javascript - BackboneJS and JQuery plugins architecture playing together in a MiniPhotoshop project -


i'm rather new backbonejs. exciting stuff worked plain jsons until now. :) used design jquery widgets , plugins encapsulate logic / presentation. backbone seems more flexible mv* approach.

i redesigning "mini-photoshop" project work. javascript/html page can add elements labels, images, buttons, change properties, drag&drop them around , change z-index, etc.

i took approach of having backbone collection of elements represents drawing. thought of using jquery plugin able create workspace in everypage i'd like.

so like:

$('.wrapper').miniphotoshop({   elements:elements, // bb collection   painter:painter    // object knows how draw 

});

the painter seperated plugin change way collection drawn.

so objects here are:

  • miniphotoshop - jquery plugin gets bb collection
  • painter - object consisting of methods know how draw elements.
  • propertybox - jquery widget when element clicked on shows properties.

my question jquery-backbone salad make sence?

apologies if open-ended question, hoping tried similar before , able point me in right direction.

thanks!

i don't others, wouldn't take jquery structure of app. think backbone structuring code, , jquery great playing around dom.

my approach use backbone views control flow of app , jquery play with/manipulate dom inside backbone views.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -