You are on page 1of 88

TMS-Integra Micro Systems

A Project report on the Time Management System


Submitted by: Harjodh Singh C.S.E. Roll No.: 7100300586

2011

TMS-Integra Micro Systems 2011


Contents 1. COMPANY PROFILE ................................................................................................................. ....

1.1 INTRODUCTION TO THE PROJECT.................................................................. ..............................


2. 3. 3.1 3.2. OBJECTIVE ................................ ................................ ................................ ................................ TOOLS/ENVIRONMENT USED ................................ ................................ ................................ ... INTRODUCTION TO JAVA ................................ ................................ ................................ ...... Java ............................................................................................................................... ..............

3.3. Microsoft SQL Server................................ ................................ ................................ .................. 3.4. 3.5. IDE-Net Beans ................................ ................................ ................................ ........................ Apache Tomcat: ................................ ................................ ................................ .....................

3.6. JavaScript............................................................................................................................. ..... 3.7. CSS................................................... ..........................................................................................


4. 4.1 SYSTEM ANALYSIS ................................ ................................ ................................ ................... FEASIBILITY STUDY ................................ ................................ ................................ ..............

4.1.1 Technical feasibility: ................................ ................................ ................................ ................. 4.1.2. Operational feasibility: ................................ ................................ ................................ ............. 4.1.3 Economical feasibility: ................................ ................................ ................................ ............. 5. 5.1 5.2 5.3 SYSTEM DESIGN................................ ................................ ................................ ........................ DFD ................................ ................................ ................................ ................................ ......... Use Case Diagram ................................ ................................ ................................ .................. DATA DICTIONARY ................................ ................................ ................................ ................

6. Project Modules...................................................................................................................... ............. 7


8 8.1 8.2 8.3 8.4 OUTPUT ................................ ................................ ................................ ................................ ...... TESTING ................................ ................................ ................................ ................................ ..... Unit testing: - ................................ ................................ ................................ .......................... Integration testing: -................................ ................................ ................................ ............... System testing: - ................................ ................................ ................................ .................... Alpha testing: - ................................ ................................ ................................ .......................

8.5. Beta testing:- ................................ ................................ ................................ ............................. 9 10 LIMITATION OF THE PROJECT ................................ ................................ ................................ . Bibliography: ................................ ................................ ................................ ..........................

Developed by : Harjodh Singh |Time Management System 1

TMS-Integra Micro Systems 2011

1. COMPANY PROFILE
History Integra Micro Systems is a leading software company of India with its main offices in the city of Bangalore in South India. Started in 1982 by a small group of technocrats in New Delhi, Integra today employs nearly 200 persons, has offices in most major cities of India, and has spun of f two domestic and two Overseas s ubsidiaries. Taken as a whole, the Integra group employs over 450 persons today. Integra started by porting and adapting operating systems for microcomputers. It offered consulting and training in UNIX when UNIX was unheard of in India, and carried out the first UNIX port in India. Integra then moved on to product development in Office Automation, Networking and Communication, and Document Imaging, on UNIX, MS -DOS, and Windows platforms, upgrading products al l the time and looking for technology areas of the future. Integra was the first company in India and the fifth in the world to bring out a Wireless Application Protocol (WAP) stack. Integra pioneered the first WAP conference in India, aimed at spreading t he awareness of WAP technologies among software professionals. Similarly, Integra was the first company to design and deploy integrated solution (Micro ATM with associated software) for Financial Inclusion iMFAST. The technical caliber of its engineers h elped Integra achieve a respectable reputation with its global customers for on -site software development. This was followed by offshore software development in India for well -known international clients, the major area of thrust for Integra today. Integra believes that integrity, stability, long track record, product development experience, customer allegiance, learning ability and scaling to customer needs are its key strengths Achievements Achieving milestone with dedication, commitment and terrific validation of our business model as a growth & growing company we are right where we planned to be. As a result of careful growth and execution of a sound business model, we are the First Indian Company.
   

To port UNIX on Indian hardware To build office automation, communication and networking suites on UNIX for Indian clients To develop the TCP/IP stack in India along with associated utilities To develop the WAP stack in India, along with associated software solutions and services

Developed by : Harjodh Singh |Time Management System 2

TMS-I t
 

r Mi r Syst

s 2011

il il t

i i

f i

l fi ft

i li . f : ti I

tt li t L ti A li .

 

G l tI GS A ,

ti

i t

i I il I

ti ti

P P

,A i

il

Fi

i lI I t

i i i S l t t t t liz i t t i l ft i i i iti ti f fi i l i t t , ll l i t , t ft l ti

t l

l l . I t

f ll f i . il l t ti . It t i lI t t i l A i , ,f t li ti i ilit t l ti S t i f

I t t fi i f tifi t i ll

i ll i t

l i f

AS

i ti it . It

ti t f l

i t i

i t t

ti

Deve

e by : Harj

e Manage ent Syste

TMS-I t capabl f l i
t cost

r Mi r Syst
per

s 2011
transaction.

population,

designed to be transported to the villages by a agent service) and ho can visit multiple villages in a day.

through cashless transactions. It has a secure identification and authentication system through a live biometric fingerprint sensor. he device has local language voice guided systems and offers both, ired and ireless connectivity. It has voice guidance and an

impact printer hich issues a printed slip as proof of transaction.


I P
# " % $

it extends its reach to the un-banked people, increases deposit base through SHGs, increases earnings from other banking applications and value added services, and brings in cash into the banking system through cashl ss transactions and cooperative markets. o the e villager, it introduces the concept of savings, saves them the trouble of travel to the bank, extends the facility of anytime banking and frees them from the control of money -lenders.



 

 

Deve

e by : Harj

S ngh |

"!

ESS

AS

as esi ned to address t e specific pains of rural banking: a semiliterate and authentication. It is ork for the bank or a postal

arsh rural environments, and issues of securit ho may

he small portable compact electronic device brings in cash into the banking system

he solution provides benefit to both, the bank and the rural population. or the bank,



e Manage ent Syste

TMS-Integra Micro Systems 2011

SCALABILITY

The

device

can

handle

multiple

applications

requiring

identification

and

authentication. The device currently has 256 MB of memory, which can be scaled up to 8 B. Smart card is of 4 K memory currently and can be extended up to 144 K. iMFAST was initially deployed in a pilot site with a leading bank in South India. It is now successfully running in over 50 locations of this bank. In addition, the solution has been deployed in multiple locations by five other leading banks. Future development plan addresses both tech nology and services. Technology options include mini -ATM with minimum maintenance cost, enumeration devices for e -governance, support for various smart cards, NFC -based point of service/payments and information kiosks. Future services would include doorste p banking for urban regions and value added services for microfinance, micro insurance, etc

Developed by : Harjodh Singh |Time Management System 5

TMS-Integra Micro Systems 2011

1. INTRODUCTION TO THE PROJECT


This project is built using Java as the front end and Sql -Server as the backend. This system would help to keep record of the all ther users of the organi ation. All the coding work is being done in the java in NetBeans IDE. Java EE is the technology used. Servlets and JSPs are being used. Servlets handle the controller part and the JSPs are used for viewing. Administrator will be the only one who will make the new users and new roles. Only administrator will be able to change the roles of the users. Every user can make his own time sheets and can enter the periods and edit the periods. There will be no confliction of the time of periods for one day and no user will be able to make two timesheets for one day.

2. OBJECTIVE
It is difficult to maintain a large number of users and their time sheets in excel files. Time sheets sent by emails difficult to maintain. Excel files are used for keeping those time sheets which is very difficult. If a user send time sheet in excel file then also it is difficult to merge one excel file in other excel file. We need a system to maintain all the records about users and their time sheets. So we need a system which can keep the records of the users of whole organi ation. This system will help the users and the o rgani ation to make users and timesheets and adding periods.

Developed by : Harjodh Singh |Time Management System 6

TMS-Integra Micro Systems 2011

3. TOOLS/ENVIRONMENT USED

3.1

INTRODUCTION TO JAVA

Java is a object oriented programming language. The Java programming language and environment is designed to solve a number of problems in modern programming practice. Java started as a part of a larger project to develop advanced software for consumer electronics. These devices are small, reliable, portab le, distributed, real -time embedded systems. Java brings together a bunch of excellent computer language ideas, and as a result it is fantastically popular. From the original Sun Java whitepaper: Java is a simple, object-oriented, distributed, interpreted , robust, secure, architecture -neutral, portable, high performance, multi -threaded, and dynamic language. By law, any introductory Java lecture must mention the original bu Simple We wanted to build a system that could be programmed easily witho ut a lot of esoteric training and which leveraged today's standard practice. Most programmers working these days use C and most programmers doing object -oriented programming use C++. So even though we found that C++ was unsuitable, we designed Java as clos ely to C++ as possible in order to make the system more comprehensible. Java omits many rarely used, poorly understood, confusing features of C++ that in our experience bring more grief than benefit. These omitted features primarily consist of operator overloading (although the Java language does have method overloading), multiple inheritance, and extensive automatic coercions. We added automatic garbage collection, thereby simplifying the task of Java programming but making the system somewhat more complicated. A common source of complexity in many C and C++ applications is storage management: the allocation and freeing of memory. By virtue of having automatic garbage collection (periodic freeing of memory not being referenced) the Java language not only makes the programming task easier, it also dramatically cuts down on bugs. Another aspect of being simple is being small. One of the goals of Java is to enable the construction of software that can run stand -alone in small machines. The Java interpreter words.

Developed by : Harjodh Singh |Time Management System 7

TMS-Integra Micro Systems 2011


and standard libraries have a small footprint. A small si e is important for use in embedded systems and so Java can be easily downloaded over the net. Object-Oriented This is, unfortunately, one of the most overused bu and makes it possible to provide reusable "software ICs." Simply stated, object -oriented design is a technique that focuses design on the data (=objects) and on the interfaces to it. To make an analogy with carpentry, an "object oriented" carpenter would be mostly concerned with the chair he was building, and secondarily with the tools used to make it; a "non -object-oriented" carpenter would think primarily of his tools. Object -oriented design is also the mechanism for defining how modules "plug and play." The object-oriented facilities of Java are essentially those of C++, with extensions from Objective C for more dynamic method resolution. Network-Savvy Java has an extensive library of routines for coping easily with TCP/IP protocols like TTP and FTP. This makes creating network connections much easier than in C or C++. Java applications can open and access objects across the net via UR s with the same ease that programmers are used to when accessing a local file system. Robust Java is intended for writing programs that must be reliable in a variety of ways. Java puts a lot of emphasis on early checking for possible problems, later dynamic (runtime) checking, and eliminating situations that are error prone. One of the advantages of a strongly t yped language (like C++) is that it allows extensive compile-time checking so bugs can be found early. Unfortunately, C++ inherits a number of loopholes in compile -time checking from C, which is relatively lax (particularly method/procedure declarations). In Java, we require declarations and do not support C -style implicit declarations. The linker understands the type system and repeats many of the type checks done by the compiler to guard against version mismatch problems. words in the industry. But

object-oriented design is very powerful because it facilitates the clean definition o f interfaces

Developed by : Harjodh Singh |Time Management System 8

TMS-Integra Micro Systems 2011


