$30 off During Our Annual Pro Sale. View Details »

Architecture Over Framework: Rethink Your App S...

Architecture Over Framework: Rethink Your App Structure

With the kind of maturity Rails has gained over the past few years, saying our business logic resides in app/ makes us look like we are from 2009. However, that is also a truth we are bound to, as Rails exhibits a very rigid app structure. Every app has models, views, concerns, mailers etc. However, they don't have to always be in app/views, they could be in src/authentication/templates for what it's worth.

In this talk, we'll take a typical Rails app and completely mess it up by restructuring the content. We'll fragment it in a way that is relevant to the application context. No more app/models and app/controllers and such. What we will get as a result, is a big screaming pile of fail!

But, this is a start of a new red-green-refactor cycle. We will try to make it work by changing one thing at a time, looking at one error at a time. And in the end we'll make it all work, or give up hopelessly, but with a far more understanding of the magic happening under the hood.

Swanand Pagnis

July 19, 2014
Tweet

More Decks by Swanand Pagnis

Other Decks in Programming

Transcript

  1. Tweet@_swanand GitHub@swanandp StackOverflow@18678 Build { Simplero } [email protected] Ruby, Clojure,

    Lisp, Rails, Android, Emacs, TextMate, RubyMine, Minitest, MySQL, Zsh, Curl, Gmail, Hadoop, Mavericks, Solarized, Retina-MBP, Nexus 5 Oscar Wilde, Robert Jordan, J K Rowling, Quentin Tarantino, Chris Nolan, Leonardo DiCaprio, Charlize Theron, Metallica, Dream Theatre, Pink Floyd
  2. ! if magic_code puts "I am in IF block" else

    puts "In ELSE block I am" end ! => I am in IF block => In ELSE block I am how?
  3. ! if fork puts "I am in IF block" else

    puts "In ELSE block I am" end ! => I am in IF block => In ELSE block I am how?
  4. –Robert Martin “This is good for DHH; but not So

    good for you.” http://www.confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years
  5. Looking Back File structure (Load Path) Const lookups (Auto Loads)

    View Paths (Namespacing) Helper Paths (Railties)