Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

full ajax response with json vs jsp: which approach has a better performance?

 
Peter Hong
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently working on a project which will be SNS site like Facebook. I've learned that Facebook is built on PHP with lots and lots of ajax, javascript on client side.
So, I have started to wonder if it would be better idea to use ajax with a html static page than to used jsp response.
I have coded jsonView as View onto Spring controller, and have had ajax handled json object from the controller.
It works fine so far. But, like I mentioned, I am not sure if this is a right approach to build the application in MVC pattern.
Should I stick with ajax view or Should I use jsp view?
 
John Pradeep.v
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think it will definetly improve the performance as most of the UI processisng/building logic is moved to the UI layer (client machine), its as if you are moving towards the thick client approach

in your case of providing JSON response, i would suggest you to expose services (RESTful) which accepts request and provides response rather than a MVC frameworks... have a look at apache tuscany, which would make things easy for you.


 
Peter Hong
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Pradeep.v wrote:i think it will definetly improve the performance as most of the UI processisng/building logic is moved to the UI layer (client machine), its as if you are moving towards the thick client approach

in your case of providing JSON response, i would suggest you to expose services (RESTful) which accepts request and provides response rather than a MVC frameworks... have a look at apache tuscany, which would make things easy for you.



Finally~
It has been kinda long time since I posted this thread. I thought I never get a reply for this.
I really appreciate your suggestion. I will definitely go for it.
Thanks again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic