I am a server side software developer.
In the last year or so i started to develop some front end as part of a pretty big web application (spring framework, spring mvc, and pure javascript \ html)
In that project i received html layouts that was constructed by someone else and i had to do all the js logic. (mainly ajax calls)
What i came to realize is that my js file was containing 20K lines of code that had the following pattern:
1) onclick functions \ triggers 2) the ajax call itself with the parameters 3) the callback for the ajax and the html(dom) manipulation to reflect the data
So buttom line i had an extreme spagetthi monster that contains lots of the functions i mentioned above.
function createAccountButtonClicked() {
// get input
doCreateAccountAjax(params);
}
function doCreateAccountAjax(params) {
ajax.(...) //define callbackFunc(params)
}
function callbackFunc(params) {
// set dom stuff.
}
As a framework freak (server) I couldn't believe this. and figured out there must be a front end framework to allow a better control and flow over the methodology i introduced here.
I would appreciate any pieces of references .
Thanks