need a lot of files. • It’s powerful. You can make a webapp in less than 200 lines. • Very easy to learn. • Great for hackathons and small apps with simple requirements.
for web programming languages! • Three fundamental parts: ◦ Data (model) ◦ Display (view) ◦ Logic (Controller) • These 3 parts are independent, which makes everything reusable.
the data for the view. In your HTML/CSS, you might want elements that change depending on the data. The controller is the coding logic to get that data ready. This is defining a route!
you will ever need are imported as python libraries. To handle requests, and do all that good MVC stuff, is easy. A lot of it is done for you in these libraries.
→ HTML. logic → Blackjack rules. forms → Getting user input. controllers → Linking form data and routes. initialization file → Initial parameters. tmp/ → Random junk. configuration file → Settings and passwords. server file → Running Flask app.
you’ll notice that it crashes. We’ve provided most of the work but left out the Flask and Angular controllers. Together, we’ll walk through the missing parts to flush out the application. Follow along at http://goo.gl/m6avdI
plain and the backend could be more robust. Practice your new skills by adding more features and redesigning the application. Need a help getting started? We’ve already set up Bootstrap.