-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If you could change Backbone at will, how would you? #4290
Comments
What to keep: It seems that backbone is the only MVC-Framework for JavaScript that is still updated, so I would not change anything about that paradigm. What to keep/Improve: Use of ESModules without introducing the Backbone global or a build tool – #4274 What to improve: Use of ES6 classes (So I can What to improve: Not a huge problem for me, but using modern JavaScript (not cutting edge, just anything that works since a couple of years) and, with that, make underscore optional? Many functional-style methods has been added to JavaScript arrays by now, so maybe this is sufficient? Similarly Map and Set might be helpful in some occasions. Reasons: Size and code-readability for people not familiar with underscore. |
☝️ I endorse these suggested changes for a Backbone 2.0. |
So far, we have one response, which only suggests evolutionary changes, rather than anything radical. Would it be safe to conclude that Backbone users just want the library to be updated with recent JavaScript and otherwise stay mostly the same? If anyone thinks otherwise, please don't hesitate to respond. |
Not radical, either but:
|
A possible radical way to implement this, would be to unify A possible non-radical way would be to absorb the core functionality from backbone-fractal into Backbone itself. That would probably amount to introducing a new Yet another option is to just leave it to external libraries, as is currently the case. Marionette provides its own way to compose views, so how to do it in Backbone itself would probably be somewhat controversial.
Could you elaborate a bit on how you would like to see this intermediate documentation? In any case, pure documentation changes are never breaking, so this could be done before a 2.0 update already. Perhaps related: I have been wanting to deepen the indentation, which might already improve the readability. Such a change would best go together with a modularization, because that keeps all obfuscating changes in one batch. |
…for me would usually involve
Basically, something that helps understanding how different parts of the code work together and how to read the code.
No strong opinion, for me the fractal integration sounds most meaningful. |
@jdittrich I created a new issue (#4291) for your point about code understanding. It is a very good point and I think it does not need to (and perhaps should not) wait until the 2.0 release. |
I haven't written any Backbone applications in ages, so take this with the appropriate amount of salt. Change:
Keep:
|
Backbone has saved us a lot of time and give us a clear starting point. Greatly appreciate your work! |
I would push back against adding view functionality.. Marionette's team at one point intended on dropping backbone as a strict dependency as extending the view to allow for other renders was difficult. A big ask had been dropping jQuery, and that meant making backbone optional. Making that easier would be good. In order to do it now it feels like a hack or just large copy-pastes from the backbone source. You can generally see those modifications here: marionettejs/backbone.marionette#3679 Beyond that ESM would be great.. not sure if we've overcome the breaking issues of switching to |
For utmost clarity: which added functionality are you referring to here? |
absorb the core functionality from backbone-fractal in particular, but even the shadow DOM / custom elements.. backbone views should allow for that as a possibility without adding that as a required opinion. |
@paulfalgout absorbing backbone-fractal would mean adding a new class ( The custom element thing is not so much a feature addition but a radical total redesign of the library. So far, I don't have the impression that a lot of people would want that. |
It adds opinion to the library handled by other 3rd party libraries that now may be expected to support the new stuff. It would make more sense to me if a significant portion of backbone users had already adopted it, but historically a light View layer opinion was characteristic of Backbone, and I'm not certain how at this point in time embedding a particular solution is any better than just saying "if you need to do X, here are a few options" |
Sooner or later, there will be a Backbone 2.0. Major releases are disruptive for users, so I prefer to make them as infrequently as possible. But when we do one anyway, we might as well use it to its full potential.
This is a "wild ideas" ticket, where you can suggest any backwards-incompatible changes that you would like to see in a future release of Backbone. Please keep it brief, but do explain why you would like to see the change(s) that you suggest.
You are also welcome to highlight anything that you want to stay the same. Again, please with reasons.
Some rules of the game:
The following prior tickets are somewhat related: #4274, #4245, #3560.
The text was updated successfully, but these errors were encountered: