Académique Documents
Professionnel Documents
Culture Documents
1.2 MODULES
This project has been mainly divided into four modules viz.
a) General
Users of the ATS system should login to access the system. The system validates the user details and checks for the access permissions. The access to various modules of the system is provided based on the privileges of the users. These are the typical users accessing to system. They can take any specific role like: 1.PM-TL(Administrator) 2.Project-resource User can take any specific role like PM-TL, Project Resource. PM-TL will be having the administrative privileges of Resources, Projects, Tasks and Reports. Admin privileges include create, update and delete for resources, projects and tasks. Various reports of Project will give PM-TL their task easy in updating the onsite 1
timesheet system (iTime). Project-Resource will have ability to enter tasks related to the project. Tasks include task name, duration, start date and end date. Privileges on the tasks create, update and delete for the current week. No update/delete permission on the past weeks.
b) User Maintenance
PM-TL is the actor of the User Maintenance subsystem. Maintain user interface This module describes the user creation, modification and deletion. Assign Privileges This describes how different access privileges are assigned to the user and modified if required.
c)Manage Projects
This subsystem allows managing projects. The types of operations allowed are create, update and delete a project for the system by PM-TL. PM-TL is the actor of the Manage Project System. Manage Project This module describes the steps involved in creating, updating and deleting a project. Assign Resource to Project This module deals with assigning a resource to a project.
e) Reports
This subsystem enables to generate the following type of reports: 1. 2. 3. 4. Resources in the team. Resources and projects they are assigned to. Project-Task, Resources, duration, start date and end date. Summary of all Projects, Resources and billable hours related to particular month selected. PM/TL is the actor of Reports subsystem.
Table 1.1 : Layers Of Architecture Database Layer Application Layer Contains the data and database-related objects like stored procedures, triggers, packages, etc. Contains the objects addressing the business logic; Most of the middle-level Java objects will be here Web Interface Layer in application layer. It will be on the web server; It contains the web pages (JSPs) of the application which will interact Client Layer with the front-end browsers Contains the web browser which interacts with web server
Project can be categorized in two ways: Local Area Network projects. Distributed Projects.
Local Area Network projects are those projects where application has to be incorporated in the Local area network of the client i.e. within its premises only. In case of LAN, server is not remotely located and client accesses the application through the network. Here the question of platform independence does not arise and we can use the technologies like: Visual Basic, Fox pro, D2k or C, C++, etc. Distributed projects are those projects where application is remotely situated. In these kinds of projects, application is remotely situated on to the remote server from where client machine accesses the application. WAN and Internet is a kind of distributed application where client machine connects to the remote server and application is downloaded on to the client machine. Here the question of platform independence arises and we use technologies like Java Servlet, Java Server Pages, Java Beans, RMI, etc.
2.2 JAVA
2.2.1 OVERVIEW:
Java is powerful but lean on Object Oriented programming language. It has generated a lot of excitement because it makes it possible to program for Internet by creating applets, programs that can be embedded in web page. The context of an applet is limited only by one's imagination. For example, an applet can be an animation with sound, an interactive game or a ticker tape with constantly updated stock prices. Applets can be just little decorations to liven up web page, or they can be serious applications like word processors or spreadsheet. But Java is more than a programming language for writing applets. It is being used more and more for writing standalone applications as well. It is becoming so popular that many people believe it will become standard language for both general purpose and 5
Internet programming.There are many buzzwords associated with Java, but because of its spectacular growth in popularity, a new buzz word has appeared ambiguous, indeed, all indications are that it will soon be everywhere. Java builds on the strength of C++. It has taken the best features of C++ and discarded the more problematic and error prone parts. To this lean core, it has added garbage collection (automatic memory management), multithreading (the capacity for one program to do more than one thing at a time), security capabilities. The result is that Java is simple, elegant, powerful and easy to us Java is actually a platform consisting of three components: 1. Java programming language. 2. Java is library of classes and interfaces. 3. Java is a Virtual Machine. The following sections will say more about these components:
JAVA IS PORTABLE:
One of the biggest advantages Java offers is that it is portable. An application written in Java will run on all the major platforms. Any computer with a Java based browser can run the applications or applets written in the Java programming language. A programmer no longer has to write one program to run on a Macintosh, another program to run on a Windows machine, still another to run on a UNIX machine, and so on. In other words, with Java, developers write their programs only once. The Virtual Machine is what gives Java its cross platform capabilities
JAVA IS OBJECT-ORIENTED:
The Java programming language is object oriented, which makes program design focus on what you are dealing with rather than on how you are going to do something. This makes it more useful for programming in sophisticated projects because one can break
the things down into understandable components. A big benefit is that these components can then be reused. Object oriented languages use the paradigm of classes. In simplest term, a class includes both the data and the functions to operate on the data. You can create an instance of a class, also called an object, which will have all the data members and functionality of its class. Because of this, you can think of a class as being like a template, with each object being a specific instance of a particular type of class. The class paradigm allows one to encapsulate data so that specific data values are those using the data can not see function implementation. Encapsulation makes it possible to make the changes in code without breaking other programs that use that code. If for example the implementation of a function is changed, the change is invisible to the programmer who invokes that function, and it does not affect his/her program, except hopefully to improve it.
NO POINTERS:
Eliminates big source errors. By using object references instead of many pointers, problems with pointer arithmetic are eliminated, and problems with inadvertently accessing the wrong memory address are greatly reduced.
STRONG TYPING:
Cuts down on runtime errors. Because Java enforces strong type checking, many errors are caught when code is compiled. Dynamic binding is possible and often very useful, but static binding with strict type checking is used when possible.
SIMPLICITY:
Java is made easier to learn and use correctly. Java keeps it simple by having just one way to do something instead of having several alternatives, as in some languages. Java also stays lean by not including multiple inheritances, which eliminates the errors and ambiguity that arise when you create a subclass that inherits from two or more classes. To replace capabilities, multiple inheritances provide Java lets you add functionality to a class throw the use of interfaces.
Java.awt --Classes that manage user interface components such as windows, dialog boxes, buttons, check boxes, lists, menus, scrollbars, and text fields; the AWT" stands Abstract Window Toolkit. Java.sql -- The JDBC API, classes and interfaces that access databases and send SQL statements. The first three packages listed, java.lang, java.io, and java.util form the foundation, and they are the basic classes and interfaces for general-purpose programming. Development Kit Version1.1 added some new packages, with JDBC is being one of them. Other new packages include such things as Remote Method Invocation, Security and Java Beans the new API for creating reusable components. Java
JAVA IS EXTENSIBLE:
A big plus for Java is the fact it can be extended. It was purposely written to be lean with the emphasis on doing what it does very well; instead of trying to do everything from the beginning, it was return so that extending it is very easy. Programmers can modify existing classes or write their own new classes or they can write a whole new package. The JDBC API, the java.sql package, is one example of a foundation upon which extensions are being built. Other extensions are being added or worked on in area such as multimedia, Internet Commerce, conferencing, and Telephony.
JAVA IS MULTITHREADED:
Multithreading is simply the ability of a program to do more than one thing at a time. For example an application could be faxing a document at the same time it is printing another document. Or a program could process new inventory figures while it maintains a feed for current prices.
HTML stands for Hyper Text Markup Language, which is an application of standard generalized markup language. It is a simple language used to define and describe the layout of a web page.
HYPER TEXT
Hyper text is an ordinary text that has been dressed up with extra features such as formatting, imaging, multimedia and links to other documents.
MARKUP
Markup is the process of taking ordinary text and adding extra symbols. Each of the symbols used for markup in HTML is a command that tells a browser how to display the text. Markup can be very simple or it can be very complicated.
LANGUAGE
It is actually a key point to remember about HTML. HTML is a computer language related to programming languages like BASIC, C etc. HTML has its own syntax, and rules for proper communication.
HTML ELEMENTS
HTML comprises of three major elements that render a well structures look for a document. Some of these elements are optional yet their assures a better presentation Head Body Footer
10
The first HTML tag is used to identify a HTML document. The entire document should be written inside <HTML> </HTML> tags. The title of the document can be included in the <TITLE> </TITLE> tags.
BASIC ELEMENTS
An HTML document contains of text and tags used to convey the data of a document and to mark it issues. The < and > symbols that to a new user might seem to dominate an HTML are the beginnings and endings of the tags that mark a documents structure with an understanding of what these tags do a developer can quickly learn about tags mark familiar structure like titles, headings, paragraphs and lists. The < and > symbols in HTML are used to make tags to delimit elements. These elements identify the document structure. The letters into the element tag are casesensitive. Some elements such as line break elements can be delimited by one tag i.e., <BR>. Elements such as paragraph element <P> can be delimited by both start and end tag. Some elements also have attributes; the image element <IMG> uses SRC (source) to identify the file of the image to be included in the document.
BODY ELEMENTS
Body elements are used to mark text as context of a document. Unlike the head elements almost all of these marks lead to some visual expression in the browser body. The element starts with <BODY>. The tags mark the contents of the HTML document. <A>, this is an anchor element, which is based on for linking documents together
11
Attributes
HREF: This attribute identifies the URL of hypertext reference for this anchor in the form of HREF = URL. Where the URL given will be the resource that the browser receives and the user clicks the anchor hotspot. OL: For ordered list of elements.
DL: A definition list or glossary has three parts a term details explanation of the term identified with the DT element. HR: Horizontal rule, divides section of text P: This element signals a paragraph start it can have a stop tag</P> BR: This element forces a break. IMG: The IMG element allows graphical browser to place graphic images in a document at the location of the tag. SRC: This attribute indicates the source file of the image. ALIGN: This attribute sets the positioning relationship between the graphic and text that follows it. TOP, MIDDLE, LEFT, RIGHT, BOTTOM are the option for this alignment.
FORM ELEMENTS
Forms are used to present an interface consisting of fill in the blank boxes. Checklist radio buttons or other features to gather input from the user, the form elements brackets an input data form. The elements INPUT, SELECT OPTION and TEXTAREA are used to setup areas within the form input.
12
FORM: This delimits the start and end of a data input form. Forms cant be nested although there may be several forms in each document. Forms can handle other elements such as lists<PRE>.
SELECT: This element allows the user to choose one of a set of alternatives. The option element is used to define each alternative.
OPTION: This element occurs within the select element and is used to represent each choice of the select.
TEXT AREA: This element is used to collect multiple lines of text from the user. The user is presented with a scrollable pane in which text can be written.
TABLE ELEMENTS
Table: The <TABLE> tag is used to define tables and has an ending tag </TABLE> Attributes:
BORDER: Causes border to render around the table. If missing the table has no grid around it or its data.
WIDTH: Specifies how wide the table will be. If given as NN% then the width is NN% of the width of the display.
Attributes: COL SPAN: The number of columns that the cell spans.
PORTABILITY
Java Server Pages files can be run on any web server or web-enabled application server that provides support for them. Dubbed the JSP engine, this support involves recognition, translation and management of the Java Server Pages lifecycle and its interaction with associated components.
14
default/services/jse/servlets/jsp directory. This is very helpful when trying to debug the JSP files. In the javax.servlet.jsp package we can find the following classes JspPage HttpJspPage
They define the interface for the compiled JSP page-namely that it must have three methods response) The JSP author can define the first two methods, but the third is the compiled version of the JSP page, and its creation is the responsibility of the JSP engine. 15 JspInit () JspDestroy () JspService (HttpServletRequest request, HttpServletResponse
JSP Directives:
A JSP directive is a statement that gives the JSP engine information for the page that follows. The general syntax of a JSP directive is <%@ directive {attribute =value} %> Where the directive may have a number of (optional) attributes. Each directive has an optional XML equivalent, but these are intended for future JSP TOOLS.
16
Description
The language variable tells the server what language will be used in the file. Java is the only supported syntax for a JSP in the current specification.
The extends variable defines the parent class of the generated servlet. It isnt normally necessary to use anything other than the provided class.
Import = package.*;
The import variable is similar to the first section of any java program. As such it should always be placed at the top of the JSP file. The value of the import variable should be a comma-separated list of the packages and classes that you wish to import.
17
Session = true/false
By default, the session variable is true, meaning that session data is available to a page.
Info = text
servlet.getservletsetinfo () method Error Page = pathToErrorPage Gives the relative path to the JSP page that will handle unhandled exceptions. That JSP will have isErrorPage set to true.
IsErrorPage = true/false
A JSP declaration can be thought of as the definition of class-level variables and methods that are to be used throughout the page. To define a declarative block, begin the block of code with <%! Declaration>.
JSP Scriptlets:
Scriptlets are defined as any block of valid java code that resides <% and %> tags. This code will be placed in the generated servlets _jspService () method. Code that is defined within a scriptlet can access any variable and any bean that have been declared. There are also a host of implicit objects available to a scriptlet from the servlet environment. 18
Implicit Objects
Request
Description
The client request. This is usually a subclass of HttpServletRequest. This has the parameter list if there is one.
Response
The
JSP
pages
response,
subclass
of
HttpServletResponse. Page Context Page attributes and implicit objects need to be accessible through a uniform API, to allow the JSP engine to compile pages. But each server will have specific implementation of these attributes and objects. The solution to this problem is for the JSP engine to compile in code that uses a factory class to return the servers implementation of the page Context class. That page Context class has been initialized with the request and response objects and some of the attributes from the page directive and provides the other implicit objects for the page request. Session The HTTP session object associated with the request.
19
Application
The object representing the output stream. The servletConfig object for the page. The pages way of referring to itself. The uncaught subclass of Throwable that is passed to the error page URL.
Exception
JSP Expression:
A JSP expression is a very nice tool for embedding values with in your HTML code. Anything between <% and %> tags will be evaluated, converted to a string, and then displayed. Conversion from a primitive type to a string is handled automatically. JSP expression doesnt close with a semicolon. Thats because the JSP engine will put the expression within an out.println () call. JSP engine allow you to essentially parameterize HTML (just as you would parameterize a SQL query that differs by only a couple of values). Again and again, your code will setup conditions and loops using a one-line JSP scriptlet and then include the HTML code directly beneath it.
21
The J2EE server provides the EJB and web containers. The J2EE server enforces authenticating users. The either service provided by the J2EE server are listed here below. various Services to locate and search for services and components. The EJB container manages the execution of Enterprise Bean for J2EE server. EJB is a specification for making server side component that enable and simplifies the task of creating distributed objects. EJB component provide services such as transaction and security management and can be customized during deployment. The web container manages the executing of JSP and Servlets for J2EE applications web components and their container run on the J2EE server. Servlets of the java program that can be deployed on a java enable web server to enhances and extend the functionality of the web server for example you can write a Servlets to add a manager service to a website. Servlet can also be used to add dynamic content to web pages. Java Server Page (JSP) adds server side programming functionality to java. JSP consists of regular Html tags representing the static content and code enclosed within special tags representing the 22 It allows client to interact with Enterprise Bean. It enables a web browser to access Servlets and JSP files It provides naming and directory services to enable users and
dynamic content. After compilation, a JSP generates a Servlets and therefore incorporates all the Servlets functionalities.
J2EE Application:
J2EE applications are complex access data from a variety of source and cater to a variety of client. To manage these applications the business function conducted in the middle tier. The J2EE platform acts as a middle tier and provides the necessary environment needed by the application. The J2EE building multi-tier application. To create a J2EE application we need to create following three components: (1) J2EE application client 23 platform provides write once, run anywhere, portability and scalability for multi-tier application. It also minimizes complexity for
Each of these components is packaged into a file with a specified file format. A J2EE application client is a Java application that run in a environment that enable it to access to the J2EE services. A J2EE application client is packaged into a .jar (Java archive) file. The web components are packaged into a .war (Web archive) file. An Enterprise Bean consists of three files: the EJB class, Home and Remote Interfaces. The Enterprise Beans are bundled into an EJB.jar file. The .jar, .war and EJB.jar are assembled into a J2EE application, which is an .ear file. The .ear file is then deployed to the J2EE server. Oracle is one of the most successful companies that has released a number of development tools including SQL *PLUS, PL/SQL that enables faster and easier application development and its management. Oracle is the robust Database System, it support very large database. Moreover Oracle is widely used as back end for client / server applications. Administrative tools of Oracle help in securing the Data / Information. Enterprise Bean (.jar file) Component (.jar file)
Deployed
J2EE Server 24
J2EE Technologies:
The J2EE includes many technologies such as: Enterprise Java Beans (EJB) : Enterprise Java Beans (EJB) is write once, run anywhere middle tier component consisting of method that implements the business rule. Enterprise Bean encapsulates the business logic. There are two types of Enterprise Bean: Entity Bean and Session Bean.
Remote Method Invocation (RMI): Remote Method Invocation is defined for the communication of remote objects in the middle tier of the distribute application. It enables a Java object to communicate remotely with other Java object.
Java Database Connectivity (JDBC): Java Database Connectivity provides a Database programming API for Java program. A JDBC API contains a set of classes and Interfaces that are used to connect a database build using any DBMS or RDBMS. It also submit SQL query to a database and retrieve its and processes the result of SQL query.
Servlet: Servlets are used to develop a variety of web-based application. They make use of the extensive power of the Java API such as networking and URL access, multithreading, database connectivity, internationalization, RMI and object serialization. Java Server 25
Pages (JSP) adds server side programming functionality to Java. Both Servlet and JSP allow the creation of database driven web application and have server side programming capability.
Extensible Markup Language (XML) J2EE uses Extensible Markup Language as a Markup language to describe the contents. The described file created when deploying the J2EE application is an XML file.
BOUND PROPERTIES:
One way of exporting events is to use bound properties. When a property value changes a bound property can inform other parts of the application that its value is changed. 26
BEAN EVENTS:
The property change support class should cater for most of the needs. However on many occasions beans will still need to communicate even though no property change activity has occurred.
27
1. JDBC API
The JDBC API provides developers with a way to connect to relational data from within java code. Using the JDBC API, developers can create a client (which can be anything from an applet to an EJB) that can connect to a database, execute structured query language statements, and processes the result of those statements. The API provides connectivity and data access across the range of relational databases. It can do this because it provides a set of generic database access methods for sql compliant relational databases. JDBC generalizes the most common database access functions by abstracting the vendor specific detail of particular database. The result is set of classes and interface, placed in the java.sql package, which can be used with any database that has an appropriate JDBC drive. This allows JDBC connectivity to be provided in a consistent way for any database. It also means that with a little care to ensure the application confirms to the most commonly available database features, an application can be use with a different database simple by switching to a different JDBC driver. JDBC includes following packages for the means of database accessing and provides various features of the database. The packages are as follows: java.sql Package: This package contains classes and interfaces designed with traditional client/server in mind. Its functionality is focused primarily on basic database programming services such as creating connections, executing statements and prepared statements, and running batch queries. Advanced functions such as batch updates, scrollable result sets, transaction isolation, and sql data types are also available. javax.sql Package: This package introduces sum major architectural change to JDBC programming compared to java.sql package, and provides better abstractions for connections management, distributed transactions, and legacy connectivity. This package also introduces container-managed connection pooling, distributed transactions, and row sets.
2. JAVA SERVLETS
28
Servlets are Java technologys answer to Common Gateway Interface (CGI) programming. They are programs that run on a Web server, acting as middle layer between a request coming from a Web browser or other HTTP client and databases or applications on the HTTP server. Their job is to:
Look up any other information about the request that is embedded in the HTTP request.
This information includes details about browser capabilities, cookies, the host name of the requesting client, and so forth.
JDBC
There are many classifications of databases available as Hierarchical database, Network database, Relational database, A technology that enables JSP base applications to interact directly with database engines is called Java Database Connectivity and is an integral part of Java platform.
29
server
Engine
Driver
DB Server Machine
RDBMS Server
Fig 2.6.1: Interaction of JSP Page with JDBC JDBC/JSP based web application access the database connections. These connections must be managed carefully by the application especially if a large number of concurrent users may be accessing them. To make this performance optimization JDBC uses a mechanism called connection pooling. The evaluation of this open database access
30
technology has led to a miracle of driver architecture. Here the browser using the web application is not required to support java at all. The JSP has full control over how many JDBC connections are made to the server. The client never makes direct JDBC connection to the server. This solution can work readily through a firewall, only standard HTTP is used between the web server and the client.As a bonus this solution sends itself to easily secured information simply by adding secured socket layer support to the web server. Because of this separation of the presentation from the business logic, which is separated from the database logic, this sort of system is often called three tiers There is still one minor problem with this scenarioThere are 2 solutions for this: 1. Create java beans or java classes that encapsulate all the JDBC operations. This is significantly better solution. But instantiation, initialization and parameterization of the java class or the beans can still represent a significant amount of embedded java code with in the JSP. 2. Create a tag extension set to pushdown all the database access logic. The data access logic programmers write the set of custom tags. The JSP application logic designers will then use the set of custom tag to create their application.
JSPs
JDBC Driver
31
REPORTS
33
Field Name
emp_no Address Street City Pin State Phone Mobile Emailid Role_no Desig
Data Type
Number Varchar Varchar Varchar Number Varchar Number Number Varchar Number Varchar
Size
3 50 20 20 6 20 8 10 25 2 15
Constraints
Primary Key, Not null Not null Not null Not null Not null Not null Not null Not null Not null Not null Not null
Field Name
Emp_no Emp_name Status
Data Type
Number Varchar Varchar
Size
3 30 10
Constraints
Primary Key, Not null Not null Not null
34
Data Type
Varchar Varchar Varchar Varchar
Size
30 30 30 2
Constraints
Not null Not null Not null Not null
Field Name
Proj_no Proj_name Customer Stdate Enddate Duedate Esthrs Tech Status Creator Proj_status
Data Type
Number Varchar Varchar Date Date Date Number Varchar Varchar Number Varchar
Size
3 50 50
Constraints
Primary Key, Not null Not null Not null Not null Not null Not null Not null Not null Not null Not null Not null
8 50 30 3 30
Field Name
Team_no Proj_no
Data Type
Number Number
Size
3 3 35
Constraints
Primary Key, Not null Not null
Field Name
Role_no Role_name
Data Type
Number Varchar
Size
3 20
Constraints
Primary Key, Not null Not null
Process
A process transforms data values. The lowest level processes are pure functions without side effects. An entire data flow graphics high level process. Graphi
A data flow connects the output of an object or process to input of another object or process. It represents the intermediate data value within a computation. It is represented by an arrow and labeled with a description of data, usually its name or type. Graphical Representation:
values.
Actors
An actor is active object that drives the data flow graph by producing or consuming
Data store A data store is a passive object with in a data flow diagram that stores data for later access. Graphical Representation :
37
External Entity A rectangle represents an external entity such as a librarian, a library member. Graphical Representation:
Output Symbol This box represented data production during human computer interaction. Graphical Representation:
38
39
First of all you need to understand how Microsoft Access breaks down a database. Some keywords involved in this process are: Database File, Table, Record, Field, Data-type. Here is the Hierarchy that Microsoft Access uses in breaking down a database. Table 3.6.1: MS-access description
41
Database File: This is your main file that encompasses the entire database and that is saved to your hard-drive or floppy disk. Example) StudentDatabase.mdb Table: A table is a collection of data about a specific topic. There can be multiple tables in a database. Field: Fields are the different categories within a Table. Tables usually contain multiple fields.
42
If you have already opened a database or closed the dialog box that displays when Microsoft Access starts up, click New Database on the toolbar. On the Databases tab, double-click the icon for the kind of database you want to create. Specify a name and location for the database. Click Create to start defining your new database
43
4.1 ANALYSIS
44
System Analysis is the process of gathering and interpreting facts, diagnosing the problems and using the information to recommend improvements to the system. Analysis specifies what the system should do, where as, design states how to accomplish the objective. System analysis is an activity that encompasses most of the tasks that are collectively called Computer System Engineering. The activities in this phase include the investigation of the problem, the determination of the desired system performance, the identification and evolution of potential system solution and the analysis of the alternative solutions. The purpose of these activities is to select the most cost effective system. The study phase report is prepared and this system is recommended to the user as the most feasible solution to the problem. System Analysis is conducted with the following objectives in mind. 1. Identify the customers need. 2. Evaluate the system concept for feasibility of people, database and other system elements. 3. Establish cost and schedule constraints. 4. Create a system definition that forms the foundation for subsequent engineering work
45
The JSP tags can be used just like other tags specified in HTML the declarative tags and the scriptlets can be easily invoked. So the system is operationally feasible
46
With central control of data certain standards like industrial, national, international can be enforced e) Security restrictions can be applied Having complete control of data we can ensure that the only means of accessing data is through proper channel f) Integrity can be maintained The problem of integrity is the problem ensuring the data in the database is accurate. it can ensured by defining validation procedures when ever updating operations are to be carried out g) Conflicting requirements can be balanced Database can be structured to provide an overall service
1. Ability to connect to the server. 2. Notification on connection failures. 3. To display screens using tomcat. 4. Error messages on improper use of the software. 5. Ability to configure and store default values for usage of the software. 6. Comprehensive online help for the usage of the software. .
4.4 TESTING
Testing:- Software testing is a critical element of software quality assurance and
represents the ultimate review of specification, design and coding. Testing is the exposure of the system to trial input to see whether it produces correct output.
4.4.3
4.4.3.1
Test Approach
Bottom Up Approach
Testing can be performed starting from smallest and lowest level modules and proceeding one at a time. For each module in bottom up testing a short program executes the module and provides the needed data so that the module is asked to perform the way it will when embedded with in the larger system. When bottom level modules are tested attention turns to those on the next level that use the lower level ones they are tested individually and then linked with the previously examined lower level modules.
This type of testing starts from upper level modules. Since the detailed activities usually performed in the lower level routines are not provided stubs are written. A stub is a module shell called by upper level module and that when reached properly will return a message to the calling module indicating that proper interaction occurred. No attempt is made to verify the correctness of the lower level module.
Step No. 1.
The
Step Description
user/PM-TL enters Username and password and clicks the login button. If he is a valid PMTL
Result
the Manager home Page appears..
2.
The
user/PM-TL
enters
the
Username and password and clicks home page appears. the login button. If he is a valid User Exception Handling:
3. 4.
The
user
enters
an
invalid The Alert Message Please enter proper information is displayed. The Alert Message Please enter the correct Password is displayed.
51
Purpose: This module describes the user creation, modification and deletion. Prerequisite: Login procedure should be completed successfully.
The PM-TL clicks on the The users account is displayed. Resource menu in which it has two pop-ups create and view. If he selects view
2.
If he selects Create
Resource
create
page
is
displayed and the PM-TL can create a new user which can be updated in the database. Purpose: managing projects. The types of operations allowed are create,
update and delete a project. Prerequisite: Login procedure must be completed and he must be a valid PM-TL
Step No.
Step Description
Result
52
1.
The PM-TL clicks on the project menu in which he has three options view, create and The project assign displayed. If he clicks on view details are
2.
If he clicks on create
He can create a new project the details are updated in the database.
3.
If he clicks on Assign
He can select the existing users and assign projects to them .this is updated in assign projects table in database
4.5.4 Manage Project Task (User) Purpose: This subsystem enables the project resource to enter the tasks of the project. Prerequisite: Login procedure must be completed and he must be a valid User
Step No.
Step Description
Result
53
1.
The User clicks on the User Task menu in which he has two options view, create. If he clicks on view The Task details of his
project are displayed. 2. If he clicks on create He can create a new Task based on his project. The details are updated in the database. Exception Handling: 3. If he tries to modify the task Error message is displayed information of the previous saying week tasks cannot be modified
4.5.5 Reports (PM-TL) Purpose: This subsystem enables the project Manager to generate reports on projects,resources,tasks Prerequisite: Login procedure must be completed and he must be a valid PM_TL
Step No.
Step Description
Result
54
1.
The PM-TL clicks on the Reports menu in which he has three options resources, projects, tasks If he selects resource and gives resourceid as the input The report is generated for the existing user.
2.
If he selects project and gives The information regarding the projectid as input project is displayed Summary of all projects,
3.
If he selects summary
4.6 MAINTENANCE
Maintenance is far more than fixing mistakes. The maintenance can be defined using four activities that are undertaken after a program is released for use. 1.The first maintenance activity occurs because it is unreasonable to assume that software testing will uncover all latent errors in a large software system. The process that includes the diagnosis and correction and correction of one or more errors is called corrective maintenance. 2. The second activity that contributes to a definition of maintenance occurs because of the rapid change that encountered in every aspect of computing. Adaptive maintenance, an activity that modifies software to properly interface with a changing environment-is both necessary and commonplace.
55
3. The third activity that may be applied to as definition of maintenance occurs when a software package is successful. As the software is used new recommendations for new capabilities, modifications to existing functions and general enchantments are received from the users, to satisfy this request Perceptive maintenance is used. 4. The fourth maintenance activity occurs when software is changed to improve future maintainability or reliability, or to provide a better basis for future enhancements. This is often called Preventive maintenance, which is characterized by reverse engineering and Re- engineering techniques.
56
General module:
This module deals with the login procedure to access the system .The system validates the user details and checks for the access permissions. The access to various modules of the system is provided based on the privileges of the users.
57
The typical users accessing the system can take any specified role like: 1. PM-TL (administrator) 2. project-resource User can take any specific role like PM-TL, project-resource.PM-TL will be having administrative privileges of resources, projects, tasks and reports. Administrative privileges include create, update, delete for resources, projects and tasks. Various reports of project1 will give PM-TL their task easy in updating the onsite time sheet Project resources will have ability to enter tasks related to the project. Tasks include task name, duration, start date, end date, privileges on the tasks create, update, delete for the current week. No update/delete permission on the past weeks.
Reports:
In this module the PM-TL is going to generate the following reports: 1. 2. 3. Resources in the team Resources and projects they are assigned to Project task, resources, duration, start date and end date.
In the account tracking system we have designed the WebPages using HTML and JavaScript. As a front end tool we have used Java Server Pages and as a middle tier we have used web server called Tomcat5.0 which will deploy the application from JSP. For every JSP, internally a servlet is generated at the Server side. JSPs are used for generating the content dynamically and for minimal usage of code and for getting the request and response from the server or the database by internally acting as a servlet.
59
CHAPTER 6: RESULT
This objecticve of project Account Tracking System is to be a complete Project Management tool that can be used anytime, anywhere by anyone. This product enables Project Managers and team members to collaborate and communicate project and personal information around the globe. It provides access regarding details of the project to individual team member depending upon permission authored by the administrator.
This Project provides up-to-date status of all active Projects in the company. Using this tool, an organization can access the project status anytime, anywhere thus ensuring timely decisions. Moreover, using a Web browser, executives can have a high-level overview of all projects. This Project is useful for distributed organizations and provides real-time information on various project activities.
60
CHAPTER 7: CONCLUSION
7.1 CONCLUSION & FUTURE SCOPE
The application can be used by organizations that need to keep track of the user information, project information. It can be used by organizations to allow user to create and update his tasks. The System can be used for automating the onsite time sheet generated every month. The template has been so well designed that in case of newer modules to be added, it can plug the new modules in without affecting the already present modules. An elegant user friendly interface is provided so that any novice person can work with it. Authentication, Verification and Validation are some of the main features which are included in the system. The application was tested and found to execute successfully.
The software provides both the user with an online help to guide to help him through its usage, as well as facilitate the storing of important information as default parameters, also errors are taken care by the generation of appropriate user-friendly messages.The data in the Reports generated using this application is going to be exported to excel sheets using more advanced concepts timesheets. and sent to onsite for the generation of weekly
61
CHAPTER 8: REFERENCES
1. 2. 3. 4. 5. 6. Deitel ,Deitel and Nieto ,Internet and World Wide Web how to program. Roger S. Pressman ,Software Engineering A Practitioners Approach IEEE, IEEE Software Standards , IEEE Press ,1989 HTML Black Book Internet & World Wide Web Deitel, Deitel Oracle developer 2000-Ivan, Bay, Ross
WEB SITES
1. 2. 3. 4. 5. www.java.sun.com www.w3schools.com www.webopedia.com www.wikipedia.com www.google.com
62
APPENDIX A
CODING
Coding is done using HTML and JSPs as front end and MS-Access as backend database.
DatabaseConnection.java
package beans; import java.io.*; import java.sql.*; //DataBaseConnection.java public class DataBaseConnection implements Serializable { private String query; private int n; Connection con=null; Statement st=null; public DataBaseConnection() {} public void setQuery(String query) { this.query=query; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:ATS","ATS","ATS"); st=con.createStatement(); //System.out.println(query); n=st.executeUpdate(query); } catch(Exception e) { e.printStackTrace(); } finally { try { if(st != null) st.close(); if(con != null) con.close(); } catch (Exception ee) { ee.printStackTrace(); 63
LoginForm.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%@ page import="java.util.*,java.lang.*"%> <div align=right><%out.print(new Date());%></div> <html> <script> function f() { var d=new Date(); //document.f1.t.value=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds(); if(d.getSeconds()%2==0) { document.body.text="BLACK" } else { document.body.text="BLUE" } } </script> <script language="javascript"> function validate() { if(document.ff.userid.value=="") { alert("Enter UserId"); document.ff.userid.value=""; document.ff.userid.focus(); return false; 64
} else if(document.ff.userid.value.length >25) { alert("UserId should not exceed 25 characters"); document.ff.userid.focus(); return false; } else if(!(isNaN(document.ff.userid.value))) { alert("UserId should not be a number"); document.ff.userid.value=""; document.ff.userid.focus(); return false; } else if(document.ff.pass.value=="") { alert("Enter Password"); document.ff.pass.value=""; document.ff.pass.focus(); return false; } else if(document.ff.pass.value.length >15) { alert("Password should not exceed 15 characters"); document.ff.pass.focus(); return false; } else { ff.action="./login" ff.method="POST" ff.submit(); } } function infoscroll(seed,looped) { var text1 = "Account Tracking"; var text2 = " System"; var msg=text1+text2; var putout = " "; var c = 1;
65
if (looped > 10) { window.status="<Thanks !>"; } else if (seed > 100) { seed--; var cmd="infoscroll(" + seed + "," + looped + ")"; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 100 && seed > 0) { for (c=0 ; c < seed ; c++) { putout+=" "; } putout+=msg.substring(0,100-seed); seed--; var cmd="infoscroll(" + seed + "," + looped + ")"; window.status=putout; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 0) { if (-seed < msg.length) { putout+=msg.substring(-seed,msg.length); seed--; var cmd="infoscroll(" + seed + "," + looped + ")"; window.status=putout; timerTwo=window.setTimeout(cmd,100); // 100 } else { window.status=" "; looped += 1; var cmd = "infoscroll(100," + looped + ")"; timerTwo=window.setTimeout(cmd,75); // 75 } } } // --> <!-infoscroll(100,1) // --> </script> <h3><center><font face="Monotype System</font></center></h3> <hr>
Corsiva"
size="6">Account
Tracking
66
<body onload="tt=setInterval('f()',1000);"> <form name=ff method="POST" onSubmit="return validate()"> <table border=0 bordercolor=black align=center width=276 name=ta> <tr><td width="270" ><br> <p align="center"> <em><strong> <font size="6" COLOR=#000080 face="Times New Roman, Times, serif"><u SIZE=4>L O G I N</u> </font></strong></em></p></td></tr> <tr><td width="270" > <table align="center" width="206" > <tr> <td height="23" width="81"><font size="4" color="#000080">User ID:</td> <td width="115"><font color="#000080"><input type=text name=userid size=15></font></td> </tr> <tr> <td height="23" width="81" ><font size="4" color="#000080">Password:</td> <td width="115"><font color="#000080"><input type=password name=pass size=15></font></td> </tr> <!-<tr> <td align="center" height="23" ><font size="4" color="#800000">Role:</td> <td align="center"> <select name=rol size=1> <option value="ProjectManager">ProjectManager</option> <option value="ProjectLeader">ProjectLeader</option> <option value="TeamLeader">TeamLeader</option> <option value="Programmer">Programmer</option> <option value="Designer">Designer</option> <option value="Tester">Tester</option> <option value="Analist">Analist</option> </select></td> </tr> --> <tr> <td align="center" width="81"><font color="#800000"><br> <input type=submit value="L o g i n"></font></td> <td align="center" width="115"><br><input type=reset value="R e s e t"></td> </tr> </table> <br></td></tr></table> <br> </form> </body> </html>
67
UserLogin.java
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; //UserLogin.java public class UserLogin extends HttpServlet { Connection con; Statement stmt; ResultSet rs; public void service(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { PrintWriter out=resp.getWriter(); ServletContext sct=getServletConfig().getServletContext(); //RequestDispatcher disp=sct.getRequestDispatcher("/LoginForm.jsp"); RequestDispatcher disp=sct.getNamedDispatcher("Loginvalidation"); resp.setContentType("text/html"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:ATS","ATS","ATS"); HttpSession session=req.getSession(); session.setAttribute("CONNECTION",con); stmt=con.createStatement(); String query="select role from Login_Form where username='"+req.getParameter("userid")+"'and password='"+req.getParameter("pass") +"'"; rs=stmt.executeQuery(query); if(rs.next()) { String role = rs.getString(1); System.out.println("Role : "+role); req.setAttribute("role",role); //out.println("<center><font color=black><h3><i><br><br>Password ok</i></h3></font></center>"); //resp.setHeader("refresh","4;url=./LoginForm.jsp"); disp.forward(req,resp); } else { out.println("<center><font color=black><h3><i><br><br>Please Enter Currect UserId/Password</i></h3></font></center>"); 68
resp.setHeader("refresh","4;url=./LoginForm.jsp"); } }//try catch(Exception e) { e.printStackTrace(); System.out.println(e.getMessage()); } finally { try { if(rs != null) rs.close(); if(stmt != null) stmt.close(); if(con != null) con.close(); } catch (Exception ee) { ee.printStackTrace(); } } }//service } //class
ClientDetails.jsp
<%@ page import="java.util.*" %> <% Date d=new Date(); int dt=d.getDate(); int m=d.getMonth(); int y=d.getYear(); Date to_date=new Date(dt,m,y); //action="./clientdetails" %> <%@ page language="java"%> <%@ page import="bean.Counter,java.util.*,java.lang.*"%> <html> <head> <script language="JavaScript"> function check() 69
{ if(document.f.cid.value=="") { alert("Please Enter Customer ID"); document.f.cid.value=""; document.f.cid.focus(); return false; } else if(document.f.cid.value.length >10) { alert("Customer ID should not exceed 10 characters"); document.f.cid.focus(); return false; } else if(document.f.cname.value=="") { alert("Please Enter Customer Name"); document.f.cname.value=""; document.f.cname.focus(); return false; } else if(document.f.cname.value.length >20) { alert("Customer Name should not exceed 20 characters"); document.f.cname.focus(); return false; } else if(document.f.add.value=="") { alert("Please Enter Address"); document.f.add.value=""; document.f.add.focus(); return false; } else if(document.f.add.value.length > 75) { alert("Address should not exceed 75 characters"); document.f.add.focus(); return false; } else if(document.f.phno.value=="") { alert("Please Enter Phone Number"); 70
document.f.phno.value=""; document.f.phno.focus(); return false; } else if(isNaN(document.f.phno.value)) { alert("Phone Number should be Numeric"); document.f.phno.value=""; document.f.phno.focus(); return false; } else if(document.f.phno.value.length > 15) { alert("Phone Number should not exceed 15 digits"); document.f.phno.focus(); return false; } else if(! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+ $/.test(document.f.email.value))) { alert("Invalid E-mail Address! Please re-enter.") document.f.email.focus(); return false; } else if(document.f.email.value.length > 25) { alert("Email should not exceed 25 characters"); document.f.email.focus(); return false; } else if(document.f.date.value=="") { alert("Please Enter Date"); document.f.date.value=""; document.f.date.focus(); return false; } else if(document.f.des.value=="") { alert("Please Enter Description"); 71
document.f.des.value=""; document.f.des.focus(); return false; } else if(document.f.des.value.length > 100) { alert("Description should not exceed 100 characters"); document.f.des.focus(); return false; } /* else { f.action="./clientdetails"; f.submit(); } */ } </script> </head> <body > <jsp:useBean id="counter"scope="session" class="bean.Counter" /> <jsp:useBean id="pk"scope="session" class="bean.PrimaryKeyGen" /> <form name="f" method=POST action="./clientdetails" onSubmit="return check()"> <table border="3" width=401 align=center bordercolor="black"> <tr bgcolor="#cccccc" bordercolor="#cccccc"> <td colspan=2 width="346" ><em><strong><div align=center><font color="BLACK" size=5>Client Registration </font></div></strong></em> <em><strong><div align=right><font size=3 color="0033ff">Date:<% out.println(dt+"/"+(m+1)+"/"+(y+1900)); %> </font></div></strong></em><hr></td> </tr> <tr bgcolor="#eeeeee" bordercolor="#eeeeee"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Client ID</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"><input type=text name=cid size=12 text="dont"></font></div></strong></em></td> </tr> <tr bgcolor="#cccccc" bordercolor="#cccccc"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Client Name :</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"><input type=text name=cname size=12></font></div></strong></em></td> </tr> 72
<tr bgcolor="#eeeeee" bordercolor="#eeeeee"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Client Address :</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"> <textarea name=add rows="4"columns="6" cols="20"></textarea></font></div></strong></em></td> </tr> <tr bgcolor="#cccccc" bordercolor="#cccccc"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Phone No:</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"><input type=text name=phno size=12></font></div></strong></em></td> </tr> <tr bgcolor="#eeeeee" bordercolor="#eeeeee"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">E mail :</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"><input type=text name=email size=12></font></div></strong></em></td> </tr> <tr bgcolor="#cccccc" bordercolor="#cccccc"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Client Required Date:</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"><input type=text name=date size=12> </font><font size=1 color="0033ff">(eg 02-052005)</font></div></strong></em></td> </tr> <tr bgcolor="#eeeeee" bordercolor="#eeeeee"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Client Required Platforms:</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"> <select name=frontend size=1> <option value="JAVA">Java</option> <option value="J2EE">J2EE</option> <option value="J2SE">J2SE</option> <option value=".NET">.NET</option> <option value="VB">VB</option> <option value="C">C</option> <option value="C++">C++</option> <option value="SAP">SAP</option> </select> <select name=backend size=1> <option value="SQL">SQL</option> <option value="MYSQL">MYSQL</option> 73
<option value="MS-ACC">MS-ACC</option> <option value="FOXPRO">FOXPRO</option> <option value="CYBASE">CYBASE</option> </select> </font></div></strong></em></td> </tr> <tr bgcolor="#cccccc" bordercolor="#cccccc"> <td width="199"><em><strong><div align=right><font size=3 color="0033ff">Project Description :</font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"> <textarea name=des rows="4" columns="12" cols="20"></textarea></font></div></strong></em></td> </tr> <tr bordercolor="#ffccaa "> <td width="199"><em><strong><div align=right><font size=3 color="0033ff"><input type="submit" name=submit value="Insert"></font></div></strong></em></td> <td width="182"><em><strong><div align=left><font size=3 color="0033ff"><input type="Reset" value="Reset"></font></div></strong></em></td> </tr> </table> </form> </body> </html>
ClientDetails.java
import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.Date; import beans.*; import beans.DataBaseConnection; //ClientDetails.java public class ClientDetails extends HttpServlet { int i; String message; public void service(HttpServletRequest req,HttpServletResponse ServletException,IOException { res.setContentType("text/html"); PrintWriter out=res.getWriter(); DataBaseConnection bean=new DataBaseConnection(); 74
res)
throws
try { Date d = new Date(); //String sysdate = d.toString(); String flatform=req.getParameter("frontend")+"/"+req.getParameter("backend"); String query="insert into Client_Details values('"+req.getParameter("cid") +"','"+req.getParameter("cname")+"','"+req.getParameter("add") +"','"+req.getParameter("phno")+"','"+req.getParameter("email") +"',sysdate,'"+req.getParameter("date")+"','"+flatform+"','"+req.getParameter("des")+"')"; System.out.println("query ok : "+query); bean.setQuery(query); System.out.println("SET ok"); i=bean.getResult(); System.out.println("GET ok"); System.out.println(i); } catch(Exception e) { message=e.getMessage(); } if(i==1) { out.println("<html><body bgcolor=#eeeeee><center><br><br><br>"+i+"--->Record Successfully Inserted</center></body></html>"); res.setHeader("refresh","3;url=./ClientDetails.jsp"); //res.sendRedirect("./ClientDetails.jsp"); } else { out.println("<html><body bgcolor=#eeeeee><center><br><br><br>Record NOT Inserted"); out.println("<br>Due To This Exception"+message+"</center></body></html>"); res.setHeader("refresh","12;url=./ClientDetails.jsp"); //res.sendRedirect("./ClientDetails.jsp"); } } }
75
APPENDIX B
SCREEN SHOTS
ACCOUNT TRACKING SYSTEM HOME PAGE
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94