Wednesday, December 11, 2019

Home Page for a Library Using the Java EE Platform

Question: Discuss about theHome Page for a Library Using the Java EE Platform. Answer: Introduction Java EE is a platform for creating web applications; web applications (herein-fore called web apps) are programs that differ from other applications such as desktop applications (for example MS Word) because most of the computing work is done in another remote computer and the users machine only gets the display data (Gupta, 2013). The user interface is written using any of the many web technologies or languages, such as JavaScript, HTML or Flash, which are then viewed by a web browser. For the system to work, the server (remote machine) has to run an application that responds to requests from clients, does some computing, and then returns replies to the user on their machines (Ullman, 2012). When a request is sent to the web app by a user, the app server processes the request, validates the request and then instructs the web application to handle the business logic side of the request. Java EE is a collection of specifications that define how a Java based web application should be w ritten and how the application needs to be implemented in the server so they can work together (MacCaw, 2011). This paper outlines a Java EE design for a web application to be used by a library in which users can do a variety of things on the web page; new users can sign up, existing users can log in, and search for books and other items. General Requirements To develop a web application using Java EE, one needs the NetBeans 6.x as well as an IDE registered server. The Java EE and the Web installation will make it possible to optonally install and then run Apache Tomcat servlet container (6.x.x) as well as a GlassFish V2 app server. The Net Beans installation additionally requires installing the JDK (Java SE Development Kit); JDK includes the JRE (Java Runtime Environment) and tools and API required for running a web app. In Netbeans, the user should create a new file and choose Web Application and name the web application (for instance in this case library) (Juneau, 2013). The project location is then specified from the computer location, which will act as the app server and requires selecting the servers found in Netbeans, such as GlassFishV2 and the Set as main Project box is selected and Finish clicked. The project folder is created by the IDE; it will have all meta data and sources; the project then opens. Next a Java package and Sou rce File are created where a new Java Class is created. The string variables are then declared in the source editor (Bien, 2011) Architecture The app is designed using a two tier architecture whereby a client is able to directly communicate with the server that stores information, such as MySQL database using a suitable API, such as Java Connectivity API. The application is understood and managed by the application server and a database server such as MySQL understands SQL content. Focus will be placed on the home or welcome page which is where the web app will have its query results displayed. The diagrammatic design is shown below; The diagram above shows a schematic representation of the web application and how it will work. The application will actually run from a Java EE server where the servlet is located, together with the JSP page, on a web container. In the EJB container, there is the enterprise bean that runs the servlet. When a client sends a request from the user interface on a browser, the information is handled within the application client container (Borodescu, 2013). On the backside of the Java EE server is a connection to a database where user names are kept as well as information ob books and their status. For example, when a registered user gets to the web interface, they are prompted to enter their names and password; which they do from the web browser application client found in the application client container. The servlet then handles the request through the EJB container and queries the database and returns a result that the user can see on their browser (Anikas, 2016). The Web Interface The web page will be rendered in HTML 5 (headers and title and for correct reading on the web). Using Java Net Beans and JSP, web applications are made for the log in page. The log in pane is a java index page containing a JSP web application for logging in or for registering. Upon reaching the login JSP web app, a user will enter their credentials consisting of a user name and password, or if a new user, they can register. Both users/ guests and administrator will log in from the JSP web application. The administrator with high level rights will also use their password and user name to log-in. Successful log-in takes them to a second page where the administrator can manage items, such as set an item (book) to be available or check a users loan status. For users, they can check item loan details, search for items, or make a comment such as a query. The loan query delivers a loans list. Both the administrator and user can quit and get back to the home page with the log-in JSP web appl ication. These are illustrated in the chart below; The user interface links to a database on the back-end; from the database, a user or administrator can make queries and get results when making comments on an item or searching for a specific item. After logging in, a user can make a bookmark that includes item details or the user can create a comment; the user can also seek their loan list based on item details. The user can check the items from an item category, as illustrated below; References Anikas, M. (2016). 5 Common Server Setups For Your Web Application | DigitalOcean.Digitalocean.com. Retrieved 29 September 2016, from https://www.digitalocean.com/community/tutorials/5-common-server-setups-for-your-web-application Bien, A. (2011). Real world Java EE night hacks. [London]: Press.adam-bien.com. Borodescu, C. (2013). Web Sites vs. Web Apps: What the experts think. VisionMobile. Retrieved 29 September 2016, from https://www.visionmobile.com/blog/2013/07/web-sites-vs-web-apps- what-the-experts-think Gupta, A. (2013). Java EE 7 essentials. Sebastopol, CA: O'Reilly Media. Juneau, J. (2013). Java EE 7 recipes. Berkeley, Calif.: Apress. MacCaw, A. (2011). JavaScript web applications. Sebastopol, CA: O'Reilly. Ullman, L. (2012). Modern JavaScript. Berkeley, CA: Peachpit Press.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.