Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
I believe the Steal framework can help out with the module loading –  Christian Horsdal Dec 9 '11 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. –  Raynos Dec 9 '11 at 20:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.