Вы находитесь на странице: 1из 53

SOCIAL NETWORKING

A Mini Project

BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING

Submitted by

M.SUMAPRIYA 07761A0548
N.SRIKANTH 07761A0527
T.NARENDRA 07761A0550

Under the esteemed guidance of


P.SAI KIRAN
ASSOCIATE PROFESSOR

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING
(Affiliated to J.N.T.U.,KAKINADA)
MYLAVARAM-521 230(A.P.)

1
LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING

Mylavaram, Krishna Dist—521 230.

CERTIFICATE

This is to certificate that project work entitled “ SOCIAL NETWORKING” that is


being Submitted for the partial fulfillment of IV/I B.TECH in COMPUTER SCIENCE
AND ENGINEERING to JNTU College of Engineering, Kakinada, is bonafide work
done by

M.SUMAPRIYA 07761A0548
N.SRIKANTH 07761A0527
T.NARENDRA 07761A0550

This was carried out under our supervision and guidance.

GUIDE CO-ORDINATOR HEAD OF THE DEPARTMENT

2
ACKNOWLEDGEMENT

A successful task makes everyone happy. Success will often be


crowned to people who made it reality but the people who are behind curtain
with constant guidance and encouragement that made it possible will be
crowned first on the eve of success. Words are inadequate to express my
deep sense of gratitude towards all those people behind the screen who
guided, inspired and helped me for the completion of our project work.

The successful completion of the project on “SOCIAL


NETWORKING” which I have undertaken has a partial fulfillment of the
requirements for the award of Bachelor of technology degree in Computer
Science and Engineering.

It is with profound sense of gratitude that I acknowledge my project


guide P.SAI KIRAN for providing me with live specification and his
valuable suggestion which encouraged me to complete this project
successfully.

I thank our HOD Dr.S.SAI SATYANARAYANA REDDY for


permitting us to do this project.

At last but not the least I thank entire Computer Science department
who rendered their full cooperation for successful completion of the project.

3
ABSTRACT

We plan to develop a Social Networking module based on the group


http://www.orkut.com. We want to provide this portal only to the students of LBRCE
only. We studied the working of Orkut in detail and tried to import some important
features in our project. The basic idea behind this project is to provide the user with an
enjoyable and good-to-look means of communication. Unlike the real Orkut our project
will contain basic functions like maintaining Profile Information, Managing Friends,
Scrap Book and Photo sharing. A User must Register first with this portal and create his
profile to be part of this social network. Users are allowed to upload only one photo of
their choice, which will be displayed on his homepage. The user can send a friend’s
request to anyone who is a member of our module. And the other one can accept or reject
the request based on his/her interest. The users can scrap other users depending on the
privacy policies of users.

4
INDEX

1. INTRODUCTION 6

2. SYSTEM ANALYSIS 7-12

2.1 FEASIBILITY STUDY

2.2 EXISTING SYSTEM & DRAWBACKS

2.3 PROPOSED SYSTEM &MERITS

2.4 HARDWARE & SOFTWARE REQUIREMENTS

3. SOFTWARE REQUIREMENT SPECIFICATION 13-17

3.1 USER REQUIREMENT SPECIFICATION

3.2 EFFORT ESTIMATION

4. SYSTEM DESIGN & IMPLEMENTATION DETAILS 18-27

4.1 CLIENT-SERVER MODEL

4.2 UML DIAGRAMS

5. TECHNOLOGY DESCRIPTION 28-34

6. TESTING 35-38

6.1 TYPES OF TESTING

7. REPORTS (SCREENS) 39-45

8. FUTURE ENHANCEMENTS 46

9. CONCLUSION 47

10. BIBILIOGRAPHY 48

5
1. INRODUCTION

SOCIAL NETWORKING is a website which provides the up-to date


information of all the students registered into it. It is effectively used for knowing the
people of different groups. We can update our personal details. The user is also provided
the facility of scraping to friends and to all the registered members from. They can wish
their friends by sending E-Cards.

Repository Search Engine For The Module uses Java Server Pages
TM is the Java TM 2 Platform, Enterprise Edition (J2EE) technology for building
applications for generating dynamic web content, such as HTML, DHTML. The Java
Server Pages technology enables the easy authoring of web pages that create dynamic
content with maximum power and flexibility. JSP uses a component-based approach that
allows web developers to easily combine static HTML for look-and-feel with Java
components for dynamic features.

6
2. SYSTEM ANALYSIS

2.1 FEASIBILITY STUDY

Feasibility study is an important phase in the software development process. It


enables the developer to have an assessment of the product being developed It refers to
the feasibility study of the product in terms of outcomes of the product, operational use
and technical support required for implementing it.
Feasibility study should be performed on the basis of various criteria and
parameters. The various feasibility studies are:

 Economic Feasibility
 Operational Feasibility
 Technical Feasibility