The single biggest difference bet ween Java and C/C++ is that Java has a pointer model that eliminates the possibility of overwriting memory and corrupting data. Instead of pointer arithmetic, Java has true arrays. This allows subscript checking to be performed. In addition, it is not poss ible to turn an arbitrary integer into a pointer by casting. Secure Java is intended for use in networked/distributed environments. Toward that end, a lot of emphasis has been placed on security. Java enables the construction of virus -free, tamper-free systems. The authentication techniques are based on public -key encryption. There is a strong interplay between "robust" and "secure." For example, the changes to the semantics of pointers make it impossible for applications to forge access to data structures or to access private data in objects that they do not have access to. This closes the door on most activities of viruses. Someone wrote an interesting "patch" to the PC version of the Archimedes system. They posted this patch to one of the major bulletin b oards. Since it was easily available and added some interesting features to the system, lots of people downloaded it. It hadn't been checked out by the folks at Archimedes, but it seemed to work. Until the next April 1st, when thousands of folks discovered rude pictures popping up in their children's lessons. Needless to say, even though they were in no way responsible for the incident, the folks at Archimedes still had a lot of damage to control. Architecture Neutral Java was designed to support applicatio ns on networks. In general, networks are composed of a variety of systems with a variety of CPU and operating system architectures. To enable a Java application to execute anywhere on the network, the compiler generates an architecture-neutral object file format--the compiled code is executable on many processors, given the presence of the Java runtime system. This is useful not only for networks but also for single system software distribution. In the present personal computer market, application writers h ave to produce versions of their application that are compatible with the IBM PC and with the Apple Macintosh. With the PC market (through Windows/NT) diversifying into many CPU architectures and Apple moving off the 680x0 toward the PowerPC, production of software that runs on all platforms becomes nearly impossible. With Java, the same version of the application runs on all platforms.

Developed by : Harjodh Singh |Time Management System 9

TMS-Integra Micro Systems 2011


The Java compiler does this by generating byte code instructions which have nothing to do with particular computer architecture. Rather, they are designed to be both easy to interpret on any machine and easily translated into native machine code on the fly. Portable Being architecture neutral is a big chunk of b eing portable, but there's more to it than that. Unlike C and C++, there are no "implementation dependent" aspects of the specification. The si es of the primitive data types are specified, as is the behaviour of arithmetic on them. For example, "int" alwa ys means a signed two's complement 32 bit integer, and "float" always means a 32 -bit IEEE 754 floating point number. Making these choices is feasible in this day and age because essentially all interesting CPUs share these characteristics. The libraries that are a part of the system define portable interfaces. For example, there is an abstract Window class and implementations of it for Unix, Windows NT/95, and the Macintosh. The Java system itself is quite portable. The compiler is written in Java and the runtime is written in ANSI C with a clean portability boundary. The portability boundary is essentially a POSIX subset. Interpreted Java byte codes are translated on the fly to native machine instructions (interpreted) and not stored anywhere. And since linking is a more incremental and lightweight process, the development process can be much more rapid and exploratory. As a part of the byte code stream, more compile-time information is carried over and available at runtime. This is what the linker's type checks are based on. It also makes programs more amenable to debugging. The programmers at Archimedes spent a lot of time waiting for programs t o compile and link. They also spent a lot of time tracking down senseless bugs because some changed source files didn't get compiled (despite using a fancy "make" facility), which caused version mismatches; and they had to track down procedures that were d eclared inconsistently in various parts of their programs. Another couple of months lost in the schedule. High Performance

Developed by : Harjodh Singh |Time Management System 10

TMS-Integra Micro Systems 2011


While the performance of interpreted byte codes is usually more than adequate, there are situations where higher performance is requi red. The byte codes can be translated on the fly (at runtime) into machine code for the particular CPU the application is running on. For those accustomed to the normal design of a compiler and dynamic loader, this is somewhat like putting the final machin e code generator in the dynamic loader. The byte code format was designed with generating machine codes in mind, so the actual process of generating machine code is generally simple. Efficient code is produced: the compiler does automatic register allocation and some optimi ation when it produces the byte codes. In interpreted code we're getting about 300,000 method calls per second on an Sun Microsystems SPARCStation 10. The performance of byte codes converted to machine code is almost indistinguishable from native C or C++. Multithreaded There are many thin gs going on at the same time in the world around us. Multithreading is a way of building applications with multiple threads Unfortunately, writing programs that deal with many things happening at once can be much more difficult than writing in the conventi onal single-threaded C and C++ style. Java has a sophisticated set of synchroni ation primitives that are based on the widely used monitor and condition variable paradigm introduced by C.A.R. oare. By integrating these concepts into the language (rather th an only in classes) they become much easier to use and are more robust. Much of the style of this integration came from Xerox's Cedar/Mesa system. Other benefits of multithreading are better interactive responsiveness and real -time behaviour. This is limited, however, by the underlying platform: stand -alone Java runtime environments have good real -time behaviour. Running on top of other systems like Unix, Windows, the Macintosh, or Windows NT limits the real -time responsiveness to that of the underlying system. ots of things were going on at once in their simulations. Ropes were being pulled, wheels were turning, levers were rocking, and input from the user was being tracked. Because they had to write all this in a single threaded form, all the things that happen at the same time, even though they had nothing to do with each other, had to be manually intermixed. Using an "event loop" made things a little cleaner, but it was still a mess. The

Developed by : Harjodh Singh |Time Management System 11

TMS-Integra Micro Systems 2011


system became fragile and hard to understand. They were pulling in data from all over the net. But originally they were doing it one chunk at a time. This seriali ed network communication was very slow. When they converted to a multithreaded style, it was trivial to overlap all of their network communication. Dynamic In a number of ways, Java is a more dynamic language than C or C++. It was designed to adapt to an evolving environment. For example, one major problem with C++ in a production environment is a side effect of the way that code is implemented. If company A prod uces a class library (a library of plug and play components) and company B buys it and uses it in their product, then if A changes its library and distributes a new release, B will almost certainly have to recompile and redistribute their own software. In an environment where the end user gets A and B's software independently (say A is an OS vendor and B is an application vendor) problems can result. For example, if A distributes an upgrade to its libraries, then all of the software from B will break. It is possible to avoid this problem in C++, but it is extraordinarily difficult and it effectively means not using any of the language's OO features directly. An interface specifies a set of methods that an object can perform but leaves open how the object sho uld implement those methods. A class implements an interface by implementing all the methods contained in the interface. In contrast, inheritance by subclassing passes both a set of methods and their implementations from superclass to subclass. A Java class can implement multiple interfaces but can only inherit from a single superclass. Interfaces promote flexibility and reusability in code by connecting objects in terms of what they can do rather than how they do it. Classes have a runtime representation: there is a class named Class, instances of which contain runtime class definitions. If, in a C or C++ program, you have a pointer to an object but you don't know what type of object it is, there is no way to find out. owever, in

Java, finding out based on the runtime type information is straightforward. Because casts are checked at both compile -time and runtime, you can trust a cast in Java. On the other hand, in C and C++, the compiler just trusts that you're doing the right thing.

Developed by : Harjodh Singh |Time Management System 12

TMS-Integra Micro Systems 2011


JAVA VIRTUAL MACHINE Java Virtual Machine or JVM as its name suggest is a virtual computer that resides in the real computer as a software process. JVM gives Java the flexibility of platform independence. et us see first how exactly Java program is created, compiled and e xecuted. Java code is written in .java file. This code contains one or more Java language attributes like Classes, Methods, Variable, Objects etc. Javac is used to compile this code and to generate .class file. Class file is also known as byte code . The name byte code is given may be because of the structure of the instruction set of Java program. We will see more about the instruction set later in this tutorial. Java byte code is an input to Java Virtual Machine. JVM read this code and interpret it and e xecutes the program. Java Virtual Machine like its real counter part executes the program and generates output. To execute any code, JVM utili es different components.

Developed by : Harjodh Singh |Time Management System 13

TMS-I t

r Mi r Syst

s 2011

Fi

Vi

20

)'

( '&

Deve

e by : Harj

h S ngh |

e Manage ent Syste

14

TMS-I t JV

r Mi r Syst

s 2011

is divided into several components like the stack, the garbage-collected heap,

the registers and the method area. Let us see diagram representation of JV .

The S Stack in Java virtual machine stores various method arguments as ell as the local

variables of any method. Stack also keep track of each an e very method invocation. his is called S Frame. here are three registers that help in stack manipulation. his registers points to different parts of current Stack. hey are

vars, frame, optop.

here are three

sections in Java stack frame: Local Variables he local variables section contains all the local variables being used by the current method invocation. It is pointed to by the vars register.

97

64

5 43

Deve

e by : Harj

h S ngh |

e Manage ent Syste

15

TMS-Integra Micro Systems 2011


Execution Environment The execution environment section is used to maintain the operations of the stack itself. It is pointed to by the frame register. Operand Stack The operand stack is used as a work space by byte code instructions. It is here that the parameters for byte code instructions are placed, and results of byte code instructions are found. The top of the operand stack is pointed to by the optop register. Method Area This is the area where byte codes reside. The program counter points to some byte in the method area. It always keeps tracks of the current instruction which is being executed (interpreted). After execution of an instruction, the JVM sets the PC to next instruction. Method area is shared among all the threads of a process. ence if more then one threads

are accessing any specific method or any instructions, synchroni ation is needed. Synchroni ation in JVM is achieved through Monitors. Garbage-collected Heap The arbage-collected eap is where the objects in Java programs are stored.

Whenever we allocate an object using new operator, the heap comes into picture and memory is allocated from there. Unlike C++, Java does not have free operator to free any previously allocated memory. Java does this automatically using arbage collection

mechanism. Till Java 6.0, mark and sweep algorithm is used as a garbage collection logic. Remember that the local object reference resides on Stack but the actual object resides in eap only. Also, arrays in Java are objects, hence they also resides in eap. arbage -collected

Developed by : Harjodh Singh |Time Management System 16

TMS-Integra Micro Systems 2011

3.2. Java EE
Project uses and extends the Java Servlet API to encourage developers to adopt a

model-view-controller (MVC) architecture.

Servlet : A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request -response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by Web servers. Thus, it can be thought of as a Java Applet that runs on a server instead of a browser. 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 requests. They are not tied to a specific client -server protocol, but are most often used with the TTP protocol. Therefore, the word "Servlet" is

often used in the meaning of " TTP Servlet".[2] Thus, a software develo per may use a servlet to add dynamic content to a Web server using the Java platform. The generated content is commonly TM , but may be other data such as XM . Servlets are the Java

counterpart to non -Java dynamic Web content technologies such as C I and ASP.NET. Servlets can maintain state in session variables across many server transactions by using TTP cookies, or UR rewriting. To deploy and run, the Apache Tomcat Server may be used. It is an open source servlet container developed by the Apache Softw are Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure Java" TTP web server environment for Java code to run. The servlet API, contained in the Java package hierar chy javax.servlet, defines the expected interactions of a Web container and a servlet. A Web container is essentially the component of a Web server that interacts with the servlets. The Web container is responsible for managing the lifecycle of servlets, m apping a UR to a particular servlet and ensuring that the UR requester has the correct access rights. 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 represe nt servlet requests and responses, as well as objects to reflect the servlet's configuration parameters and

Developed by : Harjodh Singh |Time Management System 17

TMS-Integra Micro Systems 2011


execution environment. The package javax.servlet.http defines TTP -specific subclasses of

the generic servlet elements, including session management objects that track multiple requests and responses between the Web server and a client. Servlets may be packaged in a WAR file as a Web application. Servlets can be generated automatically from JavaServer Pages (JSP) by the JavaServer Pages compiler. The difference between Servlets and JSP is that Servlets typically embed TM inside Java code, while JSPs embed Java code in TM . While the

direct usage of Servlets to generate

TM (as shown in the example below) is relatively rare

nowadays, the higher leve l MVC web framework in Java EE (JSF) still explicitly uses the Servlet technology for the low level request/response handling via the FacesServlet. A somewhat older usage is to use servlets in conjunction with JSPs in a pattern called "Model 2", which is a flavor of the model -view-controller pattern.

JSP:

Architecturally, JSP may be viewed as a high -level abstraction of Java servlets. JSP pages are loaded in the server and are operated from a structured special installed Java server packet called a Java EE Web Application, often packaged as a .war or .ear file archive. JSP allows Java code and certain pre -defined actions to be interleaved with static web markup content, with the resulting page being compiled and executed on the server to deliver an TM or XM document. The compiled pages and any dependent Java libraries

use Java bytecode rather than a native software format, and must therefore be executed within a Java virtual machine (JVM) that integrates with the host operating system to provide an abstract platform-neutral environment. JSP syntax is a fluid mix of two basic content forms: scriptlet elements and markup. Markup is typically standard TM or XM , while scriptlet elements are delimited blocks of

Java code which may be intermixed with the ma rkup. When the page is requested the Java code is executed and its output is added, in situ, with the surrounding markup to create the final page. JSP pages must be compiled to Java bytecode classes before they can be

Developed by : Harjodh Singh |Time Management System 18

TMS-I t executed, but such compilation is need only ed occurred.

r Mi r Syst

s 2011

hen a change to the source JSP file has

Java code is not required to be complete self contained) block, but can straddle markup content providing the page as a

