MaglevRubyConf Argentina 2012        Hernán Wilkinson                     Twitter: @HernanWilkinson               Blog: ob...
What is the presentation about
Common WebApp Architecture
Common WebApp Architecture
IssuesCode vs. DataObject vs. Data
IssuesParadigm Mismatch  (Need a translator)
Issues          Design Errors• Forced by the ORM• Thinking in tables not in objects• Difficult to create test objects – Mo...
Issues    More time to run!• Tests run slow!• Starting can take minutes due to  ActiveRecord!
Therefore…   More “Human” TimeBigger Development Cost
Imagine…
Imagine…
MaglevA…  –   Transactional  –   Automatically persisted  –   Multi-VM  –   NO RAM restricted… Object Server
Maglev• Two Modes: – Transient mode (normal ruby) – Persistent mode – The really interesting   one!   • Objects are natura...
Example!• Investment Accounts  – Balance:     • 10 pesos + 5 dollars     • 3000 bodens2012 + 600 futureDollarJan2013• Port...
Goals1. No Object-To-RDB Mapping  –   No Portfolio < ActiveRecord  –   No id2. No SQL SELECT…3. No save! or update!4. Sepa...
Fulfilling Goals…•    No Object-To-RDB Mapping    –   No Portfolio < ActiveRecord    –   No id•    No SQL SELECT
Account Hierarchy
AccountTransaction Hierarchy
Measure Hierarchy
Fulfilling Goals…• No Model to Web Framework coupling
PortfolioSystem andPortfolioSinatraApplication
Fulfilling Goals…• No save! or update!• Separation of concern  – No transactional code mixed with model    code
Showing the home page
Adding an Account
FREEDOM!!!
Conclusions•   Just Objects!•   No ORM! No SQL! No ActiveRecord! •   Tests run fast•   Developed really fast•   No need f...
ConclusionsSimpler EasierCheaper   …Happier
Maglev• Install with: rvm install maglev• Ruby 1.8.7• Rails:  – No scaffolding when using just objects  – Need to write ge...
FuturologyRelational Databases will fall in less than                10 years
•   Diseño Avanzado de Softaware con Objetos I:    29 de Octubre•   Metaprogramación con Lenguajes de Objetos:    13 de No...
Smalltalks 2012
Questions?
Muchas gracias!info@10pines.com        Argentinawww.10Pines.com                        Tel.: +54 (11) 6091-3125twitter: @1...
Maglev-A different way to develop with Ruby
Maglev-A different way to develop with Ruby
Maglev-A different way to develop with Ruby
Maglev-A different way to develop with Ruby
Upcoming SlideShare
Loading in...5
×

Maglev-A different way to develop with Ruby

786

Published on

These are the slides of the Maglev presentation I gave at @RubyConfAr 2012
The code of the example is in github

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
786
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Maglev-A different way to develop with Ruby

  1. 1. MaglevRubyConf Argentina 2012 Hernán Wilkinson Twitter: @HernanWilkinson Blog: objectmodels.blogspot.com www.10pines.com agile software development & services
  2. 2. What is the presentation about
  3. 3. Common WebApp Architecture
  4. 4. Common WebApp Architecture
  5. 5. IssuesCode vs. DataObject vs. Data
  6. 6. IssuesParadigm Mismatch (Need a translator)
  7. 7. Issues Design Errors• Forced by the ORM• Thinking in tables not in objects• Difficult to create test objects – Mock abuse!• etc
  8. 8. Issues More time to run!• Tests run slow!• Starting can take minutes due to ActiveRecord!
  9. 9. Therefore… More “Human” TimeBigger Development Cost
  10. 10. Imagine…
  11. 11. Imagine…
  12. 12. MaglevA… – Transactional – Automatically persisted – Multi-VM – NO RAM restricted… Object Server
  13. 13. Maglev• Two Modes: – Transient mode (normal ruby) – Persistent mode – The really interesting one! • Objects are naturally persistent • On Commit, saves transitive closure from a root object • Transactional memory! (no deadlocks)
  14. 14. Example!• Investment Accounts – Balance: • 10 pesos + 5 dollars • 3000 bodens2012 + 600 futureDollarJan2013• Portfolios – Account composite• Multiple Web Interface – Sinatra (simple ) – Rails• Using TDD!
  15. 15. Goals1. No Object-To-RDB Mapping – No Portfolio < ActiveRecord – No id2. No SQL SELECT…3. No save! or update!4. Separation of concern – No transactional code mixed with model code5. No Model to Web Framework coupling6. Only Objects!7. Development using TDD
  16. 16. Fulfilling Goals…• No Object-To-RDB Mapping – No Portfolio < ActiveRecord – No id• No SQL SELECT
  17. 17. Account Hierarchy
  18. 18. AccountTransaction Hierarchy
  19. 19. Measure Hierarchy
  20. 20. Fulfilling Goals…• No Model to Web Framework coupling
  21. 21. PortfolioSystem andPortfolioSinatraApplication
  22. 22. Fulfilling Goals…• No save! or update!• Separation of concern – No transactional code mixed with model code
  23. 23. Showing the home page
  24. 24. Adding an Account
  25. 25. FREEDOM!!!
  26. 26. Conclusions• Just Objects!• No ORM! No SQL! No ActiveRecord! • Tests run fast• Developed really fast• No need for mocks! – Bye bye FactoryGirl!• We did not have to worry about – Persistence – Transaccionability – Solved in one place
  27. 27. ConclusionsSimpler EasierCheaper …Happier
  28. 28. Maglev• Install with: rvm install maglev• Ruby 1.8.7• Rails: – No scaffolding when using just objects – Need to write generators• Heroku??• Licence – Ruby code open source – VM is not open source
  29. 29. FuturologyRelational Databases will fall in less than 10 years
  30. 30. • Diseño Avanzado de Softaware con Objetos I: 29 de Octubre• Metaprogramación con Lenguajes de Objetos: 13 de Noviembre• TDD: 19 de Noviembre• Diseño Avanzado de Softaware con Objetos II: 4 de Diciembre (50% de descuento si vinieron a esta conferencia!) http://www.10pines.com/content/cursos-disponibles
  31. 31. Smalltalks 2012
  32. 32. Questions?
  33. 33. Muchas gracias!info@10pines.com Argentinawww.10Pines.com Tel.: +54 (11) 6091-3125twitter: @10Pines Alem 693, 5B Buenos Aires agile software development & services
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×