Economic Feasibility: It refers to the benefits or outcomes we are deriving from the
product compared to the total cost we are spending for developing the product. If the
benefits are more or less the same as the older system, then it is not feasible to develop
the product.
In the present system, the development of the new product greatly enhances the
accuracy of the system and cuts short the delay in the processing of application.
The errors can be greatly reduced and at the same time providing a great level of security.
Here we don’t need any additional equipment except memory of required capacity. No
need for spending money on client for maintenance because the database used is web
enabled database.

Operational Feasibility: It refers to the feasibility of the product to be operational. Some


products may work very well at design and implementation but may fail in the real time
environment. It includes the study of additional human resource required and their
technical expertise.
In the present system, all the operations can be performed easily compared to
existing system and supports for the backlog data. Hence there is need for additional

7
analysis. It was found that the additional modules added are isolated modules as far as the
operational is concerned, so the Developed system is operationally feasible.
Technical Feasibility: It refers to whether the software that is available in the market
fully supports the present application. It studies the pros and cons of using particular
software for the development and its feasibility. It also studies the additional training
needed to be given to the people to make the application work.
In the present system, the user interface is user friendly and does not require much
expertise and training. It just needs a mouse click to do any sort of application. The
software that is used for developing is server page fully is highly suitable for the present
application since the users require fast access to the web pages and with a high degree of
security. This is achieved through integration of web server and database server in the
same environment.

IMPLEMENTATION PLAN

The main plan for the system developed is to upgrading existing system to the
proposed system. There are mainly 4 methods of upgrading the existing system to
proposed
 Parallel Run System
 Direct Cut-Over System
 Pilot System
 Phase-in Method

Parallel Run System: It is the most secure method of converting from an existing to
new system. In this approach both the systems run in parallel for a specific period of time.
During that period if any serious problems were identified while using the new system,
the new system is dropped and the older system is taken at the start point again.

Direct Cut -Over Method: In this approach a working version of the system is
implemented in one part of the organization such as single work area or department.
When the system is deemed complete it is installed through out the organization either all
at once (direct cut-over) or gradually (phase-in).

8
Phase-in Method: In this method a part of the system is first implemented and over time
other remaining parts are implemented.

Implementation planed used: The workflow Management system is developed on the


basis of “Parallel Run Method” because we upgraded the system, which is already in use
to fulfill the requirements of the client. The system already in use is treated as the old
system and the new system is developed on the basis of the old system and maintained the
standards processed by the older system. The upgraded system is working well and is
implemented on the client successfully.

General Methodology in Developing Software Project

The general methodology in developing a system in involved in different phases,


which describe the system’s life cycle model for developing software project. The
concept includes not only forward motion but also have the possibility to return that is
cycle back to an activity previously completed. This cycle back or feedback may occur as
a result of the failure with the system to meet a performance objective or as a result of
changes in redefinition of system activities. Like most systems that life cycle of the
computer-based system also exhibits distinct phases.
Those are,
1. Requirement Analysis Phase
2. Design Phase
3. Development Phase
4. Coding Phase
5. Testing Phase
1. Requirement Analysis Phase:
This phase includes the identification of the problem, in order to identify the
problem; we have to know information about the problem, the purpose of the evaluation
for problem to be known. We have to clearly know about the client’s requirements and
the objectives of the project.
2. Design Phase:
Software design is a process through which the requirements are translated into a
representation of software. One of the software requirements have been analyzed and

9
specified, the software design involves three technical activities: design, coding
generation and testing. The design of the system is in modular form i.e. the software is
logically partitioned into components that perform specific functions and sub functions.
The design phase leads to modules that exhibit independent functional characteristics.
It even leads to interfaces that reduce the complexity of the connections between
modules and with the external environment. The design phase is of main importance
because in this activity, decisions ultimately affect the success of software
implementation and maintenance.

3. Development Phase:
The development phase includes choosing of suitable software to solve the
particular problem given. The various facilities and the sophistication in the selected
software give a better development of the problem.

4. Coding Phase:
The coding phase is for translating the design of the system-produced during the
design phase into code in a given programming language, which can be executed by a
computer and which performs the computation specified by the design.

5. Testing Phase:
Testing is done in various ways such as testing the algorithm, programming code;
sample data debugging is also one of following the above testing.

In general the communication between the students through any means


of communication. Problems will be there with any system. Some of such problems in
existing system are mentioned below

2.2 EXISTING SYSTEM:

• In the existing system the institute has an association for


the passed out students. The institute has their contact addresses
and their information.

10
• The institute itself arranges some sort of programs like
meetings and some gatherings. The students are intimated through
letters or postcards.
• The students attend to these meetings and interact or will
interact by their personal.
Draw Backs:
• The problem with this system is that once the information
regarding a student is filed up, the updating may include some
complications.
• Also most of the alumni due to their mechanical life could
not attend the meetings.

2.3 PROPOSED SYSTEM AND MERITS


Existing System need a solution for the specified and unspecified problems.
Proposed System provides solutions.

• For the problem mentioned as first, the proposed system provides a mean for the
students who registered into the Module can communicate with their mates.
• The proposed system also provides the service like adding friends.
• The user is provided with my profiles page where he can view and update his

details, view his friends, add new friends and thus can maintain contact with

their friends. Can invite their batch mates online.


• The Module can check the events that are going to be held and also given a chance

to add the events

The method followed in the proposed system is Water fall method. This
model suggests a systematic, sequential approach to hardware that begins at the
system level and progress through analysis, design, coding, testing and maintenance.

11
2.4 HARDWARE REQUIREMENTS

Pentium IV
256 MB RAM
40 GB HARDDISK
CD-ROM
Super VGA Display card and Monitor
Mouse and keyboard printer

SOFTWARE REQUIREMENTS

OPERATING SYSTEM : WINDOWS


TECHNOLOGY : JSP
FRONT-END : HTML
BACK-END : MYSQL
WEBSERVER : APACHE TOMCAT

12
3. S/W REQUIREMENT SPECIFICATION
The Software Requirements Specification (SRS) begins the translation process that converts the
software requirements into the language the developers will use. The SRS draws on the use-
cases from the User Requirement Document (URD) and analyzes the situations from a number
of perspectives to discover and eliminate inconsistencies, ambiguities, and omissions before
development progresses significantly under mistaken assumptions.

PROBLEM FRAME : Machine Domain --- My buddies


Problem Domain --- Student registration,
Services like Adding Friends, Scrapbook and Personal Profile.
REFERENCES : User Requirement Document.

Interface Requirements

This section defines the parameters that the software product must follow while
interacting with the outside world.

User Interfaces: 1.Homepage Screen for Login and Sign up


2. Events Screen
3. Personal Profile
4. Scraps
5. E-cards
6. Friends List

Hardware Interfaces: Server configuration:

Minimum 1 GB Hard Disk


P-IV processor
RAM 256 MB
Windows or Linux with Apache preloaded
Client configuration:
Java
Mysql

13
Software Interfaces:

Operating System --- Windows XP


Language --- JSP
Data Base --- MYSQL
Network --- LAN

Communication Interfaces:
LAN protocols and TCP/IP

Functional Requirements

This section analyzes various angles of the functionality to be developed. You do not
need to use each type of analysis for the entire system. Select only those analyses that
best allow you to complete your understanding of the requirements.
Feature Analysis
The Repository and search engine consists of the following modules:
ADMIN:
1. Authentication of the users after registration.
2. Mails to the users regarding the approval as a registered user, disapproval mentioning
the appropriate reasons.
3. Updating the account details on the request of the users.
4. Answering the user queries.
5. Notification to the end users regarding proposals.
6. Payment of the system by the user.
7. Mentioning the security measures for the system’s safety.
8. Deleting an account/user from the system’s databases on request of the user.

USER:
1. Creating a new account
User is allowed to create his own profile. According to the specifications
required by the administrator, the user forms his own profile and submits it to the
system.

14
2. Updating the account
The user is allowed to update his/her account. The administrator updates
the profile accordingly. The user is not allowed to keep any mandatory fields
blank while updating. For E.g. Name, Last name, occupation etc.

3. Deleting the account


The user, if he/she wishes to delete the account, the administrator is informed
and with the permission of the desired user account is deleted from the system’s
database.

4. Uploading Photographs
The user has a facility to upload and share his photographs.

5. Adding YouTube videos


The user can add videos from you tube and share with people.

Nonfunctional Requirements

Performance Requirements: System can withstand even though many no. of users
requested the desired service. As we are maintaining
server for the entire colleges of JNTU and access is given
to the only registered users who can use the services etc.,
it can withstand the load.

Safety & Reliability Requirements: By incorporating a robust and proven RDBMS into
the system, reliable performance and integrity of
data is ensured. There must be a power backup for
server system.

Security Requirements: Sensitive data is protected from unwanted access by users


appropriate technology and implementing strict user access criteria.

15
Software Quality Attributes: Menu Driven programs with user friendly interface
simply Hyperlinks. It is very easy to use. Backup
mechanisms are considered for maintainability of software
as well as data base. As it is object oriented reusability
exists.

3.1 USER REQUIREMENTS:

Overview:

Customer : This application is developed for the LBRCE students. The target users
are the Students. We are developing the system for students and this
project is dedicated to enhance the students’ interactivity with their mates.

Purpose : The purpose of the project is to reconnect the students with their mates.

Scope : Release 1 focuses on:


Students

References : http://www.functionx.com/sqlserver/ (SQL-server tutorial)