ithin its scriptlet element hole is syntactically correct

for example, any Java if/for/ hile blocks opened in one scriptlet element must be correctly closed in a later element for the page to successfully compile). coding sections is called step over scripting because it can stepping over it. arkup his system of split inline

rap around the static makup by r

hich falls inside a split block of code is subject to that code, so ill only appear in the output hen the if condition evaluates to

markup inside an if block

true; likewise markup inside a loop construct may appear multi ple times in the output depending upon how many times the loop body runs. he JSP syntax adds additional X L-like tags, called JSP actions, to invoke built in functionality. Additionally, the technology allows for the creation of JSP tag libraries that act as extensions to the standard H L or X L tags. JV operated tag libraries provide a ote that not all

platform independent way of extending the capabilities of a web server. commercial Java servers are Java EE specification compliant.

FD

CA

B A@

Deve

e by : Harj

h S ngh |

e Manage ent Syste

19

TMS-Integra Micro Systems 2011

Overview of the MVC design pattern


The model-view-controller design pattern, also known as Model 2 in J2EE application programming

Model
The model is the business logic, which in most cases involves access of data stores like relational databases. The development team that handles the model may be expert at writing DB2 COBO programs, or EJB entity beans, or some other technology appropriate for storing and manipulating enterprise data.

View
The view is the code that presents images and data on Web pages. The code comprises JSP pages and the Java beans that store data for use by the JSP pages .

Controller
The controller is the code that determines the overall flow of the application. It comprises one or more configuration files, and servlets.

Characteristics of the MVC design pattern


Several characteristics are common to the model -view-controller design pattern.

View
The user interface generally is created with JSP files that do not themselves contain any business logic. These pages represent the view component of MVC architecture .

Controller
Forms and hyperlinks in the user interface that require business logic to be executed are submitted to a request URI that is mapped to an servlet. One instance of this servlet class exists and receives and processes all requests that change the state of a user's

Developed by : Harjodh Singh |Time Management System 20

TMS-I t interaction with the application. V architecture.

r Mi r Syst

s 2011

his component represents the controller component of an

Model
he servlet selects and invokes one or more actions to perform the requested business logic. he actions manipulate the state of the application's interaction with the user, typically by creating or modifying Java beans that are stored as request or session attributes depending on how long they need to be available). Such Java beans represent the model component of V architecture. Instead of producing the next page of the user interface equest ispatcher.forward ) facility of the s ervlet API to

directly, actions generally use the

pass control to an appropriate JSP file to produce the next page of the user interface.

ier

rchi ecture of the Project:

In

- ier architecture the things in a particular manner.

It is divided into following: . Presentation layer: Presentation layer is the view. It is the web interface. ser enters data and it goes to the Business logic. his layer interferes with

SQ

PH

I HG

Deve

e by : Harj

h S ngh |

e Manage ent Syste

21

TMS-Integra Micro Systems 2011


the business layer. There can never be cross connections i.e one layer cannot directly interact with other layers instead of the layer which is under this. This means presentation layer can only interact with business layer. 2. Business layer: Data which comes from the presentation layer is handled through different steps :
 

Service ayer Data access layer

After this data is passed to persistent layer.

3. Persistent layer: Persistent layer interacts with the database and made changes in the database according to the changes made by the user.

Developed by : Harjodh Singh |Time Management System 22

TMS-I t

r Mi r Syst

s 2011

3.3. Microsoft S

Server

Sql Server
he latest version of SQL Server, SQL Server , ,was released ) on August

and aims to make data management self-tuning, self organizing, and self n technologies, to provide near -

maintaining with the development of SQL Server Always zero downtime. SQL Server

also includes support for structured and semi-structured

data, including digital media formats for pictures, audio, video and other multimedia data. In current versions, such multimedia data can be stored as BL Bs binary large objects), but they are generic bitstreams. Intrinsic awareness of multimedia data will allow specialized functions to be performed on them. Accor ing to Paul d Server Applications, icrosoft orp., SQL Server lessner, senior Vice President,

can be a data storage backend for

