aspose file tools*
The moose likes Servlets and the fly likes designing a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "designing a web application " Watch "designing a web application " New topic
Author

designing a web application

saima kanwal
Ranch Hand

Joined: Oct 05, 2009
Posts: 148
is it necessary to use a framework when designing a web application? Can't we design our application with just servlets and jsps and follow design patterns where needed without using any framework like struts or spring?? is it practical?? if not the what are the pros an cons of not using a framework?


SCJP 6.0 (86%) SCWCD 5 (94%)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

Sure you can -- if you really understand the way that servlets and JSP work. Otherwise, you're better off with a framework that does all the work for you. I'm personally not a fan of the big frameworks. If this is not just an academic question and you are looking for something lightweight, check out FrontMan in my signature.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
saima kanwal
Ranch Hand

Joined: Oct 05, 2009
Posts: 148
Thanks, it really helped me.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Software Engineers that create web frameworks, e.g. Struts, enable the rapid development of web applications by helping application developers stay focused on implementing business requirements. An organization can indeed create a web application without using a framework. However, the development time for writing the application code will be much longer and more prone to errors because the size of custom, hand-written code will much larger.

Also, the organization would then need the in-house expertise to compensate for the additional development. This is a difficult aspect to manage and not very practical in today's real-world scenarios. If an organization did have this level of expertise, they would not attempt to build an application without one or more frameworks anyway.
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Frameworks are in the world to make our lifes easier.

Help to code fast, but, you still must understand it very well to use it correctly.

But, if you know the basic (Servlet) you will have a good idea of how the framework (Struts) works.


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Eduardo Yañez Parareda
Ranch Hand

Joined: Oct 09, 2008
Posts: 92

saima kanwal wrote:is it necessary to use a framework when designing a web application? Can't we design our application with just servlets and jsps and follow design patterns where needed without using any framework like struts or spring?? is it practical?? if not the what are the pros an cons of not using a framework?



It isn't necessary, but if you don't design well your core architecture, when your applications grows it will be unmaintainable. I like to use Servlets + JSP to do my apps, but when there are more peolpe working on the same project, it can be difficult to get all clean and ordered, so a framework can help the team to do things better.

If you only want a MVC or something similar framework, you can try SerfJ on my signature, it's easy to use, almost without configuration and REST oriented.

http://serfj.sourceforge.net - Simplest Ever REST Framework for Java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: designing a web application