You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently besides Jade and Backbone, all of Kranium must be included. Though some parts of Kranium are required for basic operation, others seem to be just niceties, that may not be required in every application. The user should be able to include parts at will. This issue can serve as a discussion for the best way to do this.
Perhaps the Jake task should only concatenate those parts of Kranium that are absolutely required. Then, kranium init could copy the remaining individual components (db.js, file.js, etc) and could then handle including the appropriate parts in app.js.
The code inserted by kranium init into app.js would become something like:
Ti.include("/kranium/lib/kranium.js");// ==== Optional additions (uncomment to include) ===// Ti.include("/kranium/lib/db.js");// Ti.include("/kranium/lib/androidshims.js");// Ti.include("/kranium/lib/backbone.js");// ... and so on ...
Haven't yet figured out a good way to communicate/enforce dependances.... Thoughts?
The text was updated successfully, but these errors were encountered:
Hmm... this is a good point.
Maybe we should strive for something along the lines of Dojo or YUI?!
Currently Kranium is more like jQuery with a wide scope where you get all or nothing.
Also, it could be interesting to evaluate what performance/memory gains can be achieved by splitting things up.
I'll look into it!
Yeah, i think there are a few components that area really quite standalone:
kranium-core this just includes any utilities that are required by kranium, and any code needed to load in other components
kranium-selector this contains the selector engine and element set manipulation (basically most of the jQuery emulation)
kranium-style this handles the loading and application of kss styles. It simply exposes K.style, which can be used standalone on naked Ti views, but is also used by other kranium components when laoded
kranium-create this contains the kranium easy element/hierarchy creation. if kranium-selector is loaded it will be callded to do the appropriate selector caching, if krankum-style is loaded, elements will automatically have styles applied
kranium-jade ( this handles loading of jade templates. I think this one likely needs a hard dependency on kranium-create, but would be nice if it didn't... (dont see a simple way to avoid this though given how jade templates are currently loaded.). Again, with this, if kranium-style is loaded, elements will automatically be styled.
kranium-backbone this handles backbone support. (This also likely has a hard dependency on kranium-create)
Currently besides Jade and Backbone, all of Kranium must be included. Though some parts of Kranium are required for basic operation, others seem to be just niceties, that may not be required in every application. The user should be able to include parts at will. This issue can serve as a discussion for the best way to do this.
Perhaps the Jake task should only concatenate those parts of Kranium that are absolutely required. Then,
kranium init
could copy the remaining individual components (db.js, file.js, etc) and could then handle including the appropriate parts in app.js.The code inserted by
kranium init
into app.js would become something like:Haven't yet figured out a good way to communicate/enforce dependances.... Thoughts?
The text was updated successfully, but these errors were encountered: