Skip to content

Instantly share code, notes, and snippets.

@juliankrispel
Last active December 14, 2015 02:18
Show Gist options
  • Save juliankrispel/5012097 to your computer and use it in GitHub Desktop.
Save juliankrispel/5012097 to your computer and use it in GitHub Desktop.
Thoughts on Javascript Architecture

##1 Plugins vs Modules in an MVC context

I have the impression that the general online developer-community seems to say that if you build a backbone-based application almost every UI problem can be tackled with an MV* like structure. My opinion is that for UI-development it's often more appropriate to delegate a lot of that job to a flat plugin, like a jquery plugin for example. That way you can delegate all the UI-specific code to a sepperate Module.

###Notes

  • But aren't plugins just modules, or shouldn't they structured like MVC modules? A: Depends on the complexity of the job. A lot of UI plugins/libraries would benefit from a more MVC-structured approach I believe.
  • I think there is a need for more style-standards, it would definately be a better world for frontend developers if there weren't as many different ways of doing things in Javascript. On the other hand, it's my firm believe the 'mistakes' and the vagueness inherent in the language allow for the diversity of approaches and usecases that allowed Javascript to be such a versatile language. It's used in almost any context now.

##2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment