Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added extended templates #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

garbados
Copy link

I added four new snippets, labelled backbone.[type].extended, that add the indicated type of object (model, view, etc.) with some basic attributes, such as initialize or render, already fluffed up.

What do you think?

@tomasztunik
Copy link
Owner

thinking about how common it is to use all these properties, I find myself using the initialize, defaults or events as a method rather then just an object actually less often then not using them at all and thinking if in spite of that we should make the package more bulky - what do you think? anybody else got idea what would be best way to push that?

@garbados
Copy link
Author

I'd be happy to change the templates to return methods instead of objects. That adds functionality without diminishing the use cases the templates serve (so far as I know).

Ideally, these templates should save you from writing initialize and render over and over and over for everything new you make. That's huge for me; how often do you use just the bare templates without adding those same fields?

@tomasztunik
Copy link
Owner

@garbados I had another look at it and I actually tend to lean toward adding these - what do you think if we tried to wrap the optional methods in variables/placeholers so that they would get hilighted so if not needed you could easily remove them? would need to try if it's doable to add multiline placeholders ${n:placeholder} - could you also update readme?

@garbados
Copy link
Author

Sure thing. I'll try out the changes and recommit shortly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants