Web Application Development: Design, Coding, and Architecture Report

Verified

Added on  2019/09/22

|7
|1233
|97
Report
AI Summary
This report provides a comprehensive overview of a web application's development, focusing on the object-oriented approach, JSP and servlet technology, and MySQL database usage. The report details the design and coding techniques employed, including the rationale behind their selection, and provides evidence through code examples. An architecture model is presented and critically analyzed, highlighting potential issues and suggesting improvements, such as grouping classes and distributing code for better organization. The report also explores the suggested use of design patterns, specifically the JSP/Servlet pattern with HTML and EJB design patterns, offering insights into their applicability and structure. References to external resources are also included, providing a well-rounded analysis of the web application's development process.
Document Page
Contents
Overview of approach to development and general rational......................................................................1
Detail of design and coding techniques used and reasoning behind their use............................................1
The design/coding techniques:................................................................................................................1
Why I chose this technique:....................................................................................................................1
Evidence:.................................................................................................................................................1
Conclusion:..........................................................................................................................................2
Architecture Model.....................................................................................................................................2
Critical analysis of solution..........................................................................................................................2
Issues:......................................................................................................................................................2
Suggestion:..............................................................................................................................................3
Suggested use of design patterns................................................................................................................3
Jsp/Servlet Pattern with HTML................................................................................................................3
EJB design patterns..................................................................................................................................4
References...................................................................................................................................................6
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Overview of approach to development and general rational
I have used object oriented approach. . I have used Jsp and servlet technology to develop
this application. I have used MySql as backend database.All forms are separately
designed and their actions are performed by Servlet classes and they are separately
related to different Jsp pages
Detail of design and coding techniques used and reasoning behind their
use
The design/coding techniques: I have followed partial object oriented approach.
Why I chose this technique: My application is not so big and also only I have
designed this whole code. This project is not so big. This has simple and little
functionality to implement so I make this simple by implementing very basic coding
techniques.
Evidence: as you can see in my code there are only two types of file I used and they are
: Jsp and Servlet type. In this project, all Jsp files are located in WEB-INF folder which
represents the web forms where users can interact with my web application. And all
servlet classes are placed in Source Packages’ default packages; here my all servlet
classes are model type these interact with database and perform all actions and direct
contact with Jsp forms by calling them. In my project code there are no controller classes
because my web application is very simple with the little functionalities so all Jsp forms
directly interact with the Servlet classes and all Servlet classes directly interact with Jsp
forms.
For example:
register.jsp form directly interacts with the AddNewUser.java Servlet class
When user fill the all details mentioned in the register.jsp form and click on
register button then form action call will redirect to AddNewUser.java Servlet
class where all parameters are get and then they are saved to database and after
this the call is redirect to index.jsp where user can login and can go further related
pages.
When user click on the login button then other login.jsp page is called and the
user will be identified in this page and then call will be redirect to that page which
user belong to, for example if user is admin then admin.jsp page will called or if
user is normal user(customer) then userPanel.jsp will called.
Document Page
Conclusion: So there is bidirectional relatioin in my view classes and model classes because
there are no controller classes in between them. I followed this architecture because this project
is small and this become easy for me by designing this project in this manner.
Architecture Model
Critical analysis of solution
Issues:
a) The currently system is very basic there are different Jsp forms for each
functionality and different Servlet classes for each form. So if in future we have to
add more functionalities in any form or have to designed new form to implement
those functionalities then this should be crucial to manage the functionalities
related forms and classes names because in my project there are separate Servlet
classes for each and every Jsp forms, there could be confusion which form is
related to which Servlet classes.
b) In my code there is bidirectional connection between my Jsp web form and
Servlet action classes. This code become very fizzy or complex to understand the
flow of project in large project
Suggestion:
a) For the first problem I can to one thing I will group all classes in one package
according to their type so that it will become easy to track each and every class
whether it is view related or controller or model related.
b) For the second problem I can distribute my code work in separate files so that it
becomes easy to track data flow from one form to another and one class to
another class, for this I will use html file for view section and Jsp file for
Document Page
controller section these files will access all input data from the viewed forms and
validate them and then will transfer them to Servlet class (here servlet class will
come under model) these classes will interact with the database; they will send
data to database and fetch data from the database and then send back to controller
classes these are Jsp classes and then these Jsp will output data to HTML forms to
display to user.
Suggested use of design patterns
I. Jsp/Servlet Pattern with HTML: In this we provide a solution that has a
granularity between those extreme approaches by dividing the application in
different states. We try to transfer a state transition diagram for example,
modeled with RationalRose into HTML pages, servlets and JavaServer Pages.
Applicability:
This pattern can be used in all serlet.JSP applications.We recommend this pattern
especially in complex Web applications where may Web pages and page transitions have
to be developed.
Structure:
The structure of the Servlet/JSP pattern is shown in the following diagram
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Participants:
The participants in this structure of all classes are as:
Servlet: A given request either gathers data required displaying for a given state or it
invokes the action causing a transition out of the state. This responsibility fulfill by the
“controller” in a Model-View-Controller (MVC) based application.
JavaServer Pages: These pages handles the generation of HTML code for a given
request result.
Task wrapper: Encapsulates access to the enterprise business process( back-end data
and function). This function makes the Task Wrapper the “model” in a MVC application.
HTML page: In case of static content and state transitions, we do not require complex
technologies. An HTML page could handles the “static” states.
EJB design patterns
This factor is also known as Home Factory or Home Caching.
Structure:
The structure of the home factory pattern is showing by flowing diagram:
Document Page
Participants:
The participants in the home factory pattern are as:
HomeFactory
-Declares and implements an interface for:
The operation that returns the factory singleton
The operation that returns the EJB homes
EJB Client
-Uses interface declared by HomeFactory
Actual Process:
There are no much collaboration because the HomeFactory is the only class:
Document Page
A single instance of Homefactory is created at run-time. This HomeFactory creates EJB
homes as defined in an externalized manner, example: by means of resource bundles or
XML files.
HomeFactory uses the metadata stored in this externalized manner for instantiating and
returning the appropriate EJB home class.
References
Kelle, Peteris. "Useful Calendar & Date Picker Scripts For Web
Developers". HKDC. N.p., 2016. Web. 8 Aug. 2016.
Server, W.A., 2000. Design and Implement Servlets, JSPs, and EJBs.
chevron_up_icon
1 out of 7
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]