Traditionally I use to do following for my ajax based pages using jQuery.
- Load the page from server response on first time
- On certain user triggered event i make ajax call to my PHP script
- PHP script does it working and return the response in JSON
- On ajax::success callback, I mess up removing the old div entering new div change text etc etc.
The 4th point makes my coding very messy and i have to do a lot of efforts coding both sides.
How senior devs handles these issues so that they make ajax sites plus a neat, formatted, structured and readable codes.
Is there any other thing in Javascript that addresses these issues.
or in other words , does Angular, Backbone and Ember are introduced for this purpose ?
Thanks
Aucun commentaire:
Enregistrer un commentaire