I've been developing a web app using Node.js, Express, MongoDB, Mongoose and Socket.io for some time now. Version one has just been released and is working great. For version two however, I want to completely redesign the UI and use a front-end framework such as AngularJS. I've been looking at the (MEAN stack) and it looks really promising. Before goin into too much details, I will try to explain the purpose and working of the app so hopefully you will understand my question later on.
My app is a streaming service and has 4 simple models: user, room, song, playlist. These are modeled through Schema's in Mongoose and are stored in the MongoDB database. When a user visits the app, it serves all the HTML through Node.js and Express (and Jade as templating engine). If the user then registers, Socket.io lets the server know a user register, that is then saved to the database and the user is joined in the lobby room. In this room, users can chat, listen to music, etc. This is what I've been using Socket.io for, the communication between users themselves and my server (the server sometimes serves html too through Socket.io). Basically all the messages between Socket.io and the server are really small (chat messages, room objects, song objects, etc).
I'm quite happy with this approach, however, on the client side, the code is not really separated. There are currently two JS files serving the logic. One handles the Socket.io events and manipulates the dom. The other one is a common JS file that does a bit of everything. These two files are now about 5000 lines each. This worries me and I want to find a solution for this in v2.
So I've been looking at AngularJS in the MEAN stack and how to incorporate it in my app. My question is, will this solve my client side problems and can would you recommend taking the effort to do so. Also, how well will Socket.io work with AngularJS? Having both of them might be an overkill for what I'm doing. Do you know of any possible other framework that might be easier to integrate with my current environment? I know it's a bit of a subjective question but if you have any tips or do or don'ts, thanks for sharing! I really appreciate your feedback and if you need more information, I'd be happy to share it with you!
Jordy