Beruflich Dokumente
Kultur Dokumente
BATCH CODE START DATE END DATE NAME OF THE CO-ORDINATOR NAME OF THE DEVELOPERS : : : : MR.VASANTH KUMAR : Akash Goswami Gautam Kumar Vinoth Vetrivel Monika DATE OF SUBMISSION : 13-5-2012
CERTIFICATE
This is to certify that this report titled Online Book Store is developed by Akash Goswami,Gautam Kumar,Vinoth Vetrivel and Monika and submitted as the fulfillment of the course requirement at NIIT.
TABLE OF CONTENTS
CHAPTER NO.
TITLE
PAGE NO
ABSTRACT
LIST OF TABLES LIST OF SYMBOLS 1 INTRODUCTION 1.1 GENERAL 1.2 EXISTING SYSTEM 1.3 PROPOSED SYSTEM 2. SYSTEM DESIGN 2.1UML DIAGRAM 2.1.1 USE CASE DIAGRAM 2.1.2 SEQUENCE DIAGRAM 2.1.3 COLLABORATION DIAGRAM 2.1.4 ACTIVITY DIAGRAM 2.2 TABLE DESIGN 2.3 HARDWARE REQUIREMENTS 2.4 SOFTWARE REQUIREMENTS 3 MODULES 3.1 REGISTRATION 3.2 LOGIN 3.3 PURCHASE
ii iii
DEVELOPMENT TOOLS 4.1JAVA ENTERPRISE EDITION 4.2SERVLETS 4.3JSP 4.4HTML 4.5DATABASE 4.6 TOMCAT/GLASSFISH SERVER
6 7 8 9
ACKNOWLEDGMENT
We wish to extend our thanks to our faculty, Mr Vasanth Kumar for his encouragement and guidance .We would also like to thank all other faculty members at NIIT for their cooperation and help when required. At last but not the least we would like to thank our parents, friends and God without whose support our project would not have been a success.
ABSTRACT
The design objective of this project Online Book Store is to create an online bookstore. The system will provide a mechanism for searching the available book title database with various criteria. The system will allow users to order books online. The browsing will be done via a JSP web page. A primary goal is to make the web site highly interactive and dynamic. When the user enters a subject, he or she will be able to view information on all books that correspond to that subject. The user will also be able to find additional books written by the author of a favorite title. When the user has identified a book to purchase, the system will allow him or her to enter important information, such as name, address, phone number, book id to complete the transaction. Prior to committing the transaction, the system will validate data on the client side to ensure that data is present in each required field. When the form has been correctly filled out, it will be submitted to a back-end database. On the back end, the data for the book inventory will be stored in Derby database. The same database will be used to store the customer order information. This data can be accessed later to process the orders. Any changes to the database, such as the inventory of books or the specials offered, will be reflected immediately on the web site. This project is developed using JavaEE and is be based on MVC architecture.
LIST OF TABLES
S.No 1. 2. 3.
Page No
LIST OF FIGURES
S.No 1. 2. 3. 4.
Figure Name Use Case Diagram Sequence Diagram Collaboration Diagram Activity Diagram
Page Number
Chapter 2 SYSTEM DESIGN 2.1 UML DIAGRAM 2.1.1 Use Case Diagram The use case diagram represents the functionalities of the system using actors and use cases.
S.No
Column Name
Data Type
Size
Key
Null
1. 2. 3. 4.
Not Null
Table2.2.2: Books
S.No
Column Name
Data Type
Size
Key
Null
1. 2. 3. 4. 5. 6. 7.
Not Null
Not Null
3.2 LOGIN
This will ensure that only the authorized users can login to the system. Users are provided with a login form where they are supposed to fill in their email id and password. If the user is authenticated, he is logged in to the system.
3.3 PURCHASE
In this module users can buy books by clicking on the buy button. If the user is logged in they are provided with a form where their email id, shipping address and book id are listed .The user may edit the details or click on the buy option to ship the book. Once the book has been shipped, shipping id is provided to the user. The user has to pay the cash on delivery.
4.2 SERVLETS
A Servlet is a Java class in Java EE that conforms to the Java Servlet API, a protocol by which a Java class may respond to HTTP requests. They are not tied to a specific client-server protocol, but are most often used with this protocol. The word "Servlet" is often used in the meaning of "HTTP Servlet". Thus, a developer may use a servlet to add dynamic content to a Web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML. A Servlet is an object that receives a request and generates a response based on that request. The basic servlet package defines Java objects to represent servlet requests and responses, as well as objects to reflect the servlet's configuration parameters and execution environment. Servlets may be packaged in a WAR file as a Web application.
4.3 JSP
Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic web pages and applications. This is accomplished by embedding Java code into Html, XML, DHTML, or other document types. When a client such as a web browser makes a request to the Java application container, which is typically a web server, the static page is converted behind the scenes, and displayed as dynamic content to the viewer.Servlets can be generated automatically from Java Server Pages (JSP) by the Java Server Pages compiler. The difference between Servlets and JSP is that is Servlets typically embed HTML inside Java code,
while JSPs embed Java code in HTML. A somewhat older usage is to use servlets in conjunction with JSPs in a pattern called model-view-controller pattern.
4.4 HTML
HTML stands for Hyper Text Markup Language. It is the predominant markup language for web pages. HTML is the basic building-blocks of web pages. A markup language is a set of markup tags and HTML uses markup tags to describe web pages. The purpose of a web browser is to read HTML documents and compose them into visual or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page. It can embed scripts in languages such as JavaScript which affect the behavior of HTML web pages.
4.5DATA BASE(DB)
A collection of information organized in such a way that a computer program can quickly select desired pieces of data. You can think of a database as an electronic filing system. To access information from a database, you need a Data Base Management System (DBMS).This is a collection of programs that enables you to enter, organize, and select data in a database.
Realm element represents a "database" of usernames, passwords, and roles (similar to Unix groups) assigned to those users. Different implementations of Realm allow Catalina to be integrated into environments where such authentication information is already being created and maintained, and then utilize that information to implement Container Managed Security as described in the Servlet Specification. 4.6.2 GLASS FISH The use of Glass Fish application server is growing, and having a reference card for dayto-day jobs is inevitable. Glass Fish is a free, open-source, production-ready, supported application server based on Java EE 5. The server runs on many platforms including Windows, Linux, Solaris, and Mac OS. It includes the Top Link Essentials implementation of the Java Persistence API. All Glass Fish V3 releases provide the same stability and capabilities of earlier V1 releases, plus many new features. These include clustering, in-memory replication, more improvements to the Grizzly-based HTTP engine, enhanced administrative functionality, improved self-management capabilities, great performance, and more.
5.2 CONTROLLER
The succession of views that a Web application user sees is called screen flow. A Webtier controller controls screen flow by selecting the next view a user sees. In static Web sites, screens are statically linked to one another. By contrast, a controller dynamically chooses the "next" screen in response to both user actions and model operation results. The controller uses this data to determine which view to display next. A Web controller "displays a view" by forwarding the request to a JSP page, servlet, or other component that renders the view in a format compatible with the client. The controller in the sample application uses two components to select and generate views: a screen flow manager, which selects the next view to display; and a templating service, which
actually generates the view content. The controller uses the screen flow manager to select a view, and forwards the request to the templating service, which assembles and delivers a view to the client. Both the screen flow manager and the templating servlet are generic components that are usable in any Web application. The component-based design reduces component coupling, promoting code reuse and simplifying the controller design.
To back up a database, we can use the online backup utility. We can also use roll-forward recovery to recover a damaged database. Derby accomplishes roll-forward recovery by using a full backup copy of the database, archived logs, and active logs from the most recent time before a failure. 5.3.3 STORAGE AND RECOVERY A Derby database provides persistent storage and recovery. Derby ensures that all committed transactions are durable, even if the system fails, through the use of a database transaction log. Whereas inserts, updates, and deletes may be cached before being written to disk, log entries tracking all those changes are never cached but always forced to disk when a transaction commits. If the system or operating system fails unexpectedly, when Derby next starts up it can use the log to perform recovery, recovering the "lost" transactions from the log and rolling back uncommitted transactions. Recovery ensures that all committed transactions at the time the system failed are applied to the database, and all transactions that were active are rolled back. Thus the databases are left in a consistent, valid state. In normal operation, Derby keeps the log small through periodic checkpoints. Check pointing marks the portions of the log that are no longer useful, writes changed pages to disk, then truncates the log. Derby checkpoints the log file as it fills. It also checkpoints the log when a shutdown command is issued. Shutting down the JVM in which Derby is running without issuing the proper shutdown command is equivalent to a system failure from Derby's point of view. Booting a database means that Derby checks to see if recovery needs to be run on a database. Recovery can be costly, so using the proper shutdown command improves connection or start up performance.
Indexes are not supported for columns defined on CLOB, BLOB, and LONG VARCHAR data types. If the length of the key columns in an index is larger than half the page size of the index, creating an index on those key columns for the table fails. For existing indexes, an insert of new rows for which the key columns are larger than half of the index page size causes the insert to fail. It is generally not recommended to create indexes on long columns. It is best to create indexes on small columns that provide a quick look-up to larger, unwieldy data in the row. You might not see performance improvements if you index long columns.
The system shuts down if the database log cannot allocate more disk space. A "Log Full" error or some sort of IOException will occur in the derby.log if the system runs out of space. If the system has no more disk space to append to the derby.log, you might not see the error messages.
Chapter 6 SNAPSHOTS
The system ONLINE BOOK STORE is modular and scalable. Thus this system can be scaled well to add features like buying multiple books at a time, buying books with credit card etc.
Chapter 8 CONCLUSION Thus the ONLNE BOOK STORE is found to meet all the specified objectives. This system allows user to browse and buy books from their home, thereby saving their time.
REFERENCES