Agile web dev with Pyhon

D1804d3c315cbb850aaa88d2fbadc3cf?s=47 Keith Yang
January 13, 2013

Agile web dev with Pyhon

A presentation for WebConf Taiwan 2013

D1804d3c315cbb850aaa88d2fbadc3cf?s=128

Keith Yang

January 13, 2013
Tweet

Transcript

  1. Agile web dev with Python a presentation by Keith Yang

    for WebConf Taiwan 2013 @keitheis http://quest.keitheis.org/
  2. WebConf.TW 2013 How to learn Python from zero to web

    development? A question on programmers.stackexchange.com
  3. WebConf.TW 2013 How to learn Python from zero to web

    development? A question on programmers.stackexchange.com
  4. WebConf.TW 2013 How to learn Python from zero to web

    development? A question on programmers.stackexchange.com Just go over 14 tutorials.
  5. WebConf.TW 2013 THAT simple, Dear.

  6. WebConf.TW 2013 T^T simple, Tear.

  7. WebConf.TW 2013 T^T simple, Tear. (括號:哭哭)

  8. WebConf.TW 2013 Any one who likes Ruby or PHP ?

  9. WebConf.TW 2013 Hold on

  10. WebConf.TW 2013 It’s not that easier for any_language in web_development

  11. WebConf.TW 2013 Then, how can we make it better?

  12. WebConf.TW 2013 Good is meant to be chosen that’s why

    we’re here.
  13. WebConf.TW 2013 Choosing good... • Language • Framework • Library

    • Application • Methodology • Architecture • Team • Organization
  14. WebConf.TW 2013 >>> assert True or False We’re interested: Agile

    Web Python
  15. WebConf.TW 2013 >>> assert True or False We’re interested: Agile

    Web Python Taiwan
  16. WebConf.TW 2013 >>> assert True and False Traceback (most recent

    call last): File "<stdin>", line 1, in <module> AssertionError Traceback (most recent call last): File "<stdin>", line 1, in <module> AssertionError
  17. WebConf.TW 2013 >>> assert True and False Traceback (most recent

    call last): File "<stdin>", line 1, in <module> AssertionError Traceback (most recent call last): File "<stdin>", line 1, in <module> AssertionError raise Exception quickly.
  18. WebConf.TW 2013 Exception You can choose not to raise it

    now, you will be !ne except it may come to visit you often, sometimes secretly.
  19. WebConf.TW 2013 Keith Yang architect.py at biideal yet another di"erent

    e-commerce provider Taipei.py organizer PyCon Taiwan sta"
  20. WebConf.TW 2013 Keith Yang architect.py at biideal yet another di"erent

    e-commerce provider Taipei.py organizer PyCon Taiwan sta" 2012 2013 ...
  21. WebConf.TW 2013 Monthly meeting Python user group in Taipei Taipei.py

  22. WebConf.TW 2013 We’re using Python And not just us. Python

    has been popular in parts of the startups
  23. WebConf.TW 2013 We’re using Python And not just us. Python

    has been popular in parts of the startups Instagram, FriendFeed, ... how Facebook [like] it
  24. WebConf.TW 2013 Looking for good

  25. WebConf.TW 2013 Looking for good

  26. WebConf.TW 2013 Looking for good Coder Dev Ops

  27. WebConf.TW 2013 The best agile toolkit for Python web dev?

  28. WebConf.TW 2013 Python itself. Yeah, you know the secret...

  29. WebConf.TW 2013 Python itself. Yeah, you know the secret...

  30. WebConf.TW 2013 “Nobody got !red for choosing Python”

  31. WebConf.TW 2013 “Nobody got !red for choosing Python” not me,

    not yet
  32. WebConf.TW 2013 Python is good by people who is using

    it
  33. WebConf.TW 2013 Python is good by people who is using

    it be careful with magic project that supports injection of apps, plugins, extensions
  34. WebConf.TW 2013 “Simple, Stupid Language”

  35. WebConf.TW 2013 “Simple, Stupid Language” Not much surprise Not much

    magic No all day debug of $%@!? variables
  36. WebConf.TW 2013 It practices elegance Rethink code in hands. Just

    do it
  37. WebConf.TW 2013 It practices elegance Rethink code in hands. Just

    do it better.
  38. WebConf.TW 2013 Web Toolkits Most popular one v.s. My opinionated

    one v.s. Alternatives
  39. WebConf.TW 2013 Web Frameworks of Python ... lots • Django

    • Pyramid • Flask • Tornado • Web2py, Turbogears, bottle.py, ...
  40. WebConf.TW 2013 Web Frameworks of Python ... lots • Django

    • Pyramid • Flask • Tornado • Web2py, Turbogears, bottle.py, ... ALL AGILE!
  41. WebConf.TW 2013 Web Frameworks of Python ... lots • Django

    • Pyramid • Flask • Tornado • Web2py, Turbogears, bottle.py, ... ALL AGILE! Ready for RESTful
  42. WebConf.TW 2013 As long as you know PEP 8 or

    The Hitchhiker’s Guide to Python!
  43. WebConf.TW 2013 As long as you know PEP 8 or

    The Hitchhiker’s Guide to Python! Good style to follow
  44. WebConf.TW 2013 Code Indention from the very beginning. Seems that

    Co"eeScript loves it.
  45. WebConf.TW 2013 It’s important You can make choice between several

    well developed choices. Not just ONE there.
  46. WebConf.TW 2013 How to pick a web framework from “Just

    pick a good one.” to “I’ve compared EVERYTHING.”
  47. WebConf.TW 2013 How to pick a web framework Goal Scale

    Resources
  48. WebConf.TW 2013 How to pick a web framework Goal: Blog,

    Wiki, EC Platform Scale: Personal, Studio, Company, Enterprise Resources: Schedule, Support
  49. WebConf.TW 2013 How to pick a web framework Micro: bottle.py

    Mini: Flask by Armin Ronacher by Marcel Hellkamp
  50. WebConf.TW 2013 How to pick a web framework Micro: bottle.py

    Mini: Flask Middle: Django, Pyramid, web2py by Armin Ronacher by Marcel Hellkamp
  51. WebConf.TW 2013 How to pick a web framework Micro: bottle.py

    Mini: Flask Middle: Django, Pyramid, web2py Other: you’ll know what you want. by Armin Ronacher by Marcel Hellkamp
  52. WebConf.TW 2013 What Makes Pyramid Unique Single-!le applications Decorator-based con!g

    URL generation Debug Toolbar Add-ons Class-based and function-based views Asset speci!cations Extensible templating Event system No any “mutable globals” Transaction management
  53. WebConf.TW 2013 What Makes Pyramid Unique Single-!le applications Decorator-based con!g

    URL generation Debug Toolbar Add-ons Class-based and function-based views Asset speci!cations Extensible templating Event system No any “mutable globals” Transaction management Lots more!
  54. WebConf.TW 2013 How to setup environment virtualenv + pip Search:

    “keitheis pip” for my tutorial
  55. WebConf.TW 2013 Documentation by Georg Brandl.

  56. WebConf.TW 2013

  57. WebConf.TW 2013 Object-Relational Mapping •SQLAlchemy unless you’re using Django ORM

    or web2py DAL • You might also be interested in: MongoKit structured schema and validation layer
  58. WebConf.TW 2013 Template •Mako or Jinja2 unless you’re using Django

    Template • You might also be interested in: Plim “a Python port of Ruby’s Slim template language built on top of the Mako Templates”
  59. WebConf.TW 2013 Manage Web Assets “webassets - Asset management for

    Python” • with Django • with Flask • with Pyramid • other or no framework
  60. WebConf.TW 2013 Do it later Celery asynchronous task queue/job queue

    based on distributed message passing
  61. WebConf.TW 2013 Testing •Nosetests (Django-nose?) • You might also be

    interested in: pytest more powerful, detail, #exible and complex
  62. WebConf.TW 2013 Coding tool •Sublime Text 2 powered by Python

    •PyDev more powerful, detail, #exible and complex • Lots... Emacs, Vim, ...
  63. WebConf.TW 2013 Coding tool •Sublime Text 2 powered by Python

    •PyDev more powerful, detail, #exible and complex • Lots... Emacs, Vim, ...
  64. WebConf.TW 2013 Deployment •Fabric + cuisine Server(s) administration in Python

    • You might also be interested in: Plumbum di"erent style... # sudo[ls["-l", "-a"]] by Christian Vest Hansen and Jeffrey E. Forcier. by Sebastien Pierre by Tomer Filiba
  65. WebConf.TW 2013 Fabric + cuisine def restart_service(service_name, time_interval=1): stop_service(service_name) time.sleep(time_interval)

    # Avoid time attack start_service(service_name) def stop_service(service_name): return sudo( 'service {service_name} stop'.format( service_name=service_name)) def start_service(service_name): return sudo( 'service {service_name} start'.format( service_name=service_name))
  66. WebConf.TW 2013 Process Management •Supervisor monitor and control a number

    of processes on UNIX-like operating systems. • You might also be interested in: Circus.io process & socket manager. by Agendaless by Mozilla
  67. WebConf.TW 2013 Powerful Data Computing If you’re going to have

    numbers, you won’t hope to learn one more language for statistic and analysis.
  68. WebConf.TW 2013 Python User Group in Taiwan Communities: PyHUG #

     Taipei.py # 
  69. WebConf.TW 2013 Python User Group in Taiwan Communities: PyHUG #

     Taipei.py #  Yilan, Tainan, Kaohsiung, Kinmen, ... #
  70. WebConf.TW 2013 PyCon Taiwan 2013 after PyCon.TW 2012 fantasy #

     tw.pycon.org
  71. WebConf.TW 2013 PyCon Taiwan 2013 after PyCon.TW 2012 fantasy #

     Call for Proposals tw.pycon.org
  72. WebConf.TW 2013 PyCon Taiwan 2013 after PyCon.TW 2012 fantasy #

     Call for Proposals and Sponsorship tw.pycon.org
  73. WebConf.TW 2013 Be agile but not scrumover#ow

  74. WebConf.TW 2013 Choose good

  75. WebConf.TW 2013 Some Fun Demo? % python Python 2.7.2 (default,

    Jun 20 2012, 16:23:33) Type "help", "copyright", "credits" or "license" for more information. >>> import this
  76. WebConf.TW 2013 Q & A