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?
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.
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.
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.