The more I read about building apps entirely in packages, the more it seems the correct way to go. There seems to be quite a few ppl talking about it
- http://www.manuel-schoebel.com/blog/meteorjs-package-only-app-structure-with-mediator-pattern
- Is packages-for-everything the solution to all Meteor problems?
- http://meteor.redandivory.com/#/6/1
- and during yesterday’s dev shop live stream the iHealth dev spoke about how all of their projects are built entirely in packages
Obviously being able to declare dependencies explicitly, control load order, and not pollute the global namespace is all great, but I’d like to hear from you people who are developing in this pattern what your approaches are. There are a couple different ways I’ve seen
- put all app code in packages, such as what Telescope is doing https://github.com/TelescopeJS/Telescope
- put all reusable code in packages, but keep app-specific code outside of packages. this seems to be what RocketChat is doing https://github.com/RocketChat/Rocket.Chat
This is a topic that seems to be gaining momentum as the “correct” approach for large-scale or enterprise grade applications, but the amount of writings out there describing how to do it properly and what all the advantages are is still little to none. Every book and guide I’ve seen doesn’t teach in this manner, so let’s talk about it and maybe get a reference going for newcomers who aren’t so familiar with the package-everything method.
So what’s your approach, and why do you think it’s the right way to go? How do you manage separating app-specific code from reusable code? What problems have you encountered?