http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html
(Documentation on Tomcat 5.0)
http://www.jsptut.com/ (for JSP tutorial)

16
General Requirements

System in Context : Repository and Search Engine is a web based application


developed in Windows operating system, which is of importance to
students. The Repository and Search Engine (RASE) is an Internet
based application that can be accessed throughout the World.
User Characteristics : Students will operate the system.
Constraints : The system will process exceptions in a consistent fashion.
If the exception is a user error that can be corrected. The system
displays an error message with an explanation of the mistake.
The system allows the user to correct the mistake without starting
over. If the exception is a rule violation that cannot be corrected.
The system displays an informational message explaining the
constraint to the user.
System-Wide Requirements
(Received) : The system will process exceptions in a consistent fashion.
If the exception is a user error that can be corrected:
The system displays an error message with an explanation of the
mistake. The system allows the user to correct the mistake
without starting over. If the exception is a rule violation that
cannot be corrected: The system displays an informational
message explaining the constraint to the user.
Rules
The system will allow accessing the services on verifying the user
id and password, opens the services based on the role id.

17
4. SYSTEM AND IMPLEMENTATION DETAILS

DESIGN

Design of software involves conceiving, planning out and


specifying the externally observable characteristics of the
software product. We have data design, architectural design and
user interface design in the design process. These are explained
in the following section. The goal of design process is to provide
a blue print for implementation, testing and maintenance
activities.
The primary activity during data design is to select logical
representations of data objects identified during requirement
analysis and software analysis. A data dictionary explicitly
represents the relationships among data objects and constraints on
the elements of the data structure. A data dictionary should be
established and used to define both data and program design.
Design process is in between the analysis and
implementation process. The following design diagrams (Data
Flow Diagrams and E-R Diagrams) make it easy to understand
and implement
The design process for software system has two levels.
1. System Design or Top Level Design.
2. Detailed Design or Logical Design.
System Design or Top Level Design:
In the system design the focus is on deciding which
modules are needed for the system, the specification of these
modules and how these modules should be interconnected.
Detailed Design or Logical Design:
In detailed design the interconnection of the modules or
how the specifications of the modules can be satisfied is decided.
Some properties for a software system design are

18
• Verifiability.
• Completeness.
• Consistency.
• Trace ability.
• Simplicity/Understandability.

4.1 CLIENT SERVER MODEL

When an architect designs a building, he has a vision of the


finished product and produces a result based on that vision. Client
– server, on the other hand, is more like Darwinian model of
evolution of a living species. No one has a vision of the finished
products; rather, day-today events and gradual changes affect it
over time in reaction to those events.

In the beginning, application was fairly simple, reading


input transaction in a ‘batch’, processing them against a data
store, and the output was paper. Record retrieval was usually a set
of subroutines embedded in the updating program.

Common functions gradually migrated from the


application to the operating system. Database processing was one
of the first major functions to be removed from application
control. Much of the time database functions in the application
included retrieval, replacement and insertion. Since it was
function had to be introduced database administration. This new
function was separated from the application code and involved
defining the structure of the database; value ranges backup,
rollback, and so forth.

Advantages of Client – Server Model:

19
 The hardware and software can be placed where it will do
the most good.
 In Client – Server model PCs, the power can be spread
across the client and the server.
 On client side, an Active X object is used to present data
 By having the client side it can do more work
 The client software supplies the interface (Such as
windowed program) and the knowledge of how to pass the
request to the server and the format of the data for the user
when it’s returned from the server. The server’s job is to
manipulate the data according to the user’s request.

A BRIEF INTRODUCTION TO THREE TIER


ARCHITECTURE

The three-tier software architecture


emerged in the 1990s to overcome the limitations of the two-tier
architecture the third tier (middle tier server) is between the user
interface (client) and the data management (server) components.
This middle tier provides process management where business
logic and rules are executed and can accommodate hundreds of
users (as compared to only 100 users with the two tier
architecture) by providing functions such as queuing, application
execution, and database staging. The three tier architecture is used
when an effective distributed client/server design is needed that
provides (when compared to the two tier) increased performance,
flexibility, maintainability, scalability while hiding the
complexity of distributed processing from the user. These
characteristics have made three layer architectures a popular
choice for Internet applications and net-centric information
systems.

20
• Tier 1: the client contains the presentation logic, including
simple control and user input validation. This application
is also known as a thin client.
• Tier 2: the middle tier is also known as the application
server, which provides the business processes logic and
the data access.
• Tier 3: the data server provides the business data.

First Tier:
Responsibility for presentation and user interaction
resides with the first-tier components. These client components
enable the user to interact with the second-tier processes in a
secure and intuitive manner. Web Sphere Application Server
supports several client types. Clients do not access the third-tier
services directly.

Second Tier:

21
The second-tier processes are commonly referred
to as the Application Logic Layer. These processes manage the
business logic of the application, and are permitted access to the
third-tier services. The application logic layer is where most of
the processing work occurs. Multiple client components can
access the second-tier processes simultaneously, so this
application logic layer must manage its own transactions.

Third Tier:
The third-tier services are protected from direct
access by the client components residing within a secure network.
Interaction must occur through the second-tier processes.

Three Tier Architecture

Usage:

Three tier architectures are used in commercial and military


distributed client/server environments in which shared resources,
such as heterogeneous databases and processing rules, are
required. The three-tier architecture will support hundreds of
users, making it more scalable than the two-tier architecture.

4.2 UML DIAGRAMS


UML APPROACH:

22
UML stands for Unified Modeling Language.UML is a
language for specifying, visualizing and documenting the system.
This is the step while developing any product after analysis. The
goal from this is to produce a model of the entities involved in the
project which later need to be built. The representation of the
entities that are to be used in the product being developed need to
be designed.

Software design is a process that gradually changes as


various new, better and more complete methods with a broader
understanding of the of the whole problem in general come into
existence. There are various kinds of methods in software design.
They are as follows:

 Use case Diagram


 Sequence Diagram
 Collaboration Diagram
 State Chart Diagram
 Object Diagram
 Class Diagram
 Component Diagram
 Deployment Diagram

Use case Diagrams:

Use case diagrams model behavior within a system and


helps the developers understand of what the user require. The
stick man represents what’s called an actor.
An actor represents an outside entity- either human or
technological. In this example its human (Stick man). Notice the
curved rectangle on the diagram this represents the system

23
boundary everything inside that is part of that system, and
everything outside are actors (basically not part of system).
Use case diagrams can be useful for getting an overall
view of the system and clarifying who can do and more
importantly what they can’t do.

Usecase Diagram consists of usecases and actors and


shows the interaction between the usecase and actors.

 The purpose is to show the interactions


between use cases and actor.
 To represent the system requirements from
user’s perspective.
 It must be remembered that the use-cases are
the functions that are to be performed in the
module.
 An actor could be the end-user of the system
or an external system.
Sequence Diagram:
The purpose is to show the functioning through a use case.
In other Words, we call it mapping processes in terms of data
transfers from the actor through corresponding objects.

 To represent the logical flow of data


with respect to a process.
 It must be remembered that the the
sequence diagram display Objects and not the
classes.
Collaboration Diagram:
The diagrammatic representation of process is shown. It
is the same As sequence diagram. However, the representation is
generic and not logical Step by step. The purpose of
collaboration diagram is to assist the Quality Engineers and

24
System Architects to have a view of the distribution of
Processing between objects.
Class Diagram:
 This is one of the most important of
the diagrams in development.
 The diagram break the class into three
layers. One has the name, the second
describes its attributes and the third its
methods. The private attributes are
represented by a padlock to left of the
name.
 The relationships are drawn between
the classes.
 Developers use the Class Diagram to
develop the classes.
 Analyses use it to show the details of
the system.

Architects look at class diagrams to see if any class has too many
functions and see if they are required to be split.

State Transition Diagrams:

 The purpose is to model various


states in which an object can exist.
 Most of the objects in a complex
system maintain states, depending upon which modifies
its behavior.
 Implementation takes start state and
stop state.

25
 It is method for describing the
system’s architecture in detail on various behaviors of the
component.

DIAGRAMS
USECASE DIAGRAM
For a new user for sign up:
Login Page:

26
Home Page:

Video Page:

27
se

Package Diagram:

Deployment Diagram:

28
29
5. TECHNOLOGY
DESCRIPTION

INTRODUCTION TO APACHE SERVER

Apache was originally based on the code and ideas found


in the most popular HTTP server of the time. NCSA httpd1.3
(early 1995). It has since evolved into a far superior system which
can rival (and probably surpass) almost any other UNIX based
HTTP server in terms of functionality, efficiency and speed.
Since it began, it has been completely rewritten and includes
many features. Apache is, as of January 1997, the most popular
WWW server on the Internet, according to the Net craft Survey.

Why Apache?
To address the concerns of a group of WWW providers
and part time http programmers that http didn’t as they wanted it
to behave. Apache is an entirely volunteer effort, completely
funded by its members, not by commercial sales. Apache has
been show to be substantially faster than many other free servers.
The Apache http servers a powerful,flexible,HTTP/1.1
complaint webserver implements the latest protocols ,including
HTTP/1.1 (RFC2616)is highly configurable and extensible with
third party modules can be customized by writing ‘modules’
using the Apache module API provides full source code and
comes with an unrestrictive license runs on WINDOWS NT/9x ,
Netware 5.x and above ,OS/2 ,and most versions of Unix , as well
As Several other operating systems is actively being developed
encourages user feedback through new ideas , bug reports and
patches implements many frequently requested features
,including:

30
DBM databases for authentication:

Allows you to easily set up password-protected pages with


enormous numbers of authorized users, without bogging down
the server.

Customized responses to errors and problems:


Allows you to set up files, or even CGI scripts, which are
returned by the server in response to errors and problems, e.g. set
up a script to intercept 500 Server Errors and perform on-the-fly
diagnostics for both users and yourself.

Java Server Pages (JSP)

To make creating dynamic content easier, Sun introduced


Java Server Pages (JSP). While writing servlets developer
require a pretty extensive knowledge of Java, a person who is
new to the java can learn some pretty neat tricks in JSP in a snap.
JSP represents an attractive alternative of Microsoft’s ASP.
Java Server Pages is a Java – based technology that
simplifies the process of developing dynamic web sites. With
JSP, web designers and developers can quickly incorporate
dynamic elements into web pages using embedded Java. JSP files
contain traditional HTML along with embedded code that allows
the page designer to access data from Java code running on the
Server.
JSP provides the HTML designer with a way to access
data and business logic stored inside Java objects without having
to master the complexities of Java application development.
Although servlets are powerful web components, they are
not ideal technology available to us to build presentation
elements. This is because:

31
• Amending the look and feel of the system involves
recompiling the servlet classes.
• The presence of HTML within the servlet tightly couples
the presentation and the content, which blurs the role of
presentation and providing content.
• Lots of HTML code within the servlet classes make them
difficult to maintain

Java Server Pages addresses these concerns. JSP pages are


text files similar to HTML files but have extra tags that allow us
to:

• Interact with dynamic content.


• Include content from other web application resources.
• Forward the response to other web application
resources.
• Perform custom processing on the server when the
web container serves the page.
Translation phase: In this phase the JSP page is transformed into
a Java servlet and then compiled. This phase occurs only once for
each JSP page and must be executed before the JSP page is
served.

Implementation class: The translation phase results in a delay


when a JSP page is requested for the first time. To avoid this
delay, JSP pages can be precompiled before they are deployed
using tools that perform the translation phase when the server
starts up.

Execution phase: This phase (also known as the Request


Processing Phase) is executed each time the JSP page is served by
the web container. Request for the JSP page result in the
execution of the JSP page implementation class.

JSP scripting Elements:

32
There are three kinds of scripting elements in JSP:
• Declarations
• Scriptlets
• Expressions
Declarations:
Declarations are used to define methods and instance
variables. They do not produce any output that is sent back to the
client. Declarations in the JSP pages are embedded between <%!
and %> delimiters.
In the given example two methods and the variable will be
made available to the page implementation class and we can
access these functions and variables within the JSP page.
Declarations are mainly used in conjunction with Scriptlets.
<%!
Public void jspDestroy(){
System.out.println(“JSP Destroyed”);
}
public void jspInit() {
System.out.println(“JSP Loaded”);
}
int myVariable = 123;
%>
Scriptlets:

Scriptlets are used to embed Java code within JSP pages.


The contents of Scriptlets go within the _jspService () method.
The lines of code embedded in JSP pages should compile with the
syntactical and semantic constructs of Java. Scriptlets are
embedded between <% and %> delimiters, for example:

<%
int x = 10;
int y = 20;
int z = x * y;

33
%>
Expressions:

Expressions in JSP pages are used to write dynamic


content back to the browser and are embedded in <%= and %>
delimiters. If the output of the expression is a Java primitive, the
value of the primitive is printed back to the browser. If the output
is a Java object, the result of calling the toString () on the object is
written back to the browser.

JDBC
The JDBCTM API provides universal data access from
the JavaTm programming language. Using the JDBC 2.0 API,
you can access virtually any data source, from relational
databases to spreadsheets and flat files. JDBC technology also
provides a common base on which tools and alternate interfaces
can be built.

The JDBC 2.0 API is comprised of two packages:

The java.sql package ---- included in the Java 2 SDK, Standard


Edition
The javax.sql package --- included in the Java 2 SDK, Enterprise
Edition.

JDBC Technology Drivers


To use the JDBC API with a particular database
management system, you need a JDBC technology based driver
to mediate between JDBC technology and the database.
Depending on various factors, a driver might be written purely in
the java programming language or in a mixture of the java
programming language and JavaTM Native Inerface (JNI) native

34
methods. The JDBC web site maintains a list of vendors with
drivers currently available or under development.
There are four types of JDBC drivers each having it’s own
functionality. Please note that they are not substitute one another.
Each having their own suitability aspects. They are classified
based on how they access the data from the database.
1. Native JDBC Driver: A JDBC driver, which is partly
written in and most of it is implemented using native
methods to access the database. This is useful in case of
java application that can run only on some specific
platforms. Writing this type is easier when compared to
writing other drivers.

2. All Java JDBC Net Drivers: A JDBC net driver when


uses a common network
Protocol to connect an intermediate server. Which in turn
employees native calls to connect to the database. This
approach suited for applets. Where the request must go
through the intermediate server.

3. JDBC – ODBC Bridge Driver: A bridge driver


provided with JDBC can Convert the JDBC call into
equivalent ODBC calls using the native methods. Since
ODBC provides connection to any type of database
i.e. ODBC complaint, to connect a number of databases
simultaneously is very simple matter this approach is a
recommended one since using ODBC drivers, which are
industry standards as of now, would make an application
truly portable across databases.

4. Native Protocol all - java Drivers: This type of JDBC


driver is written completely in java and can access
the database by making the use of native protocols of
database. This method of data access is suitable in case of

35
intranets where everything can run as an application
instead of an applet. This driver is generally provided by
vendor of the database.

Procedure for Establishing a Connection with the Database:

Step 1: Register the Driver

Driver d= new (name of the Driver);

DriverManager.registerDriver(d);

Step2: Establishing a Connection with the Database Connection

con=DriverManager.getConnection (url, Username,


Password);

When we execute DriverManager.getConnection() it


internally executes the code that is provided by the JDBC Driver
vendor. This code creates an object based on the class provided
by the vendor that implements Connection interface.

Establishing a connection with a database is an expensive


operation. Once the connection is established we can perform
various database operations using the SQL statements.

A JDBC programmer can categorize the SQL statements as

• Select Statements
• Non-Select Statements
Select Statements:

Select Statements are used for fetching the data from the
Database.

Procedure for using the Select Statement:

Step 1: Create a Statement object.

Statement stmt=con.createStatement();

Step 2: Use the executeQuery().

36
This method returns the ResultSet object.Using the
ResultSet we can fetch the data.

ResultSet rs=stmt.executeQuery(“ SQL Select Statement “);

Non-Select Statement:

Non-Select Statements are used to perform the different


operations on the database like insert, delete, update etc.,

Procedure for using the Non-Select Statement:

Step 1: Create a Statement object.

Statement stmt=con.createStatement();

Step 2: Use executeUpdate() to execute Non-Select Statement.

stmt.executeUpdate(“ SQL Statement”);

When a Java Program executes stmt.executeUpdate() statement


the JDBC driver send the statement to the server. The server
carries out the following process.

The server breaks up the SQL Statement into multiple Tokens


(Parts) and analysis whether the Statement is a valid SQL
Statement or not. During this step the server also checks whether
the columns, tables used in the Statement are available or not.
This phase is called as PARSING. If parsing is successful then
the server executes the Statement.

37
6. TESTING
In a software development project, errors can be injected
at any stage during development. The development of software
involves a series of production activities where opportunities for
injection of human fallibility’s are enormous. Because of human
inability to perform and communicate with perfection, software
development is accomplished by a quality assurance activity.
Software testing is a critical element of software quality
assurance and represents the ultimate review of specification,
design and coding. Testing presents an interesting anomaly for
the software engineer. The engineer creates a series of test cases
that are intended to demolish the software engineer process that
could be viewed as destructive rather than constructive.

Testing Objective
• Testing is a process of executing a program with the intent
of finding an error.
• A good test case is one that has a high probability of

38
finding an as –yet undiscovered error.
• A successful test one that uncovers an as –yet
undiscovered error.
The above objectives imply a dramatic change in
viewpoint. They move counter to the commonly held view that a
successful test is one in which no errors are found. Testing cannot
show the absence of detects, it can only show that software errors
are present.
Testing Phases: Software testing phases include the following:
Test activities are determined and test data selected.
The test is conducted and test results are compared with the
expected results.
There are various types of testing:
Unit Testing: Unit testing is essentially for the verification of the
code produced during the coding phase and the goal is test the
internal logic of the module/program. In the Generic code project,
the unit testing is done during coding phase of data entry forms
whether the functions are working properly or not. In this phase
all the drivers are tested they are rightly connected or not.

Integration Testing: All the tested modules are combined into


subsystems, which are then tested. The goal is to see if the
modules are properly integrated, and the emphasis being on the
testing interfaces between the modules. The generic code
integration testing is done mainly on table creation module and
insertion module.

System Testing: It is mainly used if the software meets its


requirements. The reference document for this process is the
requirement document.

Acceptance Testing: It is performed with realistic data of the


client to demonstrate that the software is working satisfactorily.

39
Test methods
Any engineered can be tested in one of the two ways.
1. knowing the specified function that a product has been
designed to perform tests can be conducted that demonstrate each
function is fully operational at the save time searching for errors
in each function.
2. Knowing the internal working of a product, test can be
conducted to ensure that “all gears mesh”, that is that internal
operation performs according to the specification and all internal
components have been adequately exercised. The first test
approach is called Black box testing and the second approach is
called White box testing.

Structural Testing (White Box Testing)


Introduction
White box testing, sometimes called Glass box testing
design method that uses the control method of the procedural
design to derive test cases. Using white box testing methods, the
software engineer can derive test cases that:
1. Guarantee that all independent paths with in a module have
been exercised at least once.
2. Exercise all logical decisions on their true and false sides.
3. Execute all loops at their boundaries and with in their validity.
4. Logical errors and incorrect assumptions are inversely
proportional to the probability that a program path will be
executed.
5. We often believe that logical path not likely to executed when,
in fact, it may be executed on regular basis.
6. Typographical errors are random.
Each of these reasons provides an argument for
conducting white box tests. Black box testing, no matters how
through, may miss the kinds of errors above. “bugs lurk in
corners and congregate”.
White-box testing is far more likely to uncover them.

40
The design of test cases for software and other engineered
products can be as challenging as initial design of the product
itself. The tests that have the highest likelihood of finding the
most errors with a minimum amount of time and effort should be
designed.
A rich variety of test case design methods have evolved
for software. These methods provide the developer with a
systematic approach to testing. Any engineered product can be
tested in one of two ways.
1.Knowing the specified function that a product has been
designed to perform.
2.Knowing the internal working of the project.
The first test approach is known as blackbox testing and
the second is white box. Testing.

Functional Testing(Black Testing)


Introduction
Black box testing focuses on the functional requirements
of the software.That is black-box testing enables the software
engineer to drive set of input conditions that will fully exercise all
functional requirements of a program. Black-box testing attempts
to find errors in the following categories.
1. introduction or missing function
2. Interface errors.
3. Errors in data structures or external data access
4. Initializing and termination errors.

Equivalence Partitioning
Testing case testing for equivalence partitioning is
based on a evaluation of equivalence class for an input condition
if a set of objects can be linked by relationship that are
symmetric, transitive and reflexive, an equivalence is present. An

41
equivalence class represents a set of valid or invalid states for
input condition. Typically an input condition is a specific numeric
value, a range of values, a set of related values, or a condition.
TEST APPROACH:
Testing can be done in two ways:
 Bottom up approach
 Top down approach

Bottom up approach: Testing can be performed starting from


smallest and lowest level modules and proceeding one at a time.
For each module in bottom up testing a short program executes
the module and provides the needed data so that the module is
asked to perform the way it will when embedded with in the
larger system. When bottom level modules are tested attention
turns to those on the next level that use the lower level ones they
are tested individually and then linked with the previously
examined lower level modules.

Top down approach: This type of testing starts from upper level
modules, since the detailed activities usually performed in the
lower level routines are not provided stubs are written. A stub is a
module shell called by upper level module and that when reached
properly will return a message to the calling module indicating
that proper interaction occurred. No attempt is made to verify the
correctness of the lower level module.

42
7. REPORTS

INDEX PAGE:

43
REGISTRATION PAGE:

44
LOGIN PAGE:

45
HOME PAGE:

46
FRIENDS:

47
PICTURES:

48
VIDEOS:

49
8. FUTURE ENHANCEMENTS

It is not possible to develop a system that makes all the


requirements of the user. User requirements keep changing as the
system is being used. Some of the future enhancements that can
be done to this system are:
• As the technology emerges, it is possible to upgrade the
system and can be adaptable to desired environment.
• Because it is based on object-oriented design, any further
changes can be easily adaptable.
• Based on the future security issues, security can be
improved using emerging technologies.

50
9. CONCLUSION

Online social networking offers people great


convenience for social networking. It allows people to
keep in touch with friends, reconnect with old friends or
acquaintances, meet new people, and even conduct
business with the click of a few buttons. You can find
people with similar interests as you and get to know
them better, even if they are in a different country
without having to worry about an enormous phone bill or
going over the restricted minutes on a phone card.

In my opinion, I feel that socializing and having


real friends in the real world is much better than living
in a virtual world.

51
10. BIBLOGRAPHY

Text books Referred:

JSP : Java Server Pages by Peckowsky


The Complete Reference by Phil Hanna
Java Server Pages by Barry Burd
Professional JSP by Simon Brown

JAVA : Java Complete Reference by Patrick Naughton


Concurrent Programming in java: Design
Principles and patterns by Doug Lea

HTML : HTML Black Book by Steven Holzner


HTML and Dynamic HTML by Teri Kieffer

UML : Unified Modeling Language by Iyar Jacobson,Ram


Baugh, Grady Booch
Applying Use Case Driven Object Modeling with
UML by Doug Rosenberg, Kendall Scott

Sites Referred:
www.roseindia.net/jsp/jsp.htm
www.w3schools.com

52
www.jsptut.com
www.htmlref.com

53

Вам также может понравиться