different varieties of data: X L, email, time/calendar, file, document, spatial, etc as well as perform search, query, analysis, sharing, and synchronization across all data types. ther new data types include specialized date and time types and aSpatial data type for location-dependent data. Better support for unstructured and semi -structured data is provided using the new ILES stored on the file system.
[
a b

EA

data type, which can be used to reference an file y

Structured data and metadata about the file is stored in SQL


` ` `X X WU W V UT

Deve

e by : Harj

h S ngh |

e Manage ent Syste

23

TMS-Integra Micro Systems 2011


Server database, whereas the unstructured component is stored in the file system . Such files can be accessed both via Win32 file handling APIs as well as via S S
[13]

Server using T-

; doing the latter accesses the file data as a B OB. Backing up and restoring the S Server 2008 also natively

database backs up or restores the referenced files as well. supports hierarchical data, and includes T-S using recursive queries.

constructs to directly deal with them, without

The Full-Text Search functionality has been integrated with the database engine. According to a Microsoft technical article, this simplifies management and improves performance. Spatial data will be stored in two types. A "Flat Earth" ( EOMETRY or planar) data type represents geospatial data which has been projected from its native, spherical, coordinate system into a plane. A "Round Earth" data type ( EO RAP Y) uses an ellipsoidal model in which the Earth is defined as a single continuous entity which does not suffer from the singularities such as the international dateline, poles, or map projection on e "edges". Approximately 70 methods are available to represent spatial operations for the Open eospatial Consortium Simple Features for S S , Version 1.1.

Server includes better compression features, which also helps in improving

scalability. It enhanced the indexing algorithms and introduced the notion of filtered indexes. It also includes Resource overnor that allows reserving resources for certain users or

workflows. It also includes capabilities for transparent encryption of data (TDE) as well as compression of backups. S Server 2008 supports the ADO.NET Entity Framework and

the reporting tools, replication, and data definition will be built around the Entity Data Model . S Server Reporting Services will gain chartin g capabilities from the integration of the data

visuali ation products from Dundas Data Visuali ation, Inc. , which was acquired by Microsoft. On the management side, S Server 2008 includes the Declarative

Management Framework which allows configuring policies and constraints, on the entire database or certain tables, declaratively. The version of S included with S Server 2008 supports IntelliSense for S Server Management Studio queries against a S Server

2008 Database Engine. S

Server 2008 also makes the databases available via Windows

PowerShell providers and management functionality available as Cmdlets, so that the server and all the running instances can be managed from Windows PowerShell . SQL Server 2008 R2

Developed by : Harjodh Singh |Time Management System 24

TMS-Integra Micro Systems 2011


S Server 2008 R2 (formerly codenamed S Server "Kilimanjaro" ) was

announced at TechEd 2009, and was released to manufacturing on April 21, 2010. S Server 2008 R2 adds certain features to S Server 2008 including a master data

management system branded as Master Data Services, a central management of master data entities and hierarchies. Also Multi Server Management, a centrali ed console to manage multiple S Server 2008 instances and services including relational databases,

Reporting Services, Analysis Services & Integration Ser vices. S Server 2008 R2 includes a number of new services, including PowerPivot for

Excel and SharePoint, Master Data Services, StreamInsight, Report Builder 3.0, Reporting Services Add-in for SharePoint, a Data -tier function in Visual Studio that enables packaging of tiered databases as part of a n application, and a S Server Utility named UC (Utility

Control Point), part of AMSM (Application and Multi -Server Management) that is used to manage multiple S Editions Microsoft makes S Server available in multiple editions, with different feature sets Servers.

and targeting different users. These editions are : SQL Server Compact Edition (SQL CE) The compact edition is an embedded database engine. Unlike the other editions of S Server, the S CE engine is based on S Mobile (initially designed for use

with hand-held devices) and does not share the same binaries. Due to its small si e (1 MB D footprint), it has a markedly reduced feature set compared to the oth er

editions. For example, it supports a subset of the standard data types, does not support stored procedures or Views or multiple -statement batches (among other limitations). It is limited to 4 B maximum database si e and cannot be run as a

Windows service, Compact Edition must be hosted by the application using it. The 3.5 version includes considerable work that supports ADO.NET Synchroni ation Services. SQL Server Developer Edition S Server Developer Edition includes the same features as S Server Enterprise

Edition, but is limited by the license to be only used as a development and test system, and not as production server. This edition is available to download by students free of charge as a part of Microsoft's Dream Spark program.

Developed by : Harjodh Singh |Time Management System 25

TMS-Integra Micro Systems 2011

Developed by : Harjodh Singh |Time Management System 26

TMS-Integra Micro Systems 2011


SQL Server 2005 Embedded Edition (SSEE) S S Server 2005 Embedded Edition is a specially configured named instance of the Server Express database engine which can be accessed only by certain

Windows Services. SQL Server Enterprise Edition S Server Enterprise Edition is the full -featured edition of S Server, including

both the core database engine and add -on services, while including a range of tools for creating and managing a S SQL Server Evaluation Edition S Server Evaluation Edition, also known as the Trial Edition , has all the features of Server cluster.

the Enterprise Edition, but is limited to 180 days, after which the tools will continue to run, but the server services will stop . SQL Server Express Edition S Server Express Edition is a scaled down, free edition of S Server, which

includes the core database engine. While there are no limitations on the number of databases or users supported, it is limited to using one processor, 1 4 B database files (10 B database files from S B memory and Server Express 2008 R2 [28] ).

The entire database is stored in a single .mdf file, and thus making it suitable for XCOPY deployment. It is intended as a replacement for MSDE. Two additional editions provide a superset of features not in the original Express Edition. The first is SQL Server Express with Tools, which includes S Server Management Studio Basic. SQL Server Express with Advanced Services adds full-text search capability and reporting services . SQL Server Fast Track S Server Fast Track is specifically for enterprise -scale data warehousing storage

and business intelligence processing, and runs on reference -architecture hardware that is optimi ed for Fast Track . SQL Server Standard Edition S Server Standard edition includes the core database engine, along with the

stand-alone services. It differs from Enterprise edition in that it supports fewer active instances (number of nodes in a cluster) and does not include some high -availability

Developed by : Harjodh Singh |Time Management System 27

TMS-Integra Micro Systems 2011


functions such as hot-add memory (allowing memory to be added while the server is still running), and parallel indexes. SQL Server Web Edition S Server Web Edition is a low -TCO option for Web hosting.

SQL Server Workgroup Edition S Server Workgroup Edition includes the core database functionality but does not

include the additional services. Architecture Protocol layer Protocol layer implements the external inte rface to S can be invoked on S Server. All operations that

Server are communicated to it via a Microsoft -defined format, called

Tabular Data Stream (TDS). TDS is an application layer protocol, used to transfer data between a database server and a client. Initially designed and developed by Sybase Inc. for their Sybase S Microsoft S Server relational database engine in 1984, and later by Microsoft in

Server, TDS packets can be encased in other physical transport dependent

protocols, including TCP/IP, Named pipes, and Shared memory. Consequently, access to S Server is available over these protocols. In additio n, the S Server API is also

exposed over web services. Data storage The main unit of data storage is a database, which is a collection of tables with typed columns. S Server supports different data types, including primary types such as Integer,

Float, Decimal, Char (including character strings), Varchar (variable length character strings), binary (for unstructured blobs of data), Text (for textual data) among others. The rounding of floats to integers uses either Symmetric Arithmetic Rounding or Symmetric Round Down (Fix) depending on arguments: SE ECT Round(2.5, 0) gives 3. Microsoft S Server also allows user -defined composite types (UDTs) to be defined

and used. It also makes server statistics available as virtual tables and views (called Dynamic Management Views or DMVs). In addition to tables, a database can also contain other objects including views, stored procedures, indexes and constraints, along with a transaction log. A S Server database can contain a maximum of 2 objects, and can span

multiple OS-level files with a maximum file si e of 2 TB. The data in the database are stored in primary data files with an extension .mdf. Secondary data files, identified with a .ndf extension, are used to store optional metadata. og files are identified with the .ldf extension.

Developed by : Harjodh Singh |Time Management System 28

TMS-Integra Micro Systems 2011


Storage space allocated to a database is divided into sequentially numbered pages, each 8 KB in si e. A page is the basic unit of I/O for S Server operations. A page is

marked with a 96-byte header which stores metadata about the page including the page number, page type, free space on the page and the ID of the object that owns it. Page type defines the data contained in the page - data stored in the database, index, allocation map which holds information about how pages are allocated to tables and indexes, change map which holds information about the changes made to other pages since last backup or logging, or contain large data types such as image or text. While page is the basic unit of an I/O operation, space is actually managed in terms of an extent which consists of 8 pages. A database object can either span all 8 pages in an extent ("uniform extent") or share an extent with up to 7 more objects ("mixed extent"). A row in a database table cannot span more than one page, so is limited to 8 KB in si e. owever, if the data exceeds 8 KB and the row contains Varchar or Varbinary data, the data in those columns are moved to a new page (or possibly a sequence of pages, called an Allocation unit ) and replaced with a pointer to the data. For physical storage of a table, its rows are divided into a series of partitions (numbered 1 to n). The partition si e is user defined; by default all rows are in a single partition. A table is split into multiple partitions in order to spread a database over a cluster. Rows in each partition are s tored in either B-tree or heap structure. If the table has an associated index to allow fast retrieval of rows, the rows are stored in -order according to their index values, with a B -tree providing the index. The data is in the leaf node of the leaves, and other nodes storing the index values for the leaf data reachable from the respective nodes. If the index is non -clustered, the rows are not sorted according to the index keys. An indexed view has the same storage structure as an indexed table. A table without an index is stored in an unordered heap structure. Both heaps and B -trees can span multiple allocation units. Buffer management S Server buffers pages in RAM to minimi e disc I/O. Any 8 KB page can be

buffered in-memory, and the set of all pages currently buffered is called the buffer cache. The amount of memory available to S Server decides how many pages will be cached in memory. The buffer cache is manage d by the Buffer Manager . Either reading from or writing to any page copies it to the buffer cache. Subsequent reads or writes are redirected to the in-memory copy, rather than the on -disc version. The page is updated on the disc by the Buffer Manager only if the in-memory cache has not been referenced for some time. While writing pages back to disc, asynchronous I/O is used whereby the I/O operation is done in a

Developed by : Harjodh Singh |Time Management System 29

TMS-Integra Micro Systems 2011


background thread so that other operations do not have to wait for the I/O operation to complete. Each page is written along with its checksum when it is written. When reading the page back, its checksum is computed again and matched with the stored version to ensure the page has not b een damaged or tampered with in the meantime. Logging and Transaction S Server ensures that any change to the data is ACID-compliant, i.e. it uses

transactions to ensure that the database will always revert to a known consistent state on failure. Each transaction may consist of multiple S statements all of which will only make

a permanent change to the database if the last statement in the transaction (a COMMIT statement) completes successfully. If the COMMIT successfully completes the transaction is safely on disk.

SQL Server implements transactions using a write -ahead log.


Any changes made to any p age will update the in -memory cache of the page, simultaneously all the operations performed will be written to a log, along with the transaction ID which the operation was a part of. Each log entry is identified by an increasing

Log Sequence Number ( SN) which is used to ensure that all changes are written to the
data files. Also during a log restore it is used to check that no logs are duplicated or skipped. S Server requires that the log is written onto the disc before the data page is written back.

It must also ensure that all operations in a transaction are written to the log before any COMMIT operation is reported as completed. At a later point the server will checkpoint the database and ensure that all pages in the data files have the state of their contents synchronised to a point at or after the SN that the checkpoint started. When completed the checkpoint marks that portion of the log file as complete and may free it (see Simple transaction logging vs Full transaction logging). This enables S S erver to ensure integrity of the data, even if the system fails.

On failure the database log has to be replayed to ensure the data files are in a consistent state. All pages stored in the roll forward part of the log (not marked as completed) are rewritten to the database, when the end of the log is reached all open transactions are rolled back using the roll back portion of the log file. The database engine usually checkpoints quite frequently. owever, in a heavily

loaded database this can have a signific ant performance impact. It is possible to reduce the

Developed by : Harjodh Singh |Time Management System 30

TMS-Integra Micro Systems 2011


frequency of checkpoints or disable them completely but the rollforward during a recovery will take much longer Concurrency and locking S Server allows multiple clients to use the same database concurrently. As such,

it needs to control concurrent access to shared data, to ensure data integrity - when multiple clients update the same data, or clients attempt to read data that is in the p rocess of being changed by another client. S Server provides two modes of concurrency control:

pessimistic concurrency and optimistic concurrency. When pessimistic concurrency control is being used, S Server controls concurrent access by using locks. ocks can be either

shared or exclusive. Exclusive lock grants the user exclusive access to the data - no other user can access the data as long as the lock is held. Shared locks are used when some data is being read - multiple users can read from data locked with a shared lock, but not acquire an exclusive lock. The latter would have to wait for all shared locks to be released. ocks can be applied on different levels of granularity - on entire tables, pages, or even on a per row basis on tables. For indexes, it can either be on the entire index or on index leaves . The level of granularity to be used is defined on a per -database basis by the database administrator. While a fine grained locking system allows more users to use the table or index simultaneously, it requires more resources. So it does not automatically turn into higher performing solution. S Server also includes two more lightweight mutual exclusion

solutions - latches and spinlocks - which are less robust than locks but are less resource intensive. S S Server uses them for DMVs and other resources that are usually not busy.

Server also monitors all worker threads that acquire locks to ensure that they do not Server takes remedial measures, which in many

end up in deadlocks - in case they do, S

cases is to kill one of the threads entangled in a deadlock and rollback the transaction it started. To implement locking, S Server contains the Lock Manager . The ock Manager

maintains an in -memory table that manages the database objects and locks, if any, on them along with other metadata about the lock. Access to any shared object is mediated by the lock manager, which either grants access to the resource or blocks it. S Server also provides the optimistic concurrency control mechanism, which is

similar to the multiversion concurrency control used in other databases. The mechanism allows a new version of a row to be created whenever the row is updated, as opposed to overwriting the row, i.e., a row is additionally identified by the ID of the transaction that created the version of the row. Both t he old as well as the new versions of the row are stored and maintained, though the old versions are moved out of the database into a system database identified as Tempdb. When a row is in the process of being updated, any other

Developed by : Harjodh Singh |Time Management System 31

TMS-Integra Micro Systems 2011


requests are not blocked (u nlike locking) but are executed on the older version of the row. If the other request is an update statement, it will result in two different versions of the rows both of them will be stored by the database, identified by their respective transaction IDs . Data retrieval The main mode of retrieving data from an S The query is expressed using a variant of S shares with Sybase S Server database is querying for it. , a dialect Microsoft S Server

called T-S

Server due to its legacy. The query declaratively specifies what is

to be retrieved. It is processed by the query processor, which figures out the sequence of steps that will be necessary to retrieve the requested data. The sequence of actions necessary to execute a query is called a query plan. There might be multiple ways to process the same query. For example, for a query that contains a join statement and a select statement, executing join on both the tables and then executing select on the re sults would give the same result as selecting from each table and then executing the join, but result in different execution plans. In such case, S Server chooses the plan that is

expected to yield the results in the shortest possible time. This is calle d query optimi ation and is performed by the query processor itself. S Server includes a cost-based query optimi er which tries to optimi e on the iven a query, then the

cost, in terms of the resources it will take to execute the query.

query optimi er looks at the database schema, the database statistics and the system load at that time. It then decides which sequence to access the tables referred in the query, which sequence to execute the operations and what access method to be used to access the tables. For example, if the table has an associated index, whether the index should be used or not - if the index is on a column which is not unique for most of the columns (low "selectivity"), it might not be worthwhile to use the index to access the data. Finally, it decides whether to execute the query concurrently or not. While a concurrent execution is more costly in terms of total processor time, because the execution is actually split to different processors might mean it will execute faster. Once a qu ery plan is generated for a query, it is temporarily cached. For further invocations of the same query, the cached plan is used. Unused plans are discarded after some time. S Server also allows stored procedures to be defined. Stored procedures are queries, that are stored in the server itself (and not issued by the client

parameteri ed T-S

application as is the case with general queries). Stored procedures can accept val ues sent by the client as input parameters, and send back results as output parameters. They can call defined functions, and other stored procedures, including the same stored procedure (up to

Developed by : Harjodh Singh |Time Management System 32

TMS-Integra Micro Systems 2011


a set number of times). They can be selectively provided access to. Unlike other queries, stored procedures have an associated name, which is used at runtime to resolve into the actual queries. Also because the code need not be sent from the client every time (as it can be accessed by name), it reduces network traffic and somewhat improves performance. Execution plans for stored procedures are also cached as necessary. SQL CLR Main article: S C R Server 2005 includes a component named SQL CLR ("Common

Microsoft S

anguage Runtime") via which it integrates with .NET Framework. Unlike most other applications that use .NET Framework, S Server itself hosts the .NET Framework

runtime, i.e., memory, threading an d resource management requirements of .NET Framework are satisfied by S system. S With S OS itself, rather than the underlying Windows operating

OS provides deadlock detection and resolution services for .NET code as well. C R, stored procedures and triggers can be written in any managed .NET

language, including C# and VB.NET. Managed code can also be used to define UDT's ( user defined types), which can persist in the database. Managed code is compiled to .NET assemblies and after being verified for type safety, registered at the database. After that, they can be invoked like any other procedure . ibrary is available, when running code under S functionality are not available . When writing code for S C R, data stored in S Server databases can be owever, only a subset of the Base Class C R. Most APIs relating to user interface

accessed using the ADO.NET APIs like any other managed application that accesses S Server data. owever, doing that creates a new database s ession, different from the one in Server provides some enhancements to the

which the code is executing. To avoid this, S

ADO.NET provider that allows the connection to be redirected to the s ame session which already hosts the running code. Such connections are called context connections and are set by setting context connection parameter to true in the connection string. S Server also

provides several other enhancements to the ADO.NET API, including classes to work with tabular data or a single row of data as well as classes to work with internal metadata about the data stored in the database. It also provides access to the XM features in S Server,

including X uery support. These enhancements are also available in T -S

Procedures in

consequence of the introduction of the new XM Datatype (query,value,nodes functions).

Developed by : Harjodh Singh |Time Management System 33

TMS-Integra Micro Systems 2011


Services S Server also includes an assortment of add -on services. While these are not

essential for the operation of the database system, they provide value added services on top of the core database management system. These services either run as a part of some S Server component or out -of-process as Windows Service and presents their own API to control and interact with them. Service Broker Used inside an instance, it is used to provide an asynchronous programming environment. For cross instance applications, Service Broker communicates The Service Broker, which runs as a part of the database engine, provides a reliable messagi ng and message queuing platform for S Server applications. over TCP/IP and allows the different

components to be synchroni ed together, via exchange of messages . Replication Services S Server Replication Services are used by S Server to replicate and

synchroni e database objects, either in entirety or a subset of the objects present, across replication agents, which might be other database servers across the network, or database caches on the client side. Replication follows a publisher/subscriber model, i.e., the changes are sent out by one database server ("publisher") and are received by others ("subscribers") . S Server supports three different types of replication .

Transaction replication Each transaction made to the publisher database (master database) is synced out to subscribers, who update their databases with the transaction. Transactional replication s ynchroni es databases in near real time . Merge replication Changes made at both the publisher and subscriber databases are tracked, and periodically the changes are synchroni ed bi -directionally between the publisher and the subscribers. If the same data has been modified differently in both the publisher and the subscriber databases, synchroni ation will result in a conflict which has to be resolved - either manually or by using pre -defined policies. rowguid needs to be configured on a column if merge replication is configured . Snapshot replication

Developed by : Harjodh Singh |Time Management System 34

TMS-Integra Micro Systems 2011


Snapshot replication published a copy of the entire database (the then -snapshot of the data) and replicates out to the subscribers. Further changes to the snapshot are not tracked. Analysis Services S Server Analysis Services adds O AP and data mining capabilities for S O AP storage modes

Server databases. The O AP engine supports MO AP, RO AP and for data. Analysis Services supports the XM

for Analysis standard as the underlying

communication protocol. The cube data can be accessed using MDX queries. Data mining specific functionality is exposed via the DMX query language. Analysis Services includes various algorithms - Decision trees, clustering algorithm, Naive Bayes algorithm, time series analysis, sequence clustering algorithm, linear and logistic regression analysis, and neural networks - for use in data mining . Reporting Services S from S Server Reporting Services is a report generation environment for data gathered Server databases. It is administered via a web interface. Reporting services

features a web services interface to support the development of custom rep orting applications. Reports are created as RD files. Reports can be designed using recent versions of Microsoft Visual Studio (Visual Studio.NET 2003, 2005, and 2008) with Business Intelligence Development Studio , installed or with the included Report Builder. Once created, RD files can be rendered in a variety of formats including Excel, PDF, CSV, XM , TIFF (and other image formats), and Archive. Notification Services Originally introduced as a post -release add-on for S Services was bundled as part of the Microsoft S with S Server 2000, Notification TM Web

Server platform for the first and only time Server Notification Servic es is a

Server 2005. with Sql Server 2005, S

mechanism for generating data -driven notifications, which are sent to Notification Services subscribers. A subscriber registers for a specific event or transaction (which is registered on the database server as a trigger); when the event occurs, No tification Services can use one of three methods to send a message to the subscriber informing about the occurrence of the event. These methods include SMTP, SOAP, or by writing to a file in the filesystem. Notification Services was discontinued by Microso ft with the release of S Server 2008 in

Developed by : Harjodh Singh |Time Management System 35

TMS-I t August

r Mi r Syst

s 2011

, and is no longer an officially supported component of the SQL Server

database platform. Integration Services SQL Server Integration Services is used to integrate data from different data sources. It is used for the E L capabilities for SQL Server for data warehousing needs. Integration Services includes G I tools to build data extraction workflows integration various functionality such as extracting data from various sources, querying data, transforming data including aggregating, duplication and merging data, and then loading the transformed data onto other sources, or sending e-mails detailing the status of the operation as defined by the user. Full Text Search Service

ig

fd

e dc

Deve

e by : Harj

h S ngh |

e Manage ent Syste

36

TMS-Integra Micro Systems 2011


The SQL Server Full Text Search service architecture S Server Full Text Search service is a speciali ed indexing and querying service Server databases. The full text search index can be

for unstructured text stored in S

created on any column with character based text data. It allows for words to be searc hed for in the text columns. While it can be performed with the S IKE operator, using S

Server Full Text Search service can be more efficient. Full Text Search (FTS) allows for inexact matching of the source string, indicated by a Rank value which can range from 0 to 1000 - a higher rank means a more accurate match. It also allows linguistic matching ("inflectional search"), i.e., linguistic variants of a word (such as a verb in a different tense) will also be a match for a given word (but with a lower rank than an exact match). Proximity searches are also supported, i.e., if the words searched for do not occur in the sequence they are specified in the query but are near each other, they are also considered a match. T S exposes special operators that can be used to access the FTS capabilities. The Full Text Search engine is divided into two processes - the Filter Daemon process (msftefd.exe) and the Search process (msftesql.exe). These processes interact with the S Server. The Search process includes the indexer (that creates the full text indexes) and the full text query processor. The indexer scans through text columns in the database. It can also index through binary column s, and use iFilters to extract meaningful text from the binary blob (for example, when a Microsoft Word document is stored as an unstructured binary file in a database). The iFilters are hosted by the Filter Daemon process. Once the text is extracted, the Filter Daemon process breaks it up into a sequence of words and hands it over to the indexer. The indexer filters out noise words , i.e., words like A, And etc., which occur frequently and are not useful for search. With the remaining words, an inverted index is created, associating each word with the columns they were found in. S Server

itself includes a Gatherer component that monitors changes to tables and invokes the indexer in case of updates . When a full text query is received by the S Server query processor, it is handed

over to the FTS query processor in the Search process. The FTS query processor breaks up the query into the constituent words, filters out the noise words, and uses an inbuilt thesaurus to find out the linguistic variants for each word. The words are then queried against the inverted index and a rank of their accurateness is computed. The results are returned to the client via the S Server process.

Developed by : Harjodh Singh |Time Management System 37

TMS-Integra Micro Systems 2011


Tools SQLCMD S CMD is a command line application that comes with Microsoft S Server. It allows S Server, and

exposes the management features of S

queries to be written and

executed from the command prompt. It can also act as a scripting language to create and run a set of S statements as a script. Such scripts are stored as a .sql file, and are used

either for management of databases or to create the database schema during the deployment of a database. S CMD was introduced with S Server 2005 and this continues with S and IS Server 2008.

Its predecessor for earlier versions was OS it pertains to TS although S

, which is functionally equivalent as

execution, and many of the comman d line parameters are identical,

CMD adds extra versatility.

Visual Studio Microsoft Visual Studio includes native support for data programming with Microsoft S Server. It can be used to write and debug code to be executed by S C R. It also includes

a data designer that can be used to graphically create, view or edit database schemas. ueries can be created either visually or using code. SSMS 2008 intellisense for S queries as well. onwards, provides

SQL Server Management Studio


S Server Management Studio is a UI tool included with S Server 2005 and

later for configuri ng, managing, and administering all components within Microsoft S Server. The tool includes both script editors and graphical tools that work with Server Management Studio replaces Server

objects and features of the server. S

Enterprise Manager as the primary management interface for Microsoft S since S Server 2005. A version of S

Server Management Studio is also

available for S

Server Express Edition, for whic h it is known as SQL Server

Management Studio Express (SSMSE).


A central feature of S Server Management Studio is the Object Explorer, which

allows the user to browse, select, and act upon any of the objects within the server It can be used to visually observe and analy e query plans and optimi e the database performance, among others. S Server Management Studio can also be used to create a new database,

alter any existing database schema by adding or modifying tables and indexes, or analy e

Developed by : Harjodh Singh |Time Management System 38

TMS-Integra Micro Systems 2011


performance. It includes the query windows which provide a and execute queries. Business Intelligence Development Studio Business Intelligence Development Studio (BIDS) is the IDE from Microsoft used for developing data analysis and Business Intelligence solutions utili ing the Microsoft S Server Analysis Services, Reporting Services and Integration Services . It is based on the Microsoft Visual Studio development environment but customi es with the S Server UI based interface to write

services-specific extensions and project types, including tools, controls and projects for reports (using Reporting Services), Cubes and data mining structures (using Analysis Services). Programmability T-SQL Main article: T-SQL T-S (Transact-S ) is the primary means of programming and managing S Server,

Server. It exposes keywords for the operations that can be performed on S

including creating and altering database schemas, entering and editing data in the database as well as monitoring and managing the server itself. Client applications that consume data or manage the server wil l leverage S Server functionality by sending T -S queries and

statements which are then processed by the server and results (or errors) returned to the client application. S Server allows it to be managed using T -S . For this it exposes

read-only tables from which server statistics can be read. Management functionality is exposed via system-defined stored procedures which can be invoked from T -S queries to .

perform the management operation. It is also possible to create linked Server using T -S inked server allows operation to multiple server as one query . SQL Native Client S Native Client is the native client side data access library for Microsoft S Server features

Server, version 2005 onwards. It natively implements support for the S

including the Tabular Data Stream implementation, support for mirrored S databases, full support for all data types supported by S

Server

Server, asynchronous

operations, query notifications, encryption support, as well as receiving multiple result sets in a single database session. S Native Client is used under the hood by S Server plug -

Developed by : Harjodh Singh |Time Management System 39

TMS-Integra Micro Systems 2011


ins for other data access technologies, including ADO or O E DB. The S can also be directly used, bypassing the generic data access layers Native Client

3.4. IDE-Net Beans


History Early history NetBeans began in 1996 as Xelfi (word play on Delphi), a Java IDE student project under the guidance of the Faculty of Mathematics and Physics at Charles University in Prague. In 1997 Roman Stan k formed a company around the project and produced commercial versions of the NetBeans IDE until it was bought by Sun Microsystems in 1999. Sun open-sourced the NetBeans IDE in June of the following year. Since then, the NetBeans community has continued to grow. Current versions NetBeans IDE 6.0 introduced support for developing IDE modules and rich client applications based on the NetBeans platform, a Java Swing UI builder (formerly known as

"Project Matisse"), improved CVS support, Web ogic 9 and JBoss 4 support, and many editor enhancements. NetBeans 6 is availabl e in official repositories of major distributions. NetBeans IDE 6.5, released in November 2008, extended the existing Java EE features (including Java Persistence support, EJB 3 and JAX -WS). Additionally, the NetBeans Enterprise Pack supports development of Java EE 5 enterprise applications, including SOA visual design tools, XM BPE ), and UM development. The NetBeans IDE 6.8 is the first IDE to provide complete support of Java EE 6 and the lassFish Enterprise Server v3 . Developers hosting their open -source projects on schema tools, web services orchestration (for inux

modeling. The NetBeans IDE Bundle for C/C++ supports C/C++

kenai.com additionally benefit from instant messaging and issue tracking integration and navigation right in the IDE, support for web application development with P P 5.3 and the Symfony framework, and improved code completion, layouting, hints and navigation in JavaFX projects.

Developed by : Harjodh Singh |Time Management System 40

TMS-Integra Micro Systems 2011


NetBeans IDE 6.9, released in June 2010, added support for OS i, Spring

Framework 3.0, Java EE dependency injection (JSR -299), Zend Framework for P P, and easier code navigation (such as "Is Overridden/Implemented" annotations), formatting, hints, and refactoring across several langu ages. NetBeans IDE 7.0 was released in April 2011

NetBeans Platform The NetBeans Platform is a reusable framework for simplifying the development of Java Swing desktop applications. The NetBeans IDE bundle for Java SE contains what is needed to start developing NetBeans plugins and NetBeans Platform based applications; no additional SD K is required. Applications can install modules dynamically. Any application can include the Update Center module to allow users of the application to download digitally-signed upgrades and new features directly into the running application. Reinstalling an upgrade or a new release does not force users to download the entire application again. The platform offers reusable services common to desktop applications, allowing developers to focus on the logic specific to their application. Among the features of the platform are:
y y y y y y y

User interface management (e.g. menus and toolbars) User settings management Storage management (saving and loading any kind of data) Window management Wi ard framework (supports step -by-step dialogs) NetBeans Visual ibrary Integrated Development Tools

NetBeans IDE The NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports development of all Java application types ( Java SE including JavaFX, (Java ME, web, EJB and mobile applications) out of the box. Among other features are an Ant-based project system, Maven support, refactorings, version control (supporting CVS, Subversion, Mercurial and Clearcase).

Developed by : Harjodh Singh |Time Management System 41

TMS-I t

r Mi r Syst

s 2011

Modularity: All the functions of the I E are provided by modules. Each module provides a well defined function, such as support for the Java language, editing, or support for the VS versioning system, and SV . etBeans contains all the modules needed for

Java development in a single download, allowing the userto start working immediately. Modules also allow etBeans to be extended. ew features, such as support for other or instance, Sun

programming languages, can be added by installing additional modules. Studio, Sun Java Studio Enterprise, and Sun Java Studio are all based on the License: ommon etBeans I E. through ,

reator from Sun Microsystems

rom July

etBeans I E was licensed under Sun's L), a license based on the Mozilla etBeans would henceforth be licenses, with the GPL

evelopment and

istribution License

Public License MPL). In

ctober

, Sun announced that

offered under a dual license of the linking exception for G Integrated modules lass path.

L and the GPL version

hese modules are part of the etBeans I E.


etBeans Profiler he etBeans Profiler is a tool for the monitoring of Java applications: It helps ormerly downloaded separately, it is

developers find memory leaks and optimize speed. integrated into the core I E since version . .

vt

sq

r qp

Deve

e by : Harj

h S ngh |

e Manage ent Syste

42

TMS-Integra Micro Systems 2011


The Profiler is based on a Sun aboratories research project that was named JFluid. That research uncovered specific techniques that can be used to lower the overhead of profiling a Java application. One of those techniques is dynamic bytecode instrumentation, which is particularly useful for profiling large Java applications. Using dynamic bytecode instrumentation and additional algorithms, the NetBeans Profiler is able to obtain runtime information on applications that are too large or complex for other profilers. Ne tBeans also support Profiling Points that let you profile precise points of execution and measure execution time. GUI design tool Formerly known as project Matisse , the prototype and design Swing The UI design-tool enables developers to UI components.

UIs by dragging and positioning

UI builder also has bu ilt-in support for JSR 296 (Swing Application

Framework), and JSR 295 (Beans Binding technology). NetBeans JavaScript editor The NetBeans JavaScript editor provides extended support for JavaScript, Ajax, and CSS. JavaScript editor features comprise syntax highlighti ng, refactoring, code completion for native objects and functions, generation of JavaScript class skeletons, generation of Ajax callbacks from a template; and automatic browser compatibility checks. CSS editor features comprise code completion for styles names, quick navigation through the navigator panel, displaying the CSS rule declaration in a ist View and file

structure in a Tree View, sorting the outline view by na me, type or declaration order ( ist & Tree), creating rule declarations (Tree only), refactoring a part of a rule name (Tree only).

Developed by : Harjodh Singh |Time Management System 43

TMS-I t

r Mi r Syst

s 2011

3. .

ache Tomcat

Apache omcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. he Java Servlet and JavaServer Pages specifications are developed under the Java ommunity Process. Apache omcat is developed in an open and participatory environment and released under the Apache License version . Apache omcat is intended to be a collaboration of the best-of-breed developers from around the world. e invite you to participate in this open development project. Apache omcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.

y xw

Deve

e by : Harj

h S ngh |

e Manage ent Syste

44

TMS-I t

r Mi r Syst

s 2011

Apache Tomcat Versions


Apache omcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. ifferent versions of Apache omcat are available for different versions of the Servlet and JSP specifications. he mapping between the specifications and the respective Apache omcat versions is:

Alpha / Beta / Stable


Almost every omcat release is initially released as an Alpha release. After a week or so of testing a vote is held to gather views on the stability of the release. If a major issue is identified during testing, then the vote may not take place and the release will remain as an Alpha release. he download pages will always show the latest stable release and any newer Alpha or Beta release if one exists. Alpha and beta releases are always clearly marked on the download pages. Stability is a subjective judgement and you should always read carefully the release notes for any version you intend to make use of. If you are an early adop of a release, we ter would love to hear your opinion about its stability as part of the vote: it takes place on the development mailing list. Alpha releases may contain large amounts of untested/missing functionality required by the specification and/or significant bugs and are not expected to run stably for any length of time. Beta releases may contain some untested functionality and/or a number of relatively minor bugs. Beta releases are not expected to run stably. Stable releases may contain a small number of relatively minor bugs. Stable releases are intended for production use and are expected to run stably for extended periods of time.

Deve

e by : Harj

h S ngh |

e Manage ent Syste

45

TMS-Integra Micro Systems 2011

Apache Tomcat 7.x


Apache Tomcat 7.x is the current focus of development. It build s upon the improvements made in Tomcat 6.0.x and implements the Servlet 3.0, JSP 2.2 and EL 2.2 specifications. In addition to that, it includes the following improvements:
y y y y y

Web application memory leak detection and prevention Improved security for the Manager and ost Manager applications eneric CSRF protection Support for including external content directly in a web application Refactoring (connectors, lifecycle) and lots of internal code clean -up

Apache Tomcat 6.x


Apache Tomcat 6.x builds upon the i mprovements made in Tomcat 5.5.x and implements the Servlet 2.5 and JSP 2.1 specifications. In addition to that, it includes the following improvements:
y y y

Memory usage optimi ation Advanced IO capabilities Refactored clustering

Apache Tomcat 5.x Apache Tomcat 5.5.x supports the same Servlet and JSP Specification versions as Apache Tomcat 5.0.x. There are significant changes in many areas under the hood, resulting in improved performance, stability, and total cost of ownership. Please refer to the Apache Tomcat 5.5 Changelog for details. Apache Tomcat 5.0.x improves on Apache Tomcat 4.1 in many ways, including: Performance optimi ations and reduced garbage collection
y

y y y y y y y y

Refactored application deployer, with an optional standalone deployer allowing validation and compilation of a web application before putting it in production Complete server monitoring using JMX and the manager web application Scalability and reliability enhancements Improved Taglibs handling, including advanced pooling and tag plug ins Improved platform integration, with native Windows and Unix wrappers Embedding using JMX Enhanced Security Manager support Integrated session clustering Expanded documentation

Developed by : Harjodh Singh |Time Management System 46

TMS-Integra Micro Systems 2011

Apache Tomcat 4.x


Apache Tomcat 4.x is available for download from the arch ives. Apache Tomcat 4.x implements a new servlet container (called Catalina) that is based on completely new architecture. The 4.x releases implement the Servlet 2.3 and JSP 1.2 specifications. Apache Tomcat 4.1.x is a refactoring of Apache Tomcat 4.0.x, a nd contains significant enhancements, including:
y y y y y y y

JMX based administration features JSP and Struts based administration web application New Coyote connector ( TTP/1.1, AJP 1.3 and JNI support) Rewritten Jasper JSP page compiler Performance and memory efficiency improvements Enhanced manager application support for integration with development tools Custom Ant tasks to interact with the manager application directly from build.xml scripts

Apache Tomcat 4.0.x . Apache Tomcat 4.0.6 is the old production qua lity release. The 4.0 servlet container (Catalina) has been developed from the ground up for flexibility and performance. Version 4.0 implements the final released versions of the Servlet 2.3 and JSP 1.2 specifications. As required by the specifications, A pache Tomcat 4.0 also supports web applications built for the Servlet 2.2 and JSP 1.1 specifications with no changes.

Apache Tomcat 3.x


Apache Tomcat 3.x is available for download from the archives.
y

y y

Version 3.3 is the current production quality release fo r the Servlet 2.2 and JSP 1.1 specifications. Apache Tomcat 3.3 is the latest continuation of the Apache Tomcat 3.x architecture; it is more advanced then 3.2.4, which is the 'old' production quality release. Version 3.2.4 is the 'old' production quality r elease and is now in maintenance only mode. Version 3.1.1 is a legacy release.

All Apache Tomcat 3.x releases trace their heritage back to the original Servlet and JSP implementations that Sun donated to the Apache Software Foundation. The 3.x versions all implement the Servlet 2.2 and JSP 1.1 specifications. Apache Tomcat 3.3.x . Version 3.3.2 is the current production quality release. It continues the refactoring that was begun in version 3.2 and carries it to its logical conclusion. Version 3.3 provides a much more modular design and allows the servlet container to be customi ed by adding and removing modules that control the processing of servlet requests. This version also contains many performance improvements.

Developed by : Harjodh Singh |Time Management System 47

TMS-Integra Micro Systems 2011

Apache Tomcat 3.2.x . Version 3.2 added few new features since 3.1; the major effort was a refactoring of the internals to improve performance and stability. The 3.2.1 release, like 3.1.1, was a security patch. Version 3.2.2 fixed a large number of bugs and all known specification compliance iss ues. Version 3.2.3 was a security update that closes a serious security hole. Version 3.2.4 is a minor bug fix release. All users of Apache Tomcat versions prior to 3.2.3 should updgrade as soon as possible. With the exception of fixes for critical security related bugs, development on the Apache Tomcat 3.2.x branch has stopped.

Apache Tomcat 3.1.x . The 3.1 release contained several improvements over Apache Tomcat 3.0, including servlet reloading, WAR file support and added connectors for the IIS and Netscape web servers. The latest maintenance release, 3.1.1, contained fixes for security problems. There is no active development ongoing for Apache Tomcat 3.1.x. Users of Apache Tomcat 3.1 should update to 3.1.1 to close the security holes and they are strongly encouraged to migrate to the current production release, Apache Tomcat 3.3. Apache Tomcat 3.0.x . Initial Apache Tomcat release.

Security Updates Please note that, except in rare circumstances, binary patches are not produced for individual vulnerabilities. To obtain the binary fix for a particular vulnerability you should upgrade to an Apache Tomcat version where that vulnerability has been fixed. Source patches, usually in the form of references to SVN commits, may be provided in either in a vulnerability announcement and/or the vulnerability details listed on these pages. These source patches may be used by users wishing to build their own local version of Tomcat with just that security patch rather than upgrade. Please note that an exercis e is currently underway to add links to the svn commits for all the vulnerabilities listed on these pages. ists of security problems fixed in released versions of Apache Tomcat are available:
y y y y y

Apache Tomcat 7.x Security Vulnerabilities Apache Tomcat 6.x S ecurity Vulnerabilities Apache Tomcat 5.x Security Vulnerabilities Apache Tomcat JK Connectors Security Vulnerabilities Apache Tomcat APR/native Connector Security Vulnerabilities

ists of security problems fixed in versions of Apache Tomcat that may b e downloaded from the archives are also available:
y y

Apache Tomcat 4.x Security Vulnerabilities Apache Tomcat 3.x Security Vulnerabilities

Developed by : Harjodh Singh |Time Management System 48

TMS-Integra Micro Systems 2011

Reporting New Security Problems with Apache Tomcat


The Apache Software Foundation takes a very active stance in eliminating security problems and denial of service attacks against Apache Tomcat. We strongly encourage folks to report such problems to our private security mailing list first, before disclosing them in a public forum. The security mailing list should only be used for reporting undisclosed security vulnerabilities in Apache Tomcat and managing the process of fixing such vulnerabilities. We cannot accept regular bug reports or other queries at t his address. All mail sent to this address that does not relate to an undisclosed security problem in the Apache Tomcat source code will be ignored. If you need to report a bug that isn't an undisclosed security vulnerability . uestions about:
y y y y

how to configure Tomcat securely if a vulnerability applies to your particular application obtaining further information on a published vulnerability availability of patches and/or new releases

should be address to the users mailing list. Please see the mailing lists page for details of how to subscribe. The private security mailing address is: security@tomcat.apache.org Note that all networked servers are subject to denial of service attacks, and we cannot promise magic workarounds to generic problems (such as a cli ent streaming lots of data to your server, or re-requesting the same UR repeatedly). In general our philosophy is to avoid any attacks which can cause the server to consume resources in a non -linear relationship to the si e of inputs.

Errors and omissions Please report any errors or omissions to security@tomcat.apache.org

Developed by : Harjodh Singh |Time Management System 49

TMS-Integra Micro Systems 2011

3.6 JavaScript

JavaScript, also known as ECMAScript, is a pro totype-based, object-oriented scripting language that is dynamic, weakly typed and has first -class functions. It is also considered a functional programming language like Scheme and OCaml because it has closures and supports higher-order functions. JavaScript is an implementation of t he ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects w ithin a host environment. JavaScript's use in applications outside web pages for example in PDF documents, site specific browsers and desktop widgets is also significant. Newer and faster JavaScript VMs and frameworks built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web apps. JavaScript uses syntax influenced by that of C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages. Compatibility considerations Since JavaScript runs in widely varying environments, an important part of testing and debugging it is testing across browsers. The DOM interfaces for manipulating web pages are not part of the ECMAScript standard, or of JavaScript itself. Officially, they are defined by a separate standardi ation effort by the W3C; in practice, browser implementations differ from the sta ndards and from each other, and not all browsers execute JavaScript. To deal with these differences, JavaScript authors can attempt to write standards -compliant code which will also be executed correctly by most browsers; failing that, they can write code that checks for the presence of certain browser features and behaves differently if they are not available. In some cases, two browsers may both implement a feature but with different behavior, and authors may find it practical to detect what browser is ru nning and change their script's behavior to match. Programmers may also use libraries or toolkits which take browser differences into account. Furthermore, scripts may not work for some users. For example, a user may: use an old or rare browser with incomp lete or unusual DOM support, use a PDA or mobile phone browser which cannot execute JavaScript, have JavaScript execution disabled as a security precaution, use a speech browser due to, for example, a visual disability.

Developed by : Harjodh Singh |Time Management System 50

TMS-Integra Micro Systems 2011


To support these users, web authors can try to create pages which degrade gracefully on user agents (browsers) which do not support the page's JavaScript. In particular, the page should remain usable albeit without the extra features that the JavaScript would have added. An alternative appro ach that many find preferable is first to author content using basic technologies that work in all browsers, then to enhance it for users with JavaScript enabled, testing for feature support before adding the enhancements. This is known as progressive enhancement. Accessibility Assuming that the user has not disabled its execution, client -side web JavaScript should be written to enhance the experiences of visitors with visual or physical disabilities, and certainly should avoid denying information to these visitors.[36] Screen readers, used by the blind and partially sighted, can be JavaScript -aware and so may access and read the page DOM after the script has altered it. The TM should be as concise, navigable and semantically rich as possible whether the s cripts have run or not. JavaScript should not be totally reliant on mouse -specific events so as to deny its benefits to users who either cannot use a mouse or who choose to favor the keyboard for whatever reason. Equally, although hyperlinks and webforms c an be navigated and operated from the keyboard, accessible JavaScript should not require keyboard events either. There are device-independent events such as onfocus and onchange that a re preferable in most cases. JavaScript should not be used in a way that is confusing or disorientating to any web user. For example, using script to alter or disable the normal functionality of the browser, such as by changing the way the back -button or the refresh event work, is usually best avoided. Equally, triggering even ts that the user may not be aware of reduces the user's sense of control as do unexpected scripted changes to the page content. Often the process of making a complex web page as accessible as possible becomes a nontrivial problem where issues become matter s of debate and opinion, and where compromises are necessary in the end. owever, user agents and assistive technologies are constantly evolving and new guidelines and relevant information are continually being published on the web.[36] Security JavaScript and the DOM provide the potential for malicious authors to deliver scripts to run on a client computer via the web. Browser authors contain this risk using two restrictions. First, scripts run in a sandbox in which they can only perform web -related actions, not general-purpose programming tasks like creating files. Second, scripts are constrained by the same origin policy: scripts from one web site do not have access to information such as usernames, passwords, or cookies sent to another site. Most JavaScr ipt-related security bugs are breaches of either the same origin policy or the sandbox.

Cross-site vulnerabilities

Developed by : Harjodh Singh |Time Management System 51

TMS-Integra Micro Systems 2011


A common JavaScript-related security problem is cross -site scripting, or XSS, a violation of the same-origin policy. XSS vulnerabilities occur when an attacker is able to cause a target web site, such as an online banking website, to include a malicious script in the webpage presented to a victim. The script in this example can then access the banking application with the privileges of the victim, potentially disclosing secret information or transferring money without the victim's authori ation. A solution to XSS vulnerabilities is to use TM escaping whenever displaying untrusted data. Some browsers include partial protection against refle cted XSS attacks, in which the attacker provides a UR including malicious script. owever, even users of those browsers are vulnerable to other XSS attacks, such as those where the malicious code is stored in a database. Only correct design of Web applica tions on the server side can fully prevent XSS. XSS vulnerabilities can also occur because of implementation mistakes by browser auth ors. Another cross-site vulnerability is cross -site request forgery or CSRF. In CSRF, code on an attacker's site tricks the victim's browser into taking actions the user didn't intend at a target site (like transferring money at a bank). It works because, if the target site relies only on cookies to authenticate requests, then requests initiated by code on the attacker's site will carry the same legitimate login credentials as requests initiated by the user. In general, the solution to CSRF is to require an authentication value in a hidden form field, and not only in the cookies, to authenticate any request that might have last ing effects. Checking the TTP Referrer header can also help. "JavaScript hijacking" is a type of CSRF attack in which a <script> tag on an attacker's site exploits a page on the victim's site that returns private information such as JSON or JavaScript. Possible solutions include requiring an authentication token in the POST and ET parameters for any response that returns private JSON (even if it has no side effects); using POST and never ET for requests that return private JSON; and modifying the response so that it can't be used via a <script> tag (by, for example, wrapping the JSON in a JavaScript comment). Misplaced trust in the client Client-server applications, whether they involve JavaScript or not, must recogni e that untrusted clients may be under the control of attackers. Thus any secret embedded in JavaScript could be extracted by a determined adversary, and the application author cannot assume that his JavaScript runs as intended, or at all. Some implications: Web site authors cannot perfectly c onceal how their JavaScript operates, because the code is sent to the client, and obfuscated code can be reverse -engineered. JavaScript form validation only provides convenience for users, not security. If a site verifies that the user agreed to its terms of service, or filters invalid characters out of fields that should only contain numbers, it must do so on the server, not only the client. Scripts can be selectively disabled, so JavaScript can't be relied on to prevent oper ations such as "save image". It would be extremely bad practice to embed a password in JavaScript (where it can be extracted by an attacker), then have JavaScript verify a user's password and pass

Developed by : Harjodh Singh |Time Management System 52

TMS-Integra Micro Systems 2011


"password_ok=1" back to the server (since the "password_ok=1" response is easy to forge).[40] Browser and plugin coding errors JavaScript provides an interface to a wide range of browser capabilities, some of which may have flaws such as buffer overflows. These flaws can allow attackers to write scripts which would run any code they wish on the user's system. These flaws have affected major browsers including Firefox, Intern et Explorer, and Safari. Plugins, such as video players, Adobe Flash, and the wide range of ActiveX controls enabled by default in Microsoft Internet Explorer, may also have flaws exploitable via JavaScript, and such flaws have bee n exploited in the past. In Windows Vista, Microsoft has attempted to contain the risks of bugs such as buffer overflows by running the Internet Explorer proc ess with limited privileges. oogle Chrome similarly limits page renderers in its own "sandbox." Sandbox implementation errors Web browsers are capable of running JavaScript outside of the sandbox, with the privileges necessary to, for example, create or delete files. Of course, such privileges a ren't meant to be granted to code from the web. Incorrectly granting privileges to JavaScript from the web has played a role in vulnerabilities in both Internet Explorer and Firefox. In Windows XP Service Pack 2, Microsoft demoted JScript's privileges in Internet Explorer. Microsoft Windows allows JavaScript source files on a computer's hard drive to be launched as general -purpose, non-sandboxed programs. This makes JavaScript (like VBScript) a theoretically viable vector for a Trojan horse, although JavaSc ript Trojan horses are uncommon in practice.

Developed by : Harjodh Singh |Time Management System 53

TMS-Integra Micro Systems 2011

3.7 CSS

Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is t o style web pages written in TM and X TM , but the language can also be applied to any kind of XM document, including plain XM , SV and XU . CSS is designed primarily to enable the separation of document content (written in TM or a similar markup language) from document presentation, including elements such as t he layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on -screen, in print, by voice (when read out by a speech -based browser or screen reader) and on Br aillebased, tactile devices. While the author of a document typically links that document to a CSS style sheet, readers can use a different style sheet, perhaps one on their own computer, to override the one the author has specified. CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so -called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.

Advantages
Fexibility By combining CSS with the functionality of a Content Management System, a considerable amount of flexibility can be programmed into content submission forms. This allows a contributor, who may not be familiar or able to understand or edit CSS or TM code to select the layout of an article or other page they are submitting on -the-fly, in the same form. For instance, a contributor, editor or author of an article or page might be able to select the number of columns and whether or not the page or article carrie s an image. This information is then passed to the Content Management System, and the program logic evaluates the information and determines, based on a certain number of combinations, how to apply classes and IDs to the TM elements, therefore styling an d positioning them according to the pre-defined CSS for that particular layout type. When working with large -scale, complex sites, with many contributors such as news and informational sites, this advantage weighs heavily on the feasibility and maintenance of the project. Separation of content from presentation CSS facilitates publication of content in multiple presentation formats based on nominal parameters. Nominal parameters include explicit user preferences, different web browsers, the type of device being used to view the content (a desktop computer or mobile Internet device), the geographic location of the user and many other variables.

Developed by : Harjodh Singh |Time Management System 54

TMS-Integra Micro Systems 2011

Site-wide consistency When CSS is used effectively, in terms of inheritance and "cascading," a global style sheet can be used to affect and style elements site -wide. If the situation arises that the styling of the elements should need to be changed or adjusted, these changes can be made by editing rules in the global style sheet. Before CSS, this sort of maintenance w as more difficult, expensive and time -consuming. Bandwidth A stylesheet, whether internal to the source document or separate, will specify the style once for a range of TM elements selected by class, type or relationship to others. This is much more efficient than repeating style information inline for each occurrence of the element. An external stylesheet is usually stored in the browser cache, and can therefore be used on multiple pages without being reloaded, further reducing data transfer over a netwo rk. Page reformatting With a simple change of one line, a different style sheet can be used for the same page. This has advantages for accessibility, as well as providing the ability to tailor a page or site to different target devices. Furthermore, device s not able to understand the styling still display the content.

Developed by : Harjodh Singh |Time Management System 55

TMS-Integra Micro Systems 2011

4. SYSTEM ANALYSIS 4.1 FEASIBILITY STUDY


The most important part of the every system is feasibility study. It provides technical, operational & economical feasibility. We discuss all three parts in details .

4.1.1 Technical feasibility:

Technical feasibility pointed towards the hardware & software requirements of the system. The questions of how to computeri e is for look on soft ware & computer experts rather than hardware.

4.1.2. Operational feasibility:

Operational feasibility keeps acceptation from user on the willingness & ability of customers to support to proposed system i.e. this feasibility focuses on capability of user & after studying this programmer can decide about the design of system.

4.1.3 Economical feasibility:

It contain mostly includes t he profit of proposed system. When we are going to decide the economical feasibility, we must consider different points in account & they are cost of computer hardware, software, system analysis & design, programming training, installing operating cost etc . in short this study is related to economy.

People are inherently resistant to change and computers have been known to facilitate change. As estimate should be made of how strong a reaction the user staff is likely to have toward the d evelopment of computeri ed system. The s ystem user friendly and smooth working, so it is easy to understand and operate.

Therefore system is behaviorally feasible

Developed by : Harjodh Singh |Time Management System 56

TMS-Integra Micro Systems 2011

5. SYSTEM DESIGN
The system design is the major part for the developing of the project .actually this part describe the flow of data from an y part to the another part of the organi ation. The system design is deal with the following things:

DFD DATA DICTONARY DATABASE DESIGN

DFD: DFD is a pictorial representation of showing the flow of data into, around and out of a system. They can b e understood by user and are less prone to miss interpretation than textual description. It is also known as bubble chart. A complete s et of DFD provides a compact top down representation of a system which make it easier for users and analyst to visible the system as a whole. Symbol Arrow (data flow)

1. 2.

Circle

(Process)

Rectangle (Source and destination)

3.

Open rectangle (Store)

Developed by : Harjodh Singh |Time Management System 57

TMS-Integra Micro Systems 2011


Rules for constructing DFD: -

Process should be name and no. For easy reference. Each name and number should be unique for each process. The direction of flow should be from top to bottom and from left to right data paradigm by flow from left to right where left side will be destination. In some cases they may flow back to the source. The processes can be employed into sub process and each sub process must be number again.

Developed by : Harjodh Singh |Time Management System 58

TMS-Integra Micro Systems 2011

5.1

DFD

Admin

Add

Insert

Time Management System

Update

User

View

Developed by : Harjodh Singh |Time Management System 59

TMS-I t

r Mi r Syst

s 2011

se

ase

iagram

Admin

Deve

e by : Harj

h S ngh |

e Manage ent Syste

60

TMS-I t

r Mi r Syst

s 2011

User

hf

Deve

e by : Harj

h S ngh |

e Manage ent Syste

61

TMS-I t

r Mi r Syst

s 2011

5.3

ATA

I TI

ARY

Relationship among tables:

om

lj

k ji

Deve

e by : Harj

h S ngh |

e Manage ent Syste

62

TMS-Integra Micro Systems 2011

6 Project Modules
6.1 6.2 6.3 6.4 Role Management User management Time Management Other

6.1 . Role Management


Only Administrator can use role management Administrator can perform following functions: Adding the role Editing the role Deleting the role See users according to role

6.2 User Management


Only administrator can use user management Administrator can perform following functions: Adding the user Editing the user Search user Reset password for a user Deleting the user

6.3 Time Management


All users can perform following functions: Adding time sheet for a particular day Editing time sheet Adding periods for a particular time sheet Editing periods

Developed by : Harjodh Singh |Time Management System 63

TMS-Integra Micro Systems 2011


Deleting periods See periods for a time sheet Deleting time sheet

6.4 Other
Change password og out

Developed by : Harjodh Singh |Time Management System 64

TMS-I t

r Mi r Syst

s 2011

7.

UTPUT

Main Project
ogin Page

At this page user will enter the username and the password. If the username or password is invalid the following screen will be displayed.

vt

sq

r qp

Deve

e by : Harj

h S ngh |

e Manage ent Syste

65

TMS-I t Invalid User name or invalid password

r Mi r Syst

s 2011

}{

zx

y xw

Deve

e by : Harj

h S ngh |

e Manage ent Syste

66

TMS-I t

r Mi r Syst

s 2011

If the username and password are valid then the user will log in. according to the user i.e. user is admin or other. Admin:

elcome screen will appear

~

Deve

e by : Harj

h S ngh |

e Manage ent Syste

67

TMS-I t

r Mi r Syst

s 2011

Other User :

Deve

e by : Harj

h S ngh |

e Manage ent Syste

68

TMS-I t

r Mi r Syst

s 2011

Role Management:

licking on ole Management list of roles will appear. In this Admin can add edit or delete the user.

List of Roles :

Deve

e by : Harj

h S ngh |

e Manage ent Syste

69

TMS-I t

r Mi r Syst

s 2011

Add Role :

Deve

e by : Harj

h S ngh |

e Manage ent Syste

70

TMS-I t

r Mi r Syst

s 2011

Edit Role :

Deve

e by : Harj

h S ngh |

e Manage ent Syste

71

TMS-I t

r Mi r Syst

s 2011

elete Role :

Deve

e by : Harj

h S ngh |

e Manage ent Syste

72

TMS-I t

r Mi r Syst

s 2011

User Management: Clicking on user management list of users will appear. Admin can add edit or delete the user.

List of Users:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

73

TMS-I t

r Mi r Syst

s 2011

Add User :

Deve

e by : Harj

h S ngh |

e Manage ent Syste

74

TMS-I t

r Mi r Syst

s 2011

Edit User:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

75

TMS-I t

r Mi r Syst

s 2011

User Search:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

76

TMS-I t

r Mi r Syst

s 2011

Timesheet Management:
sheets of the user.

Clicking on time sheet management will show the time ser can add edit or delete the timesheets.

List of Sheets:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

77

TMS-I t

r Mi r Syst

s 2011

Add Time Sheet:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

78

TMS-I t

r Mi r Syst

s 2011

Edit Time Sheet:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

79

TMS-I t

r Mi r Syst

s 2011

Add Period:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

80

TMS-I t

r Mi r Syst

s 2011

Edit Period:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

81

TMS-I t

r Mi r Syst

s 2011

See Periods:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

82

TMS-I t

r Mi r Syst

s 2011

hange Password:

Deve

e by : Harj

h S ngh |

e Manage ent Syste

83

TMS-Integra Micro Systems 2011

7 TESTING
Once code has been generated, program testing begins. The testing process focuses on the logical internals of the software, ensuring that all statements have been tested, and on the functional externals; that is conducting tests to uncover errors and ensure that defined input will produce actual results that agree with r equired results.

8.1

Unit testing: -

Unit testing focuses verification efforts on the smallest unit of software design the software components or module. Using the components level design description as a guide, important control paths are tested to uncover errors within the boundary of the module. The relative complexity of tests and uncovered tests is limited by the constrained scope established for unit testing. White box is a test can design method that uses the control structure of the procedural design to derive test cases using white -box testing method the project developer can derive test can that are follow:
y

uarantee that all independent path within a module have been excised at lest once.

Exercise all logical decision on the these true and false si de

8.2

Integration testing: -

Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. The objective is to take unit tested component and a program structure that has been dictated by design.

8.3

System testing: -

We stressed the fact that software is only one element of a larger computer -basedsystem. Ultimately, software is incorporated with other system elements, and a series of system integration and validation tests are conducted. These tests fall outside the scope of the software process and not conducted solely by software engineers.

Developed by : Harjodh Singh |Time Management System 84

TMS-Integra Micro Systems 2011

8.4

Alpha testing: -

This testing conducted at the developers site by the customers. The software is used in the natural setting with the developed looking over the shoulder of used and recording error and usages problem. Alpha testing are conduction in a controlled environments.

8.5. Beta testing:Unlike Alpha testing, the developer is generally not present. The customer record all problem (real or imagined) that are encountered during beta testing and report these to the developer at problem reported during beta test, software developer make modifi cation and these prepare for release of the software product to the entire customers -base

LIMITATION OF THE PROJECT

As we know that no project is all completed within few duration so this project is no different and a wider perspective can be followed to optimize the project. This project can be seen as a wider scope i.e. to be applied to any organization. This project can be optimized to various levels of its own.

Developed by : Harjodh Singh |Time Management System 85

TMS-Integra Micro Systems 2011

10 Bibliography:

References:
 

Servlet and Jsp black book Jsp and Servlet Head Frist Series by:- O Reilly

Web references
http://www.roseindia.net/jdbc http://www.codeproject.com http://www.java-samples.com http://stackoverflow.com http://download.oracle.com/javaee/6/tutorial http://www.java2s.com http://w3cschools.com http://blog.sqlauthority.com

Developed by : Harjodh Singh |Time Management System 86

TMS-Integra Micro Systems 2011

Search Engines: www.google.com www.wikipedia.com

Developed by : Harjodh Singh |Time Management System 87

You might also like