You might not need a javascript framework
I'm going to let you in on a pattern I've been using in my rails applications that is by no means new but I thought it was good enough to bring up in this age of mindboggling Javascript frameworks.
I will be using rails in my examples but the formula is so simple it can be applied to any "web app".
Priciples
1, Render your front end from the server as normal, your application should work 100% without JS enabled at this point. 2, Intercept form submit events using javascript and resubmit them using AJAX with a request type of 'script' 3, Handle 'script' type requests on the server, handle the request as you would a non-AJAX request, but instead of rendering a HTML view, render the JS that will manipulate the view and make it appear dynamic like an SPA.
Example
# app/views/users/index.html.erb <ul id="users"> <%= @users.each do |user| %> <%= render partial: 'users/single_user', user: user %> <% end %> </ul> <form id="newUser" action="/users" method="post"> Name: <input type="text" name="user_name"> <input type="submit"> </form> <script> $(document).ready(function() { $('form#newUser').submit(function(){ // resubmit as script type $.ajax({ type : $(this).attr('method'), dataType : 'script', data : $(this).serialize(), url : $(this).attr('action') }); }); }); </script> # app/views/users/_single_user.html.erb <li><%= user.name %></li> # app/controllers/users_controller.rb class UsersController def create # create a user as you normally would @user = the_created_user @users = all_users end end # app/views/users/create.js.erb $('ul#users).append('<%= escape_javascript(render partial: 'users/single_user', user: @user) %>'); # app/views/users/create.html.erb <h1>Successfully created user!</h1> <%= render template: 'users/index' %>















