5

I've been looking into several of the JavaScript MVC Frameworks (Backbone.js, Spine, SproutCore,etc.) and it seems to me that all of these are designed to act as 'single-page' applications. All of the examples I see have an index page that act as a front controller, and use # or #! style URLs for different pages, and handle the entire rendering of the page.

I have several projects where I would like to use a more 'traditional' style of URLs, and having more structured JavaScript to handle some of the more complicated parts of the application. are JS MVC frameworks the answer here, or should I be looking for something different?

asked Dec 9, 2011 at 16:13

1 Answer 1

3

JavaScript MVC is just a code organization pattern.

They happen to work well with SPA but they can be used in normal applications.

However you don't actually need a JS MVC framework. You can just write modular JavaScript using some kind module loading strategy.

As long as you separate modules into separate objects / functions / units the code should be structured and clean.

answered Dec 9, 2011 at 16:20
3
  • I believe the Steal framework can help out with the module loading Commented Dec 9, 2011 at 20:21
  • Steal/RequireJS, scripts and namespaces, and script packagers and dependency managers are all popular module loading strategies. I would actually recommend against steal if your not using javascriptmvc. Commented Dec 9, 2011 at 20:24
  • Where does the business logic sit in a modular pattern? Would it be in it's own main logic module which is loaded in on application init? Commented Jan 24, 2015 at 1:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.