Django on Jython, PyCon 2009

2,169 views

Published on

Django on Jython presentation, featuring a prototype for a Django IDE, on top of Eclipse/PyDev

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,169
On SlideShare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
46
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • http://www.flickr.com/photos/purpleslog/231478071
  • http://www.flickr.com/photos/21054697@N03/2053923652
  • http://www.flickr.com/photos/21054697@N03/2053923652
  • http://www.flickr.com/photos/vicintosh87/2618725412/
  • http://www.flickr.com/photos/purpleslog/231478071
  • http://www.flickr.com/photos/purpleslog/231478071
  • http://www.flickr.com/photos/dipster1/1403240351
  • Django on Jython, PyCon 2009

    1. 1. Django on Jython <ul><li>Jim Baker </li></ul><ul><li>Leo Soto </li></ul>
    2. 2. Jython Status
    3. 3. Shipped 2.5 (beta3)
    4. 4. Greatly improved “compatibility”
    5. 5. setuptools
    6. 6. virtualenv
    7. 7. nose
    8. 8. etree
    9. 11. web 2 py
    10. 14. Django + Jython: Why?
    11. 15. Installing this Django app...
    12. 16. ...in an Enterprise Infrastructure
    13. 17. (I mean, this kind of enterprise infrastructure)
    14. 18. Didn't work quite well
    15. 19. Guess how much time it took
    16. 20. We like Python They need Java
    17. 21. Jython
    18. 22. Avoiding Java Sneaking Python Is that it?
    19. 23. No, it is more than that! (if you want)
    20. 24. Examples...
    21. 25. <ul><li>Python/Django </li></ul><ul><li>Install Django </li></ul><ul><li>Install 3rd party deps </li></ul><ul><li>Install app(s) </li></ul><ul><li>Tweak settings.py </li></ul><ul><li>Configure web server </li></ul><ul><li>Make sure everything is consistent </li></ul>Steps to Deploy a Web Application
    22. 26. <ul><li>Java </li></ul><ul><li>Copy/upload WAR package </li></ul>Steps to Deploy a Web Application
    23. 27. Java libs can eat complex Excel data!
    24. 28. We can reuse what's good on the Java ecosystem!
    25. 29. Django + Jython: Architecture
    26. 30. The cool side of Java <ul><li>System Programming </li></ul><ul><li>Concurrency Model </li></ul><ul><li>Memory Model </li></ul>
    27. 31. <ul><ul><li>$ jython2.5 </li></ul></ul><ul><ul><li>... </li></ul></ul><ul><ul><li>>>> from __future__ import GIL </li></ul></ul>
    28. 32. <ul><ul><li>$ jython2.5 </li></ul></ul><ul><ul><li>... </li></ul></ul><ul><ul><li>>>> from __future__ import GIL </li></ul></ul><ul><ul><li>Traceback (most recent call last): (no code object) at line 0 File &quot;<stdin>&quot;, line 1 </li></ul></ul><ul><ul><li>SyntaxError: </li></ul></ul><ul><ul><li>Never going to happen! </li></ul></ul>
    29. 33. On the other hand...
    30. 34. J2EE was a big, horrible mistake
    31. 35. The right tool for the right job!
    32. 36. Java : Performance, Heavy lifting, Pre-existing infrastructure
    33. 37. Jython : Everything else :)
    34. 38. Deployment
    35. 39. App Servers: Already there, lots of features
    36. 40. Let's use their force! http://flickr.com/photos/tomloudon/322172413/sizes/l/
    37. 41. Deployment Options <ul><li>Java app servers - show some horizontal scaling; also management - sys admins know how to do this! </li></ul><ul><li>Hardened - it runs on the JVM </li></ul>
    38. 42. vs Google App Engine <ul><li>It’s Django 1.0 </li></ul><ul><li>We have Unicode, internationalization, ORM, unit tests, admin, shell, everything! </li></ul><ul><li>And we can use Java analogues: </li></ul><ul><ul><li>BigTable <=> HBase, Hypertable </li></ul></ul><ul><ul><li>MapReduce <=> Hadoop </li></ul></ul>Add pictures for app engine, HBase, Hadoop
    39. 43. WAR! <ul><li>Web ARchive format </li></ul><ul><ul><li>Standard deployment for Java app servers </li></ul></ul><ul><ul><li>Just a bunch of files with a standard directory layout and manifest </li></ul></ul>
    40. 44. <ul><li>$ jython manage.py war </li></ul><ul><li>--include-java-libs=jdbcdriver.jar </li></ul>
    41. 45. 100% self-contained!
    42. 46. WAR format for DoJ <ul><li>|-- WEB-INF </li></ul><ul><li>| |-- lib </li></ul><ul><li>| `-- lib-python </li></ul><ul><li>| |-- Lib </li></ul><ul><li>| |-- django </li></ul><ul><li>| |-- doj </li></ul><ul><li>| `-- mysite </li></ul><ul><li>`-- media </li></ul>super simple bundling!
    43. 47. IDE Integration
    44. 48. Again, why?
    45. 49. Quick Start!
    46. 50. Let People Explore
    47. 51. Re-factoring
    48. 52. One place to rule them all
    49. 53. Let see how that'd be with Django...
    50. 54. Demo
    51. 55. Summary
    52. 56. Questions?
    53. 57. Thanks! Jim's Blog: http://www.zyasoft.com/pythoneering/ Leo's Blog: http://blog.leosoto.com Twitter: jimbaker, leosoto
    54. 58. <ul><li>http://www.flickr.com/photos/purpleslog/231478071 </li></ul><ul><li>http://www.flickr.com/photos/21054697@N03/2053923652 </li></ul><ul><li>http://www.flickr.com/photos/vicintosh87/2618725412 </li></ul><ul><li>http://www.flickr.com/photos/dipster1/1403240351 </li></ul>Images used under CC license

    ×