Spitfire: Template Lightning Talk

3,520 views
3,356 views

Published on

Lightning talk about the new Python-based template language called Spitfire. Given at the Plone Conference 2007 in Naples, Italy by Alexander Limi — http://limi.net

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,520
On SlideShare
0
From Embeds
0
Number of Embeds
36
Actions
Shares
0
Downloads
34
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Spitfire: Template Lightning Talk

  1. 1. All Template Languages Suck Suck Suck
  2. 2. aka
  3. 3. Why another template language?
  4. 4. Because we can™
  5. 5. (Who’s “we”?)
  6. 6. Mike / YouTube
  7. 7. (f**king genius)
  8. 8. Yours truly
  9. 9. (markup obsessive)
  10. 10. Also, because
  11. 11. All Template Languages Suck Suck Suck
  12. 12. Why do they suck?
  13. 13. Let me count the ways…
  14. 14. Either they look like this
  15. 15. UGLY <p class=”<?php someClass() ?>”> <?php callSomeFunction() ?> </p>
  16. 16. Or they perform like this
  17. 18. We can do better
  18. 19. We want
  19. 20. NICE <p tal:content=”context/something”> Text goes here </p>
  20. 21. and
  21. 23. What are your current options?
  22. 24. <ul><li>TAL </li></ul><ul><li>Genshi </li></ul><ul><li>Myghty/Mako </li></ul><ul><li>Cheetah </li></ul><ul><li>Your own </li></ul>
  23. 25. Let’s do a simple benchmark
  24. 26. Standardized test bigtable.py http ://genshi.edgewall.org/wiki/GenshiPerformance · obviously synthetic · 10×1000 table render · measures pure throughput · measures pure throughput · measures pure throughput · measures pure throughput · measures pure throughput · measures pure throughput · measures pure throughput · measures pure throughput
  25. 27. Rendering times
  26. 30. 100% Python goodness
  27. 31. Current version: Compiler: ~2000 LoC Runtime: 150 LoC Runtime: 150 LoC Runtime: 150 LoC Runtime: 150 LoC
  28. 32. Compiles templates to bytecode
  29. 33. Pluggable syntax
  30. 34. Both XML and text modes
  31. 35. Rendering times
  32. 36. Rendering times
  33. 37. Rendering times

×