Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
ORM: Object-relational mapping
Next
Download to read offline and view in fullscreen.

6

Share

Download to read offline

Why not ORM

Download to read offline

What do you need to keep in mind when using ORM, how it will affect your needs and what are the disadvantages of using and advantages of not using ORM.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Why not ORM

  1. 1. Why not ORM? Michal Špaček, Skype; WebExpo 2010 , Prague
  2. 2. OMGWTF ORM ?
  3. 3. O bject- R elational M apping !
  4. 4. ORM, SRSLY ?
  5. 5. PHP/ORM guru , anyone ? <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  6. 6. ORM… … maps relational databases to objects says František Tröster
  7. 7. ORM… … maps relational databases to objects says František Tröster … maps objects to relational databases says Jiří Knesl
  8. 8. ORM… … maps relational databases to objects says František Tröster … maps objects to relational databases says Jiří Knesl … is a technique for converting data between incompatible type systems in OOP languages says Wiki Pedia
  9. 9. ORM is like …
  10. 10. … TDD
  11. 11. Best thing since sliced bread . Or maybe not .
  12. 12. ORM is said to allow the database systems swap „ on the fly “…
  13. 13. <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  14. 14. … , but have anyone seen it, ever ?
  15. 15. Most of the times you'll end up changing bunch of other things too, so it's not that easy as it might seem .
  16. 16. When your O/R mapper goes bananas …
  17. 17. ORM expert <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  18. 18. Database system expert <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  19. 19. Using ORM and want to refactor relations ?
  20. 20. Do it, pretty please, but you have to refactor code too…
  21. 21. … and you need to deploy all the changed stuff at once !
  22. 22. And what about accessing one database with several technologies? <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  23. 23. Put your business logic into the database !
  24. 26. Issues solved ( all of them) <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  25. 27. Database code can be tested separately from the rest of the code
  26. 28. Application code tests do not need a connection to the database
  27. 29. Forget explicit transactions ( BEGIN & COMMIT ) if you can has your codes wrapped in functions
  28. 30. You'll get …
  29. 31. Nice connection pooling <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  30. 32. Every query can be executed on different machine
  31. 33. Add proxies… <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  32. 34. … and get high performance clusters <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  33. 36. Because we got no transactions
  34. 37. Teams of database developers and admins …
  35. 38. … can monitor functions and their performance
  36. 39. … can redirect functions to be executed in different database when something goes horribly wrong
  37. 40. … are generally useless while using ORM http://www.xkcd.com/303/ ORM, DUDE!
  38. 41. While without ORM …
  39. 42. … everything's possible! <ul>2010 © Skype – As seen on TV </ul><ul>Slide </ul>
  40. 43. Will YOU stop using ORM?
  41. 44. Problems summarized : <ul><li>getting external help
  42. 45. refactoring relations
  43. 46. multiple technologies
  44. 47. tricky testing
  45. 48. inefficient connection pooling
  46. 49. admins are hopeless, if any
  47. 50. performance monitoring and control </li></ul>
  48. 51. <ul>Thanks for listening Michal Špaček Skype: spazef0rze ; Twitter: @ spazef0rze BTW, we're hiring: jobs.skype.com/cz </ul>
  • TryCatchFinal

    Apr. 16, 2016
  • michaljankovsky

    Apr. 13, 2015
  • Junkm4n

    Apr. 27, 2013
  • MaryElizabethSullivan1

    Jan. 23, 2012
  • yngyani

    Aug. 23, 2011
  • messacz

    Sep. 25, 2010

What do you need to keep in mind when using ORM, how it will affect your needs and what are the disadvantages of using and advantages of not using ORM.

Views

Total views

8,207

On Slideshare

0

From embeds

0

Number of embeds

1,409

Actions

Downloads

70

Shares

0

Comments

0

Likes

6

×