Closed yamsellem closed 10 years ago
@yamsellem we do offer standalone pieces here http://marionettejs.com/
By standalone you mean allow the use of Marionette.View without Marionette.AppRouter, Marionette.Application or Marionette.Module?
I don't see that :-( And I've heard many times this will be a great addition in the teams I've work with.
Oh, you want to pull those pieces out. Hmmmm that will actually be a bit tricky to do. Mind telling me your use case?
I've seen a lot of projects using a module loader — like RequireJS — and through don't need Marionette.Module. As well, Marionette.Application and Marionette.AppRouter are not compulsory.
To me, Marionette is good at handling views (an area, where Backbone does not do much).
But Application, Module, Controller, Event bus, all seem a lot when there is still room in the view area (loading, hiding, dynamic layout AFAICT) and where other tools exists for those different purposes.
IMO, here is the fine line between library and framework. Small is beautiful, don't you think?
Sure I think it would be nice to build each file as a standalone or at least a subset of them. Would you be interested in working on the grunt file to add this?
Sure.
My schedule has not a lot of blank spot right now. If this can wait a while, I will work on it then :-)
You could use something similar like JQuery or Bootstrap (Using a website: http://getbootstrap.com/customize/) or maybe like LoDash (Using the command line: https://lodash.com/custom-builds). Personally, I prefer the first option over the second one.
It would be really nice this feature. Automagically, you could avoid to load unneeded modules that you are loading at the moment, keeping your javascript thinner.
@yamsellem are you finally working on it?
I understand that this is a feature many people want, so I went ahead and did the work over on #1900 to support pulling in pieces of Marionette by themselves. The PR works great, and works out-of-the-box with UMD. So your AMD/CommonJS/ES6 build process will pull them in correctly.
It wasn't merged because some members of the team felt it wasn't a good idea. I contend that there's nothing wrong with the idea, so go ahead and use that branch if you're interested.
@santihbc @frankcortes hey guys just wondering your usecase here, what is your motivation for this feature.
In my case, I want to avoid loading marionette Modules because I would rather use requireJS or Requirify. Futhermore, I don't need to use some features like TemplateCache or Behaviours module.
that is a fair need @frankcortes , Reopening 1900
Sorry @santihbc but I haven't find the time to (I've been quite busy with Thorax lately — I can share some thoughts elsewhere if you want me too).
Using Require or Browserify is, in fact, a good sample of the need to use precise parts or Marionette. Thanks for reopening ;-).
I +1 this idea. To me I intend to use a lot of micro libraries to build a web application. For instance I might use Virtual DOM for templating, Immutables and Stores (LokiJS) for models and collections, and PubSub.js for the event bus.
But something that Marionette is unrivaled at is a great View system.
@jshthornton If you like small libraries with one purpose, you may take a look to Ampersand. It shares the common patterns of Marionette, but with a component state of mind (and it trades Marionette's deprecated Controller & Module for a useful State).
@yamsellem interesting ;) Le mar. 30 juin 2015 à 11:32, amsellem yves notifications@github.com a écrit :
@jshthornton https://github.com/jshthornton If you like small libraries with one purpose, you may take a look to Ampersand http://ampersandjs.com. It shares the common patterns of Marionette, but with a component state of mind (and it trades Marionette's deprecated Controller & Module for a useful State).
— Reply to this email directly or view it on GitHub https://github.com/marionettejs/backbone.marionette/issues/1118#issuecomment-117084676 .
Marionette is branded as a “collection of common design and implementation patterns”.
While it is a "all or nothing" download for the moment, allowing to download separate parts (including their dependencies) — like twittter.bootstrap does — would be a wonder.