Social Networking Site in JAVA

113
ConnectingYouth.com 201 2 A Training Report Submitted to the Rajasthan Technical University, Kota in partial fulfillment of the requirement for the degree of MASTER OF COMPUTER APPICATIONS Submitted by ANKUR KUMAR AGARWAL Name of Internal Guide Name of Training In charge Mr. Yajuvendra Mrs. Ratna (Manager, HCL CDC, Gurgaon) Laxmi Devi Institute of Engineering & Technology 1

Transcript of Social Networking Site in JAVA

Page 1: Social Networking Site in JAVA

ConnectingYouth.com 2012

A Training Report Submitted to the Rajasthan Technical University, Kota

in partial fulfillment of the requirement for the degree of MASTER OF COMPUTER APPICATIONS

Submitted by ANKUR KUMAR AGARWAL

Name of Internal Guide Name of Training In charge

Mr. YajuvendraMrs. Ratna

(Manager, HCL CDC, Gurgaon)

Laxmi Devi Institute of Engineering & Technology

1

Page 2: Social Networking Site in JAVA

ConnectingYouth.com 2012

Laxmi Devi Institute of Engineering & Technology Affiliated to

Rajasthan Technical University, Kota

MCA-(2009) (June-2012)

TO WHOM IT MAY CONCERN

This is certify that Mr. Ankur Kumar Agarwal Class Roll No. O9MCA606, Enrolment

No. 09C2LDXXM40P606 and University Examination Roll No. 09CLDXX606 of the

Course of MCA-VI Semester (third year) has submitted his PROJECT REPORT duly

signed by the supervisor. PROJECT REPORT is accepted for evaluation.

Department of Computer ApplicationsLaxmi Devi Institute Of Engineering & Technology, AlwarRajasthan Technical University, Kota (Rajasthan) E-mail:

2

Page 3: Social Networking Site in JAVA

ConnectingYouth.com 2012

(Hemant Sharma) Date

HOD

TO WHOM IT MAY CONCERN

This is to certify that Mr. Ankur Kumar Agarwal Class Roll No. 09MCA606, Enrolment

No. 09C2LDXXM40P606 and University Examination Roll No. 09CLDXX606 of the

Course of MCA VI Semester (third year) has completed this assignment and project work

satisfactory. He/She has performed this project work entitle “Social Networking Site”

under my supervision. I am satisfied with his /her work and wish for his/her further

success.

Department of Computer ApplicationsLaxmi Devi Institute Of Engineering & Technology, AlwarRajasthan Technical University, kota (Rajasthan) E-mail:

3

Page 4: Social Networking Site in JAVA

ConnectingYouth.com 2012

(Prakash Kumar) Date:

Supervisor

TO WHOM IT MAY CONCERN

This is to certify that Mr. Ankur Kumar Agarwal Class Roll No. 09MCA606, Enrolment

No. 09C2LDXXM40P606 and University Examination Roll No. 09CLDXX606 of the

Course of MCA VI Semester (third year) has completed this assignment and project work

satisfactory. He/She has performed this project work entitle “Social Networking Site”

under my supervision. I am satisfied with his /her work and wish for his/her further

success.

Department of Computer ApplicationsLaxmi Devi Institute Of Engineering & Technology, AlwarRajasthan Technical University, kota (Rajasthan) E-mail:

4

Page 5: Social Networking Site in JAVA

ConnectingYouth.com 2012

(Vipul Singhal) Date:

Coordinator

TO WHOM IT MAY CONCERN

This is to certify that Mr. Ankur Kumar Agarwal Class Roll No. 09MCA606, Enrolment

No. 09C2LDXXM40P606 and University Examination Roll No. 09CLDXX606 of the

Course of MCA VI Semester (third year) has completed this assignment and project work

satisfactory. He/She has performed this project work entitle “Social Networking Site”

under my supervision. I am satisfied with his /her work and wish for his/her further

success.

Department of Computer ApplicationsLaxmi Devi Institute Of Engineering & Technology, AlwarRajasthan Technical University, kota (Rajasthan) E-mail:

5

Page 6: Social Networking Site in JAVA

ConnectingYouth.com 2012

Date:

YajuvendraDepartment of Computer Applications,Laxmi Devi Institute of Engg. & Tech., Alwar

ACKNOWLEDGEMENT

The satisfaction that accompanies the successful started of any task would be incomplete

without the mention the names of people whose ceaseless cooperation made it possible,

whose constant guidance and encouragement crown all efforts with success.

I offer my sincere thanks to Mr. Prakash Sir Lecturar (MCA), Laxmi Devi Institute of

Engineering & Technology (LIET), Alwar for suggesting and helping me in taking up the

project work at HCL CDC, Gurgaon.

I am thankful to Mr. Navratan for giving me an opportunity to work in HCL CDC,

Gurgaon under his guidance, inspiration and constructive suggestion that helped me in

the preparation and execution of the manuscript, as part of the sixth semester project

training of MCA curriculum.

6

Page 7: Social Networking Site in JAVA

ConnectingYouth.com 2012

ANKUR AGARWAL

MCA VIth Semester.

PREFACE

`This project report is submitted for the partial fulfillment of MCA from RTU, Kota Undertaken at HCL CDC,Gurgaon. This project is a social networking site which connects two or more then two peoples for entertainment and sharing their ideas and making new friends.

Major Project is must for each and every student and especially for technical students for successive completion of their studies. The study remains incomplete without having the practical knowledge of what we have gone through theory. It is rather important for every student to be practical along with his theoretical knowledge. Today there is a need of more perspective and systematic alignment of a student along with his knowledge.Without having any lagging effect of a student should have admirable knowledge of the practical field. Enclosures regarding his field should be made with every respect and viewpoint.So, I conclude that Major Project is most important for each and every student along with theoretical knowledge.

ANKUR KUMAR AGARWAL(MCA VIth Sem)

7

Page 8: Social Networking Site in JAVA

ConnectingYouth.com 2012

INDEX

S.No. Topics Page No.1. Introduction 112. Objective 133. System Analysis 15

3.1 Identification of need 173.2 Preliminary Investigation 17

4. Feasibility Study 214.1 Technical Feasibility 224.2 Economical Feasibility 224.3 Operational Feasibility 23

5. Software Engineering Paradigm Applied 286. Software &Hardware Requirement

Specification30

7. System Design 328. Coding 389. Code Efficiency 5410. Optimization Of code 5411. Validation Code 5512. Implementation & Maintenance 57

8

Page 9: Social Networking Site in JAVA

ConnectingYouth.com 2012

12.1 Testing 5813 System Security Measure 6314.. Cost Estimation Of the Project 6415. Reports 6516. PERT Chart, Gantt Chart 7917. Future Scope of the Project 8018. Bibliography 8219. Glossary 83

The title of the project is

“CONNECTINGYOUTH.COM”

9

Page 10: Social Networking Site in JAVA

ConnectingYouth.com 2012

10

Page 11: Social Networking Site in JAVA

ConnectingYouth.com 2012

People have used the idea of "social network" loosely for over a century to connot ecomplex sets of relationships between members of social systems at all scales, from interpersonal to international Our project aims at using JAVA Technologies to make a social Networking Website. In our project we will use JAVA for the Designing interactive interface or Presentation Logic at Front End and HTML to design the website, MySQL 2005 a Database Management System for the manipulation of database of user at Back End.

11

Page 12: Social Networking Site in JAVA

ConnectingYouth.com 2012

12

Page 13: Social Networking Site in JAVA

ConnectingYouth.com 2012

The project is about Social networking site hence it is a website called as connectingyouth.com. As the name suggests the website is designed specifically for social network and persons can connect always with our friends.

This website allows a user with so many features that he can go through detailed information on any person details, can scrap any person and can save some image in memory and also many features too. This website provide user friendly environment and it provide all detail required for a naive user. The service is designed to help users meet new friends and maintain existing relationships. connectingyouth.com is a website just as a Facebook.com and Myspace.com. A user first creates a "Profile", in which the user provides "Social", "Professional" and "Personal" details. Users can upload photos into their connecting profile with a caption. Members can make groups to join friends according to their wishes.

Speaking technically, the website is designed using language java and the database used during the development of site is Microsoft Sql server.

Hence the website is developed in a way that it is both technically and non-technically sound for the administrator and user respectively.

13

Page 14: Social Networking Site in JAVA

ConnectingYouth.com 2012

14

Page 15: Social Networking Site in JAVA

ConnectingYouth.com 2012

To have an Attractive and Secure Login page to access.

Make new user account in more user friendly and proper validation of details.

Search Friends easily on entire network.

Send Friend request to other users to make friends.

Add friends to your Friend box to accept request.

Creating a public profile having social, professional and personal information.

Ease of editing of profile anytime you need.

Upload and Share Photographs on network.

Add, Search and shares videos of Youtube

15

Page 16: Social Networking Site in JAVA

ConnectingYouth.com 2012

16

Page 17: Social Networking Site in JAVA

ConnectingYouth.com 2012

1) STUDY OF THE SYSTEM

This application can be mainly divided into two modules:

1. Server

2. Client

This project “ConnectingYouth.com” is mainly depended on client/server model. The

client requests the server and server responses by granting the clients request.

The proposed system should provide both of the above features along with the

followed ones:

SERVER: The server should be able to perform the following features:

The first and foremost problem is to find the server. We should identify the

program in the server which processes the client’s request.

Administrator Client who will be acting as a super user.

Creating of private room with the password facility to enable private chats with the

users online. The server is always waiting for clients requests .The clients come and

go down but the server remains the same.

CLIENT: The client should be able to perform the following features:

17

Page 18: Social Networking Site in JAVA

ConnectingYouth.com 2012

Should be able to send message to anybody in the room with clients unique chat name created in the server for chatting purpose.

Should be provided with the drawing tools like free hand, rectangle, oval, line and

also sending text message over the room.

In all the network applications, we find two sort program where the first i.e., server

sends the information and the second i.e., client receives the information.

2) INPUT AND OUTPUT:

The user has to provide to which server it has to connect. In this, the server name

to be provided is local host.

The user has to provide the username and the password for proceeding with the server

for chatting purpose.

IDENTIFICATION OF NEED:

Have u ever thought that we can talk with people residing At far of places i.e., orkut

around the world now we can do this, that’s what technology is all about and you will be

surprised that you can talk with people all over the globe just sitting at your PC, sounds

interesting yes!, just at the click of a button u can communicate and share information

between different users who are present on their terminals at the time you logged in. All

this can be done through a program called ‘Social Networking Site’ and the project

‘ConnectingYouth.com” is all about to do this.

By Social Networking Site a user can share his/her picture with many peoples at a same

time,and know what people think about this picture.and they also know that his/her

friends like this picture or not.ConnectingYouth.com is do these all the things.

18

Page 19: Social Networking Site in JAVA

ConnectingYouth.com 2012

Preliminary Investigation:

WWW is called the World Wide Web. WWW supports many kinds of text, pictures,

video and audio. WWW resources through a web browser which basically a program that

runs on the internet.

There are two kinds of browsers 1) text only browsers and 2) graphical browsers.

Graphical browsers like Netscape Navigator and Internet Explorer are popular. These

browsers provide you Inline images, fonts & document layouts. When you access a

WWW server, the document is transferred to your computer and then the connection is

terminated.

The World Wide Web is a network of information, accessible via an easy-to-use

interface. The information is often presented in hypertext or multimedia and provided by

servers located around the world. The usability of the Web depends largely on the

performance of these servers.

This application is a Java client/server combination, which can be used to chat over the

Internet or local networks

With these features and with the advent of WWW, Web browsers and with

“Social NEtworking”, Internet has become the media of applications.

We can use “Social Networking” for following activities:

To exchange information and converse with friends and family.

To participate in group discussions through public news bulletin board.

19

Page 20: Social Networking Site in JAVA

ConnectingYouth.com 2012

For Entertainment.

Leisure activities.

Access business while at home.

Communicate and collaborate through pictures and images.

20

Page 21: Social Networking Site in JAVA

ConnectingYouth.com 2012

3.1. SDLC:- Software Development Life Cycle (SDLC) is a structured sequence of phases for

implementing an information system.

A System/Software development life cycle (SDLC) is a logical process by which systems

analysts, software engineers, programmers and end-users build information systems and

computer application to solve business problems and needs.

The System/Software development life cycle (SDLC) is a conceptual model

used in project management that describes the stages involved in an information system

development project, from an initial feasibility study through maintenance of the

completed application.

In the software development process we focus on the activities

directly related to the production of the software, for example, design, coding, and

testing. A development process is a sequence of steps. Each step performs a well-defined

activity leading towards the satisfaction of the project goals, with the output of one step

forming the input of the next one.

We have followed the concept of SDLC in the following way:

Survey

21

Page 22: Social Networking Site in JAVA

ConnectingYouth.com 2012

Feasibility Study

Analysis

Preliminary Design

System Design

Implementation

Acceptance Test Generation

Quality Assurance

Database Conversion

Installation

3.2. REQUIREMENT ANALYSIS:-

Requirement Analysis is the first phase of the SDLC. First, we need to figure out

what the problem is (analysis)? We must know exactly what we want to do before we can

begin to do it. A clear understanding of exactly what is needed is necessary for creating a

solution.

In this phase Business Analysts (BA), find out what is the

problem and what are requirements and so on.It begins with a request from the user for a

new system. It involves the following:

Identify the requirement for the system.

Clarify deficiencies in the current system.

Identify deficiencies in the current system.

Establish goals and objectives for the new system.

Determine the feasibility for the new system.

Prepare a project charter that will be used to guide the reminder of the project.

3.3. FEASIBILITY STUDY:-

22

Page 23: Social Networking Site in JAVA

ConnectingYouth.com 2012

Feasibility Study is basically the test of the proposed system in the

light of its workability, meeting user’s requirements, effective use of resources and of

course, the cost effectiveness.

It is a set of manual & computerized components for

gathering, storing & processing business data for an organization. It also converts such

data useful decision oriented information.

The main goal of feasibility study is not to solve the

problem but to achieve the scope. In the process of feasibility study, the cost and benefits

are estimated with greater accuracy. It has three types:

Operational Feasibility

Technical Feasibility

Economic Feasibility

Through Feasibility Study, we can specify User Requirement

Specification (URS) and Software Requirement Specification (SRS).

Depending on the results of the initial investigation, the survey is

expanded to a more detailed feasibility study.

Formation of a project form and appointment of a project leader.

Preparation of System Flow Charts.

Enumerate proposed candidate system.

Describe the characteristics of that candidate system.

Determine and evaluate the performance of that candidate system.

Weight system performance and cost data.

Selection of the best candidate system.

Economic Feasibility:

This procedure is to determine the benefits and savings that are expected from a candidate system and compare them with costs. If benefits outweigh costs, then the decision is made to design and implement the system. Otherwise, further

23

Page 24: Social Networking Site in JAVA

ConnectingYouth.com 2012

justification or alterations in proposed system will have to be made if it is to have a chance of being approved. This is an ongoing effort that improves in accuracy at each phase of the system life cycle.

Economic feasibility talks about the benefits that which we get from this project. Here with the introduction of this online process we are not only reducing the time take for the registration of the entrants. We even reduce the burden on the administrator. As this project is not only reducing the time but also the work burden of the user we say that this product is economically feasible.

Technical Feasibility:Technical feasibility centers on the existing computer system (hardware, software, etc.,) and to what extent it can support the proposed addition. If the budget is a serious constraint, then the project is judged not feasible.

Technical feasibility speaks about the existing hardware and the software that we are using and the deviations that we have to make from the existing one, as we are developing the application using java there is no change in the hardware that the we are using. So we a say that this application is technically feasible as there is no change in the configuration more over it is cost effective.

Operational Feasibility: People are inherently resistant to change, and computers have been known to facilitate change. It is understandable that the introduction of a candidate system requires special effort to educate, sell, and train the staff on new ways of conducting business.

As this project is a user friendly version there is not much training required for the people to use. This product is not only making the task of the administrator easy but it is reducing the time that is taken otherwise. So we say that this product is operationally feasible.

3.4. ANALYSIS:-

24

Page 25: Social Networking Site in JAVA

ConnectingYouth.com 2012

Analysis is a detailed study of the various operations

performed by a system and their relationships within and outside of the

system. This activity is also used to study the system in details. The

objective of this step is to develop structured system specifications for

the proposed system. The structured system specification will be called

the Essential Model. It involves:

Detailed study of the system.

Understand the procedure of the system.

Determine the scope of the system.

Define the goals of the proposed system.

3.5. PRELIMINARY DESIGN:-

The most creative and challenging phase of the system life cycle is

System Design. The term design describes the final system and the

process by which it is developed. This activity deals with certain

design issues that are to be finalized in consultation with the user. The

two most important issues of relevance to the user are the automation

boundary & the human machine interface. The output of this activity is

the user implementation model. This model, in addition to the essential

model defines the following for the system:

Automation Boundary

Report Layout

Workable plan for implementing the candidate system.

Screen layouts for the data entry forms

Menus

25

Page 26: Social Networking Site in JAVA

ConnectingYouth.com 2012

Information on personnel, money, hardware, facilities, and their

estimated cost must also be available.

3.6. DESIGN:-

System Design involves the transformation of the user implementation

model into software design. The first step is to determine how the output is

to be produced and in what format. Second, input data and master files

(database) have to be designed to meet the requirements of the proposed

output.

The design specification of the proposed system consists of the

following:

Database schema

Pseudo code for all the modules.

3.7. CODING:-

After designing the new system/software, the whole system/software is

required to be converted into computer language. Coding the new system/software into

computer programming language does this. It is an important stage where the defined

procedures are transformed into control specifications by the help of a computer

language. This is also called the Programming Phase in which the programmer converts

the program specifications into computer instructions, which we refer as programs. The

programs coordinate the data movement as and control the entire process in a

system/software.

3.8. TESTING:-

Before actually implementing the new system/software into operations, a

test run of the system/software is done removing all the bugs, if any. It an important

26

Page 27: Social Networking Site in JAVA

ConnectingYouth.com 2012

phase of a successful system. After codifying the whole programs of the system, a test

plan should be developed and run on a given set of test data.

In the system/software testing stage, we check the overall behavior of

the system/software against the functional and the performance requirements. There are

two type of testing:

White-Box: Internal part (code) of the project is testing.

Black-Box: System behavior (input/output) is checked.

3.9. IMPLEMENTATION:-

After having the user acceptance of the new

system/software developed, the Implementation phase begins.

Implementation is the stage of a project during which theory is turned into

practice. In this phase, user can know how to execute the package, how to enter data and

so on.

The implementation phase is less creative then system design. This

activity includes programming, testing & integration of modules into

progressively more complete system.

It is primarily concerned with user training, site preparation, and file

conversion. During the final testing user acceptance is tested, followed

by user training.

System testing checks the readiness and accuracy of the system to

access, update, and retrieve data from new files. The output of this

activity is the complete integrated system.

Major sub activities

Coding

Integration

Testing

27

Page 28: Social Networking Site in JAVA

ConnectingYouth.com 2012

Debugging

Inputs

Project character

Design specification

Outputs

Integrated Systems

3.10. MAINTENANCE:-

When the implementation report is submitted, an Maintenance

should be made to determine whether the system/software meets the objectives stated

in the general design report.

In this phase, users may be able to suggest the easy-to-implement

improvements.

3.11. ACCEPTANCE TEST GENERATION:- This activity generated a set of test data that can be used to test the new system

before accepting it. If successful, the program(s) is then run with “live” data. Otherwise a

diagnostic procedure is used to locate and correct errors in the program.

Input

Project Character

Output

Quality Assurance test set

3.12. DATABASE CONVERSION:-

This activity involves conversion of data from the existing system (if any) to the new

system.

3.13. PROCEDURE DESCRIPTION:-

The objective of this step is to produce a manual, which may be used as a guide for

operating the system.

Inputs

28

Page 29: Social Networking Site in JAVA

ConnectingYouth.com 2012

Project Character

User implementation model

Outputs

User manual (guide for end user)

3.14. INSTALLATION:-

This is another activity of the System Development Life Cycle. The change over

from the current system to the new system is done.

Inputs

Project Character

User manual

Outputs

Installed system

This project involves all the activities of the System Development Life Cycle except

for the database conversion and installation.

29

Page 30: Social Networking Site in JAVA

ConnectingYouth.com 2012

A development strategy that encompasses the process, methods and tool layers, and the generic phases is referred to as a process model or software engineering paradigm.

A process model is chosen based on the nature of the project and application, methods and tools to be used and controls and deliverable that are required.

Waterfall Model

The model suggest a systematic sequential approach to software development, it begins at system level and progresses to analysis, design, coding testing and maintenance.

30

Page 31: Social Networking Site in JAVA

ConnectingYouth.com 2012

31

Page 32: Social Networking Site in JAVA

ConnectingYouth.com 2012

Hardware Environment:

Processor : Pentium IV, 600 MHz

RAM : 256 MB

Hard Disk : 40 GB

Monitor : “SAMSUNG 15”

32

Page 33: Social Networking Site in JAVA

ConnectingYouth.com 2012

Software Environment:

Operating System : Windows-XP

Front End : JSP,HTML

Back End : SqlServer, Java Script,CSS

Development Tool : NetBeans, Jdk 1.6, HeidiSql,MySql

For Server

1. Any Operating System

2. MySql Server

3. Apache Tomcat Server

For Client

1. Any Operating System

2. Browser

33

Page 34: Social Networking Site in JAVA

ConnectingYouth.com 2012

Logical design (DFD)

In the DFD, the inputs (source), outputs (destination), Databases (data stores), procedures (Data Flow) and boundaries of the system are described that needs the user requirement. It specifies the user need at a level of detail that virtually determines the information flow into and out of the system and the required data resources.

Physical design (Database design)

34

Page 35: Social Networking Site in JAVA

ConnectingYouth.com 2012

This activity deals with the design of the physical database. A key is to determine how the access paths are to be implemented. A physical path is derived from the logical path. The relationships existing among the entities like one-to-one, one-to-many, many-to-many are considered while designing the database. Relational structured database is used in this system.

Program Design

In conjunction with database design is a decision on the programming language to be used and the flowcharting, coding and debugging procedure prior to conversion.

In this application, java is used as server side scripting while JavaScript and HTML are used as client side scripting, which are supported by the browsers like Mozila Explorer.

Database Design

The Database (collection of data) is at the core of any information system. The nature of data stored in the database as well as the organization of the data has wide implications on the performance of the system. A good database design should hold all the data, which may be required by the users of the system, but at the same time, avoid any harmful or unnecessary redundancy. The database should also be flexible so that any future change in requirements can be incorporated with minimum changes.

ENTITY RELATIONSHIP DIAGRAM

USER_DATA

SEXFirst_name

Last_name

User_name

city

state

35

Page 36: Social Networking Site in JAVA

ConnectingYouth.com 2012

Phone_no

birthdayaddress

country

imageAuthenticate

Login_data

User_name

password

MAKEFRIENDS

USER_FRIENDS

USER_NAME

REQUESTFRIEND

FIRST_NAMEUSER_SCRAP

USER_NAME

FRIEND_NAME SCRAP

IMAGE

SEND SCRAP

A

A

View/uploa

Sr_no

36

Page 37: Social Networking Site in JAVA

ConnectingYouth.com 2012

DATA FLOW DIAGRAM

It is a pictorial representation of Business processes (functions/services/activities), along with the data flow.

Software process:-Guides how the software is being built.

Image_table

User_namepath

Insert/update

User_social

status martial

religious

smoke

drink aboutme passion

sports

movies

music

hobbies

37

Page 38: Social Networking Site in JAVA

ConnectingYouth.com 2012

Business process:-Specific to organization, e.g.:- In this project; issuing ticket, canceling ticket. In this focus is on what data flows and not how the data flows. When all the analysis is being made then we develop a diagram to depict the analysis, and following symbols are being used:-

S.NO.

SYMBOL NAME DESCRIPTION

1 Data Flow Represents the connectivity between various processes.

2 Process Performs some processing of input data.

3

External Entity

Defines source or destination of system data. The entity which receives or supplies information.

4 Data Store Repository of data.

0 Levels DFD:

Provide Authentication

SERVER

38

Page 39: Social Networking Site in JAVA

ConnectingYouth.com 2012

Register an Acoount Developed Profile

CLIENT

Social NetworkingSystem

39

Page 40: Social Networking Site in JAVA

ConnectingYouth.com 2012

Table Design

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `agarwal` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `agarwal`;

CREATE TABLE /*!32312 IF NOT EXISTS*/ `image_comments` ( `image_no` varchar(50) default NULL, `user_name` varchar(200) default NULL, `comments` varchar(500) default NULL

40

Page 41: Social Networking Site in JAVA

ConnectingYouth.com 2012

);

CREATE TABLE /*!32312 IF NOT EXISTS*/ `image_like` ( `image_no` varchar(500) default NULL, `user_name` varchar(200) default NULL);

CREATE TABLE /*!32312 IF NOT EXISTS*/ `image_table` ( `sr_no` tinyint(4) NOT NULL auto_increment, `user_name` varchar(50) default NULL, `image_path` varchar(100) default NULL, PRIMARY KEY (`sr_no`));

CREATE TABLE /*!32312 IF NOT EXISTS*/ `login_data` ( `user_name` varchar(10) NOT NULL, `password` varchar(20) default NULL, PRIMARY KEY (`user_name`));

CREATE TABLE /*!32312 IF NOT EXISTS*/ `user_data` ( `user_name` varchar(20) NOT NULL, `email_id` varchar(50) default NULL, `first_name` varchar(25) default NULL, `last_name` varchar(25) default NULL,

`sex` varchar(10) default NULL, `birthday` varchar(30) default NULL, `phone_no` varchar(50) default NULL, `address` varchar(50) default NULL, `city` varchar(50) default NULL, `state` varchar(10) default NULL, `country` varchar(10) default NULL, `image` varchar(200) default NULL);

CREATE TABLE /*!32312 IF NOT EXISTS*/ `user_data` ( `user_name` varchar(20) NOT NULL, `email_id` varchar(50) default NULL, `first_name` varchar(25) default NULL, `last_name` varchar(25) default NULL, `sex` varchar(10) default NULL,

41

Page 42: Social Networking Site in JAVA

ConnectingYouth.com 2012

`birthday` varchar(30) default NULL, `phone_no` varchar(50) default NULL, `address` varchar(50) default NULL, `city` varchar(50) default NULL, `state` varchar(10) default NULL, `country` varchar(10) default NULL, `image` varchar(200) default NULL);

CREATE TABLE /*!32312 IF NOT EXISTS*/ `user_scrap` ( `user_name` varchar(100) default NULL, `friend_name` varchar(20) default NULL, `scraps` varchar(500) default NULL, `image` varchar(300) default NULL);

CREATE TABLE /*!32312 IF NOT EXISTS*/ `user_social` ( `user_name` varchar(20) NOT NULL default '', `user_status` varchar(100) default 'Not Set Now', `martial` varchar(20) default 'Not Available', `religious` varchar(30) default 'Not Available', `smoke` varchar(20) default 'Not Available', `drink` varchar(20) default 'Not Available', `aboutme` varchar(200) default 'Not Available', `passion` varchar(100) default 'Not Available', `sports` varchar(100) default 'Not Available', `music` varchar(100) default 'Not Available', `movie` varchar(100) default 'Not Available',

`hobbies` varchar(100) default 'Not Available', PRIMARY KEY (`user_name`));

CSS Code

templatemo_style.css

body {margin: 0;padding: 0;line-height: 1.5em;font-family: Verdana, Arial, san-serif;font-size: 11px;color: #3d3939;

42

Page 43: Social Networking Site in JAVA

ConnectingYouth.com 2012

background: #d95995 url(images/templatemo_main_bg.jpg) top repeat-x;}

a:link, a:visited { color: #262324; text-decoration: none; font-weight: bold;} a:active, a:hover { color: #262324; text-decoration: underline;}

p {margin: 0px;padding: 0px;

}

img {border: 5px solid #f5d0e1;

}

.cleaner {clear: both;width: 100%;height: 1px;font-size: 1px;

}

.cleaner_with_height {clear: both;width: 100%;

height: 30px;font-size: 1px;

}

.cleaner_with_divider {clear: both;width: 100%;height: 40px;font-size: 1px;margin: 15px 0 30px 0;background:url(images/templatemo_divider.jpg) center center no-repeat;

}

#templatemo_container{width: 960px;margin: 0 auto;border-left: 1px solid #fff;border-right: 1px solid #fff;

43

Page 44: Social Networking Site in JAVA

ConnectingYouth.com 2012

background-color: #f8bbd7;}/* header */#templatemo_header {

width: 920px;height: 205px;padding: 0px 20px;background: url(images/templatemo_header_bg.jpg);

}

#templatemo_header #templatemo_login_box {float: right;width: 520px;padding-top: 7px;

}

#templatemo_header #templatemo_login_box a {font-size: 14px;color: #fe0077;

}

#templatemo_header #templatemo_login_box form {float: left;padding: 0px;margin: 0px;margin-right: 10px;

color: #fff;}

#templatemo_header #templatemo_login_box form label {margin-right: 10px;

}

#templatemo_login_box form .inputfield {width: 120px;color: #000;

background:#743050;border: 1px solid #8b4264;font-variant: normal;height: 12px;

44

Page 45: Social Networking Site in JAVA

ConnectingYouth.com 2012

padding: 4px;}

#templatemo_login_box form .button{background: url(images/templatemo_login_btn.jpg) no-repeat; border: none;color: #f6d848;cursor: pointer;font-size: 12px;font-weight: bold;height: 21px;margin: 0 0 0 7px;padding: 0 8px 0 4px;text-align: center;vertical-align: bottom;white-space: pre;width: 50px;

}/* end of header */

/*scrap box*/#templatemo_header_scrap {

height: 205px;padding: 0px 28px;

}

#templatemo_header_scrap #templatemo_login_box a_scrap {

font-size: 25px;color: black;

}#templatemo_login_box_scrap form .button{

background: no-repeat; border: none;color: white;cursor: pointer;font-size: 18px;font-weight: bold;height: 25px;margin: 0 0 0 7px;

45

Page 46: Social Networking Site in JAVA

ConnectingYouth.com 2012

padding: 0 8px 0 4px;

vertical-align: bottom;white-space: pre;width: 100px;

}/*end scrap box*//* menu */

#templatemo_menu {clear: both;width: 960px;height: 55px;background: url(images/templatemo_menu_bg.jpg) no-repeat;

}

#templatemo_menu ul {padding: 15px 0 0 0;margin: 0 0 0 80px;list-style: none;

}

#templatemo_menu ul li{display: inline;

}

#templatemo_menu ul li a{float: left;padding: 0 20px;font-size: 12px;font-weight: bold;

text-align: center;text-decoration: none;color: #571a37;

}

#templatemo_menu li a:hover, #templatemo_menu li .current{color: #ee3f91;

}#templatemo_menu_in {

clear: both;width: 650px;height: 55px;

46

Page 47: Social Networking Site in JAVA

ConnectingYouth.com 2012

background: url(images/templatemo_menu_bg.jpg) no-repeat;}#templatemo_content_in {

width: 650px;padding: 40px 20px 0px 20px;

}#templatemo_menu_in ul {

padding: 15px 0 0 0;margin: 0 0 0 80px;list-style: none;

}#templatemo_menu_in ul li{

display: inline;}#templatemo_menu_in ul li a{

float: left;padding: 0 20px;font-size: 12px;font-weight: bold;text-align: center;text-decoration: none;

}#templatemo_menu_in li a:hover, #templatemo_menu_in li .current{

}#templatemo_content_right_background #templatmeo_quick_search_background{

clear: both;position: relative;width: 650px;

height: 92%;margin-bottom: 0px;color: #fff;background: #ee3f91 url(images/templatemo_quick_search_bg_top.jpg)

top right repeat;}#templatmeo_quick_search_background h1 {

margin: 1000px;font-size: 105px;border-bottom: 1px solid #d32275;margin-bottom: 5000px;padding: 15px 20px;

47

Page 48: Social Networking Site in JAVA

ConnectingYouth.com 2012

color: #fff;}#templatmeo_quick_search_background span {

position: absolute;bottom: 0px;display: block;width: 200px;height: 10px;background:url(images/templatemo_quick_search_bg_bottom.jpg) no-

repeat;}

/*scrap css */

#templatemo_content_right_background_scrap #templatmeo_quick_search_background_scrap{

background: #ee3f91 url(images/templatemo_quick_search_bg_top.jpg) top right repeat;}#templatmeo_quick_search_background_scrap h1 {

margin: 1000px;font-size: 105px;border-bottom: 1px solid #d32275;margin-bottom: 5000px;padding: 15px 20px;color: #fff;

}#templatmeo_quick_search_background_scrap span {

position: absolute;bottom: 0px;display: block;width: 200px;

height: 10px;background:url(images/templatemo_quick_search_bg_bottom.jpg) no-

repeat;}

/* end of menu*/

/* content */#templatemo_content {

width: 920px;padding: 40px 20px 0px 20px;

48

Page 49: Social Networking Site in JAVA

ConnectingYouth.com 2012

}

#templatemo_content #templatemo_content_left {float: left;width: 560px;

}

.content_left_section_01 .welcome_title {width: 100%;height: 40px;background: url(images/templatemo_welcome_title.jpg) no-repeat;margin-bottom: 30px;

}

.content_left_section_01 h1 {font-size: 24px;color: #720035;margin: 0 0 15px 0;padding: 5px 0 15px 0;border-bottom: 1px solid #720035;

}

#templatemo_content_left .content_left_section_01 img {margin: 0 0 0 15px;

}

#templatemo_content_left p {margin: 0px;padding-bottom: 10px;text-align: justify;

}

#templatemo_content_left .content_left_section_02 {clear: both;overflow: hidden;padding: 20px;position: relative;color: #fff;background: #794f63

url(images/templatemo_content_left_section_top_bg.jpg) top center no-repeat;}

.content_left_section_02 span{

49

Page 50: Social Networking Site in JAVA

ConnectingYouth.com 2012

position: absolute;bottom: 0px;left: 0px;display: block;width: 100%;height: 5px;background: url(images/templatemo_content_left_section_bottom_bg.jpg)

bottom center no-repeat;}

.content_left_section_02 .latest_profile_title{font-size: 20px;font-weight: bold;color: #ffffff;margin: 0 0 30px 0;padding: 10px 0 5px 50px;border-bottom: 1px solid #653f51;background:url(images/templatemo_profile_icon.jpg) bottom left no-

repeat;}

.content_left_section_02 .latest_profile_box {float: left;width: 250px;

}

.latest_profile_box .name {font-weight: bold;color: #FFF;

}

.latest_profile_box img {

float: left;margin-right: 15px;padding: 0px;

}

.content_left_section_02 .cleaner_with_width {float: left;display: inline-block;height: 20px;width: 20px;font-size: 1px;

}

50

Page 51: Social Networking Site in JAVA

ConnectingYouth.com 2012

#templatemo_content #templatemo_content_right {float: right;width: 310px;

}

#templatemo_content_right #templatmeo_quick_search {clear: both;position: relative;width: 270px;margin-bottom: 150px;color: #fff;background: #ee3f91 url(images/templatemo_quick_search_bg_top.jpg)

top right no-repeat;}

#templatmeo_quick_search h1 {margin: 100px;font-size: 15px;border-bottom: 1px solid #d32275;margin-bottom: 15px;padding: 15px 20px;color: #fff;

}

#templatmeo_quick_search form {margin: 0px;padding: 0 10px 10px 10px;text-align: right;

}

#templatmeo_quick_search form label {width: 200px;margin-right: 50px;

}

#templatmeo_quick_search form .form_row{margin-bottom: 2px;

}

#templatmeo_quick_search form .inputfield {color: #000;font-variant: normal;

51

Page 52: Social Networking Site in JAVA

ConnectingYouth.com 2012

height: 10px;padding: 5px;

}

#templatmeo_quick_search span {position: absolute;bottom: 0px;display: block;width: 200px;height: 10px;background:url(images/templatemo_quick_search_bg_bottom.jpg) no-

repeat;}

#templatemo_content_right .content_right_section {clear: both;

}

.content_right_section img {border: 10px solid #f5d0e1;margin-bottom: 2px;

}

.content_right_section h1 {font-size: 20px;color:#720035;margin: 50px;margin-bottom: 20px;padding: 0px;padding-bottom: 10px;border-bottom: 1px dotted #720035;

}

.content_right_section h2 {font-size: 16px;color: #524e50;margin: 0 0 5px 0;padding: 0 0 5px 0;padding-bottom: 3px;

}

.content_right_section p{margin: 0 0 0 0;padding: 0 0 0px 0;

52

Page 53: Social Networking Site in JAVA

ConnectingYouth.com 2012

}/* end of content */

/* footer */#templatemo_footer {

clear: both;width: 960px;padding: 20px 0px 20px 0;text-align: center;background-color: #eaa9c7;

}

#templatemo_footer a{color: #333;font-weight: normal;

}/* end of menu */

ConnectingYouth.com JSP Code

Index.jsp

<%-- Document : index Created on : Mar 30, 2012, 11:25:39 AM Author : pankaj--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

53

Page 54: Social Networking Site in JAVA

ConnectingYouth.com 2012

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <% response.sendRedirect("home.jsp"); %> </body></html>

54

Page 55: Social Networking Site in JAVA

ConnectingYouth.com 2012

CODE OPTIMIZATION AND EFFICIENCY

The below mentioned steps where taken to optimize the code:

Use Of Class Modules(Components): Class modules were used for reusability of the code ,this helps our application to achive easy maintinence and seprate compilation can be reflected to all the dependent modules .

55

Page 56: Social Networking Site in JAVA

ConnectingYouth.com 2012

Use Of General Variables and Object in Module: Module was used for declaring general variables and objects, Single connection was opened in the general module so that common connection can be shared in different modules.

Check No Use of Un-necessary Variables: Precautions are taken to prevent the use of un-necessary variables or objects, same variables are used in case of holding the similar data.

Opening/Closing Objects: Objects are assigned only when they are to be used to prevent wastage of memory, and it is closed when its necessity is assumed to be vanished.

56

Page 57: Social Networking Site in JAVA

ConnectingYouth.com 2012

VALIDATTION CHECKS

ConnectingYouth.com is a social networking site. It has some common validation just like another social networking site.For example it has following validation :-

On first step when user creates his/her account he/she choose a ‘user name’. This ‘user name’ is a unique id in our database, so when a user choose already defined ‘user name’ he/she get an error in sign up page.

57

Page 58: Social Networking Site in JAVA

ConnectingYouth.com 2012

User can’t sign up without entering his user name, email-id, first name, last name, and city etc.

On sign-up page email-id and re-enter email-id must be same.

On sign-up page password and re-enter password must be same.

On log-in page they must enter user name with password. Without entering user name and password they can’t log-in.

A user can’t upload another file except .gif, .jpeg, .png.

A user delete’s only his/her own scraps in friend’s scrapbook, and in his/her scrapbook they delete any scrap, there is no validation.

IMPLEMENTATION

The implementation is the final and important phase. It involves user training, system

testing and successful running of the developed proposed system. The user tests the

developed system and changes are made according to their needs. The testing phase

involves the testing of developed system using various kinds of data.

58

Page 59: Social Networking Site in JAVA

ConnectingYouth.com 2012

An elaborate testing of data is prepared and the system is tested using the test data. While

testing, errors are noted and corrections are made. The corrections are also noted for

future use. The users are trained to operate the developed system.

The implementation phase of software development involves translation of design

specification into source code, and debugging, documenting and unit testing the source

code. To enhance the quality of the software the methods are structured control

constructs, built in and user defined data types, secure type checking, flexible scope rules

exception handling mechanism, concurrency constructs and separates compilation

modules.

TESTING

1. Introduction:

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.

59

Page 60: Social Networking Site in JAVA

ConnectingYouth.com 2012

Testing is one of the most important phases in the software development activity. In

software development life cycle (SDLC), the main aim of testing process is the quality;

the developed software is tested against attaining the required functionality and

performance.

During the testing process the software is worked with some particular test cases and the

output of the test cases are analyzed whether the software is working according to the

expectations or not.

The success of the testing process in determining the errors is mostly depends upon the

test case criteria, for testing any software we need to have a description of the expected

behavior of the system and method of determining whether the observed behavior

confirmed to the expected behavior.

2. Types of Testing:

Since the errors in the software can be injured at any stage. So, we have to carry out the

testing process at different levels during the development. The basic levels of testing are

Unit, Integration, System and Acceptance Testing.

The Unit Testing is carried out on coding. Here different modules are tested against the

specifications produced during design for the modules. In case of integration testing

different tested modules are combined into sub systems and tested in case of the system

testing the full software is tested and in the next level of testing the system is tested with

user requirement document prepared during SRS.

Unit Testing:

60

Page 61: Social Networking Site in JAVA

ConnectingYouth.com 2012

Unit testing focuses verification effort on the smallest unit of software design that is the

module. Using procedural design description as a guide, important control paths are

tested to uncover errors within the boundaries of the module. The unit test is normally

white box testing oriented and the step can be conducted in parallel for multiple modules.

Integration Testing:

Integration testing is a systematic technique for constructing the program structure, while

conducting test to uncover errors associated with the interface. The objective is to take

unit tested methods and build a program structure that has been dictated by design.

Functional Testing:In Functional Testing test cases are decided solely on the basis of requirements of the

program or module and the internals of the program or modules are not considered for

selection of test cases. This is also called Black Box Testing

Structural Testing:In Structural Testing test cases are generated on actual code of the program or module to

be tested. This is called White Box Testing.

Top-down Integration:

Top down integrations is an incremental approach for construction of program structure.

Modules are integrated by moving downward through the control hierarchy, beginning

with the main control program. Modules subordinate to the main program are

incorporated in the structure either in the breath-first or depth-first manner.

Bottom-up Integration:

61

Page 62: Social Networking Site in JAVA

ConnectingYouth.com 2012

This method as the name suggests, begins construction and testing with atomic modules

i.e., modules at the lowest level. Because the modules are integrated in the bottom up

manner the processing required for the modules subordinate to a given level is always

available and the need for stubs is eliminated.

System Testing:

System testing is actually a series of different tests whose primary purpose is to fully

exercise the computer-based system. Although each test has a different purpose, all work

to verify that all system elements have been properly integrated to perform allocated

functions.

Security Testing:

Attempts to verify the protection mechanisms built into the system.

Performance Testing:

This method is designed to test runtime performance of software within the context of

an integrated system.

Validation Testing:

At the conclusion of integration testing software is completely assembled as a package,

interfacing errors have been uncovered and corrected and a final series of software tests

begins, validation test begins. Validation test can be defined in many ways. But the

simple definition is that validation succeeds when the software function in a manner that

can reasonably expected by the customer. After validation test has been conducted one of

two possible conditions exists.

One is the function or performance characteristics confirm to specifications and are

accepted and the other is deviation from specification is uncovered and a deficiency list is

created. Proposed system under consideration has been tested by using validation testing

and found to be working satisfactorily.

62

Page 63: Social Networking Site in JAVA

ConnectingYouth.com 2012

Output Testing:

After performing validation testing, the next step is output testing of the proposed system

since no system could be useful if it does not produce the required output in the specified

format. Asking the users about the format required by them tests the outputs generated by

the system under consideration. Here the output format is considered in two ways, one is

on the screen and other is the printed format. The output format on the screen is found to

be correct as the format was designed in the system designed phase according to the user

needs. For the hard copy also the output comes as the specified requirements by the users.

Hence output testing does not result any corrections in the system.

User Acceptance Testing:

User acceptance of a system is the key factor of the success of any system. The system

under study is tested for the user acceptance by constantly keeping in touch with the

prospective system users at the time of developing and making changes wherever

required.

Test Case:

If Librarian/Student enters the user id and password and clicks the sign in button then

checks into database, if it is correct then entered into site otherwise displaying the error

message of user id and password is incorrect and you could not login as Librarian/Student

role.

If librarian can issue more than 4 books to each student then the message will be

displayed as `this student already taken 4 books so issuing is not possible with out

returning any book`.

63

Page 64: Social Networking Site in JAVA

ConnectingYouth.com 2012

SYSTEM SECURITY MEASURES

ConnectingYouth.com is a social networking site, which is built in JAVA language. Because JAVA is a very secure language, so this site also is very secure. But we add additional security features in it by which it’s become more secure. These additional security features are as follows:-

64

Page 65: Social Networking Site in JAVA

ConnectingYouth.com 2012

A user always on home or welcome (home2.jsp) page, all the pages change internally.

The most power full feature of this site is, url is always on home2.jsp, user can’t see which page is internally moving.

We choose unique database user name and password, which cannot be guessed easily by someone.

We choose unique database name which is also not guessed by someone.

All the fields in database are unique.

We have only one database table for log-in, which only stores user-name and password.

COST ESTIMATION OF THE PROJECT

Cost estimation for a system needs to consider several cost elements. Some of them are Hardware, Personal, Facility, Operating and Supply Costs.

Hardware Costs related to the actual purchase or lease of computer and peripherals, Dtermining the actual costs of hardware is generally more difficult when the system is

65

Page 66: Social Networking Site in JAVA

ConnectingYouth.com 2012

shared by varios users then dedicated stand alone system in some cases. The best way to control for this cost is treat it as an operating costs.

Personal Costs includes EDP staff salaries benefits and well as pay for those involved in developing the system.

Facility Costs are expenses incurred in the preparation of the physical expendecture where the application or rthe computer will be in operation. This involves flooring, wiring, and lighting and air conditioner. These costs are treated as one time costs an incorporated into overall costs.

Operating Costs includes all costs associated with day-to-day operation of the system. Once the system is installed, the cost of operating and maintaining the system becomes recurring costs.

Supply Costs are variables costs that increase with increased use of paper, ribbons, disks and the like. They should be estimated and included in the overall costs of the system.

REPORTS

SNAPSHOTS

home.jsp

66

Page 67: Social Networking Site in JAVA

ConnectingYouth.com 2012

signup.jsp

67

Page 68: Social Networking Site in JAVA

ConnectingYouth.com 2012

home2.jsp

68

Page 69: Social Networking Site in JAVA

ConnectingYouth.com 2012

profile.jsp

69

Page 70: Social Networking Site in JAVA

ConnectingYouth.com 2012

update_profile.jsp

70

Page 71: Social Networking Site in JAVA

ConnectingYouth.com 2012

user_social_information.jsp

71

Page 72: Social Networking Site in JAVA

ConnectingYouth.com 2012

update_social_profile.jsp

72

Page 73: Social Networking Site in JAVA

ConnectingYouth.com 2012

user_scap.jsp

73

Page 74: Social Networking Site in JAVA

ConnectingYouth.com 2012

photos.jsp

74

Page 75: Social Networking Site in JAVA

ConnectingYouth.com 2012

big_image.jsp

75

Page 76: Social Networking Site in JAVA

ConnectingYouth.com 2012

uploadfile.jsp

76

Page 77: Social Networking Site in JAVA

ConnectingYouth.com 2012

search_friend.jsp

77

Page 78: Social Networking Site in JAVA

ConnectingYouth.com 2012

friend_status.jsp

78

Page 79: Social Networking Site in JAVA

ConnectingYouth.com 2012

notification.jsp

79

Page 80: Social Networking Site in JAVA

ConnectingYouth.com 2012

PERT CHART AND GANTT CHART

80

Page 81: Social Networking Site in JAVA

ConnectingYouth.com 2012

FUTURE SCOPE OF THE PROJECT

81

Page 82: Social Networking Site in JAVA

ConnectingYouth.com 2012

Scope of this project is that we can add a features of User based Communities and

Live Chat Server for online user.

User Communities

Online Chat Server

Privacy of user information among other person on network

Games & other Application

A Wall to comment and share information on network.

CONCLUSION

82

Page 83: Social Networking Site in JAVA

ConnectingYouth.com 2012

During the training we learnt how to make a product is doesn’t mean take raw material

& just put it together and product is ready but it means that manufacturing a product is a

systematic process which consist of a step by step process for this purpose.

Our training included the development of a dummy website on Social Networking . In

the sessions we acquired the knowledge about the planning of System Requirement

Specification. We learned the steps involving in software development life cycle.

In the practical sessions we made the project assigned, on which we developed the design

documents & made an analysis on how it can be developed.

At last, training period is a time, which really enables the trainee to develop his/her skills,

gain knowledge that how, an organization works & now a product is manufactured with

collective work of so many people.

In brief a training period is really essential for every technical person.

BIBLIOGRAPHY

83

Page 84: Social Networking Site in JAVA

ConnectingYouth.com 2012

Database System Concepts by Henry F. Korthe Database Management System by Gherke www.google.com www.w3schools.com www.askQuestion.com

84