-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix the plugin system #1
Comments
Interesting approach with creating a view-ish object that you can then given a template to render. Would you want to pass the model in during the view-ish creation or during the render call? What do you call the instance that |
One option is to have it all return "views", but the view won't have an Another thing we do is mirror values between views. Something like this happens a lot:
I'd like to be able to reduce this so that we only have to state the mirroring once (but not have to update the DOM, which would happen if we did this in 1.x):
|
@defunctzombie can you push your |
Another thing: since |
This system nicely reduces the |
The next branch only had the {{ }} change which is now in master. For sharing values between views I would recommend using a a model layer The flip side is sharing a view between different models so one could make
|
I agree that calling bind after render won't work. I think the distinction Also check out backbone views extend for some ideas.
|
…functionality. Add plugin tests. See #1
I pushed some code that adds |
Currently the plugin system and the .bind() method are kaput because they can't alter the functionality of
dommit
wholesale. After construction of theDommit
object, the view has been rendered. Adding a new binding (a common plugin practice) has no effect. The only way to do this is to wrap thedommit()
method. Furthermore, subviews created byeach
and other custom bindings have no way of reproducing the same object, which can cause many bugs.I suggest creating a plugin system that will allow arbitrary bindings before rendering of the view. This could be done like so (a suggestion only):
The text was updated successfully, but these errors were encountered: