This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP's or MVC

 
Bhavani Sankar Ikkurthi
Greenhorn
Posts: 8
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a project which contains huge database in Oracle. The application is totally built in PL/SQL[using HTP package].
Now the client wants a lighter version of the application to be used offline.
As oracle lite is compatible with Java.. we are developing one more application converting all Oracle procedures to JSP pages.

We are writing queries in the scriplet tags in the JSP's itself. Is it a good idea??
Does implementing MVC architecture to this project take more time to fetch many records from the DB and traverse them over the model classes.Does that take more time against fetching records from DB using queries in scriplets in JSP.

If we need to follow some other architecture then which is better?? The queries will be returning some thousands of records as resultset.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are writing queries in the scriplet tags in the JSP's itself. Is it a good idea??

NO.

If nothing else, separate the view from the DB logic. Even when not using an ORM layer it's a really good idea to keep Java code in Java, and view code in JSP.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just in case David's response didn't register strongly enough:

NO
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Just in case David's response didn't register strongly enough:

NO


Any performance difference in properly structured code will be negligible.
 
Sunder Ganapathy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I enjoy Bear's replies. Simply superb. Never hesitates to hit the nail on its head.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one's ever accused me of being a shrinking violet.

Seriously, I think it's important to get the point across that following poor practices to solve a performance "problem" that probably doesn't even exist is not a great idea.
 
Sunder Ganapathy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, following these simple rules, helps not only creating easily maintainable software, it also helps in
creating customer delight, the single purpose for which the software was originally brought into existence, with an
additional add on, of increased bank balance for both the customer and the software creator, due to better
performance.
 
Bhavani Sankar Ikkurthi
Greenhorn
Posts: 8
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much all.
 
Billy Korando
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhavani Sankar Ikkurthi wrote:We have a project which contains huge database in Oracle. The application is totally built in PL/SQL[using HTP package].
Now the client wants a lighter version of the application to be used offline.
As oracle lite is compatible with Java.. we are developing one more application converting all Oracle procedures to JSP pages.

We are writing queries in the scriplet tags in the JSP's itself. Is it a good idea??
Does implementing MVC architecture to this project take more time to fetch many records from the DB and traverse them over the model classes.Does that take more time against fetching records from DB using queries in scriplets in JSP.

If we need to follow some other architecture then which is better?? The queries will be returning some thousands of records as resultset.


How absolutely important is performance? Are we talking a system that has very heavy usage with very little resources? Because unless this is the case (and I can almost guarantee you it isn't) maintainable code should take precedence over performance. As is there is only a few real bottlenecks in any program, e.g. DB calls, at which point is when you can have messy code if it does make a performance difference (and that difference justifies the messy code).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic