Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Performance is not related to your arguments; they are about project organization.</p> <blockquote> <p>Maximum part of the business logic are moved to helper</p> </blockquote> <p>This shouldn't happen, you should move the business (aka models) logic inside the models. Rails doesn't force you doing it, so keeping the logic organization is up to developers.</p> <blockquote> <p>Models are used only for validation</p> </blockquote> <p>This is a consequence of putting the business (aka models) logic outside the models. You should move it from the controllers/helpers to the models. Again, Rails doesn't force you to do that, so it's up to developers to do it.</p> <blockquote> <p>Included all helper files in a module under lib directory and included that module in application controller.</p> <p>In many methods, no argument passed, instead they used the instance variable(create instance variable in calling method and use that instance variable in the called method).</p> <p>Each action will call a helper method to execute business logic and that method will call some other helper methods.</p> <p>All method are written as public, No protected and private method.</p> </blockquote> <p>I think that these points are (some more, some less) related to the Rails Helper design. One flaw of Rails is the Helper design: they go against the OO pattern and usually end up by being a bunch of unorganized functions, <i>à la</i> PHP.</p> <p>For this reason some people use Decorators. Decorators "add an OO layer of presentation logic" (from <a href="https://github.com/drapergem/draper" rel="nofollow">Draper</a>), allowing to organize better the view related methods.</p> <p>If you want to examine the argument, I suggest you the following links:</p> <ul> <li><a href="https://www.google.com/search?q=rails+decorator" rel="nofollow">Google search about decorators</a></li> <li><a href="https://github.com/drapergem/draper" rel="nofollow">Draper</a></li> <li><a href="https://www.ruby-toolbox.com/categories/rails_presenters" rel="nofollow">The Ruby Toolbox, presenters category</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload