Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tu - flask/react

Tu - flask/react

Avatar for Đỗ Anh Tú

Đỗ Anh Tú

August 04, 2017

Other Decks in Technology

Transcript

  1. Python Hanoi Meetup #1 • Speaker: Do Anh Tu •

    Github: https://github.com/tudoanh • Blog: https://medium.com/@doanhtu • Author of bookzen.top and getlink.top • and some packages: python-facebook-bot and get_fshare • … and unemployed as fuck =))
  2. Topics • Flask • Bulma.io • RESTful API (sort of)

    • React.js (Just for fun) • Philosophy (j/k)
  3. 1.1 – What is Flask? • Flask is a Python

    web micro-framework • Homepage: http://flask.pocoo.org/ • Author: https://twitter.com/mitsuhiko • Using by: Pinterest, Uber, Twillio, Linked-in, Obama President’s team, Netflix … • So yep, flask sound like a good deal.
  4. 1.2 – Why Flask • Small • Easy to use

    • Sort learning curve • Good for small projects • Perfect fit for writing APIs (flask-restful) • Why not?
  5. 1.3 - Cons • Have no admin page • DIY

    • Not fully documented like Django
  6. 1.4 – How it works? • Quick start: http://flask.pocoo.org/docs/0.12/quickstart/ •

    Router • Static files and Templates • Render templates • Cookies & Sessions (which allows you to store information specific to a user from one request to the next) • Database
  7. 1.5 – Writing APIs • Flask-restful • https://flask- restful.readthedocs.io/en/0.3.5/quickstart.html •

    HTTP methods (used mostly) – POST – GET – PUT – DELETE • Wanna learn more about HTTP? Go here.
  8. 2 – React JS • Create by Facebook • Use

    by Facebook, Instagram, Airbnb, Uber, Twitch, Twitter etc. Full list here • Game changer • Homepage: https://facebook.github.io/react/
  9. 2.1 – React pros • Fast • A lot of

    learning resources • Huge & active community • Update constantly • Hot keywork to your CV • Can build mobile app with similar syntax
  10. 2.2 - Cons • Easy to learn, hard to expert

    • Stupid docs • Stupid npm • Not that easy • Will be replace soon • If your site does not need, so don’t
  11. 3 – Bulma.io • Great CSS Framework • Lightweight •

    No JS included • Beautiful design • Homepage: http://bulma.io/ • My project using bulma – https://bookzen.top – http://getlink.top