• Post Reply Bookmark Topic Watch Topic
  • New Topic

bussiness logic and presentation logic

 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir,
in the real wold (in every )web application using jsp
should i seperate the bussiness logic from presentation logic???
i mean should i use only jsp taglib's instead of expressions and other scriptlets....

if anybody answer this question i will be very happy... abt it..


cinux
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean should i use only jsp taglib's instead of expressions and other scriptlets


While I think removing Java scriplets and scriplet expressions from JSP pages makes them a lot easier to deal with at creation, debug and maintenance time, creating a multi-tiered web application that cleanly separates business logic from the UI is a lot more involved that just that.

Remember that your presentation logic is more than just the JSPs; it also encompasses all of the servlets, filters, listeners, beans and any other classes that have any knowledge of, and dependency upon, the servlet and web application environment.

Your business logic should be completely UI-agnostic. A good test of this could be: can you take your business logic classes, and write a command-line interface program using them? Could you do the same with a Swing interface?

If you need to change the business logic when you remove it from the servlet environment, you haven't defined a clean separation.
[ May 11, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!