Tom Söderlund
Tom Söderlund

Reputation: 4747

How to build a MVC structure on top of RequireJS and JQuery?

I'm building a web-based drawing program. Since it's a lot of DOM manipulation, I decided to skip AngularJS and instead go for JQuery. I'm using RequireJS to structure it somewhat.

Now, the core drawing functionality and I want to continue building the UI around it: login/signup functionality, project file browsing, UI components for palettes, toolbars, etc.

What would you recommend for frameworks for this? BackboneJS? Marionette? Or use AngularJS for everything else that's not DOM manipulation?

Upvotes: 0

Views: 112

Answers (2)

Arnaud Weil
Arnaud Weil

Reputation: 2492

I successfully used JSViews on my project together with RequireJS and jQuery.

They play well together, and I personnally love the minimalist approach of JSRender/JSViews: take what you want, and go as far as you need.

Upvotes: 1

redmallard
redmallard

Reputation: 1138

There is no right answer here, you'll probably get different advice from every person you ask. Having built several complex apps using both RequireJS/BackboneJS, and RequireJS/AngularJS, here's my 2 cents:

  • AngularJS - There's no reason not to use angular because you're doing DOM manipulation, that's what directives are for. You can write directives using jQuery/D3/etc, which are then encapsulated and reusable throughout your application. Angular is very opinionated and 'automagical', so be prepared to spend a lot of time debugging until you understand what's going on under the hood.
  • BackboneJS - Really lightweight, it's more of a 'toolkit' that enables you to write your own framework because it's lacking some of the glue to connect everything. If that's not your cup of tea, try out one of the opinionated libraries built on / inspired by Backbone.

Upvotes: 1

Related Questions