Switching from PHP to Python

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    7 Favorites

    Switching from PHP to Python - Presentation Transcript

    1. Making the Switch from PHP to Python The Grass Is Always Greener Alex Ezell July 21, 2009
    2. the on e on t he left. Hi, I’m
    3. The bloodiest wars in history have been religious wars. -Richard M. Nixon
    4. Why did we change? How did we change (so far)? Would I do it all again?
    5. Why did we change?
    6. Change Is What We Do
    7. Opportunity Major push from the business for new features more often and the freedom to make that happen Team growth Stability in other areas: infrastructure, strategic planning, etc. Necessity with regards to current codebase
    8. Background Scripting Lots of background, server processes managing parts of our application Desire for code in daemon processes to more closely resemble application code Threading, threading, threading.
    9. Web Frameworks Rapid development Reuse of code Easy, powerful templating Modern database access layer with an ORM Python: Django, Pylons, TurboGears, web2py, Zope, etc. PHP: CakePHP, Solar, Symfony, Zend, etc.
    10. Internationalization PHP and Python can use gettext Framework support is easy Unicode? Python’s strict typing and encoding helps avoid confusion and mistakes f life. But I believe “Glo balization is a fact o ated its fragility.” we have underestim - Kofi Annan
    11. Developer Buy-In Stagnation with current codebase Familiarity with new tools Developer interest in a new language Shorter uptake for new hires
    12. Why Python/Django? Maturity and capability Ease of use / Low learning curve Rapid development Future of the technology Ecosystem of tools
    13. How did we change?
    14. Let’s Try To Avoid Armageddon Stop for a full rewrite and not have something compelling when you reboot No new features while the rewrite occurs Inability to really beta test new stuff Incremental transition
    15. Session Handling Let PHP continue to handle session authentication Teach Python how to read/write PHP serialization using Scott Hurring’s code: http://hurring.com/scott/code/ python/serialize/ Django has built-in memcache support, so we make PHP save sessions in memcache
    16. Database Access Moving to multi-database model Handle different types of encoding How does the speed compare? How does writing queries in Django/sqlalchemy compare to straight SQL?
    17. The Campaign Edit Example 2600 lines of code to 700 Exact same functionality including some additional stuff Number of database queries stayed close to the same Very Javascript heavy, so changes might not be as extensive as other sections
    18. Audience Main Code
    19. Get Mailings
    20. Would I do it all again?
    21. Learning a New Language Porting is bad Bad habits are easy to break in Python, though not unavoidable Python’s interactive interpreter makes tinkering easy Every developer learns in unique ways and at different rates One way to do something
    22. Framework Evaluation Who is using it and what are they doing? How does it handle legacy data? Do something with a few of them and see what fits your culture and needs What direction is the framework moving?
    23. Hindsight is 20/20 PHP frameworks (CakePHP and Symfony) have come a long way and are on par with Django The shift to sqlalchemy from the Django ORM has been problematic Django template parsing can be slow in certain situations Hiring Python developers can be tough, especially in Nashville
    24. Positives Codebase is becoming more standardized Developer energy is high Features we have implemented have turned out well and been easy to add functionality to Python’s standard library offers powerful, quality add- on modules for free Developers we have hired have been able to contribute quickly and be impactful
    25. www.wordle.net
    26. Many of us crucify ourselves between two thieves - regret for the past and fear of the future. - Fulton Oursler
    27. Contact Me Email: aezell@gmail.com Twitter: @aezell
    28. Photo Credits Nixon - BusinessWeek: http://images.businessweek.com/ss/07/04/0426_dow/ source/5.htm Change - http://www.flickr.com/photos/spursfan_ace/2328879637/ Kofi Annan - http://www.gambianow.com/news/Open-Forum/Have-Your-Say/ Many_Give_Annan_High_Marks_as_UN_Chief_Despite_Flaws.html Butterflies - http://21stcenturylearning.typepad.com/blog/2009/01/why- change.html Winehouse - http://jezebel.com/5247714/amys-comeback-gig-is-a-total-disaster Sad boy - http://www.psychologytoday.com/blog/ulterior-motives/200806/will-i- regret-it-in-the-morning-how-about-when-im-64
    29. Resources Doug Hellman’s PyMOTW: http:// www.doughellmann.com/PyMOTW/ effbot.org’s articles: http://effbot.org/zone/ PythonVsPHP: http://wiki.python.org/moin/ PythonVsPhp Mark Pilgrim’s Dive into Python Python’s own tutorial: http://docs.python.org/tutorial/

    + aezellaezell, 4 months ago

    custom

    1460 views, 7 favs, 2 embeds more stats

    A discussion of why and how we switched platforms f more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1460
      • 1458 on SlideShare
      • 2 from embeds
    • Comments 0
    • Favorites 7
    • Downloads 83
    Most viewed embeds
    • 1 views on http://www.slideshare.net
    • 1 views on http://python.rk.edu.pl

    more

    All embeds
    • 1 views on http://www.slideshare.net
    • 1 views on http://python.rk.edu.pl

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories