ON
IN
Asp.net
Submitted in partial fulfilment of the requirements
for the award of the degree of Bachelor of
Computer Science
(2007-2011)
JODHPUR
Under Supervision of
Prof. J. L. Kankriya
(H.O.D. C.S.E.)
This is to certify that GAURAV JAIN student of B. Tech. IV Yr/VII Sem. from
Marwar Engineering College and Research Centre, Jodhpur (Raj.) have successfully
created project on ASP.NET : ”GREEN WEB”.The project was developed under my
consideration and guidance.
I would like to express our heartiest thank to Mrs. Aarti Choudhary, senior professor,
Marwar Engineering College & Research Center, Jodhpur for providing me this great
opportunity.
(Computer Science & Engg. ) for showing the complete confidence in me.
I express my sincere gratitude towards Mr. V.K. Bhansali, Director, MECRC for
providing us the excellent environment for project making.
I am also thankful to my friends and classmates, who were always there to help me out,
Last but not the least it is the staff of Department of Computer Application, Marwar
GAURAV JAIN
B.Tech IV Year(C.S.E)
MECRC
Social Networking - It's the way the 21st century communicates now. Social networking is
the grouping of individuals into specific groups, like small rural communities or a
neighbourhood subdivision. Although social networking is possible in person, especially in
the workplace, universities, and high schools, it is most popular online. This is because unlike
most high schools, colleges, or workplaces, the internet is filled with millions of individuals
who are looking to meet other people.
Social network is the mapping and measuring of relationships and flows between people,
groups, organizations, computers, URLs, and other connected information/knowledge
entities. The nodes in the network are the people and groups while the links show
relationships or flows between the nodes. Social network provides both a visual and a
mathematical analysis of human relationships.
Social Networking Website project itself is a huge project comprising various features like
profile updation, friend’s list organization and various other application to enhance the overall
look and feel of the website. However, in this project I am basically working on two essential
feature or module ( PROFILE MANAGEMENT & FRIENDS ORGANIZATION ).
PROFILE MANAGEMENT module maintain the profile of a user like name, like, dislikes,
hobbies, status etc.
FRIENDS ORGANIZATION module maintains the friend list, handles request and sends
request to the other user.
Profiles and Friends lists are two key features on social network sites. The third is a public
commenting feature ('Testimonials', 'Comments', 'The Wall'). This feature allows individuals
to comment on their Friends' profiles. These comments are displayed prominently and visible
for anyone who has access to that profile.
1. INTRODUCTION............................................................................................6
1.1 Objective of the Project.................................................................................7 – 9
2. THEORITICAL BACKGROUND..................................................................10
2.1 HTML...........................................................................................................10 – 14
2.2 XHTML........................................................................................................15– 18
2.3 ASP.Net.........................................................................................................19 - 35
3. SOFTWARE REQUIREMENT SPECIFICATION......................................36
3.1 Overview of SRS...........................................................................................36- 37
3.2 Feasibility Study............................................................................................37 - 38
3.3 Operating Environment..................................................................................38
3.4 Hardware / Software Requirements................................................................39
4. DESIGNING PHASE.........................................................................................40
4.1 Flow Chart......................................................................................................40 - 42
4.2 Use case Diagram............................................................................................43 - 44
4.3 Data Flow Diagram.........................................................................................45 - 47
4.4 Entity Relationship Diagram...........................................................................48 - 49
4.5 Database Design..............................................................................................50 - 55
5. SNAPSHOTS OF PROJECT.............................................................................56 - 61
6. TESTING TECHNIQUES..................................................................................62
6.1 Validation Checks...........................................................................................62- 63
7. FUTURE RESEARCH......................................................................................64- 65
8. CONCLUSION...................................................................................................66
REFRENCES....................................................................................................67
Social networking sites such as Facebook and MySpace connect millions of people
worldwide through a range of features including fairly static profile information, such as job
history and likes/dislikes, and more dynamic content like what people are doing and how
people are feeling at various points throughout the day. This dynamic content is updated
manually and represented using plain text (e.g., “Meeting new friends at the gym”). While
this sort of input provides the ultimate flexibility, the requirement for manual input places a
barrier between a person’s dynamic status and its representation on a users profile page. As a
result, the minutiae that provide texture to our daily lives is filtered from a person’s online
self, and as a result friends are less connected.
Social Networking Website project itself is a huge project comprising various features like
profile updation, friends list organization and various other application to enhance the overall
look and feel of the website. However, in this project I am basically working on two essential
feature or module ( PROFILE MANAGEMENT & FRIENDS ORGANIZATION ).
PROFILE MANAGEMENT module maintain the profile of a user like name, like, dislikes,
hobbies, status etc.
FRIENDS ORGANIZATION module maintains the friend list, handles request and sends
request to the other user.
Social Networking - It's the way the 21st century communicates now. Social networking is
the grouping of individuals into specific groups, like small rural communities or a
neighbourhood subdivision. Although social networking is possible in person, especially in
the workplace, universities, and high schools, it is most popular online. This is because unlike
most high schools, colleges, or workplaces, the internet is filled with millions of individuals
who are looking to meet other people.
Social network is the mapping and measuring of relationships and flows between people,
groups, organizations, computers, URLs, and other connected information/knowledge
Fig. 1.1
To publish information for global distribution, one needs a universally understood language, a
kind of publishing mother tongue that all computers may potentially understand. The
publishing language used by the World Wide Web is HTML (from Hyper Text Markup
Language).
• Publish online documents with headings, text, tables, lists, photos, etc.
• Retrieve online information via hypertext links, at the click of a button.
• Design forms for conducting transactions with remote services, for use in searching
for information, making reservations, ordering products, etc.
• Include spread-sheets, video clips, sound clips, and other applications directly in their
documents.
HTML was originally developed by Tim Berners-Lee while at CERN, and popularized by the
Mosaic browser developed at NCSA. During the course of the 1990s it has blossomed with
the explosive growth of the Web. During this time, HTML has been extended in a number of
ways. The Web depends on Web page authors and vendors sharing the same conventions for
HTML. This has motivated joint work on specifications for HTML.
It is a platform independent language that can be used on any platform such as Windows,
Linux, Macintosh, and so on. To display a document in web it is essential to mark-up the
different elements (headings, paragraphs, tables, and so on) of the document with the HTML
tags. To view a mark-up document, user has to open the document in a browser. A browser
understands and interpret the HTML tags, identifies the structure of the document (which part
are which) and makes decision about presentation (how the parts look) of the document.
GUIDELINES OF XHTML :
a) Start and end tags are compulsory
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body> Don’t forget me this weekend!
</body>
</note>
b) Attribute value in double tags (“.....”)
<note date=”12/11/2007”>
<to>Tove</to>
<from>Jani</from>
</note>
c) XHTML Tags are Case Sensitive.
The tag <Letter> is different from the tag <letter>
<Message>This is incorrect</message>
<message>This is correct</message>
d) XHTML Elements Must be Properly Nested
<b>
<i>
This text is bold and italic
</i>
</b>
e) Empty elements must also be closed.
Empty elements must either have an end tag, or the start tag must end with />.
A DTD specifies the syntax of a web page in SGML (Standard Generalized Markup
Language).
A DTD is used by SGML applications, such as HTML, to specify rules that apply to the
markup of documents of a particular type, including a set of element and entity declarations.
XHTML is specified in an SGML document type definition.
An XHTML DTD describes in precise, computer-readable language, the allowed syntax
and grammar of XHTML markup.
WEB SERVERS:
Web servers are software that manage Web pages and make them available to client browsers
– via a local network or over the Internet. In the case of the Internet, the Web server and
browser are usually on two different machines, possibly many miles apart. However, in a
local situation we can set up a machine that runs the Web server software, and then use a
browser on the same machine to look at its Web pages.
It makes no difference whether we access a remote Web server (a Web server on a different
machine from our browser) or a local one (Web server and browser on the same machine),
since the Web server’s function – to make Web pages available to all – remains unchanged. It
may be that we are the only person with access to our own machine nevertheless the
principles remain the same.
4. The Web order to create a stream of HTML server follows the instructions in.
5. The Web server sends the newly created HTML stream back across the network to the
browser.
Table 2.1
<asp:Label>
Let's start with a small but very useful control, the <asp:Label> control. This control provides
an effective way of displaying text on our Web page in ASP.NET, similar to the HTML
<span> tag. By having a control for text, we can manipulate its contents and visibility from
our ASP.NET code.
<asp:Label> Attributes:
i. Text: Sets the text that you want the label to display
<asp:Label> Examples:
<html>
<head>
<title>ASP.NET Controls Demo</title>
</head>
<body>
Demo of the asp:Label control<br />
<form id="frmDemo" runat="server">
<asp:Label id="lblGreeting1" runat="server">Text of asp:Label</asp:Label>
</form>
</body>
</html>
<asp:DropDownList>
The three important differences between the ASP.NET control and the HTML form control
are:
❑ The <asp:DropDownList> tag directly replaces the <select> tag
❑ The <asp:ListItem> tag replaces the <option> tag
❑ The id attribute replaces the name attribute
<asp:DropDownList id="lstCities" runat="server">
<asp:ListItem>Madrid</asp:ListItem >
<asp:ListItem >Oslo</asp:ListItem >
<asp:ListItem >Lisbon</asp:ListItem >
</asp:DropDownList >
<asp:ListBox>
<asp:TextBox>
This control is ASP.NET's version of the HTML <textbox> and <textarea> controls. In fact,
textareas are simply textboxes that feature multiple lines, thus allowing us to input larger
quantities of text. The TextBox control also provides the functionality of an HTML form
password control. To enable these variations the <asp:TextBox> control needs some extra
attributes:
❑ textmode: Specifies whether we want the control to have one line (not set), many lines (set
to multiline), or have a single line of masked content (set to password)
❑ rows: Specifies the number of rows we want the textbox to have and will only work if
textmode is set to multiple
❑ columns: Specifies the number of columns we want the textbox to have and will only work
if textmode is set to multiple
<asp:TextBox id="text1" runat="server">Default text here...</asp:TextBox>
<asp:TextBox id="text1" runat="server" text="Default text here..."/>
<asp:RadioButtonList> and <asp:RadioButton>
The <asp:RadioButtonList> control works in the same way as its HTML forms equivalent or
the Windows interface. Choice of one button excludes the selection of another button within
the group. Note that the identifier for the whole group is set only once in the id attribute of
the <asp:RadioButtonList> control:
<asp:RadioButtonList id="radSample" runat="server">
<asp:ListItem id="option1" runat="server" value="Option A" />
<asp:ListItem id="option2" runat="server" value="Option B" />
<asp:ListItem id="option3" runat="server" value="Option C" />
STATE MANAGEMENT
State management is used to maintain the information on the pages of the website.
There are four different mechanisms for remembering information:
❑ Cookies: Identifying previous visitors to a site by storing data on the client machine
❑ Sessions: Remembering information for the duration that a user browses a site
❑ Applications: Remembering information that exists for as long as the application runs
❑ Caching: Storing data for as long as is necessary to improve performance
• COOKIES:
Cookies are used throughout the Web to store small pieces of information on the client
machine. They are small text files that usually store persistent data, which is useful whenever
we revisit a site. This can be data such as user preferences and login tokens, whether a user
has voted in an online poll, details of the last time we browsed a site, and so on. In short,
Fig. 2.5
How Do Cookies Work?
Cookies are linked to the request-response mechanism of HTTP and are passed back and
forth along with other data between the client and the server. Let’s look at what happens
where a site uses cookies to remember whether a user wants a certain popup when they visit a
site. In Figure 1, Stage 1 is about a user visiting a page on the site. Stage 2 is when the
contents of that site are sent to the browser. These contents happen to include a popup. At
Stage 3, anyone browsing the site could check a box on a form that states, “Do not show the
advert popup again.” When they click a button to submit their request, they send data back to
Fig 2.6
When to Use Cookies
Cookies are great for storing small pieces of identification data but not complete
authentication details. They can be configured to expire after any length of time, but most
cookies on our system are likely to last a long time. After we log on to Amazon.com for the
first time, we will be presented with a personalized front page on every subsequent trip to the
site. Because cookies are stored on the client, it takes the burden off the server.
Cookies, however, can be blocked at the client end, so we can't rely on our users being able to
(or even choosing to) use them. Also, cookies should never be used to store sensitive
information, since cookies can be tampered with – all we have to do is open a cookie, change
• CACHING:
GAURAV JAIN MECRC Page 33
In addition to Application state, ASP.NET provides another way to share objects across an
application – the Cache object. Any object, from XML data to a simple variable can be stored
in the Cache object.
However, the Cache object also has some additional features, notably the ability to store data
about dependencies.
So, what are dependencies? Well, imagine we wanted to store the contents of a Hashtable in
the cache. For example, this Hashtable could hold a set of dates corresponding to the dates
when a soccer team is playing a match. We could save this to the cache with a dependency set
to the value of a global variable; this could be a DateTime field representing when the list of
dates was last updated. If the contents of that variable change (if a new match is scheduled),
the cached hashtable would immediately expire and need to be regenerated to display the new
date.
ASP.NET allows us to have dependencies between items placed in the cache and files in the
file system. If a file targeted by a dependency changes, ASP.NET automatically removes
dependent items from the cache. This allows for the development of fast applications where
developers do not have to worry about stale data remaining in the cache.
To add an object to the cache, all us need to do in the simplest case is:
Cache["MyCachedThing"] = ThingToBeCached;
CHAPTER - 3
GAURAV JAIN MECRC Page 35
SOFTWARE REQUIREMENT SPECIFICATION
3.1 OVERVIEW OF SRS
A Software Requirements Specification (SRS) is a complete description of the behavior of
the system to be developed. It includes a set of use cases that describe all the interactions the
users will have with the software. Use cases are also known as functional requirements. In
addition to use cases, the SRS also contains non-functional (or supplementary) requirements.
Non-functional requirements are requirements which impose constraints on the design or
implementation (such as performance engineering requirements, quality standards, or design
constraints).
General Outline of a SRS
1 INTRODUCTION
1.1 Product Overview
1.2 Purpose
1.3 Scope
1.4 Reference
1.5 Definition And Abbreviation
2 OVERALL DESCRIPTION
2.1 Product Perspective
2.2 Product Functions
2.3 User Characteristics
2.4 General Constraints
2.5 Assumptions and Dependencies
3 SPECIFIC REQUIREMENTS
• Hidden costs such as user time for requirements acquisition, testing and training
should not be omitted; the most frequently missed cost is the cost of maintaining the
system once it is installed.
• Set against the costs should be a quantifiable assessment of the expected benefits, for
example reduced labour costs, and improved customer service for predicted increase
in orders.
• The proposed software. was found to be economically feasible, and would certainly
be beneficial to implement it.
Operational Feasibility:-
• Organizational, political and human aspects are considered in order to ensure that the
proposed system will be workable when implemented. The impact the proposed
system will have on jobs should be assessed; The likely reaction of employees and
union representatives to job and other proposed changes should be considered; The
current software is manual so it is very difficult to manage the complete working of
the college. The proposed system is computerized and user friendly with all validation
checks in order to avoid wrong from the user.
• A 512 MB RAM.
• Software:
Login
N No
Is Valid
User
Yes
U Page
User’s Home
Applications
Sign Out
Fig 4.1
• Use cases. A use case describes a sequence of actions that provide something of
measurable value to an actor and is drawn as a horizontal ellipse.
• Actors. An actor is a person, organization, or external system that plays a role in one
or more interactions with your system. Actors are drawn as stick figures.
• Associations. Associations between actors and use cases are indicated in use case
diagrams by solid lines. An association exists whenever an actor is involved with an
interaction described by a use case. Associations are modeled as lines connecting use
cases and actors to one another, with an optional arrowhead on one end of the line.
The arrowhead is often used to indicating the direction of the initial invocation of the
relationship or to indicate the primary actor within the use case. The arrowheads are
typically confused with data flow and as a result I avoid their use.
• System boundary boxes (optional). You can draw a rectangle around the use cases,
called the system boundary box, to indicates the scope of your system. Anything
within the box represents functionality that is in scope and anything outside the box is
not. System boundary boxes are rarely used, although on occasion I have used them
to identify which use cases will be delivered in each major release of a system.
• Packages (optional). Packages are UML constructs that enable you to organize
model elements (such as use cases) into groups. Packages are depicted as file folders
Log In
Registe
r
User
My New User
Friends
Find Friend
LogFriend
In Log In
Request
Compose
Message
Inbox
Groups
Pictures
Sign Out
Browse
Guest Profile
Contact
Users
GAURAV JAIN MECRC Page 44
Fig 4.2
In the late 1970s data-flow diagrams (DFDs) were introduced and popularized for structured
analysis and design (Gane and Sarson 1979). DFDs show the flow of data from external
entities into the system, showed how the data moved from one process to another, as well as
its logical storage. A data flow diagram is a graphical representation of the "flow" of data
through an information system. A data flow diagram can also be used for the visualization of
data processing (structured design). It is common practice for a designer to draw a context-
level DFD first which shows the interaction between the system and outside entities. This
context-level DFD is then "exploded" to show more detail of the system being modeled.
There are only four symbols:
There are several common modeling rules that are followed when creating DFDs:
The Level 0 DFD is also called Context Level DFD. It depicts the overview of the entire
system. The major external entities, a single process and the output stores constitute the level-
0 DFD. Though this diagram does not depict the system in detail, it represents the overall
inputs, process and output of the entire system at a very high level.
The Level -0 DFD is expanded into Level-1 DFD. It should be noted that information flow
continuity is maintained between level 0 and level 1. The process represented at DFD level 1
further refined into lower levels. This further refinement is continued until an easily
implementable program component is reached.
Data flow diagrams illustrate how data is processed by a system in terms of inputs and
outputs.
Fig 4.3
DFD Principles
LEVEL 0
Adminsn
Admin Details
GREEN
WEB
LEVEL 1
Login Details
Personal Details Login
Verify
GAURAV JAIN MECRC Page 47
Register
User Details
Updat
e
Data Base
Information
Fig 4.4
4.4 Entity Relationship Diagram:
Data models are tools used in analysis to describe the data requirements and assumptions in
the system from a top-down perspective. They also set the stage for the design of
databases later on in the SDLC.
There are three basic elements in ER models:
Pass F_name
Email P_details
Subscrib
es
User
Send_Re
c-eive
Creat
es
Account_Profil- Msg
es
U_nam
e Friend
Img
Mail
F_request
Scrap
Fig 4.5
Friend Invitation
Invitation_id
acc_id
Date
Friend_id
Table 4.1
Snap Shot:
Snap shot:
Snap shot:
Pictures
Id
acc_id
Table 1
id
name
address
city
country
phone
dob
email
img
username
Table 4.7
UNDERSTANDING DATABASES
Understanding some basics about databases is crucial to using data in our pages. We don't
need to be a database expert, but there are certain things we will need to know in order to
work with data in .NET. For a start, we need to understand how data is stored. All types of
data on a computer are stored in files of some sort. Text files, for example, are simple files
and just contain plain text. Spreadsheets, on the other hand, are complex files containing not
only the entered text and numbers, but also details about the data, such as what the columns
contain, how they are formatted, and so on.
Databases also fall into the category of complex files. When using Microsoft Access, we have
an MDB file – this is a database file, but we can't tell anything about the data from the file
itself. We need a way to get to the data, either using Microsoft Access itself, or as we are
going to do, using the .NET data classes. Before we can access the data, we need to know
how it is stored internally.
All of us are familiar with the term data. In fact, unknowingly we come across data in our
day to day life everyday. The age of a person, price of potato, number of students in a school,
pin code of a city, etc. are some examples of data. In our life we have to remember so much
of data. But it is easier for us to remember all information for a few individuals. For example,
you may be in a position to tell accurately the age, height, complexion, income, educational
CHAPTER – 5
RESULTS AND DISCUSSIONS
GROUPS PAGE
The existential checks for the server side is very important, in which it checks whether the
entered value exist or not. After filling any transaction form the user clicks the submit button.
At that place if user is existing user then he simply feed his user id, and password. Site
automatically checks their necessary checks and display the user transaction acknowledgment
but if he is not existing user or valid user and want to enter in my site for transaction then he
never enter in site without feeding all login information about himself.
CHAPTER – 7
The work described above and included in this special theme section contributes to an on-
going dialogue about the importance of social network sites, both for practitioners and
researchers. Vast, uncharted waters still remain to be explored. Methodologically, SNS(Social
Networking Websites) researchers' ability to make causal claims is limited by a lack of
experimental or longitudinal studies. Although the situation is rapidly changing, scholars still
have a limited understanding of who is and who is not using these sites, why, and for what
purposes, especially outside the U.S. Such questions will require large-scale quantitative and
qualitative research. Richer, ethnographic research on populations more difficult to access
(including non-users) would further aid scholars' ability to understand the long-term
implications of these tools. We hope that the work described here and included in this
collection will help build a foundation for future investigations of these and other important
issues surrounding social network sites.
In May 2007, Facebook launched the Facebook platform, which allowed third-party
developers to author and market applications to Facebook’s 20 million active users. One year
and 50 million additional users later, more than 20,000 Facebook applications have been
developed, with 95 percent of the user base having run at least one application. In January
2008, Facebook banned the application Secret Crush after it was reported to have led users to
install Zango adware.
Approximately nine months after Facebook launched its platform, MySpace followed suit,
and recently Google released an application program interface (API) for orkut, Google’s
social networking site.
Future social networking sites will become more important because platforms will expand
further. “Killer apps” will include mobility, presence, and location awareness, with the goal of
making our physical life more convenient through your virtual network; we’ll have a
travelling social network in our back pocket. Not only we will be able to know which of the
friends in our network is online, but we’ll also be able to know which are nearby.
Cell tower triangulation and global positioning systems will be able to pass along our
location to whomever we allow. Location-aware services could match local businesses and
entertainment to our interests based on our profile. Business travellers could more easily
rendezvous with coworkers and clients at conferences and trade shows. The thrill of online
dating could be heightened through the creation of location-specific communities, so we
CHAPTER - 8
GAURAV JAIN MECRC Page 66
CONCLUSION
Finally I would like to conclude that in the 6 weeks while i was working on this project we
learned many new technologies, concepts and have also learn about working in a team.
My project Social Networking Website is based and is under the ASP.Net technology.
This insulates the application from technical implementation and enhancement to support
future technologies in a transparent manner without having the major impact on the
application. This also enables the easy portability of application to other operating system and
databases.
This project followed the maintenance SDLC, which involved the steps of the
REQUIREMENT ANALYSIS
DESIGN
CODING
TESTING
IMPLEMENTATION
MAINTENANCE
Thus we were able to understand in greater details the various software engineering
processes, and were able to apply them to our live project.
With this enduring and simulating experience we admit that the people of this website has
really enlightened me. With due regards, i want to express our heart-felt thanks to all for their
support and cooperation towards the completion of our project.
REFERENCES:
GAURAV JAIN MECRC Page 67
A wide variety of information sources are available on the internet. It is a great pleasure for
me to write foreword for this project.
1. Imar Spaanjaars, “Beginning ASP.NET 3.5 with Visual C# and .NET”, Wiley
Publishing, Inc., 2008.
2. K.K.Agarwal and Yogesh Singh, “Software Engineering”, New Age International
Publishers, 3rd Edition, 2008.
3. Henry F. Korth, “Database Management System”, 4th Edition, 2004.
4. Java Script – referring from www.w3schools.com.
5. Student guide, “Designing and Creating a website”