Railsify your web                                development                                  Thomas Lundström, Softhouse ...
Agenda                    • About this session                    • 12 Practices                                          ...
About this session                                    http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 apr...
About this session                    •     Day job:                          consultant, .NET/Java                    •  ...
About this session                    • Ruby on Rails is                     • Simple                     • Productive    ...
About this session                    • This started me asking why                                           http://www.fli...
About this session                    • Answer: part practices, part Ruby                    • Can we steal the practices?...
About this session                    • Disclaimer: the practices aren’t invented in                          Rails, but t...
12 Practices                                  http://www.flickr.com/photos/kapungo/1408329358/måndag den 4 april 2011
BDD                                http://www.flickr.com/photos/fredcoree/301890340/måndag den 4 april 2011
BDD                    • Writing automated acceptance test suites                    • Focus on users’ needs              ...
BDD                    • Executable specifications                                                 http://www.flickr.com/pho...
BDD                    • .NET: Specflow/Cucumber                    • Java: JBehave/Cucumber                    • Applicati...
TDD                                http://www.flickr.com/photos/mroach/2448878900/måndag den 4 april 2011
TDD                    • We all know this, right?                    • However ... how to do it well?                     ...
TDD                    • “Build Quality In” (Deming)                    • Hands-on process that helps designing the       ...
TDD                    • TDD is an acquired skill                    • One or two in the team spearheads the              ...
MVC                            http://www.flickr.com/photos/spaceamoeba/3044883638/måndag den 4 april 2011
MVC                    • Splitting logic into (Domain) Model,View,                          Controller                    ...
MVC                    • Splitting of different types of logic                    • Known structure in your web app       ...
MVC                    • Disentangle                    • Refactor                    • Un-spaghettize                    ...
Collaborative database                        development                                http://www.flickr.com/photos/tomsa...
Collaborative database                        development                    • Easy setup of a private database           ...
Collaborative database                        development                    • Simple database refactorings               ...
Collaborative database                        development                    • Migrations                     • .NET: Migr...
App-private database                                       http://www.flickr.com/photos/evert-jan/72568626/måndag den 4 apr...
App-private database                    • Previously: devs in one team share one DB                    • Here: different p...
App-private database                          • One more degree of freedom                                                ...
App-private database                    • Long-term architectural work...                                                h...
RESTful URL:s                                   http://www.flickr.com/photos/jimg944/3202247839måndag den 4 april 2011
RESTful URL:s                    • Readable and understandable HTTP-based                          interface              ...
RESTful URL:s                    • No cognitive mismatch of App vs. URL                    • Uniform, standard interface  ...
RESTful URL:s                    • Thoughtful URL design                                              http://www.flickr.com...
Devops                               http://www.flickr.com/photos/jimg944/3123212129/måndag den 4 april 2011
Devops                    • Dev team = Ops team                    • T-shaped people                                      ...
Devops                    • Removal of Ops-Devs wall                                             http://www.flickr.com/phot...
Devops                    • Organizational change                                              http://www.flickr.com/photos...
Convention over                           configuration                                    http://www.flickr.com/photos/afor...
Convention over                           configuration                    • Minimizing the configuration                   ...
Convention over                           configuration                    • Easier to set up and use the app              ...
Convention over                           configuration                    • Remove default configuration                   ...
DRY                                http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
DRY                    • Don’t Repeat Yourself                    • Remember: not only for source code!                   ...
DRY - SASS                          .content-navigation {                            border-color: #3bbfce;               ...
DRY - SASS                          $blue: #3bbfce                          $margin: 16px                          .conten...
DRY                    • Cleaner code                                           http://www.flickr.com/photos/paulmannix/286...
DRY                    • Smart selection of tools                                                 http://www.flickr.com/pho...
Scaling out                                  http://www.flickr.com/photos/geraldford/3078861139/måndag den 4 april 2011
Scaling out                    • Don’t buy bigger servers, buy more!                                              http://w...
Scaling out                    • Cheaper scaling                                        http://www.flickr.com/photos/gerald...
Scaling out                    • Shared-nothing                    • No Session                                       http...
OSS                                http://www.flickr.com/photos/wordridden/3107810417/måndag den 4 april 2011
OSS                    • Get along with the OSS culture                    • Use & publish!                               ...
OSS                    • Publishing: developer good-will                    • Using: ready-made functionality             ...
OSS                    • Use 3rd party plugins in infrastructure                    • Harvest infrastructure              ...
Reference management                             http://www.flickr.com/photos/saragoldsmith/2896007790/måndag den 4 april 2...
Reference management                    • Structured dependency management                                          http:/...
Reference management                    • Simple and easy dependency mgmt                     • Finding                   ...
Reference management                    • Java: Maven/Ivy                    • .NET: NuGet/OpenWrap                       ...
What not to use?                    • ActiveRecord pattern                    • Scaffolds                                 ...
Thanks!                    • Thomas Lundström, Softhouse                    • thomas.lundstrom@softhouse.se               ...
Upcoming SlideShare
Loading in...5
×

Railsify your web development

1,414

Published on

My presentation on Scandinavian Developer Conference

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

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

No notes for slide

Railsify your web development

  1. 1. Railsify your web development Thomas Lundström, Softhouse @thomaslundstrom Scandinavian Developer Conference, Gothenburg April 4, 2011 http://www.flickr.com/photos/mtl_shag/320960018/måndag den 4 april 2011
  2. 2. Agenda • About this session • 12 Practices http://www.flickr.com/photos/puntodevista/84796578/måndag den 4 april 2011
  3. 3. About this session http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 april 2011
  4. 4. About this session • Day job: consultant, .NET/Java • Rails dev at night http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 april 2011
  5. 5. About this session • Ruby on Rails is • Simple • Productive • Easy http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 april 2011
  6. 6. About this session • This started me asking why http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 april 2011
  7. 7. About this session • Answer: part practices, part Ruby • Can we steal the practices? http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 april 2011
  8. 8. About this session • Disclaimer: the practices aren’t invented in Rails, but they are in the culture http://www.flickr.com/photos/78986993@N00/3335393740/måndag den 4 april 2011
  9. 9. 12 Practices http://www.flickr.com/photos/kapungo/1408329358/måndag den 4 april 2011
  10. 10. BDD http://www.flickr.com/photos/fredcoree/301890340/måndag den 4 april 2011
  11. 11. BDD • Writing automated acceptance test suites • Focus on users’ needs • Drive the outer layer (UI, Web Services, API) http://www.flickr.com/photos/fredcoree/301890340/måndag den 4 april 2011
  12. 12. BDD • Executable specifications http://www.flickr.com/photos/fredcoree/301890340/måndag den 4 april 2011
  13. 13. BDD • .NET: Specflow/Cucumber • Java: JBehave/Cucumber • Application- and tech-specific driver http://www.flickr.com/photos/fredcoree/301890340/måndag den 4 april 2011
  14. 14. TDD http://www.flickr.com/photos/mroach/2448878900/måndag den 4 april 2011
  15. 15. TDD • We all know this, right? • However ... how to do it well? http://www.flickr.com/photos/mroach/2448878900/måndag den 4 april 2011
  16. 16. TDD • “Build Quality In” (Deming) • Hands-on process that helps designing the software http://www.flickr.com/photos/mroach/2448878900/måndag den 4 april 2011
  17. 17. TDD • TDD is an acquired skill • One or two in the team spearheads the TDD drive http://www.flickr.com/photos/mroach/2448878900/måndag den 4 april 2011
  18. 18. MVC http://www.flickr.com/photos/spaceamoeba/3044883638/måndag den 4 april 2011
  19. 19. MVC • Splitting logic into (Domain) Model,View, Controller http://www.flickr.com/photos/spaceamoeba/3044883638/måndag den 4 april 2011
  20. 20. MVC • Splitting of different types of logic • Known structure in your web app http://www.flickr.com/photos/spaceamoeba/3044883638/måndag den 4 april 2011
  21. 21. MVC • Disentangle • Refactor • Un-spaghettize http://www.flickr.com/photos/spaceamoeba/3044883638/måndag den 4 april 2011
  22. 22. Collaborative database development http://www.flickr.com/photos/tomsaint/3051540613/måndag den 4 april 2011
  23. 23. Collaborative database development • Easy setup of a private database • Your structural change is yours only until committed http://www.flickr.com/photos/tomsaint/3051540613/måndag den 4 april 2011
  24. 24. Collaborative database development • Simple database refactorings • “I can’t work since the change made by John put the DB in a strange state” http://www.flickr.com/photos/tomsaint/3051540613/måndag den 4 april 2011
  25. 25. Collaborative database development • Migrations • .NET: Migrator.NET • Java: Flyway, DBDeploy, mybatis (comparison at https://code.google.com/ p/flyway/) http://www.flickr.com/photos/tomsaint/3051540613/måndag den 4 april 2011
  26. 26. App-private database http://www.flickr.com/photos/evert-jan/72568626/måndag den 4 april 2011
  27. 27. App-private database • Previously: devs in one team share one DB • Here: different products share one DB • Integration #fail http://www.flickr.com/photos/evert-jan/72568626/måndag den 4 april 2011
  28. 28. App-private database • One more degree of freedom http://www.flickr.com/photos/evert-jan/72568626/måndag den 4 april 2011
  29. 29. App-private database • Long-term architectural work... http://www.flickr.com/photos/evert-jan/72568626/måndag den 4 april 2011
  30. 30. RESTful URL:s http://www.flickr.com/photos/jimg944/3202247839måndag den 4 april 2011
  31. 31. RESTful URL:s • Readable and understandable HTTP-based interface • GET http://app.com/users/thomas/view • PUT http://app.com/users/thomas/ edit.json http://www.flickr.com/photos/jimg944/3202247839måndag den 4 april 2011
  32. 32. RESTful URL:s • No cognitive mismatch of App vs. URL • Uniform, standard interface • Stateless • Cacheable http://www.flickr.com/photos/jimg944/3202247839måndag den 4 april 2011
  33. 33. RESTful URL:s • Thoughtful URL design http://www.flickr.com/photos/jimg944/3202247839måndag den 4 april 2011
  34. 34. Devops http://www.flickr.com/photos/jimg944/3123212129/måndag den 4 april 2011
  35. 35. Devops • Dev team = Ops team • T-shaped people http://www.flickr.com/photos/jimg944/3123212129/måndag den 4 april 2011
  36. 36. Devops • Removal of Ops-Devs wall http://www.flickr.com/photos/jimg944/3123212129/måndag den 4 april 2011
  37. 37. Devops • Organizational change http://www.flickr.com/photos/jimg944/3123212129/måndag den 4 april 2011
  38. 38. Convention over configuration http://www.flickr.com/photos/aforero/339031109/måndag den 4 april 2011
  39. 39. Convention over configuration • Minimizing the configuration • Feature level/code level http://www.flickr.com/photos/aforero/339031109/måndag den 4 april 2011
  40. 40. Convention over configuration • Easier to set up and use the app http://www.flickr.com/photos/aforero/339031109/måndag den 4 april 2011
  41. 41. Convention over configuration • Remove default configuration • Take decisions! http://www.flickr.com/photos/aforero/339031109/måndag den 4 april 2011
  42. 42. DRY http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
  43. 43. DRY • Don’t Repeat Yourself • Remember: not only for source code! http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
  44. 44. DRY - SASS .content-navigation { border-color: #3bbfce; color: #2b9eab; } .border { padding: 8px; margin: 8px; border-color: #3bbfce; } http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
  45. 45. DRY - SASS $blue: #3bbfce $margin: 16px .content-navigation border-color: $blue color: darken($blue, 9%) .border padding: $margin / 2 margin: $margin / 2 border-color: $blue http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
  46. 46. DRY • Cleaner code http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
  47. 47. DRY • Smart selection of tools http://www.flickr.com/photos/paulmannix/286817119/måndag den 4 april 2011
  48. 48. Scaling out http://www.flickr.com/photos/geraldford/3078861139/måndag den 4 april 2011
  49. 49. Scaling out • Don’t buy bigger servers, buy more! http://www.flickr.com/photos/geraldford/3078861139/måndag den 4 april 2011
  50. 50. Scaling out • Cheaper scaling http://www.flickr.com/photos/geraldford/3078861139/måndag den 4 april 2011
  51. 51. Scaling out • Shared-nothing • No Session http://www.flickr.com/photos/geraldford/3078861139/måndag den 4 april 2011
  52. 52. OSS http://www.flickr.com/photos/wordridden/3107810417/måndag den 4 april 2011
  53. 53. OSS • Get along with the OSS culture • Use & publish! http://www.flickr.com/photos/wordridden/3107810417/måndag den 4 april 2011
  54. 54. OSS • Publishing: developer good-will • Using: ready-made functionality http://www.flickr.com/photos/wordridden/3107810417/måndag den 4 april 2011
  55. 55. OSS • Use 3rd party plugins in infrastructure • Harvest infrastructure • .NET devs: don’t focus on MS tools only http://www.flickr.com/photos/wordridden/3107810417/måndag den 4 april 2011
  56. 56. Reference management http://www.flickr.com/photos/saragoldsmith/2896007790/måndag den 4 april 2011
  57. 57. Reference management • Structured dependency management http://www.flickr.com/photos/saragoldsmith/2896007790/måndag den 4 april 2011
  58. 58. Reference management • Simple and easy dependency mgmt • Finding • Updating • Control of transitive deps http://www.flickr.com/photos/saragoldsmith/2896007790/måndag den 4 april 2011
  59. 59. Reference management • Java: Maven/Ivy • .NET: NuGet/OpenWrap http://www.flickr.com/photos/saragoldsmith/2896007790/måndag den 4 april 2011
  60. 60. What not to use? • ActiveRecord pattern • Scaffolds http://www.flickr.com/photos/deapeajay/2143573706/måndag den 4 april 2011
  61. 61. Thanks! • Thomas Lundström, Softhouse • thomas.lundstrom@softhouse.se • @thomaslundstrom • http://blog.thomaslundstrom.com http://www.flickr.com/photos/mtl_shag/320960018/måndag den 4 april 2011

×