java - Modern AJAX Webapp Paradigm -


introduction:

my company has webapp based on classic asp. our webapp grows, finding difficult maintain system. feel complexity of code , need many asp pages making maintenance of system outweigh development of new features. have thoughts on how modernize system, , appreciate community's feedback on how modern webapps work.

question:

my current understanding there 2 major portions architecture of modern webapp. there front end (browser/user facing) , end (server/database). in our current asp architecture, backend , data requests database mashed our client side code. feel there should separation between 2 components, , json solution.

the picture below demonstrates architecture envision: architecture concept

my idea have front end developers , end developers work agreeing on sort of "api". example, lets business requirements need send list of current customers.

front end developer: need display list of customers user.

back end developer: need list of customers database, , send front end developers.

the json this:

[     {         "fname": "john",         "lname": "doe",         "price": "5"     },     {         "fname": "jane",         "lname": "deer",         "price": "5"     } ] 

how envision working

front end code:

assumptions: single page app, requests go 1 server page, javascript jquery, knockout.js

//ajax request data using jquery , request $.getjson('/index',         //the page request data     {"request":"customers"} //json let server know want     , function(data) {      //function execute     //get data in pre-defined format     //add mvvm (knockout.js)     someknockoutmappingfunction(); }); 

back end code:

assumptions: java

 string request = req.getparameter("request");     if (request == null) {        //error case     }     //the ajax request came in requesting customers     else if(request == "customers")     {         //get data database , format         somedatabasetojsonfunction();         //send data client         somesendjsonbackfunction();     } 

wrap up

so, on right track? has implemented kind of model , can make helpful suggestions before dive in? suggestions on how can migrate asp?

thanks in advance!

you have couple of options.

if have requirements keep migrating away asp classic, may want @ integrating 1 of (still) existing frameworks/libraries make asp/vbscript more manageable development environment.

here 3 have links @ moment, know there 2 or 3 others (that i'm aware of) can't recall find them...

if can move language/framework, may still want use 1 of libraries above build of glue ties old code new (asp-ajaxed has class emitting json). i'd wary of rapidly changing/upgrading code base because never know old business rules or old bug fixes may kill in process.

there few questions awesome answers outlining sane ways of moving code new platform.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -