building a reddit clone from the ground up
TRANSCRIPT
![Page 2: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/2.jpg)
Agenda
• Food
• Intro to web apps
• Overview of Flask
• Code
• Questions
• Special questions
![Page 3: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/3.jpg)
Web App Basics - MVC
![Page 4: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/4.jpg)
![Page 5: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/5.jpg)
Web App Basics - HTTP
• HTTP GET - retrieve a specified resource
• HTTP POST - submit data to be processed by a
specified resource
• e.g Pulling up FB newsfeed vs posting a status
![Page 6: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/6.jpg)
Why Flask?
• Open source micro-framework
• Super easy to use
![Page 7: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/7.jpg)
But what about {{framework}}
• Very little magic with Flask
• Bare bones
• Add in plugins as-needed
• There is a time and place for Django, RoR, etc.
![Page 8: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/8.jpg)
Flask, what is it good for?
• Beginners
• Prototyping a web app
• Building a backend API
• **Learning how web frameworks work**
![Page 9: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/9.jpg)
Reddit Clone Features
• Posts
• Upvotes/Downvotes
• Subreddits
• Comment Threads
![Page 10: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/10.jpg)
How to follow along
• https://github.com/uclaacm/teach_reddit_clone_flask
• Recording + screencast will be up soon after
• Best bet is to watch and ask questions
![Page 11: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/11.jpg)
Useful Links
• http://blog.miguelgrinberg.com/post/the-flask-mega-
tutorial-part-i-hello-world
• https://www.digitalocean.com/community/tutorials/ho
w-to-structure-large-flask-applications
![Page 12: Building a Reddit Clone from the Ground Up](https://reader036.vdocument.in/reader036/viewer/2022073102/55a928cd1a28abbd768b4769/html5/thumbnails/12.jpg)
Questions?