Social Networking Site: Computer Science and Engineering
Social Networking Site: Computer Science and Engineering
A
PROJECT REPORT
SUBMITTED IN FULFILLMENT FOR THE
AWARD OF THE DEGREE
OF
BATHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING
ON
“SOCIAL NETWORKING SITE”
2010
DEPARTMENT OF
COMPUTER SCIENCE AND ENGINEERING
CERTIFICATE
DEPARTMENT OF
COMPUTER SCIENCE AND ENGINEERING
CERTIFICATE
APPROVAL
CERTIFICATE
APPROVAL
CERTIFICATE
First and foremost, we would like to pay our sincere homage and regards to
the almighty God, with whose blessings we have successfully completed our
project work. We wish to thank the Authorities of Mandsaur Institute Of
Technology, and also express our deepest sense of gratitude toward our
project incharge, Mr. Jitendra Dangra (Lect. CSE) and Mr. Roopesh Kumar
(Lect. CSE) for their invaluable guidance, encouragement criticism and
helpful suggestions.
We are also thankful to Mr. Amit Jain (HOD, CSE) for his kind and sincere
coordination for the project.
We are very thankful to our parents for their sacrifices, devotion and love
during the course of this project work.
Last but the least, we wish to thank all those noble hearts who directly or
indirectly helped us to complete this project work.
Roshni Mittal
ACKNOWLEDGMENT
The completion of any task depends upon the cooperation, coordination and
consol dative efforts of several resources of knowledge, energy, time and
above all, the proper guidance of the veterans. Therefore, we approach this
matter of acknowledgement thorough the following lines.
First and foremost, we would like to pay our sincere homage and regards to
the almighty God, with whose blessings we have successfully completed our
project work. We wish to thank the Authorities of Mandsaur Institute Of
Technology, and also express our deepest sense of gratitude toward our
project incharge, Mr. Jitendra Dangra (Lect. CSE) and Mr. Roopesh Kumar
(Lect. CSE) for their invaluable guidance, encouragement criticism and
helpful suggestions.
We are also thankful to Mr. Amit Jain (HOD, CSE) for his kind and sincere
coordination for the project.
We are very thankful to our parents for their sacrifices, devotion and love
during the course of this project work.
Last but the least, we wish to thank all those noble hearts who directly or
indirectly helped us to complete this project work.
Sangeeta Sewani
CONTENTS
1. INTRODUCTION
1.1. Project definition
1.2. Project description
1.3. Team structure
1.4. Need and scope
2. REQUIREMENT ANALYSIS
2.1. Software requirement
2.2. Hardware requirement
2.3. Non functional requirements
3. FEASIBILITY ANALYSIS
3.1. Technical feasibility
3.2. Economical feasibility
3.3. Operational feasibility
4. TECHNOLOGY USED
5. RISK ANALYSIS
6. PLANNING AND DESIGNING
6.1. Planning
6.2. Design principles
6.3. Process model used
6.4. Use case diagram
6.5. ER diagram
6.6. Data flow diagram
7. CODING
8. PROJECT SCREENS
9. TESTING
10. FUTURE ENHANCEMENT
11. LIMITATIONS OF PROJECT
12. BIBLIOGRAPHY
Books & Material
2. Software Engineering
Author: Pressman Rogers
Web References
• http://www.w3schools.com
• http://www.converyourasp.com
• http://www.microsoft.com/education/Tutorials.aspx
• http://www.msdn.microsoft.com
• http://www.google.com
INTRODUCTION
INTRODUCTION
1.1 DEFINITION
Social Networking Site basically means any type of relationship-building amongst
a group of people with a common interest (business or personal). However, that
term has taken on a whole new dimension online, where social networking sites
(My Space, Linked In, Face book) are popping up faster than you can say "Will
you be my friend?" These Web sites are designed around helping people network
and build relationships via online, instead of the more traditional face-to-face
networking meetings.
A social networking site is web based service that allow individuals to interact via
online across the world .It allow group of people to interact socially ,allowing one or
more individual interacting directly or indirectly with others.The project describes
the capabilities that will be provided by the software application “social networking
site” It basically means any type of relationship-building amongst a group of people
with a common interest (business or personal). However, that term has taken on a
whole new dimension online, where social networking sites (My Space, Linked In,
Face book) are popping up faster than you can say "Will you be my friend?"
These Web sites are designed around helping people network and build
relationships via online, instead of the more traditional face-to-face networking
meetings.
1.3 TEAM STRUCTURE
A typical development team includes software engineers, QA and testing
specialists, as well as dedicated or part-time graphic designers, technical writers, system
engineers, and other supporting professionals. Each team has a Project Leader, who is
responsible for technical leadership, task assignments, supervision of team members, and
daily communications with the client.
These were the individual part done by all of us while completing the project, but we help
each other in all the part in making it better.
Culture- our different experiences and backgrounds brings diversity to the group.
Appreciation- we appreciate each other’s ideas treat one another with respect.
Yesterday- punctuality and evaluation of our efficiency is high among our values.
Skills- we understand we have much strength within the group. We plan to use it.
Target- in our ascent to the peak, our focus will be a great motivator.
There is the possibility that we will spend too much time finalizing ideas and completing
projects because we all have different end products in mind. However, that will ensure
that everybody is happy with the final project and that we all feel like we contributed
something positive to the project. We also feel that our team composition will be
beneficial to the team because our different skill sets and backgrounds will allow us to
generate and share different perspectives amongst the team.
achieved:
• User Friendliness:
• Least Maintainability:
• Portability:
Portability concerns with the ease with which the software can be
transported from one environment to another as indicated by the following sub
attributes: adaptability, install ability, conformance, and replace ability.
REQUIIRMENT
ANALYSIS
REQUIIRMENT
ANALYSIS
2.1 SOFTWARE REQUIREMENTS
• Operating system platform Microsoft Windows
2000/XP/NT
• Language JAVA
FEASIBILITY
ANALYSIS
FEASIBILITY
ANALYSIS
In any project, feasibility study is a very important stage. Feasibility study is system
proposal according to its workability, impact on the operation, ability to meet user needs
and efficient use of resources. Any project may face scarcity in resources, time or
workforce. An important outcome of the preliminary investigation is the determination
whether the system requested is feasible or not. The key considerations involved in the
feasibility analysis are technical, operational, and economic.
Here it is seen that no new hardware or software is needed for the development of the
system. Hence the project is economically feasible for development.
The objective of data security can be divided into three separate, but interrelated, areas as
follows.
Secrecy
Integrity
Availability
What is it? Risk analysis and management are a series of steps that help a software team
to understand and manage uncertainty. Many problems can plague a software project. A
risk is a potential problem—it might happen, it might not. But, regardless of the outcome,
it’s a really good idea to identify it, assess its probability of occurrence, estimate its
impact, and establish a contingency plan should the problem actually occur. Who does it?
6.1 Planning
Tools developed to assist students in understanding at this micro level should address the
following design principles:
Literate
programming (Knuth, 1984; Shum & Cook, 2002) provides a perspective on
the programming process where the focus is on integrating (formally) the informal
descriptions of the program’s functions with the formality of the programming language
instructions. While the inclusion of comments in code is generally accepted as good
practice there are few tools that require, or support, it in a tightly coupled and formal
way. There is some evidence ((Bonar & Soloway, 1983; Bruckman & Edwards, 1999)) to
indicate that a significant proportion of errors in novice programming are caused by a
confusion of natural language semantics with the more limited (but precise) semantics of
the programming language. As a result there may be some value in leveraging the use of
natural language expressions to better support the programming process Armarego &
Roy
Stepwise
refinement. The task of creating a program from a specification is an open
problem: of the many concepts, ideas, strategies and processes that can be proposed none
provide all the answers. However, stepwise, or progressive, refinement is one strategy
that appears often (Reynolds, Maletic, & Porvin, 1992; Wirth, 1971). Quoting from
Reynolds et al (1992; p 80): stepwise refinement can be viewed as a sequence of
elaborations that result in the formation of a program in a target language from an initial
function specification In some ways this principle is still at the core of teaching novice
designers, and central to the goals for the use and development of pseudocode based
technologies/tools. Novices struggle with understanding how a computation should be
performed - the problem needs to be approached gradually and progressively
Encapsulation
and information hiding. Encapsulation is concerned with the
containment of code within program elements that can stand alone and integrate with
other program elements through well defined interfaces (Blair, Gallagher, Hutchison, &
Sheperd, 1991; Booch, 1991; Wirfs-Brock, Wilkerton, & Weiner, 1990). This facilitates
separate compilation and the effective management of large and complex systems.
Information hiding is aimed at ensuring that attributes and operations are defined so that:
o their visibility is limited to those parts of the system where they are needed o the ability
to observe and/or modify data or behaviour is restricted to those parts of the system
where the designer explicitly allows such capabilities. These principles are integral to the
effective re-use of proven and well tested components in the large software libraries that
form essential tools for the software designer. Most engineering design tasks rely on
standard components: software should be no different
Modularization.
Most complex design tasks are solved by breaking them down into
manageable parts. These modules must be of a size or complexity so their functional
requirements can be clearly stated and implemented without being too concerned about
the operation of the whole system (Yourdon & Constantine, 1979). This requires a clear
definition of how the module interfaces with other parts of the system and a description
of any conditions that can be applied to ensure the integrity of the module. Developing
skills in modular design is essential for teaching novices. “Rules of thumb” like limiting
the complexity of an operation to a single task can assist in knowing when further
modularisation is required
Model
representations. The design process for software, like other areas of
engineering, requires the designer to have an appropriate mental model. For software this
is commonly taken as the textual representa tion. In reality this is just one view of the
design solution, and often not the most effective. Hence the emergence of modelling
languages such as UML to describe the complex behaviour of software. The idea that an
underlying model can have several views to explain different elements of the semantics
of the program is central to the development of a good appreciation of the role of the
design model and should be introduced at an early stage of teaching. Regardless of what
programming paradigm is adopted, early progress and ultimate success for the novice
will be closely related to how well the fundamentals of computational primitives (ie
sequence, iteration,selection and recursion) are understood. Our approach has been to
develop a model for software designthat focuses on these basic elements, while
introducing a limited subset of O-O concepts. The goal is toprovide a framework that can
be extended as the student’s understanding and design sophistication grows.
Description:
To produce a solution for any client specific problem the team of software engineers must
adopt a development strategy that encompasses the processes, tools and layers. This
strategy is called process modeling. The model is chosen on basis of the nature of
project. There are various models used to analyze the projects. The model we had
selected for our project is described as below:
The process model used for our project is Linear Sequential Model. It is better known as
Classic Lifecycle Model or Waterfall Model. It suggests a systematic, sequential
approach to software development that begins at the system level and progresses through
analysis, design, coding, testing and maintenance. It is illustrated as such.
ADVANTAGES
♦ Easy to explain to the user.
♦ Activities and the stages are well defined.
♦ Ensures that information is obtained before it is required.
♦ Helps to plan and schedule project.
♦ Verification at each stage shows up early detection of errors.
♦ Ensures that system meets user needs.
DISADVANTAGES
♦ Assumes that requirements are stable.
♦ Next stage begins only after the previous stage is completed.
♦ User training is not given importance.
♦ Implementation is ignored.
6.4 USE CASE DIAGRAM
Use case diagram
6.5 ER DIAGRAM
6.6 DATA FLOW DIAGRAM
HOME PAGE
SCRAPBOOK
SEARCH USER
CODING
CHECKUSER.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%@ page import="java.io.*,java.sql.*" %>
<%
String u=request.getParameter("email_id");
String p=request.getParameter("password");
Connection cn=null;
ResultSet rs=null;
PrintWriter pw=response.getWriter();
PreparedStatement ps=null;
try
{
Class.forName("com.mysql.jdbc.Driver");
cn=DriverManager.getConnection("jdbc:mysql://localhost:3306/project","r
oot","");
ps=cn.prepareStatement("select * from registration where
email_id=? and password=?");
ps.setString(1,u);
ps.setString(2,p);
rs=ps.executeQuery();
if(rs.next())
{
session.setAttribute("log",u);
%>
<script type="text/javascript">
alert("Login Successfull");
document.location="welcome.jsp";
</script>
<%
}
else
{
%>
<script type="text/javascript">
alert("Inavlid User");
document.location="index.jsp";
</script>
<%
}
}
catch(Exception e)
{
pw.println(e);
}
%>
REGISTRATION SERVLET
import java.io.*;
import java.sql.*;
import javax.servlet.*;
public class regi extends GenericServlet
{
public void service(ServletRequest rq,ServletResponse rp) throws
ServletException ,IOException
{
PrintWriter pw=rp.getWriter();
Connection cn=null;
PreparedStatement ps=null;
pw=rp.getWriter();
String f=rq.getParameter("fn");
String l=rq.getParameter("ln");
String ed= rq.getParameter("eid");
String p=rq.getParameter("pwd");
String r=rq.getParameter("rpwd");
try
{
Class.forName("com.mysql.jdbc.Driver");
cn=DriverManager.getConnection("jdbc:mysql://localhost:3306/project","r
oot","");
ps=cn.prepareStatement("insert into
registration values(?,?,?,?,?)");
ps.setString(1,f);
ps.setString(2,l);
ps.setString(3,ed);
ps.setString(4,p);
ps.setString(5,r);
ps.execute();
pw.println("you have been succesfully
registered");
pw.println("<a href=index.jsp>login</a>");
pw.close();
}
catch(Exception e)
{
pw.println(e);
}
PROFILE SERVLET
import javax.servlet.*;
import java.io.*;
import java.sql.*;
public class profile extends GenericServlet
{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn=DriverManager.getConnection("jdbc:mysql://localhost:3306/project","r
oot","");
PreparedStatement ps=cn.prepareStatement("insert into
profile values(?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,n);
ps.setString(2,l);
ps.setString(3,s);
ps.setString(4,c);
ps.setString(5,dob);
ps.setString(6,r);
ps.setString(7,k);
ps.setString(8,o);
ps.setString(9,m);
ps.setString(10,b);
ps.setString(11,f);
ps.execute();
pw.println("data saved");
}
catch(Exception e)
{
pw.println(e);
}
SEARCH USER
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
/**
* Servlet implementation class for Servlet: searchFrnd
*
*/
public class searchf extends javax.servlet.http.HttpServlet implements
javax.servlet.Servlet {
static final long serialVersionUID = 1L;
/* (non-Java-doc)
* €@see javax.servlet.http.HttpServlet#HttpServlet()
*/
public searchf() {
super();
}
/* (non-Java-doc)
* @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest
request, HttpServletResponse response)
*/
/* (non-Java-doc)
* @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest
request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
Connection cn=null;
PreparedStatement ps=null;
ResultSet rs=null;
PrintWriter pw=response.getWriter();
String f=request.getParameter("fname");
String eid=request.getParameter("email_id");
HttpSession hs=request.getSession(true);
String m=(String)hs.getAttribute("log");
try
{
Class.forName("com.mysql.jdbc.Driver");
cn=DriverManager.getConnection("jdbc:mysql://localhost:3306/project","r
oot","");
ps=cn.prepareStatement("select * from registration
where fname=? && email_id=? ");
ps.setString(1,f);
ps.setString(2,eid);
rs=ps.executeQuery();
if(rs.next())
{
String n=rs.getString("fname");
String ed =rs.getString("email_id");
//String cn1=rs.getString("country");
//String s=rs.getString("sex");
//String cnn=rs.getString("city");
pw.println("<div style=float:left><div
float:left>Name ="+n+"<br>Email id= ="+ed+"<br><div style=float:left><a
href=addnewfriend.html>add new friend<hr></div>");
//pw.println("<div style=float:left><div
float:left>Name ="+n+"<br><br>Email_id="+ed"<div style=float:left><a
href=addnewfriend.html>add as a friend<hr></div>");
}
else
{
//pw.println("sry!!!! no record found");
//pw.println("<br><a
href=searchf.html>back</a>");
response.sendRedirect("http://localhost:8080/minorproject/searchacknowl
egment.jsp");
}
}
catch(Exception e)
{
pw.println(e);
}
}
}
POSTSCRAP SERVLET
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class for Servlet: newscrap
*
*/
public class newscrap extends javax.servlet.http.HttpServlet implements
javax.servlet.Servlet {
static final long serialVersionUID = 1L;
/* (non-Java-doc)
* @see javax.servlet.http.HttpServlet#HttpServlet()
*/
public newscrap() {
super();
/* (non-Java-doc)
* @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest
request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
/* (non-Java-doc)
* @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest
request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
Connection cn=null;
PreparedStatement ps=null;
int scno=0;
PrintWriter pw=response.getWriter();
String myid=request.getParameter("nm");
String msg=request.getParameter("ab");
String fid=request.getParameter("nm1");
try
{
Class.forName("com.mysql.jdbc.Driver");
cn=DriverManager.getConnection("jdbc:mysql://localhost:3306/project","r
oot","");
ps=cn.prepareStatement("select max(sid) from
scrapbook where email_id=?");
ps.setString(1, myid);
ResultSet rs=ps.executeQuery();
rs.next();
scno=rs.getInt(1);
rs.close();
scno=scno+1;
ps=cn.prepareStatement("insert into scrapbook
values(?,?,?,?)");
ps.setString(1,fid);
ps.setString(2,msg);
ps.setString(3,myid);
ps.setInt(4,scno);
ps.execute();
response.sendRedirect("http://localhost:8080/minorproject/scrapacknowle
dge.jsp");
//pw.println("Your scrap has been sent succesfully");
//pw.println("<a href=scrapbook.html> scrapbook</a>");
}
catch(Exception e)
{
pw.println(e);
}
}
SEARCH ACKNOWLEGNMENT.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css" />
<a href="searchf.html">back</a>
</font></body>
</html>
SCRAPBOOKACKNOWLEGNMENT.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css" />
<a
href="scrapbook.html">Scrapbook</a>
</font></body>
</html>
PROJECT SCREENS
TESTING
Our objective is to design tests that systematically uncover different classes of errors and
do so with a minimum amount of time and effort. As a secondary benefit, testing
demonstrates that software functions appear to be working according to specifications
and that performance requirements appear to have been met. In addition, data collected as
testing is conducted provides a good indication of software reliability and some
indication of software quality as a whole.
Unit testing deals with testing a unit as a whole. This would test the interaction of many
functions but confine the test within one unit. The exact scope of a unit is left to
interpretation. Supporting test code, sometimes called scaffolding, may be necessary to
support an individual test. This type of testing is driven by the architecture and
implementation teams. This focus is also called black-box testing because only the details
of the interface are visible to the test. Limits that are global to a unit are tested here.
FUTURE ENHANCEMENTS
There are various suggestions that we would like to give for the future enhancement of
this project:
Although we have tired our best to implement every possible concept to our project but
as every possible concept to our project but as every system is not complete in itself , it
continuous to evolve with time.
The task given to us performed by keeping in mind the goals we have to achieve, these
are to provide user-friendliness.
1. The main limitation of our project is that we can see our friend profile and
scrapbook
2. Many features such photo uploading, creating albums etc are not present .
3. Email id is registered for our site only
4. Confirmation through mail is not provided.
BIBLIOGRAPHY