• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets and Java

 
Gopinath Reddy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application i am writing my buisness logic in servlets. But we can write our buisness login in core java also. Actually what is the difference between writing buisness logic in java and in servlets.?
which one is better?
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Well servlets are server side programmes ,I mean that they listen the request and send the rseponse to client.Basically see it has been derived from all core java classes and we can use in a particular direction that is on server side .
Just read the servlets again , and if you have any questions do ask.
you are welcome.
Please see the documentation of servlets very well.
http://java.rrzn.uni-hannover.de/jug/servlets/tutorial/servlet_tutorial.html
thanks
jasmine
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good, maintainable design usually has hardly any processing in the actual servlet classes. All "business" processing is done in objects that neither know nor care whether they are running in a web application or a test harness.
Try it. Write your "logic" in separate classes, test your "logic" code thoroughly before you ever go near a servlet container. When you are happy that your business logic works, write a very thin servlet which calls your tested code. With any luck, your code will be much more reusable, and your test and development cycle should be much quicker.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic