Skip to content

Instantly share code, notes, and snippets.

@mikedfunk
Created September 26, 2014 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikedfunk/410276e0f6cbebd4c451 to your computer and use it in GitHub Desktop.
Save mikedfunk/410276e0f6cbebd4c451 to your computer and use it in GitHub Desktop.
View presenter pros/cons

View Presenter pros/cons

Pros Cons
πŸ‘ Makes large views readable as to what they contain πŸ‘Ž If you want to change text and it's all in one view, just ctrl-f for it and change the text. If it's in sub-views, you first have to find which view fragment it resides in before you change it. The frustration of this IMHO outweighs the simplicity of knowing what's going on in the master view
πŸ‘ Allows you to reuse sections of code with different parameters (this is only helpful if you plan on reusing the abstracted code) πŸ‘Ž When you abstract segments that are only being used in one place, it adds unnecessary complexity and processing requirements.
πŸ‘Ž Dealing with an extra closing div is a nightmare. Now you have to go through each @included file and find the extra .
πŸ‘Ž Indentation adjustment is a pain in the ass because you have to match child file indentation to be one more than the parent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment