• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP's or MVC

 
Greenhorn
Posts: 8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just in case David's response didn't register strongly enough:

NO
 
Bear Bibeault
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I enjoy Bear's replies. Simply superb. Never hesitates to hit the nail on its head.
 
Bear Bibeault
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much all.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic