deftjs / DeftJS

Extensions for Large-Scale Sencha Touch and Ext JS Applications
http://deftjs.org/
MIT License
285 stars 56 forks source link

Distribute packages separately. #114

Closed demee closed 11 years ago

demee commented 11 years ago

Hi Folks,

I think it would be nice if you were distributing your packages separately. I need just Deffered functionality, not everything else, but I cannot bring it in to my app on it's own which basically stops me from using your lib.

Regards Slawek.

brian428 commented 11 years ago

Is there some reason you can't just pull in the Deft JS package and use only the Promises functionality? I'm not sure I understand what the issue would be with doing that.

I imagine splitting things up is possible but it's probably not high on John's list at the moment. I'm also not sure if there's a way to specify transitive package dependencies, or if this would force people to pull in both packages themselves. And finally, I don't think there are major dependencies from the Promises classes to other classes, but there are probably at least a few. So properly splitting them up would likely be a bit more work than it may seem initially.

johnyanarella commented 11 years ago

Hey Slawek,

Thanks for writing to voice your concern.

The Deft.promise.Deferred and Deft.promise.Promise classes do not depend on the classes used for the IoC or MVC features. While the Deft JS brand (and project) bundles a number of features useful for large-scale application development, one of our design goals has been to limit unnecessary interdependencies and make it possible for developers to use those features in isolation.

How are you building your production applications? Are you using Sencha Cmd or the older Sencha SDK tools?

I assume by "package" you are referring to the deft.js or deft-debug.js files in the build directory (which will likely be phased out, now that Sencha has replaced the SDK tools with Sencha Cmd). You are correct that because these are concatenations of all of the Deft JS source files, including these particular files incurs some additional overhead for the IoC or MVC features you might not use.

If you are using Sencha Cmd, we now distribute Deft JS as a package compatible with its package management system. When Sencha Cmd builds your application, it will only pull in the classes that you explicitly require (and their dependencies).

If you are using the older Sencha SDK tools, I would suggest configuring the Ext.Loader to pull in the individual Deft source files (in /src/js) and require the classes you intend to use. As with Sencha Cmd, when you build your app, it will only pull in the classes you explicitly require (and their dependencies).

Does that help?

demee commented 11 years ago

Hey,

I'm using SDK. Yes that did help, I'll try it out.

Thank you. Slawek.

johnyanarella commented 11 years ago

Great - thanks for trying out Deft JS!