Software construction IP 4
1 | Page
Conference Android Application
Software Reengineering Project Document
SWE400-1402B-01 Software Construction
1st June 2014
Project Proposal
· Approved
· Not Approved
|
Student ID |
Student Name |
*Signature |
|
|
1 |
ID |
Name1 |
|
|
2 |
ID 2 |
Name 2 |
|
|
3 |
|
|
|
*The candidates confirm that the work submitted is their own and appropriate credit has been given where reference has been made to work of others
Supervisor Name:
Designation: ____________________
Signature: ____________________
Co-Supervisor Name: ____________________
Designation: ____________________
Signature: ____________________
My Conference android application is used to book meetings between attendees in the conferences and seminars. Attendees can book meetings with other users in the conference. Attendees have to register in the application.
Introduction
My Conference application is used by different seminars and conferences to assist users to book meetings with each other. The attendees in the conference need to be registered in the application. These users can login and see other registered users in the conference. They can access name, company and details of other users. These users can book meeting with other attendees. The other attendee will see who has booked meeting with him. Meetings can be booked with meetings names, meeting details and time. The application interacts with java server (J2EE project) to receive request from application. Requests are processed in MySQL database and response is sent back to application.
Application has the following modules to be made:
1. Registration
2. Sending password to Email
3. Attendees list display
4. Book Meetings
5. Database management
Motivation and Scope
My Conference android application streamlines the meeting appointments process traditional reporting systems. It replaces the manual meeting booking system which consumes time. This advanced software can eliminate all time constraints. It allows users to check other user’s company’s names and their designations before meeting. You do not have to do special meetings.
System Architecture
Our system will be java web and mobile platform based.
Goals and Objectives
The goal and objective of our project is:
· To optimize the meetings appointment process in the conferences.
· It will be simple and user friendly
· As its paperless system and it will be web based. So can be access from anywhere.
· Using new technologies and tools to make it efficient.
Future Work
We are building conference application in such a way that it can be extended for modules other than meetings that are required in the conference. For example along with meeting appointment we can extend it to perform meetings via video conferencing.
Tools and Technologies
The tools and technologies which will be using are
· Android Platform.
· J2EE based server
· MySQL server
· My SQL workbench
· Eclipse for Android
· Eclipse (J2EE enabled) for java server
· Tomcat server apache-tomcat-7.0.30 to run server
Contents My Conference Android Application 1 Software Reengineering Project Document 1 Course Name 1 Project Proposal ………………………………………………………………..……………………………………………………2-4 1. Project Outline (Week 1)………………………………..……………………………………………………………………………………7 2. Software Reengineering Project..……………………………………………………………………………………………………8-10 2.2.1. User Registration 12 2.2.1.1. Description: 12 2.2.1.2 Requirement: 12 2.2.1.3 Preconditions 13 2.2.2 User Login 13 2.2.2.1 Description: 13 2.2.2.2 Requirement: 13 2.2.2.3 Preconditions 13 2.2.3 Home Page 13 2.2.3.1 Description: 13 2.2.3.2 Requirement: 14 2.2.3.3 Preconditions 14 2.2.4 Attendies list 14 2.2.4.1 Description: 14 2.2.4.2 Requirement: 14 2.2.4.3 Preconditions 15 2.2.5 Book Meetings 15 2.2.5.1 Description: 15 2.2.5.3 Preconditions 15 2.2.6 Feedback Form 16 2.2.6.1 Description: 16 2.2.6.2 Preconditions 16 3. API Evolution (Week 2 …………..…………………………………………………………………………………………………….17-24 4. API Efficiency, Reliability, and Maintainability (Week 3)………………………………………………………………………………25 5. Configuration and Change Management (Week 4)………………………………………………………………………………………26 6. Software Construction Tools and Techniques (Week 5)………………………………………………………………………………27
1. Project Outline:
Application Name: My Conference Application
Languages and Technologies: Android platform, java, MySQL
My Conference application is used by different seminars and conferences to assist users to book meetings with each other. The attendees in the conference need to be registered in the application. These users can login and see other registered users in the conference. They can access name, company and details of other users. These users can book meeting with other attendees. The other attendee will see who has booked meeting with him. Meetings can be booked with meetings names, meeting details and time. The application interacts with java server (J2EE project) to receive request from application. Requests are processed in MySQL database and response is sent back to application.
The application receives user requests and send data to web based java server. The java server process requests by saving and checking data in the MySQL database. After processing requests response or required data is sent back to application which is viewed by attendees.
2. Software Reengineering:
Java Mail and servlet API are used in this project. Java Mail API is used to send email password to registered users. Servlet API is used for connection between android application and java server. Tomcat server is used to run java server.
2.1. API used in the application:
The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API is available as an optional package for use with the Java SE platform and is also included in the Java EE platform.
Application screenshots are as followed:
The general architecture of the program is shown as followed:
2.2. Details of the program flow:
2.2.1. User Registration
2.2.1.1. Description:
Attendee first needs to be registered on the application before booking of the meeting. Imei check enabled to register the user only one time. We can register only one user on one mobile.
2.2.1.2 Requirement:
|
Requestor |
Application response |
|
User clicks on the mobile app icon |
Application displays the page that shows login and register |
|
User clicks register button |
Application navigate to registration page |
|
User enters information required |
Application enters data into fields. |
|
User clicks register button |
Application validate entered information and check imei. If imei exists or data is not validated, application returns error.To check imei data mobile imei is sent to serve which checks entry in MySql database If data is validated Application sends password to email entered and shows success message “You have been registered. Please check your email to get password.” |
2.2.1.3 Preconditions
User should not registered previously with same imei (device).
Network should be available and Mobile should be connected with network
User registration should be completed and approved.
2.2.2 User Login
2.2.2.1 Description:
After registration, user can login application to access its functionalities.
2.2.2.2 Requirement:
|
Requestor |
Application response |
|
User clicks on the mobile app icon |
Application displays the page that shows login and register |
|
User clicks login button |
Application navigate to login page |
|
User enters login and passowrd |
Application enters data into fields. |
|
User clicks login button |
Application validate entered username and password by sending data to java server. Java server checks entries in MySql database If data is not validated, application returns error. If data is validated Application navigates to homepage. |
2.2.2.3 Preconditions
Network should be available and Mobile should be connected with network
User login should be approved.
2.2.3 Home Page
2.2.3.1 Description:
After registration, user can login application to access its functionalities and shows homepage.
2.2.3.2 Requirement:
|
Requestor |
Application response |
|
User clicks on the mobile app icon |
Application displays the page that shows login and register |
|
User clicks login button |
Application navigate to login page |
|
User enters login and passowrd |
Application enters data into fields. |
|
User clicks login button |
Application validate entered username and password by sending data to java server. Java server checks entries in MySql database If data is not validated, application returns error. If data is validated Application navigates to homepage which shows About fragment which shows outline of the project. |
|
User enters fragment button |
Application shows four options to Select: 1. Attendies List 2. Meeting Scheduled 3. Feedback Form 4. About |
2.2.3.3 Preconditions
Network should be available and Mobile should be connected with network
User login should be approved.
2.2.4 Attendies list
2.2.4.1 Description:
User can see all attendees in the conference and see their details. They can easily select one person to whom they want to do meeting.
2.2.4.2 Requirement:
|
Requestor |
Application response |
|
User clicks login button |
Application validate entered username and password by sending data to java server. Java server checks entries in MySql database If data is not validated, application returns error. If data is validated Application navigates to homepage which shows About fragment which shows outline of the project. |
|
User enters fragment button |
Application shows four options to Select: 1. Attendies List 2. Meeting Scheduled 3. Feedback Form 4. About |
|
User enter Attendies List option |
Application interacts with server. Server retrieves all registered users from database and send to application. Application shows attendees names, company and details in listview. |
2.2.4.3 Preconditions
Network should be available and Mobile should be connected with network
User login should be approved.
2.2.5 Book Meetings
2.2.5.1 Description:
User can view all meetings schedules and information in the conference and see their details. Requirement:
|
Requestor |
Application response |
|
User clicks login button |
Application validate entered username and password by sending data to java server. Java server checks entries in MySql database If data is not validated, application returns error. If data is validated Application navigates to homepage which shows About fragment which shows outline of the project. |
|
User enters fragment button |
Application shows four options to Select: 5. Attendies List 6. Meeting Scheduled 7. Feedback Form 8. About |
|
User enter Meeting Scheduled option |
Application interacts with server. Server retrieves all users who have booked meetings from database and send to application. Application shows name (to whom meeting with) and dateTime of the meeting |
2.2.5.3 Preconditions
Network should be available and Mobile should be connected with network
User login should be approved.
2.2.6 Feedback Form
2.2.6.1 Description:
User can send feedback about the conference and application functionalities.
|
Requestor |
Application response |
|
User clicks login button |
Application validate entered username and password by sending data to java server. Java server checks entries in MySql database If data is not validated, application returns error. If data is validated Application navigates to homepage which shows About fragment which shows outline of the project. |
|
User enters fragment button |
Application shows four options to Select: 1. Attendies List 2. Meeting Scheduled 3. Feedback Form 4. About |
|
User enter Feedback Form option |
Application shows feedback entry page. |
|
User answers question on feedback page |
Application interacts with java server and server stores answer to database. |
2.2.6.2 Preconditions
Network should be available and Mobile should be connected with network
User login should be approved.
3. API Evaluation (Week 2)
API Evaluation
1.) Java Mail API
A good design of the Java Mail API is a makes a very fine example of Oracle continuing advance technology provides certain API frameworks for the Java design project. Making a point of these common frameworks, as to be in the same arena of vendor-specific solutions which will be great for the creation of a growing open development environment.
When using the font for E-mail messaging software developers will look for another way to find the implementation of the common API framework which will be beneficial for the case of an API. Which build mail and messaging applications -- or even support multiple implementations simultaneously which can also send users login details after registration?
Implementation of the level that is at basic design can help providers develop solutions that make sure the efficient access to their mail server products. As an example of the meaning, I can focus on creating that best mail client and be assured of easily supporting the environment of the mail service.
Need to address the function that the Java Mail API is tied to, or rather leverages, another Java extension: the Java Activation Framework (JAF). The JAF will bring together the working with the several of data that formats that can be used right there. Whether they are simple text or extremely complex documents tied with certain files dealing with image’s and live files system objects. It would be great to use this format of the JAF as design for Java what plug-ins provide to a Web browser to enable transfer of documents such as images describing the site where the meeting is going to take place.
Java Mail API supported operations
· Sending email.
· Receiving email.
· Sending Notifications to Registered users
Overview of JavaMail APIs
The JavaMail APIs only provide general mail facilities for reading and sending mail. These APIs require service providers to implement the protocols.
Service providers implement specific protocols. For example, Simple Mail Transfer Protocol (SMTP) is a transport protocol for sending e-mail. Post Office Protocol 3 (POP3) is the standard protocol for receiving e-mail. Internet Message Access Protocol (IMAP) is an alternative protocol to POP3.
In addition to service providers, JavaMail requires the JavaBeans Activation Framework (JAF) to handle mail content that is not plain text. For example, this includes MIME (Multipurpose Internet Mail Extensions), URL (Uniform Resource Locator) pages, and file attachments.
The JavaMail APIs, the JAF, the service providers and the protocols are shipped as part of WebSphere Application Server - Express using the following Sun licensed packages:-
mail.jar: This JAR file contains JavaMail APIs, and the SMTP, IMAP, and POP3 service providers.
activation.jar: This JAR file contains the JavaBeans Activation Framework.
2.)Servlet API
Servlet http form based submission is one of the methods of API in SDP. This form helps users to access the java server from other Conference android application. Users can use this form to raise requests instantly in java server without accessing the application. The result of the operation contains the status of the operation and key information such as the request ID.
Similar operations can be performed on requests, meeting schedule, venue and book for meeting from the external application, for which the sample forms are shown in the following documents.
Servlet API supported operations
· Adding new request, editing, closing, deleting and viewing a meeting request.
· Adding new venue, editing avenue and deleting a venue.
· Adding new executive, editing and deleting executive.
· Adding a new requester, editing and deleting requester.
Overview of Servlet API
servlet API’s suitability to it tasks
The above API provides Packages which assist us in coming up with a platform which initiates communication to the java server. (javax.servlet)
The (javax.servlet) design has several a numbers of ( classes and interfaces) that goes in detail and will define the contracts between a servlet class and the run time environment that fives information for an instance of such design class code by adjusting to servlet container. (javax.servlet.annotation)
The javax.servlet.annotation design contains a number of ( annotations) that allow users to use annotations to declare servlets, filters, and listeners and specify the metadata for the declared component. (javax.servlet.descriptor)
Provides programmatic access to a web application's configuration information that was aggregated from the web.xml and web-fragment.xml descriptors. (javax.servlet.http)
The (javax.servlet.htt) package contains a number of classes and interfaces that describe and define the contracts between a servlet class running under the HTTP protocol and the runtime environment provided for an instance of such a class by a conforming servlet container.
Requests and servlets
When (Application Engine) receives a web request for our Conference application, it will give the servlet that corresponds to the URL, as definition of the design in the application's deployment descriptor (the web.xml file in the WEB-INF/ directory). It uses the Java Servlet API to provide the request data to the servlet, and accept the response data.
The (Application Engine) Design uses several web servers to access the application, and increase adjustment of the number of servers it is using to handle performance requests. Some request may be sent to any server, sometime different types of server that handled a previous request from the same user.
By the beginning level, each HTTP web services will processes only one request at a time. If you mark your application as thread-safe, (Application Engine) may give orders to several requests to each web server in parallel. To do so, simply add a <thread safe>true</thread safe> element to appengine-web.xml as described in Using Concurrent Requests.
Conclusion
You can retrieve the ID of the instance handling a request using particular codes.
In the production environment, a logged-in admin can use the ID in a URL .The request will be routed to that specific instance. If the instance cannot handle the request it returns an immediate 503.
At the time of the request, you can save the request ID, which is unique to the request. The request ID can be used later to correlate a request with the logs for that request. Servlet API is very important type of API when developing our Android Conference Application.
4. API Efficiency, Reliability, and Maintainability (Week 3)
JavaMail API is used to exchange mails between applications. This message sending and receiving is done by using various classes available in the API which allows us to create a customized mail application depending on our needs. It helps us in creating personal mail filter, simple mailing lists and mail applications.
“Java Mail API has classes such as Session, Message, Address, Authenticator, Transport, Store and Folder”. All these classes are found in JavaMail API. The API can be sub classed for providing new protocols.
The Session class is an entry level class of Mail API. This acts as a connection factory which defines a basic session through which everything works. It can be used to get basic information like user name, password and other information that can be shared throughout the lifecycle of the application. The Session class cannot be sub-classed.
Message class is an abstract class and it is used to create a message that can be sent. It includes all the details of an email message like the subject line, recipient email address, sent date etc. To create a message we need to pass the Session object to the MimeMessage class constructor.
Address class is an abstract class which gives us the functionality to address the message. All we need to do here is pass the email address to the Address constructor. After that is done, we connect it to our message by using the setFrom() and setReplyTo() method. We can also add people in CC, BCC by using the Message.RecipientType.CC, Message.RecipientType.BCC.
Authenticator provides authentication in the network connection so that we can access protected resources which is the mail server in this case via a username and password. We need to create an instance of Authenticator and register it with the session in order to do so.
Transport is the mechanism by which a mail sent by a sender is moved towards recipient. The class uses protocol specific language for sending the message. First a connection is established and then the message is sent to the recipients.
Store class is used for storing and retrieving messages. The message stores require the user to authenticate before allowing them access. The Folder class represents the folder for emails. It can have a folder and its sub folders. First we need to connect to the store, then to our folders in order to read messages from it.
One key advantage of JavaMail API is that it is tied to “Java Activation Framework” which is intended to unite many data formats that are available like text, audio, image, video etc. It is reusable. The MailAPI provides protocol like IMAP, POP3 etc. which we can use now and it also gives an option of making a customized mail client depending on our needs and have scope so that the future demands and enhancements can be taken care of. So we see that the API’s used are maintainable and can be easily improved in future.
JavaMail API doesn’t have any support for sending and receiving secure mails though it provides the architecture in such a way that this feature can be added later. JavaMail also doesn’t have a feature of providing facility of maintaining an address book. Every mail server does it differently so to put this in JavaAPI we need to figure out how it is handled by server.
Java Servlet API is a set of classes which includes various interface between a web client and a web servlet. Clients make a request to the Web Server, which in turn invokes the servlet which can be used to service the request through the interfaces provided.
Servlets are protocol and platform independent server side components that provide a general framework for services built on request-response paradigm. They provide customized multiuser experience to the consumer base of an organization in addition to static web page.
We always consider servlet's as an alternative ways to dynamic web technologies. We consider this because of its portability, safety, efficiency etc. Servlet is written in java so it is platform independent. We can make an application in Windows platform and if required we can even use it in Unix using tomcat taking use of the WORA property of Java.
Servlet invocation is also very efficient. One’s it is loaded it stays in memory. It is not necessary to make a process for each request from the client. The load on the server is less as when we are using servlet, a thread is formed which takes less space instead of using a process like in common gateway interface. Servlets also offers other optimizations such as caching previous computations and keeping database connection open.
Servlets are multi-threaded so it can handle multiple requests at a time. So giving response to these multiple requests is faster using servlets as context switching between threads take less time as compared to processes. We can also make our servlets thread safe so they don't undergo any concurrency issues. This can be done by using synchronized keyword or by following a single thread model.
Java’s exception handling makes servlet more reliable to handle any unwanted events and render a page according to it. A server can also use Java Security Manager so that a server can executes it servlet under an agency that enforces a security policy designed to prevent the server from getting damaged because of any poorly written servlet or from some malicious attack. The availability of Permission class allows granting permission to a particular resource. This is done by passing one or more parameter to the Permission class constructor. The first parameter is the target file and the second parameter is the action (read/write etc). We can also provide multiple permissions by using comma separated composite string.
It also provides us with some extra infrastructure for automatically parsing and decoding HTML form, handling cookies and sessions and other utilities like setting and getting HTTP headers.
When it comes to drawbacks or limitation of servlet, the basic one is that it is a mix of java as well as html content. So an application based on servlet becomes complex while doing any enhancement. This is where JSP comes to our rescue.
One also needs Java Runtime Environment to run servlets. In cases where there are no interfaces in java for a particular resource, writing a CGI program is easier than writing a java native method as there are chances that it might not work. It also helps in writing a fully complied code much nearer to the machine on which it is run. Also testing a CGI program is easier as compared to servlets.
5. Configuration and change Management (Week 4)
6. Software Construction Tools and Techniques (Week 5)