Giter Site home page Giter Site logo

rodolfopeixoto / mvc-components-refactoring-in-rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rubygarage/mvc-components-refactoring-in-rails

0.0 1.0 0.0 12 KB

Code examples of MVC components refactoring in Rails from RubyGarage to SitePoint

Ruby 82.77% HTML 17.23%

mvc-components-refactoring-in-rails's Introduction

How to Refactor MVC Components in Rails?

In the article How to Make MVC Components Skinny in Rails we defined a concrete purpose of each component, what's happening with code when it starts containing redundant logic, and finally figured out the solution that helps make code clear and concise. This solution is refactoring.

Having the solution defined we specified the tools (design patterns) to aid us in the refactoring process, including:

  1. Service Objects (and Interactor Objects)
  2. Value Objects
  3. Form Objects
  4. Query Objects
  5. View Object (Serializer/Presenter)
  6. Policy Objects
  7. Decorators

So, this repo contains specific code examples that represents these seven design patterns for MVC refactoring. To see each design pattern in work you can read the article "7 Design Patterns to Refactor MVC Components in Rails" written for SitePoint.

mvc-components-refactoring-in-rails's People

Contributors

sparrow avatar

Watchers

Rodolfo Peixoto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.