jquery - Generate pages with javascript -
i'm working in company creating web app, , moving legacy yii php controllers more dynamic style.
instead of generate html php, app it's moving ask data java private api , receive json generate html elements javascript, there still elements generated in php code.
my question is: viable use server code (php, ruby, java...) generate data in json , create via javascript once it's received? (maybe body, head tags :p)
pros? cons?
if it's not bad idea, there tips? frameworks (like dust.js, backbone...) advices?
why should continue idea or why away it?
edit: example:
a php generated page (from yii framework using mvc said - not mixing backend , frontend) basic information page header, side menu, footer, , content without functionality. once page received, js takes control , adds functionality, right?
the other point is: same page php not rendering <html><body></body></html>
(just basic stuff, maybe more including js files, headers... know, minimum needed) , setting javascript variables using json objects, information needed javascript render header, menu, body, etc. pattern close one-page design js (as backbone, angular.js, etc.).
Comments
Post a Comment