I am really interested in Js MVC framework
like Ember but in many places.
I read that ember is used for one page web application.
I have some confusions.
Can I use ember for large scale application having lots of pages?
If I can't then which MVC framework is best for large applications.
Suggest your ideas...
No JS MVC Framework would be written aiming at one page web application. As per Ember's own website, http://emberjs.com/#routing-example
Ember.js makes it downright simple to create sophisticated, multi-page JavaScript applications with great URL support, in a fraction of the code you'd write in other frameworks.
So to answer your questions:
One can use Ember.js with or without the Ember.Router
. If the application doesn't need to change the browser's address bar, the following will setup a basic, one "page" Ember installation.
Given the following code:
var App = Ember.Application.create({
// Append application to a selector
rootElement: '#ApplicationView'
});
App.Router = Ember.Router.extend({
// Set the default location
location: 'none'
});
App.Router.map(function() {
// Set the default path to home
this.resource('home', { path: '/' });
});
App.ApplicationRoute = Ember.Route.extend({
init: function() {
console.log("Application route initialized");
}
});
The following template:
<script type="text/x-handlebars">
<h1>Hello World!</h1>
</script>
Will be appended into our HTML page:
<div id="ApplicationView"></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With