Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Architecting Rails Apps

Avatar for Iago Dahlem Lorensini Iago Dahlem Lorensini
December 10, 2018
290

Architecting Rails Apps

Avatar for Iago Dahlem Lorensini

Iago Dahlem Lorensini

December 10, 2018
Tweet

Transcript

  1. IAGO DAHLEM IAGO DAHLEM Passionate about web and it's ecossystem

    JavaScript Addicted (also like Ruby) Software Developer at Codeminer 42 Florianópolis
  2. THE BAD RAILS THE BAD RAILS Built on top of

    MVC Changes affects other parts of the app Top level structure screams the web framework We don't know what it does
  3. WHAT IS ARCHITECTURE WHAT IS ARCHITECTURE ANYWAY?! ANYWAY?! Independent of

    technology/framework Makes software easier to change and test
  4. DOMAIN LAYER DOMAIN LAYER Entities and business Rules Used by

    the application layer to de ne use cases Examples: User, Article
  5. APPLICATION LAYER APPLICATION LAYER Use cases and actual behavior Interacts

    with Domain units Adapts the Infrastructure Layer Examples: CreateUser, CreateArticle
  6. INFRASTRUCTURE LAYER INFRASTRUCTURE LAYER Interacts with the external world of

    the application The lowest of them Databases, email services, external APIs Examples: UserRepository, MailChimpService, ArticlesService
  7. INPUT LAYER INPUT LAYER The entry point Should only receives

    user input Returns a response to the user Controllers, CLIs, WebSockets, GUIs Examples: UsersController, ArticlesController
  8. SUMMARIZING SUMMARIZING Keep it simple You don't need to use

    everything Find what works better for and your business Make it fun