You are on page 1of 53

PREFACE

The present miraculous in the fields of technology and the resulting impact on almost all work of life can be attributed to the fast development of computer technology. The growth of technology particularly in the recent has been very fast. In today's fast changing environment, computer can with proper programming process data towards logical conclusion classify and makes them readily available for the use. Computers are seen replacing human work. Use of computers can be seen in the offices, hospitals, railways and airline reservations, hotels, department stores etc. Computers have not allowed the enhancement in computation speed but also have brought about considerable reduction in space with cost effectiveness. Computers have become so versatile, that they have become indispensable not only to engineers, scientists, business executive, managers administrators, but also to the common men. This era of information explosion is totally based upon computer technology, which is accepted world wide today practically each and everything is access by computer (Internet). It used to be that computers made a difference only to lives of those used them. But with microprocessors being embedded in everything, from washing machine to toys and automobiles, they are going to impacting a lot more lives. With the explosion of information technology and advert new electronic and computers devices users need to be acquainted with a lost of things relating to myriad branches of knowledge and skills and numerous aspect of social, economy political and technology system to achieve the goal of nations growth and development in the 21st century.

ABOUT THE PROJECT THEORETICAL BACKGROUND SYSTEM ANALYSIS AND DESIGN METHODOLOGY ADOPTED,SYSTEM IMPLEMENTATION AND
DETAILS OF HARDWARE AND SOFTWARE

DETAILED LIFECYCLE OF THE PROJECT


1. DATA FLOW DIGRAM 2. INPUT AND OUTPUT DESIGN 3. METHODOLOGY USED FOR TESTING

CONCLUSION BIBLIOGRAPHY

About The Project:Introduction:Online or virtual Social Network, allow people with common interests to meet, communicate and share ideas and information, through a network like the web. While doing this, participants develop bonds with each other and the

community as a whole. Online Social Network have emerged as one of the most potential levers of action the web. Such Social Network can be built around demographic groups students, parents, professional groups - doctors or programmers or who share a particular personal interest bikers or clock repairers. Threaded by a common interest, community participants have a lot to share with each other. Once established, online Social Network provides a new way for brands to reach customers with special interest in their products. Online Social Network aims to achieve the following: Engage citizens in participating democracy, discuss their own issues etc. Encourage citizen-source journalism that complements and in some cases competes with local for-profit news organizations Enable government officials to communicate with constituents more often, more easily and in a more meaningful way The target audience is anyone interested in local community issues/ any other issues. How does online Social Network Interact? Online Social Network interacts by virtue of their shared passion. They can be found in a variety of web destinations offering expression to interest-related activities. Like discussion forums, book sites, auction sites, trading/exchange sites, blogs and so on. The tools used are generally message boards, blogging applications, text chat. The building blocks of an online community

Online virtual Social Network makes use of a range of technologies that support person-to-person and person-togroup communications. The enabling technologies facilitate two distinct types of communication: Real time (or synchronous) Communication: through text chat and instant messaging Non-real time (or asynchronous) Communication: through message boards, mail lists, member and community web pages, and surveys. Additionally virtual Social Network also depend on a member database and may also include technologies to support registration, electronic commerce, directories (of products, services, suppliers, etc.) and searches (for searching member profiles, community documentation, reports, articles, transcripts, archives,etc.).

System Overview The application that I will develop covers the following areas: Users Personal Details with Other Information: o Entering Personal Professional and Social Details. o Uploading personal image o Storing images. Friend search: o Entering name or location. Scrapbook: o Select the user and write the message in his message box. o View messages of various friends.

o Album o o

Deleting Particular Departments Details.

User can store unlimited photos in his album User can also view others album also. Friend list

o This is the page where user can see all his joined communities. o User can also remove coined communities from community list. Chat o User can chat with other online users. Add friend User can send /accept/reject friend to the desired user Salient Features: o A user is only allowed to enter the system through id and password. So unauthorized access id controlled. o A user can change his/her own password for his/her own security. o This system provides high efficiency to manage different operation. o It provides easy movement through the different screens. o Multiple users can use this system after few modifications. o Behaviour and look n feel of the tools can be controlled by comprehensive administration parameters o Web based administration for configuration, parameters, maintenance, and approval activities

o Web based content management and moderation tools. Moderators can approve, moderate and maintain contents for all tools. It can be carried out online in real time for tools like Room chat moderation, or Guest speaker chat o Very flexible and generalized policy implementation for all tools. This policy module controls access rights for visitors, members, respective owners of different tools and moderators o Active content technology, which enables any content of any tool to be pasted on any page of the site or any other site. For example, content for a poll can be pasted in any page within the your site, or any other site o Very comprehensive user and usage statistics

THEORETICAL BACKGROUND

SYSTEM ANALYSIS AND DESIGN

ANALYSIS:

Requirement analysis is down in order to understand the problem the software system is to solve. The problem could be automating an existing manual process, developing a new automated system, or a combination of the two. For large systems that have many features, and that need to perform many different tasks, understating the requirements of the system is the major task. The emphasis in the requirements analysis is on identifying what is needed from the system, not how the system will achieve its goals. The developer has to develop the system to satisfy the clients needs. Once the problem is analyzed and the essentials understood, the requirement must be satisfied in the requirement specification document. For requirement specification in the form of a document, some specification language has to be selected. All the factors that may affect the design and the proper functioning of the system should be specified in the requirement document. Preliminary user manual That describes the entire major user interfaces frequently forms a part bof the requirements documents. DESIGN: The purpose of the design phase is to plan a solution of the problem specified by the requirement document. This phase is the first step in moving fro the problem domain to the solution domain. Stating with what is needed; design takes us towards how to satisfy the needs. The designs affect the quality of software; it has major impact on the later phases, particularly testing and maintenances. The output of this phase is the design document. as plan fort This document is similar to a blue print or the solution and is used later during

implementation, testing and maintenance. The design activity is often divided into two separate phases system design And detailed design, which is some time also called top level design, aims to identify the modules should be in the system, the specifications of these modules, and how the they interact with each other to produce the desired results. At the and of the system design all the major data structures, file formats, output formats and the major modules in the system and their specifications are decided.

Model-View-Controller Pattern Model-View-Controller (MVC) is a classic design pattern often used by applications that need the ability to maintain multiple views of the same data. The MVC pattern hinges on a clean separation of objects into one of three categories models for maintaining data, views for displaying all or a portion of the data, and controllers for handling events that affect the model or view(s). Because of this separation, multiple views and controllers can interface with the same model. Even new types of views and controllers that never existed before can interface with a model without forcing a change in the model design. How It Works The MVC abstraction can be graphically represented as follows.

Events typically cause a controller to change a model, or view, or both. Whenever a controller changes a models data or properties, all dependent views are automatically updated. Similarly, whenever a controller changes a view, for example, by revealing areas that were previously hidden, the view gets data from the underlying model to refresh itself. A Concrete Example We explain the MVC pattern with the help of a simple spinner component which consists of a text field and two arrow buttons that can be used to increment or decrement a numeric value shown in the text field. We currently do not have an element type that can directly represent a spinner component, but it easy is to synthesize a spinner using existing element types.

The spinners data is held in a model that is shared with the text field. The text field provides a view of the spinners current value. Each button in the spinner is an event source

that spawns an action event every time it is clicked. The buttons can be hooked up to trampolines that receive action events, and route them to an action listener that eventually handles that event. Recall that a trampoline is a predefined action listener that simply delegates action handling to another listener. Depending on the source of the event, the ultimate action listener either increments or decrements the value held in the model The action listener is an example of a controller. The trampolines that initially receive the action events fired by the arrow buttons are also controllers however, instead of modifying the spinners model directly, they delegate the task to a separate controller (action listener). Multiple Controllers The MVC pattern allows any number of controllers to modify the same model. While we have so far focused only on the two arrow buttons as likely source of events, there is, in fact, a third event source in this example Whenever the text field has focus, hitting the enter key fires off an action event that may potentially be handled by a different action listener than the one handling action events from the buttons.

Some parts of a component may use different controllers than others

METHADOLOGY USED FOR TESTING


Testing is the process of detecting errors. Testing performs a very critical role for quality assurance and for ensuring the reliability of software. The results of testing are used later on during maintenance also. LEVEL OF TESTING In order to uncover the errors present in different phases we have the concept of levels of testing. The basic levels of testing are follows:System Testing The philosophy behind testing is to find errors. Test cases are devised with this in mind. A strategy employed for system testing is code testing. Code Testing This strategy examines the logic of the program. To follow this method we developed some test data that resulted in executing every instruction in the program and module i.e. every path is tested. System is not designed as entire nor are they tested as single systems. To ensure that the coding is perfect two types of testing is performed or for that matter is performed on all system. Types of Testing Unit Testing

Link Testing Unit Testing Unit testing focuses verification effort on the smallest unit of software i.e. the module. Using the detailed design and the process specification testing is done to uncover errors within the boundary of the modules must be successful in the unit test before the start of the integration testing begins. In this project each service can be thought of a module. Giving different set of inputs has tested each module. When developing the module as well as finishing the development so that each module works without any error. The inputs are validated when accepting from the user. System Testing Here the entire software system is tested. The reference document for this process is the requirement document, and the goal OS to see if software meets its requirements. Here entire ATM has been tested against requirements of project and it is checked whether all requirements of project have been satisfied or not. Acceptance Testing Acceptance Test is performed with realistic data of the client to demonstrate that the software is working satisfactorily. Testing here is focused on external behavior of the system: the internal logic of program is not emphasized.

In this project Network Management of Database System I have collected some data and tested whether project is working correctly or not. Test cases should be selected so that largest number of attribute of an equivalence class is exercised at once; the testing phase is an important part of software development. It is the process of finding errors and missing operations and also a complete verification to determine whether the objectives are met and the user requirements are satisfied.

White Box Testing This is a unit testing method where a unit will be taken at a time and tested thoroughly at a statement level to find the maximum possible errors. I tested step wise every piece of code, taking care that every statement in the Code is executed at least once. The white box testing is also called Glass Box Testing. I have generated a list of test cases, sample data. This is used to check all possible combinations of execution paths though the code at every module level. Black Box Testing This testing method considers a module as a single unit and checks the unit at interface and communication with other module rather getting into details at statement level. Here the module will be treated as a block box that will take some input and generate output. Output for a given set of input combination is forwarded to other modules.

METHADOLOGY ADOPTED, SYSTEM IMPLEMENTATION & DETAILS OF HARDWARE & SOFTWARE

System implementation:The implementation phase is less creative then system design. It is primarily concerned with user train, site preparation and file conversion. When the candidate system is linked to terminals or remote sites, the telecommunication network and tests of the network along with the system are also included under implementation. During the final testing, user acceptance is tested followed by user training. Depending on the nature of the system, extensive user training may be required.

Details of hardware & software Hardware:

Processor Pentium IV 3.0 GHz

Ram 512 MB

Hdd-80 GB Capacity With 256 MB Free Space

LAN Card

Software:-

Front-end Tools:

Windows Xp

JSP/SERVLET NETBEANS

Back-end Tools:

MYSQL SERVER

0-Level Context

Send Request 0.1 USER Send Request Communi ty

0.1.5

Registr y User 0.1.2

User DB 0.1.3 Verif y

0.1.4 Post Scra p 0.1.5 View Scra p 0.1.6 Delet e Scra p 0.1.7 Update Profile 0.1.8 View Profil e
Create Communit y

Login 0.1.12 Add Friend s 0.1.1 Delete 3 Friend s 0.1.1 4 View Friend List 0.1.1 5 View Friend s Scrap 0.1.16 View Friend s Album DB Album Creat 0.1.17 e/Vie w Albu m

Scrap DB

Friend DB

Profile DB

Scrap DB

0.1.9

Delete Communi ty 0.1.11 Join/Leav e Communi ty

0.1.1 Community 0 DB

Detailed 0.1.5(Level 1) 0.1.5.1 0.1.5.2

USER

Registr y 0.1.5.3 Create Social Profile 0.1.5.4

Verify

User DB

User_Prof DB

Create Profession al Profile

0.1.5.5 Create Personal Profile

0.1.5.6 User Home

User_Pers DB

educati on

schoo l college

un Frnd _

F_un

User_pr of un

m ha s 1
accepted

have send er 1
lnam e

1 occupati on

fnam e

have

m scrap Scr_t m Scr_ dt

receive r

un
un User_pe r

user

1
Favouri te movie

1 ha s

city

msg

sta te

Favourit e book

about Ph no img

Favourite novel

hobbi es

email

ha ve ha ve

C_type

owne r

m community

un

albu m

C_name C_img

img

Snapshot

Codeing
AddFriendC.java
package controllers; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import models.FriendList; import models.UserAcc;

public class AddFriendC extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { HttpSession session=request.getSession(true); UserAcc u=(UserAcc)session.getAttribute("user");

session.setAttribute("useracc", UserAcc.readSingle(Integer.parseInt(u.getUseraccid( ))));

FriendList model=new FriendList(); session.setAttribute("model", model); response.sendRedirect("views/AddFriend" ); } catch (Exception ex) { }

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

try { FriendList model=new FriendList(); HttpSession session=request.getSession(true); UserAcc u=(UserAcc)session.getAttribute("user"); model.setUseraccid1(u.getUseraccid()); model.setUseraccid2(UserAcc.readSi(reque st.getParameter("email")).getUseraccid());

session.setAttribute("model", model); if(model.validate()==true){ int x = FriendList.Create(model); if (x > 0) { response.sendRedirect("views/AddFri end"); } else {

response.sendRedirect("views/AddFri end"); } } else {

response.sendRedirect("views/AddFriend "); }

} catch (Exception ex) { } }}

FriendList.java
/*

* To change this template, choose Tools | Templates * and open the template in the editor. */

package models; import helpers.BaseRecord; import helpers.Utils; import helpers.Validator; import java.sql.*; import java.util.ArrayList; /** * @author Pratiksha */

public class FriendList extends BaseRecord { public String friendlistid; public String useraccid1; public String useraccid2;

public boolean validate() { if (!Validator.validate_blank(useraccid1)) { addError("u1", "Required"); } if (!Validator.validate_blank(useraccid2)) {

addError("u2", "Required"); }

return this.errors.size()==0; } /** * @return the friendlistid */ //################################################# public UserAcc getUser() throws Exception { return UserAcc.readSingle(Integer.parseInt(useraccid1)); } public UserAcc getUser1() throws Exception {

return UserAcc.readSingle(Integer.parseInt(useraccid2)); }

public static int Create(FriendList fl) throws Exception { int x = 0;

Class.forName(Utils.D); Connection con = DriverManager.getConnection(Utils.Url, Utils.U, Utils.P); try { PreparedStatement ps = con.prepareStatement("insert into FriendList values(null,?,?)"); ps.setString(1, fl.getUseraccid1()); ps.setString(2, fl.getUseraccid2()); x = ps.executeUpdate(); } finally {

con.close(); } return x; }

//############################################# #### public static void Delete(String friendlistid ) throws Exception {

Class.forName(Utils.D);

Connection con = DriverManager.getConnection(Utils.Url, Utils.U, Utils.P); try { PreparedStatement ps = con.prepareStatement("delete from FriendList where friendlistid=?"); ps.setString(1, friendlistid); ps.executeUpdate();

} finally { con.close(); }

} //################################################# public static ArrayList<FriendList> readall() throws Exception { ArrayList<FriendList> lst = new ArrayList<FriendList>(); Class.forName(Utils.D); Connection con = DriverManager.getConnection(Utils.Url, Utils.U, Utils.P); try {

PreparedStatement ps = con.prepareStatement("select * from FriendList"); ResultSet rs = ps.executeQuery(); while (rs.next()) { FriendList ua = new FriendList(); ua.setFriendlistid(rs.getString(1)) ; ua.setUseraccid1(rs.getString(2)); ua.setUseraccid2(rs.getString(3)); lst.add(ua); }

} finally { con.close(); } return lst; } //################################################# public static ArrayList<FriendList> readallFri(String userid) throws Exception { ArrayList<FriendList> lst = new ArrayList<FriendList>(); Class.forName(Utils.D);

Connection con = DriverManager.getConnection(Utils.Url, Utils.U, Utils.P); try { PreparedStatement ps = con.prepareStatement("select * from FriendList where useraccid2=?"); ps.setString(1, userid); ResultSet rs = ps.executeQuery(); while (rs.next()) { FriendList ua = new FriendList(); ua.setFriendlistid(rs.getString(1)) ; ua.setUseraccid1(rs.getString(2)); ua.setUseraccid2(rs.getString(3)); lst.add(ua); }

} finally { con.close(); } return lst; }

//################################################# public static FriendList readSingle(String Friendlistid ) throws Exception {

FriendList ua = new FriendList(); Class.forName(Utils.D); Connection con = DriverManager.getConnection(Utils.Url, Utils.U, Utils.P); try { PreparedStatement ps = con.prepareStatement("select * from FriendList where Friendlistid=?"); ps.setString(1, Friendlistid);

ResultSet rs = ps.executeQuery(); if (rs.next()) { ua.setFriendlistid(rs.getString(1)) ; ua.setUseraccid1(rs.getString(2)); ua.setUseraccid2(rs.getString(3)); } } finally { con.close(); }

return ua;

} public static FriendList readSingleFri2(String userid2 ) throws Exception {

FriendList ua = new FriendList(); Class.forName(Utils.D); Connection con = DriverManager.getConnection(Utils.Url, Utils.U, Utils.P); try { PreparedStatement ps = con.prepareStatement("select * from FriendList where useraccid1=?"); ps.setString(1, userid2);

ResultSet rs = ps.executeQuery(); if (rs.next()) { ua.setFriendlistid(rs.getString(1)) ; ua.setUseraccid1(rs.getString(2)); ua.setUseraccid2(rs.getString(3)); }

} finally { con.close(); } return ua;

public String getFriendlistid() { return friendlistid; }

public void setFriendlistid(String friendlistid) { this.friendlistid = friendlistid; }

public String getUseraccid1() { return useraccid1; }

public void setUseraccid1(String useraccid1) { this.useraccid1 = useraccid1;

public String getUseraccid2() { return useraccid2; }

public void setUseraccid2(String useraccid2) { this.useraccid2 = useraccid2; } } //#################################################

Header.jsp
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="../../resources/css/style.css" /> <title>Mind Links</title> </head> <body> <div id="container"> <div id="header" class="clearfix"> <div class="clsTop clearfix"> <!--logo--> <div id="selLogo"> <h1> <a href="#">Mind Links</a> </h1> </div>

</div> <div class="clsMenu"> <div class="clsMenuLeft"> <div class="clsMenuRight"> <div class="clsMenuCenter"> <ul class="clearfix"> <c:if test="${empty sessionScope.login}"> <li><a href="../../views/otherpages/home.jsp">Home</a></li> <li><a href="../../views/otherpages/about.jsp">About Us</a></li> <li><a href="../../LoginC">Login</a></li> <li><a href="../../UserC">Register</a></li> </c:if> <c:if test="${not empty sessionScope.login}"> <li> <a href ="../../HomeC" >User Home</a> </li> <li> <a href ="../../UpdateAccC" >Edit Profile</a> </li>

<li> <a href ="../../AddFriendC" >Add Friends</a> </li> <li> <a href ="../../FriendListC" > Friends</a> </li> <li> <a href ="../../AlbumC" >My Images</a> </li>

<li> <a href ="../../ViewMessageC" >My Scraps</a> </li> <li> <a href="../../Logout">Logout</a></li> </c:if> </ul>

</div> </div>

</div> </div> <!--end of menu--> </div> <!--end of header--> <!--subhead--> <!--end of subhead--> <!--main--> <div id="main" class="clearfix"> <!--sidebox--> <div class="clsSidebox">

<div class="red_t"> <div class="red_r"> <div class="red_b"> <div class="red_l"> <div class="red_tl"> <div class="red_tr"> <div class="red_bl"> <div class="red_br"> <div class="cls100_p"> <c:if test="${empty sessionScope.login}">

<h2>login</h2> <div class="clsLogin"> <form action="../../LoginC" method="POST"> <p><label>Emai l</label> <input type="text" value="${model1.emailid}" name="emailid" id="emailid" class="usertext"/></p> <p><label>Pass word</label><input type="password" value="" name="password" id="pass" class="usertext" /></p> <p><input class="loginbutton" name="button" type="submit" value="Login" /></p> <p><span>$ {errmsg}</span><a href="../../UserC">New Register</a></p> </form> </div> </c:if> <c:if test="${not empty sessionScope.login}"> <h2>Profile</h2> <div class="clsLogin"> <div>

<img src="../../resources/imgs/user/${useracc.useraccid}.jpg" height="100" width="100"/> <center> <br /> <a href ="../../ChangeImgC" >Change Image</a> </center> </div> </div> </c:if>

<div class="red_t"> <div class="red_r"> <div class="red_b"> <div class="red_l"> <div class="red_tl"> <div class="red_tr"> <div class="red_bl"> <div class="red_br">

</div> </div> </div> </div> </div> </div>

</div> </div> </div> </div> </div> </div> </div> </div> </div>

</div> </div> </div>

<!--end of sidebox--> <!--content--> <div class="clsContent">

Footer.jsp
</div> <!--end of content--> </div> <!--end of main--> <!--footer--> <div id="footer">

<div class="clsSubFooter"> <p> &copy; Copyright 2010 Information Goes Here. All rights reserved.</p>

</div> </div> <!--end of footer--> </div> <!--end of container--> </body> </html>

Style.css
/* CSS Document */ body{ color:#fff6d7; font:normal 12px trebuchet MS; font-size:80%; scaling in MSIE --*/ margin:0; padding:0; text-align:center; background:url(../images/bg.jpg) repeat scroll left top #0f2841; /*-- Enables font size

} html > body{ font-size:9.5pt; } html, body { height: 100%; }

form,table,p,h1,h2,h3,h4,h5,h6,ul,li,div,dl{ margin:0; padding:0; font-size:100%; } li{ padding:0; margin:0; list-style:none; } a{ text-decoration:none; outline:none; color:#303030; }

img{ border:0; vertical-align:top; } .clsFloatLeft{ float:left; } .clsFloatRight{ float:right; } /* CSS Clearfix */ .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix {display: inline-table;} /* Hides from IE-mac \*/ * html .clearfix {height: 1%;} .clearfix {display: block;} /* End hide from IE-mac */

/*END OF COMMON CODE*/ #container{ width:1002px; margin:0 auto; text-align:left; background:#f7f2d4; }

CONCLUSION
Online or virtual Social Network, allow people with common interests to meet, communicate and share ideas and information, through a network like the web. While doing this, participants develop bonds with each other and the community as a whole. Online Social Network have emerged as one of the most potential levers of action the web. Such Social Network can be built around demographic groups - students, parents, professional groups - doctors or programmers or who share a particular personal interest bikers or clock repairers The system was tested by running it on different computers. The system has a high degree of accuracy and user friendliness. A few changes were suggested which is to be incorporated into the system. The system is a user-friendly system and further changes can be incorporated into the system easily.

Doing this project has made me learn not only a new technology but also it has made me more knowledgeable in the software engineering activities, which are carried out in the organization. It was a great learning experience.

References:

Ian Somerville, Software Engineering, Sixth Edition, Pearson Education Ltd, 2002. Page Jones, Fundamentals of Object Oriented design in UML, Addison Wesley Longman Pvt Ltd. Elamsri and Navathe, Fundamentals of Database Systems, Pearson Asia Edition 2000

You might also like