You are on page 1of 114

MAJOR -PROJECT ON

BLOGGERS’ STOP

Developed By

Suprakas Sasmal
BCA
Roll No-821159064
Project Title
“Bloggers’ Stop”

Start Date : 12.6.2011


Name of Trainer : Debasis Banik

Name of Developer : Suprakas Sasmal

End Date : 15.6.2011

ABSTRACT
A blog (a blend of the term web log) is a type of website or part of a
website. Blogs are usually maintained by an individual with regular
entries of commentary, descriptions of events, or other material such as
graphics or video. Entries are commonly displayed in reverse-
chronological order. Blog can also be used as a verb, meaning to
maintain or add content to a blog.

In the given project we will be developing a website which will help


allowing visitors to leave comments and even message each other via
widgets on the blogs and it is this interactivity that distinguishes them
from other static websites.[2]
Acknowledgement

It gives us great pleasure to find an opportunity to express our deep &


sincere gratitude to our project trainer Mr. DEBASISH BANIK. We do very
respectfully recollect his constant encouragement, kind attention and keen
interest throughout the course of our work. We are highly indebted to him for
the way he modelled and structured our work with his valuable tips and
suggestions that he accorded to us in every respect of our work. We are
extremely grateful to the management of Hindustan Computers Limited (HCL)
for extending all their facilities to us. We humbly extend our sense of gratitude
to Mr. Debasis Das (Managing Director, Global Group Of Institutions) other
faculty members, laboratory staffs, and administration of the training centre
for providing us the valuable help and time with a congenital working
environment.

Last but not the least we would like to thank the entire Punjub Technical University
(PTU) for allowing us to proceed with the project.

---Thanking & Expressing Gratitude

--------------------------
Signature of the candidate

Email- Id: ssasmal.2011@gmail.com


Index

1. Introduction

2. Software Requirements Specification


03. System Development Life Cycle.
04. Analysis.
06. Table Used In Database
05. Design.
06. Snapshots

07. Coding

08. Results and Discussions

09. Summary and Conclusions

10. Bibliography
1.INTRODUCTION

INTRODUCTION

1.1 General Overview


Our website allowing visitors to leave comments and even message each other
via widgets on the blogs and it is this interactivity that distinguishes them from
other static websites.

Users will be able to write and share comment of a blog and also view other’s
blog .User can also share their photos, document and delete their
blogs/comments.

1.2 Survey

Blogger’s Stop aims to develop a web application which aims at providing


sharing views, documents, and photos to the different user and views other’s
comments.

So, we thought of developing a web based application which would provide the
users all these packages from his terminal only as well as help them in writing
and view blogs. The Application was to be divided into two parts namely the
user part, and the administrator part. And each of these has their
corresponding features.

We decided to give the name of the website “BLGGERS STOP”.

BLGGERS STOP” developed using ASP.NET with VB.NET as the backend in the
.NET Framework.

1.3 Analysis

Bloggers Stop is an online blogging website, which is capable of share view of


different user on central matter and writes comment with easy and free of cost.
This website is mainly created to fulfil the following requirements, it comprises
of the following properties:-

 A central database that will store all information of the user


 An online website that will provides the ability to write or read blog
between different users, this website is connected to the central database
to fetch and store all data. Users who book ticket online will be assigned
a unique username and password to access his profile.
 Every registered user is able to view his Profiles/Blogs that has been
made in his/her name.
 Every registered user can change his password any time he wants to
change.
 Every registered user has the facilities to print his ticket any time he
wishes.
 Every guest user can able to know about the blogging, help to create the
blog and also able to register to the boggers’ stop.

Administration login
 In admin mode the administrator can make changes the user
authentication status.
 He can block a user to singing to the website and also has the
authority to allow login
 He can so the all comments and blogs writing by various user.

2. Software Requirements Specification

A. Introduction
A.1 Purpose
A.2 Scope
A.3 Reference

B. General Description

B.1 Feasibility Study

B.2 Product Perspective

B.3 Product Function

B.4 User Characteristics

C. The Specific Requirements’

C.1 Detail study and description of each module.

A. Introduction
Software Requirement Specification (SRS) as a guide to the blogger to
describe accurately what the user wishes to obtain from the blog website. It
just exactly defines the software requirements and not the means of
obtaining the results.

A good quality SRS should be grouped, complete, verifiable, and consistent


Modifiable and traceable. However an ideal SRS should not cover the cost,
delivery schedule, reporting procedures details, software development
methods, and validation and verification entities. Inside the computerization
of “Bloggers Stop”, SRS report will describe all the things one by one.

A.1 Purpose: With the advent of the Twenty-first century the world
seems to have grown a lot smaller in context to data transfer and
communication; and one of the factors responsible for this growing trend is
"The Internet"!!

Social Networking Sites have taken the world by a storm, with millions of
people logging on these sites as an effective means of viable communication
and networking.

A.2 Scope: Social Networking Sites offers a lot of facilities such as


live chatting, sending messages, finding new friends, sharing and exchanging
views and Networking. And the most important of all features is the level of
Privacy offered by these sites, to the users.

A.3References: No readymade references book is available about


Real estate Website. Our team spoke to the faculty-in-charge of HCL
Mr.Debasis Banik and then browed through various website to know about the
requirements of such a website. The entire project was prepared by studying
the various features of some of the most famous real estate website.

B.THE GENERAL DESCRIPTION


The section of the SRS describes the general factor that affected the product
and its requirements.
B.1 Feasibility Study: We estimated weather the identificated target
definition and target domain can be satisfied by using the current software
and the hardware technologies. We have done an effective study from a
point of sharing view and data of different users. Our feasibility study was
cheap and quick. The result of feasibility helped us to determine whether
developing the website in certain respect will give us satisfactory results.
There exists three of feasibility study:

(i) Technical feasibility,(ii)operational feasibility and (iii) Economical


feasibility

a. Development risks: The system elements have been designed


so that the necessary function and performance are achieved
within the constraints. Some additional features may easily
be added to the features which have been seen uncovered
during the analysis.
b. Resource availability: The system has been made so user
friendly that even non-technical and use it easily. The
hardware and software used to build it are easily available.
c. Technology: This package will work on any popular browser
(E.g.: Opera, Fire fox etc…..) and therefore it is highly
compatibles to any Standalone system or mainframe with the
windows environment.

2.2.3 Operational Feasibility

Meaning: The system will be used if it is developed well then be


resistance from users that undetermined the possible
application benefits.
Support: Administrative support for present system is there to
add new passengers new routes and new account no.. No major
Training and new skills are required as it is based on DBMS
model.
It will help in the time saving and fast processing and dispersal
of user request and to dynamically update the profile and to
display.

3. SYSTEM DEVELOPMENT LIFE CYCLE


3.1 Analysis
“Bloggers’ Stop” is a distributed project. Projects can be categorized in two
ways:-
1. Local area network projects
2. Distributed projects
Local area Network projects are those projects where application has to be in
cooperated in the Local area network of the client i.e. within its premises only.
In LAN cases, server is not remotely located and client access this application
through this network. Here the question of platform independence does not
arise and we use technologies like: Visual Basic, Fox pro, D2K or C, C++.
But Distributed projects are those projects where application is remotely
situated. In these kind of projects application is remotely situated on to the
remote server from where client machine connects to the remote server and
application is downloaded on to client machine. Here the question of platform
independence arises and we use technologies like Java.

ROLE OF WEB BROWSER, WEB SERVER, HTTP

It is important to get an understanding of the roles of the web server, web


browser, and HTTP before starting your web development. The typical
communication process can be generalized into the following steps:

1. The web browser initiates a request for a web server resource

2. HTTP is used to send the GET request to the Web server.

3. The web server processes the request

4. The web server sends a response to the web browser. HTTP protocol is
used to send the HTTP response to the web browser.

5. The web browser processes the response to the, displaying the web page.

6. The user enters data and performs an action, such as clicking a submit
button that causes the data to be send back to the web server.

7. HTTP is used to POST the data back to the server.

8. The web server processes the data.

9. The web server sends the response back to the web browser

10. HTTP is used to send the HTTP response to the web browse

11. The web browser processes the response to the web browser.
internet
Response

Request

Client(browser)

WEB SERVER HTTP

DATABASE
SERVER
ODBC

A web server application differs from a traditional client/server application in


many ways. In a traditional client/server application, the client maintains a
connection with the server while the application is being executed. The client
sends and request data to and from the server and at regular intervals checks
if connection is active. If the server goes down, the client will send an error
message to the user before exiting. In the case of a web-enabled application,
the situation is different.

The web browser: - the browser is the vital component that provides an
interface between the user and the web server. The user sends a request
through the browser to the web server .when the web server return HTML page;
the browser displays it for the user.
The web server: - The web server bears the responsibility of servicing client
browser .a web server processes scripts and sends the resulting HTML page to
the client browser that requested it .the server-side script may be stand-alone
application or embedded in active server page. Web server can do more. They
can provide connections to other server-side components and expose
information stored on other server. These may be database server, mail and
news server. The web server also support client-side scripting .that means, we
can write code that can be executed by the browser .for example, when you
accept input from the user, and it can be validated at the client end before sent
to the server

The connection: - The internet is a network. The TCP/IP (transmission control


protocol/internet protocol) transfer bookstore to before placing the order for a
book .once on order has been placed; the stocks are update to show current
availability. Titles that are not being published have to be deleted and new ones
should be the catalogue.

Client and server authentication:- The identity and validity of the web server
and web browser can be ensure through the use of digital certificates that are
maintained by the certificate server .this authentication ensure that only
authorized user are allowed to access a web site or an application.

Web application Development cycle

Web-based application may differ from traditional client/server application in


many ways. However, the phases of application development are the same
typically, the phases include:

Planning the web application: - This is the stage where the functionality of the
application is planned. You identity the audience of the application and where
it will be deployed. User may access the application through the corporate
internet, the internet, or even an external. This will help us specify the purpose
of the application .once the purpose is identified; you can define the content of
the application. The last step is identifying the resource for developing the
application.

NOTE:-An external is an area on a web site available only to a set of registered


visitors.

Designing the application:-This is the phase where you create the prototype of
the application .Here, you plan the structure of the application and also define
the navigational scheme for the application .you also plan the theme and
layout of the application .you can identify the HTML or ASP pages that will
comprise the application .you can determine whether to include client-side
script, server-side scripts, or both.

Constructing and testing the components of the application:- This is the phase
where you begin to create the component of the application .they may be
protocol provides the binding that connect this entire computer together.

NOTE:-A protocol is a set of rules that two or more computer use to share data
with each other.

Data base server: - Most application involves the use of data. The
application is required to store, retrieve and maintain data in database. Web
applications are no different. Typically, the user is allowed to search through
the database of product and service being offered. This is where a database
server steps in. a database is used to store data in database. User can access
the data and manipulate it. A web application can provide the user with the
interface to the database .for example, user can browser through the catalogue
of an online

HTML pages, ASP document, Activex component, and so on .here, you debug
the error that may occur as the application is being developed and tested.

Going live:-This is the next phase of the application development cycle .after
the various components of the application have been developed and tested ,it is
time to deploy the application on the web server .users now have access to the
application.

Production and maintenance: - This is the last phase of application


development. The objective of this phase is to update the content of site regular
interval. You will also need to maintain the application and upgrade it when
required.

Idea

Planning Phase
Function specification
NO
complete?

YES

Design Phase

No Design complete?

Construct and Testing

NO

Complete?

Although Visual Studio combines most Web technology development into a


Production
single interface and assists and simplifies writing HTML and other file formats,
Going Live and
the litany of technologies we need to know to be a complete Web programmer is
still long, and none of them are simple. They are as follows: maintenanc
 C# the language we use to build classes, retrieve and manipulate data,
and handle Events.
 Hypertext Markup Language (HTML):- A formatting/layout language you
use to design the user interface.
 Cascading Style Sheets (CSS):-A robust, extensible, and hierarchical
method for specifying the visual styles applied to page objects.
 JavaScript/JScript/ECMAScript A programming language you use to
manipulate page Objects within a client browser. JScript is Microsoft's
proprietary version of ECMA Script. The name JavaScript was initially
introduced by Netscape.
 Extensible Markup Language (XML) A general-purpose markup language
used throughout Visual Studio and .NET as a way to hold and
manipulate data retrieved from a database; a format for specifying
application configuration information; a way to persist data and objects;
and a generic data container for passing messages, objects, and data
from one component or tier to another.
 Extensible Style sheet Language (for Transformations) (XSL/XSLT):- An
XML vocabulary created for the exclusive purpose of transforming XML
documents from one state to another. That state can be from XML to
XML, from XML to HTML, from XML to text, or from XML to any other
form.
 XML Schema (XSD):- An XML vocabulary created for the exclusive
purpose of transforming XML documents from one state to another.

Introduction to scripting

In its early days, HTML was developed in document format that could be used
to exchange information over the internet. the transfer of data was meant to be
platform independent .soon however ,the focus shift from academic and
scientific circle to that of the everyday user ,who now viewed the internet as a
source of information ,and entertainment .web page became more creative and
colourful in order to appeal to the ‘common‘ user. However the underlying style
and content of the page remained fixed .Developers had little or no control over
a web page once it was displayed.

 Server-based scripts
 Client-based scripts
Scripting is a method that can be used to create dynamic HTML pages and
provide user interaction. Initially, server-based scripts were used to provide
user interaction. Data from the client machine would be sent to the web server.
Server-based scripts would process the request and send the required page to
the client browser .with several users making simultaneous request, over a
period of time the web server would definitely get overload.

Data

Web client:
Web server: CGI Browser
Scripts Processin

Soon, the need for client side processing was felt. In client side processing, the
host browser support the use of scripts, which can be embedded in the HTML
document .the browser interprets and executes the code embedded in the page
illustrates the use of client side scripts.

Data

Web client:
browser
Web
server:CGI Processin Processing JavaScript
scripts vbScript
As a developer ,you can include scripts that change the content or style of a
web page in response to user input .If the application is data base oriented
,you can create scripts to validate the data entered by the user before it is sent
to the server for processing .For example ,you could write client side script to
verify if the user has entered data in all the required fields before the form is
submitted to the server for processing .there is no point in sending data to the
server only to find that the user has not entered his first name ,if it is required.
Client-side scripting: - In client –side scripting, the scripts are embedded in
the HTML document. The host browser internets and executes the code when
the page is display. You can use client –side scripts to:

 Provide user interaction:-You can write code that responds to event


.the event may be generated by the user—mouse click, or system –
generated –page resizing, and so on.
 Dynamically change content: - Code can be used to change the content
and position of elements on the page dynamically, in response to user
interaction.
 Validate data: - You can write code to validate data entered by the user
before it is submitted to the web server for processing.
 Integration: - Integration Activex component and applets in the client
application. JavaScript is scripting language that was developed by
Netscape and sun Microsystems. The objective was to page developers
with some power and control over the functionality of a web page.

Illustrates the user of client-side script in a data entry application

HTML User input


form

Java script data


No validation No

Data Valid?

Yes

Valid Data Submit data to


server
3.2 Feasibility Study

Feasibility studies aim to objectively and rationally uncover the strengths


and weaknesses of the existing business or proposed venture, opportunities
and threats as presented by the environment, the resources required to
carry through, and ultimately the prospects for success. In its simplest term,
the two criteria to judge feasibility are cost required and value to be
attained. As such, a well-designed feasibility study should provide a
historical background of the business or project, description of
the product or service, accounting statements, details of the operations
and management, marketing research and policies, financial data, legal
requirements and tax obligations. ] Generally, feasibility studies precede
technical development and project implementation.

3.2.1 Economic Feasibility:

Meaning: Are there sufficient benefits in creating the system to make the
costs acceptable? Or Are the costs of not creating the system so great that it is
advisable to undertake the project.
This will include three major costs as described below:-
 Cost of Hardware and Software
 Cost of software to be acquired to build and run the product is a
onetime cost.
Buying a back end database is the major part of hardware and software cost.
Comparison between the Oracle database high cost and better features with
the My SQL server low cost and better support for the same vendor operating
system make this decision need oriented.
Benefits in reduced cost, error and Savings will be made by reduction of
present system expenses, time saving and increased accuracy.
The proposed system is economically feasible because the cost involved in
purchasing that hardware and the software are within approachable.
The personal cost like salaries of employees hired are also nominal, because
working in this system need not required a highly qualified professional .The
operating –environment costs are marginal .The less time involved also helped
in its economical feasibility.
Cost Avoidance: Future cost reduction in form of reduction in the number
of administrative staff needed and manual records maintains in organization.
Rise in cost will be avoided.
3.2.1 Technical Feasibility:

Meaning: Can the work for the project be done with current equipment
existing software technology and available personnel? If new technology is
needed, what is the likelihood that it can be developed?
Reply: In this project the work cannot be done by the current system
because currently all the records, filling, transactions, entries, are done by
manuals. It is really time consuming and margin of error is more.
Yes, the current available personnel can develop this system but special
training should be given to those personnel to improve their skills. Yes new
technology or software, which is currently working in the market, is to be
needed to develop this system. It can be developed easily with this software and
for a long term it is working effectively and margin of error is less.
To run this product the following technological consideration has to be kept
in mind by the Company.
MS Access Database as back-end is a good DBMS software with long-
standing track record in industry for the good technical aspect, extensibility,
concurrency and support needed for this purpose.
Sql Server and Windows Operating system are used while making this
product. Language such as JAVA is also used while making this project.
Hardware’s used in this project are –p3 processors 733 MHz, 64 MB
RAM, 10 GB hard disk. These hardware were already available on the existing
computer system. The software like MS-ACCESS, MS-WORD and operating
system used were already installed on the existing. So no additional hardware
and software were required to purchase and it is technically feasible.

3.2.3 Operational Feasibility:

Meaning: The system will be used if it is developed well then be resistance


from users that undetermined the possible application benefits.
Support: Administrative support for present system is there to add new
passengers’ new routes and new account no... No major training and new skills
are required as it is based on DBMS model.
It will help in the time saving and fast processing and dispersal of user
request and to dynamically update the profile and to display.

3.3. Approach to be used:

ITERATIVE WATERFALL MODEL:


The Iterative waterfall model is a sequential software development process,
in which progress is seen as flowing steadily downwards (like a waterfall)
through the phases of Conception, Initiation, Analysis, Design (validation),
Construction, Testing and maintenance.

Requirements

Design

Implementation

Testing

Maintenance

Progress flows from the top to the bottom, like a waterfall. The waterfall
development model has its origins in the manufacturing and construction
industries; highly structured physical environments in which after-the-fact
changes are prohibitively costly, if not impossible. Since no formal software
development methodologies existed at the time, this hardware-oriented model
was simply adapted for software development.

1. In the requirements analysis phase:

 The problem is specified along with the desired service objectives (goals)
 The constraints are identified

2. In the specification phase:


The system specification is produced from the detailed definitions of (a) and
(b) above. This document should clearly define the product function.
Note that in some text, the requirements analysis and specifications phases are
combined and represented as a single phase.

1. In the system and software design phase:


The system specifications are translated into a software representation. The
software engineer at this stage is concerned with:
 Data structure
 Software architecture
 Algorithmic detail and
 Interface representations
The hardware requirements are also determined at this stage along with a
picture of the overall system architecture. By the end of this stage the software
engineer should be able to identify the relationship between the hardware,
software and the associated interfaces. Any faults in the specification should
ideally not be passed ‘downstream’.

2. In the implementation and testing phase:

Stage the designs are translated into the software domain


 Detailed documentation from the design phase can significantly reduce
the coding effort.
 Testing at this stage focuses on making sure that any errors are
identified and that the software meets its required specification.

3. In the integration and system testing phase:

All the program units are integrated and tested to ensure that the complete
system meets the software requirements. After this stage the software is
delivered to the customer [Deliverable – The software product is delivered to the
client for acceptance testing.]

4. The maintenance phase:

The usually the longest stage of the software. In this phase the software is
updated to:
 Meet the changing customer needs.
 Adapted to accommodate changes in the external environment
 Correct errors and oversights previously undetected in the testing
phases.
 Enhancing the efficiency of the software.

REASON FOR USING THIS MODEL:-

 Testing is inherent to every phase of the waterfall model


 It is an enforced disciplined approach
 It is documentation driven, that is, documentation is produced at every
stage.
4. ANALYSIS
ANALYSIS
4.1 Requirement analysis
Functional Components

 Facilitate to create Account to join this website with minimum


information.
 Easy to manage Profile.
 Easy User Interface and professional look and feel.
 New feature introduced as key for managing privacy setting.
 Easy to manage friend list and send Request.
 Easy to extract password if in case we forget it.
 Easy messaging and wall update.

4.2 Implementation
4.2.1 Platform Used

4.2.1.1 Hardware requirements


 . Processor- Pentium 4 or higher.
 RAM- 1GB or higher.
 Hard Disk – 10GB or higher.
 Monitor - VGA/CGA or higher.
 Keyboard – Multimedia Keyboard or higher.
 Mouse – PS/2/USB
4.2.2.2 Software requirements
 Operating System – Windows XP or higher.
 Front End – Microsoft Visual Studio 2010.
 Back End – Oracle Database10g Express Edition.
 Browser – IE, Mozilla Fire fox, Google Chrome etc.
4.2.2 Front End
ASP.NET Framework:

The Microsoft.NET is a framework for Microsoft Windows operating systems. It


includes a large library, and it supports several programming languages which
allow language interoperability (each language can use code written in other
languages). The .NET library is available to all the programming languages that
.NET supports.

The framework's Base Class Library provides user interface, data


access, database connectivity, cryptography, web development,
numeric algorithms, and network communications. The class library is used by
programmers, who combine it with their own code to produce applications.

Programs written for the .NET Framework execute in a software (as contrasted


to hardware) environment, known as the Common Language Runtime (CLR).
The CLR is an application virtual machine so that programmers need not
consider the capabilities of the specific CPU that will execute the program. The
CLR also provides other important services such as security, memory
management, and exception handling. The class library and the CLR together
constitute the .NET Framework.

The .NET Framework is intended to be used by most new applications created


for the Windows platform. In order to be able to develop and not just run
applications, it is required to have Microsoft's SDK for Windows 7 or .NET
Framework 4 (or newer) or Visual Studio 2010 installed on your computer.

Principal design features


Interoperability
Because computer systems commonly require interaction between new
and older applications, the .NET Framework provides means to access
functionality that is implemented in programs that execute outside
the .NET environment. Access to COM components is provided in the
System.Runtime.InteropServices and System.EnterpriseServices
namespaces of the framework; access to other functionality is provided
using the P/Invoke feature.
Common Runtime Engine
The Common Language Runtime (CLR) is the execution engine of the
.NET Framework. All .NET programs execute under the supervision of
the CLR, guaranteeing certain properties and behaviours in the areas of
memory management, security, and exception handling.

Language Independence
The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible data
types and programming constructs supported by the CLR and how they
may or may not interact with each other conforming to the Common
Language Infrastructure (CLI) specification. Because of this feature,
the .NET Framework supports the exchange of types and object
instances between libraries and applications written using any
conforming .NET language.
Base Class Library
The Base Class Library (BCL), part of the Framework Class Library (FCL),
is a library of functionality available to all languages using the .NET
Framework. The BCL provides classes which encapsulate a number of
common functions, including file reading and writing, graphic
rendering, database interaction, XML document manipulation and so on.
Simplified Deployment
The .NET Framework includes design features and tools that help
manage the installation of computer software to ensure that it does not
interfere with previously installed software, and that it conforms to
security requirements.
Security
The design is meant to address some of the vulnerabilities, such
as buffer overflows, that have been exploited by malicious software.
Additionally, .NET provides a common security model for all applications.

Portability
The design of the .NET Framework allows it theoretically to be platform
agnostic, and thus cross-platform compatible. That is, a program written
to use the framework should run without change on any type of system
for which the framework is implemented. While Microsoft has never
implemented the full framework on any system except Microsoft
Windows, the framework is engineered to be platform agnostic, and
cross-platform implementations are available for other operating systems
(see Silver light and the Alternative implementations section below).
Microsoft submitted the specifications for the Common Language
Infrastructure (which includes the core class libraries, Common Type
System, and the Common Intermediate Language), the C# language, and
the C++/CLI language to both ECMA and the ISO, making them available
as open standards. This makes it possible for third parties to create
compatible implementations of the framework and its languages on other
platforms.

Architecture
Common Language Infrastructure (CLI)
The purpose of the Common Language Infrastructure (CLI), is to provide
a language-neutral platform for application development and execution,
including functions for Exception handling, Garbage Collection, security,
and interoperability. By implementing the core aspects of the .NET
Framework within the scope of the CLI, this functionality will not be tied
to a single language but will be available across the many languages
supported by the framework. Microsoft's implementation of the CLI is
called the Common Language Runtime or CLR.

Assemblies
The CIL code is housed in .NET assemblies. As mandated by
specification, assemblies are stored in the Portable Executable (PE)
format, common on the Windows platform for all DLL and EXE files. The
assembly consists of one or more files, one of which must contain the
manifest, which has the metadata for the assembly. The complete name
of an assembly (not to be confused with the filename on disk) contains its
simple text name, version number, culture, and public key token. The
public key token is a unique hash generated when the assembly is
compiled, thus two assemblies with the same public key token are
guaranteed to be identical from the point of view of the framework. A
private key can also be specified known only to the creator of the
assembly and can be used for strong naming and to guarantee that the
assembly is from the same author when a new version of the assembly is
compiled (required to add an assembly to the Global Assembly Cache).

Metadata
All CIL is self-describing through .NET metadata. The CLR checks the
metadata to ensure that the correct method is called. Metadata is
usually generated by language compilers but developers can create their
own metadata through custom attributes. Metadata contains information
about the assembly, and is also used to implement the reflective
programming capabilities of .NET Framework.

Security
.NET has its own security mechanism with two general features: Code Access
Security (CAS), and validation and verification. Code Access Security is based
on evidence that is associated with a specific assembly. Typically the evidence
is the source of the assembly (whether it is installed on the local machine or
has been downloaded from the intranet or Internet). Code Access Security uses
evidence to determine the permissions granted to the code. Other code can
demand that calling
code is granted a specified permission. The demand causes the CLR to perform
a call stack walk: every assembly of each method in the call stack is checked
for the required permission; if any assembly is not granted the permission a
security exception is thrown.

When an assembly is loaded the CLR performs various tests. Two such tests


are validation and verification. During validation the CLR checks that the
assembly contains valid metadata and CIL, and whether the internal tables are
correct. Verification is not so exact. The verification mechanism checks to see if
the code does anything that is 'unsafe'. The algorithm used is quite
conservative; hence occasionally code that is 'safe' does not pass. Unsafe code
will only be executed if the assembly has the 'skip verification' permission,
which generally means code that is installed on the local machine.

.NET Framework uses Application Domains as a mechanism for isolating code


running in a process. Application Domains can be created and code can be
loaded into or unloaded from them independent of other Application Domains.
This helps increase the fault tolerance of the application, as faults or crashes
in one Application Domain do not affect the rest of the application. Application
Domains can also be configured independently with different security
privileges. This can help increase the security of the application by isolating
potentially unsafe code. The developer, however, has to split the application
into sub domains; it is not done by the CLR.

Class library
The .NET Framework includes a set of standard class libraries. The class
library is organized in a hierarchy of namespaces. Most of the built in
APIs are part of either System.* or Microsoft.* namespaces. These class
libraries implement a large number of common functions, such as file
reading and writing, graphic rendering, database interaction, and XML
document manipulation, among others. The .NET class libraries are
available to all CLI compliant languages. The .NET Framework class
library is divided into two parts: the Base Class Library and the
Framework Class Library.

The Base Class Library (BCL) includes a small subset of the entire class


library and is the core set of classes that serve as the basic API of
the Common Language Runtime. The classes in mscorlib.dll and some of
the classes in System.dll and System.core.dllare considered to be a part
of the BCL. The BCL classes are available in both .NET Framework as
well as its alternative implementations including .NET Compact
Framework, Microsoft Silver light and Mono.

The Framework Class Library (FCL) is a superset of the BCL classes and


refers to the entire class library that ships with .NET Framework. It
includes an expanded set of libraries, including Windows
Forms, ADO.NET, ASP.NET, Language Integrated Query, Windows
Presentation Foundation, Windows Communication Foundation among
others. The FCL is much larger in scope than standard libraries for
languages like C++, and comparable in scope to the standard libraries of
Java.

Memory management
The .NET Framework CLR frees the developer from the burden of
managing memory (allocating and freeing up when done); instead it does
the memory management itself. To this end, the memory allocated to
instantiations of .NET types (objects) is done contiguously from the
managed heap, a pool of memory managed by the CLR. As long as there
exists a reference to an object, which might be either a direct reference to
an object or via a graph of objects, the object is considered to be in use
by the CLR. When there is no reference to an object, and it cannot be
reached or used, it becomes garbage. However, it still holds on to the
memory allocated to it. .NET Framework includes a garbage
collector which runs periodically, on a separate thread from the
application's thread, that enumerates all the unusable objects and
reclaims the memory allocated to them.

The .NET Garbage Collector (GC) is a non-deterministic, compacting, and


mark-and-sweep garbage collector. The GC runs only when a certain
amount of memory has been used or there is enough pressure for
memory on the system. Since it is not guaranteed when the conditions to
reclaim memory are reached, the GC runs are non-deterministic. Each
.NET application has a set of roots, which are pointers to objects on the
managed heap (managed objects). These include references to static
objects and objects defined as local variables or method parameters
currently in scope, as well as objects referred to by CPU registers. When
the GC runs, it pauses the application, and for each object referred to in
the root, it recursively enumerates all the objects reachable from the root
objects and marks them as reachable. It uses .NET metadata
and reflection to discover the objects encapsulated by an object, and
then recursively walk them. It then enumerates all the objects on the
heap (which were initially allocated contiguously) using reflection. All
objects not marked as reachable are garbage. This is
the mark phase. Since the memory held by garbage is not of any
consequence, it is considered free space. However, this leaves chunks of
free space between objects which were initially contiguous. The objects
are then compacted together to make used memory contiguous
again. Any reference to an object invalidated by moving the object is
updated to reflect the new location by the GC. The application is
resumed after the garbage collection is over.
The GC used by .NET Framework is actually generational. Objects are
assigned a generation; newly created objects belong to Generation 0. The
objects that survive a garbage collection are tagged as Generation 1, and
the Generation 1 objects that survive another collection are Generation
2 objects. The .NET Framework uses up to Generation 2 objects. Higher
generation objects are garbage collected less frequently than lower
generation objects. This helps increase the efficiency of garbage
collection, as older objects tend to have a larger lifetime than newer
objects. Thus, by removing older (and thus more likely to survive a
collection) objects from the scope of a collection run, fewer objects need
to be checked and compacted.

Versions

Microsoft started development on the .NET Framework in the late 1990s


originally under the name of Next Generation Windows Services (NGWS).
By late 2000 the first beta versions of .NET 1.0 were released. Version
3.0 of the .NET Framework is included with Windows Server
2008 and Windows Vista. Version 3.5 is included with Windows 7, and
can also be installed on Windows XP and the Windows Server
2003 family of operating systems. On April 12, 2010, .NET Framework 4
was released alongside Visual Studio 2010.The .NET Framework family
also includes two versions for mobile or embedded device use. A reduced
version of the framework, the .NET Compact Framework, is available
on Windows CE platforms, including Windows Mobile devices such
as Smartphone. Additionally, the .NET Micro Framework is targeted at
severely resource-constrained devices.

Versio Version Release Date Visual Studio Default in Windows


n Number

1.0 1.0.3705.0 2002-02-13 Visual Studio.NET

1.1 1.1.4322.573 2003-04-24 Visual Studio.NET Windows Server


2003 2003
2.0 2.0.50727.42 2005-11-07 Visual Studio 2005 Windows Server
2003 R2

3.0 3.0.4506.30 2006-11-06 Windows Vista,


Windows Server
2008

3.5 3.5.21022.8 2007-11-19 Visual Studio 2008 Windows 7,


Windows Server
2008 R2

4.0 4.0.30319.1 2010-04-12 Visual Studio 2010


Drawbacks of ASP

 VBScripts and JavaScript are the only two scripting languages


available in ASP. These are basic non-typed languages. You cannot
use strongly typed languages like Visual Basic or c++.
 ASP pages are interpreted. This makes their execution slower.
 ASP pages are very untidy. They are a spaghetti-like mixture of code.
HTML and text.
 While creating a web application using ASP pages, the programmers
and the designer had to work on the same life. The programmers had
to write the code to provide required functionality and the designers
too had to create the graphics and content, and all this had to be
combined into a single file.
 In ASP, you have to write code to provide any functionality you
require. For example, if you required any validations to be performed
you had to write code for it to occur. A huge numbers of lines of code
had to be written.
 Re-use of code was not given much focus in ASP. You could do it only
by using the include statement.
 There was no debugging mechanism in ASP. You could debug ASP
application only by using the response. write. This is very tedious and
not very effective.
 In ASP, you had to stop the web server to install a new version of a
DLL. DLL’S had to be registered in the registry to be available for use
in an application. Moreover, the DLL registration process is a very
complex one.

Advantage of ASP.NET

 ASP.NET supports strongly typed languages like VB, c#, and much
more.
 ASP.NET pages get compiled instead of being interpreted, thus
their execution speed is faster than ASP pages.
 ASP.NET pages are tidier than ASP pages. The code can be
separated from the HTML design and text. Thus, programmers can
work separately from the designers.
 ASP.NET provides server controls that are declarative. You just
have to declare them and you can use them. Thus, the number of
lines of code to be written is reused.
 ASP.NET supports re-use of code by the mechanism of inheritance.
For example, you can inherit c# classes and use them to provide
the required functionality.
 ASP.NET has an inbuilt method called Trace, which helps you in
debugging a page. You can either display the trace information at
the end of the page or re-direct it to another location to check later.

Features of ASP.NET

 ASP.NET can recognize the type of browser the client is using and
accordingly display the content to the client. For example, if the
client uses an up level browser (i.e.> 4.0 version), then the
validation is performed on the client –side and on the server-side.
However, if the client is using a down-level browser, then the
validation is performed only on the server-side.
 ASP.NET improves performance by using server-side caching. It
allows you to cache the entire output of a page for re-use by other
clients.
 ASP.NET functionality can be coded using different languages like
C# or VB.NET. However, only one language can be used for coding
in a single page.
 ASP.NET ships with many built –in server controls that have the
common required functionalities. For example, the developer need
not create a control for accepting data; the textbox control is
provided for this purpose. Thus, the developers need not to recreate
these controls to obtain the required functionality.
 A web service can be described as a function that can be deployed
over the web and can be called by any application or other services.
It can be a business application or a system function. ASP.NET
allows you to create such web services.
Introduction to C# language

C# (pronounced "see sharp") is a multi-paradigm programming


language encompassing imperative,
declarative, functional, generic, object-oriented (class-based),
and component-oriented programming disciplines. It was developed
by Microsoft within the .NET initiative and later approved as a
standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270). C# is one of
the programming languages designed for the Common Language
Infrastructure# is intended to be a simple, modern, general-purpose,
object-oriented programming language. Its development team is led
by Anders Hejlsberg. The most recent version is C# 4.0, which was
released on April 12, 2010.
Inheritance and Abstract Classes

 When one class inherits from a second class, the inherited class
automatically includes all the non private methods and properties
of its parent class. In other words, what’s true of the parent is true
of the child, but not the other way around.
 Inheritance is used throughout the .NET Framework. For example,
every ASP.NET page inherits from the base System.Web.UI.Page
class. The only reason that you can use properties such as the
IsPostback property in an ASP.NET page is that the page derives
from the base Page class.
 All classes in the. NET Framework derives from the base System
.Object class. The Object Class is the great- grand mother of every
other class. This means that any methods or properties of the
Object class, such as the ToString() method, are shared by all
classes in the Framework.
Using Access Modifiers

C# supports the following access modifiers, which you can use when
declaring a class, method, or property:
 Public—a public class, method, or property has no access
restrictions.
 Protected—a protected method or property can be accessed only
within the class itself or a derived class.
 Internal—An internal class, method, or property can be accessed
only by a component within the same assembly (dll file). Because
ASP.NET pages are compiled into different assemblies than the
contents of the App_Code folder, we cannot access an internal
member of a class outside of the App_Code folder.
 Private—A private class, method, or property can be accessed only
within the class itself. Visual Basic .NET supports the following
access modifiers (also called access levels), which you can use when
declaring a class, method, or property.
 Public—A Public class, method, or property has no access
restrictions.
 Protected—A Protected method or property can be accessed only
within the class itself or a derived class.
 Friend—A Friend class, method, or property can be accessed only
by a component within the same assembly (dll file). Because
ASP.NET pages are compiled into different assemblies than the
contents of the App_Code folder, you cannot access a Friend
member of a class outside of the App_Code folder.
 Protected Friend—A Protected Friend method or property can be
accessed within the class itself or a derived class, or any other class
located in the same assembly.
 Private—A Private class, method, or property can be accessed only
within the class itself.

Overview of ASP.NET Controls

The ASP.NET Framework contains over 70 controls. These controls can be


divided into eight groups:
 Standard Controls—The standard controls enable you to render
standard form elements such as buttons, input fields, and labels. We
examine these controls in detail in the following chapter, “Using the
Standard Controls.”
 ValidationControls—The validation controls enable you to validate
form data Before you submit the data to the server. For example, you
can use a Required Field Validator control to check whether a user
entered a value for a required input field.
 Rich Controls—The rich controls enable you to render things such as
calendars, file upload buttons, rotating banner advertisements, and
multi-step wizards.
 Data Controls—The data controls enable you to work with data such as
database data. For example, you can use these controls to submit new
records to a database table or display a list of database records.
 Navigation Controls—The navigation controls enable you to display
standard navigation elements such as menus, tree views, and bread
crumb trails. LoginControls—The login controls enable you todisplay
login, change password and registration forms.
 HTMLControls—The HTML controls enable you to convert any HTML tag
int server-side control.

ASP.NET controls

Label Control: - The label control display text at specific location on the web
page using the properties that the control has been assigned. Label can be
used as the caption of textbox or other control in a situation where using
access key for the Label moves the focus to the control to the right of the Label.

Textbox Control: - The Textbox control is the primary mechanism for


displaying and entering text and is one of the most common elements of the
Windows user interface. The Textbox control is a small text editor that provides
all the basic text-editing facilities: inserting and selecting text, scrolling if the
text doesn’t fit in the control’s area, and even exchanging text with other
applications through the Clipboard.

The TextBox control can be used to display three different types of input fields
depend-
Ing on the value of its TextMode property.The TextMode property accepts the
following
Three values:
. SingleLine—Displays a single-line input field.

. MultiLine—Displaysa multi-line input field.


. Password—Displaysa single-line input field in which the text is hidden.

Button control:- The button control display a push button on the web page
that the user can click to trigger a post back to the web server .A button can be
either a submit (default) button or a command button.

The ComboBox Control :-The ComboBox control is similar to the ListBox


control in the sense that it contains multiple items of which the user may
select one, but it typically occupies less space on-screen. The ComboBox is
practically an expandable ListBox control, which can grow when the user
wants to make a selectionand retract after the selection is made. Normally, the
ComboBox control displays one line with thes elected item. The real difference,
however, between ComboBox and ListBox controls is that the ComboBox allows
the user to specify items that don’t exist in the list. Moreover, the Text property
of the ComboBox is read-only at runtime, and you can locate an item by
assigning a value to the control’s Text property.
Styles of the Combo Box Control
Value Effect

Dropdown (Default) The control is made up of a drop-down


list and a text box. The user can select an item
from the list or type a new one in the text box.

DropDownList This style is a drop-down list, from which the


user can select one of its items but can’t enter
a new one.

Simple The control includes a text box and a list that


doesn’t drop down. The user can select from
the list or type in the text box.

The image button control:- The image button control is used to display a
clickable image on web page that can be used to post back to the web server
when the image is clicked .this control generates an <input=”image”>element
when rendering to HTML.

The Calender control:- The calendar control display a calendar for either the
current month or selected month. it allows the user to select and move to the
next or previous month.the selectionchanged event causes a postback when
the user select new date ,and the visibleMonth Change event causes a
postback when the user selects different month to be viewed.
The Calendar control supports the following properties (this is not a complete
list):
 DayNameFormat—Enables you to specify the appearance of the days of
the week.Possible values are FirstLetter, FirstTwoLetters, Full, Short, and
Shortest.
 NextMonthText—Enables you to specify the text that appears for the
next month link.
 NextPrevFormat—Enables you to specify the format of the next month
and previous month link. Possible values are CustomText, FullMonth,
and ShortMonth.
 PrevMonthText—Enables you to specify the text that appears for the
previous month link.
 SelectedDate—Enables you to get or set the selected date.
 SelectedDates—Enables you to get or set a collection of selected dates.
 SelectionMode—Enablesyou to specify how dates are selected. Possible
values are Day, DayWeek, DayWeekMonth, and None.

 SelectMonthText—Enables you to specify the text that appears for


selecting a month.
The panel control:-
The Panel control enables you to work with a group of ASP.NET controls.
The panel control is used as a control container and is useful when you have
controls that you want to display and hide as a group. The panel generates a
<div> element when rendering as HTML.in source view, the panel control is
represented as the <asp:panel> element and can contained many controls.
HyperLink Control
The Hyperlink control enables you to create a link to a page. Unlike the
LinkButton control, the Hyperlink control does not submit a form to a server.
The Hyperlink control supports the following properties (this is not a complete
list):
 Enabled—Enables you to disable the hyperlink.
 ImageUrl—Enables you to specify an image for the hyperlink.
 NavigateUrl—Enables you to specify the URL represented by the
hyperlink.
 Target—Enables you to open a new window.
 Text—Enables you to label the hyperlink.

Validation Controls

Six validation controls are included in the ASP.NET 3.5 Framework:

 RequiredFieldValidator—Enables you to require a user to enter a


value in a form field.
 RangeValidator—Enables you to check whether a value falls
between a certain minimum and maximum value.
 CompareValidator—Enables you to compare a value against
another value or perform a data type check.
 RegularExpressionValidator—Enables you to compare a value
against a regular expression.
 CustomValidator—Enablesyou to perform custom validation.
 ValidationSummary—Enables you to display a summary of all
validation errors in a page.
SqlDataSource:-

This control provides binding to an open Database


connectivity (ODBC), object Linking and Embedding Database (OLEDB),
SQLserver, Oracle, or other database that uses structure Query Language
(SQL).you can even attach to a SQL server database file by simple including it
in your project.

The Dropdownlist control:-


The dropdownlist control is used to display a
list of the items to the user who can make a single selection. The dropdownlist
control inherits the list control.the items collection contains the collection of
listitem object contained in the dropdownlist control. To determine the item
that is selected, you can retrieve the selected value, selected item or
selectedindex property.

The GridView Control:-


The GridView control is used to display data in
a tabular, row-and-columns format. The Gridview renders in the browser as an
HTML table. The GridView control makes it easy to configure features such as
paging, sorting, and editing without having write much, if any code.
Detail view control: this is same as grid view, but we can insert value to the
table from detail view

The AdRotator Control:-

The adrotator control is used to display randomly


selected advertisement banners on a web page.in source view, the adrotator
control is created as an <asp: adrotator>element.this control generates
<a>and<img> elements when rendering to HTML.

The AdRotator control enables you to randomly display different


advertisements in a page. You can store the list of advertisements in either an
XML file or in a database table. The AdRotator control supports the following
properties (this is not a complete list):
 AdvertisementFile—Enables you to specify the path to an XML file
that contains a list of banner advertisements.
 AlternateTextField—Enables you to specify the name of the field
for displaying alternate text for the banner advertisement image.
The default value is AlternateText.
 DataMember—Enables you to bind to a particular data member in
the data source.
 DataSource—Enables you to specify a data source
programmatically for the list of banner advertisements.
 DataSourceID—Enables you to bind to a data source declaratively.
 ImageUrlField—Enables you to specify the name of the field for the
image URL for the banner advertisement. The default value for this
field is ImageUrl.
 KeywordFilter—Enables you to filter advertisements by a single
keyword.
 NavigateUrlField—Enables you to specify the name of the field for
the advertisement link. The default value for this field is
NavigateUrl.
 Target—Enables you to open a new window when a user clicks the
banner advertisement.
AdRotator control also supports the following event:AdCreated—Raised after
the AdRotator control selects an advertisement but before the AdRotator
control renders the advertisement.

Submitting Form Data

The ASP.NETFramework includes three controls you can use to submit a form
to the server: the Button, LinkButton, and ImageButton controls. These
controls have the same function, but each control has a distinct
appearance.Using the Button Control the Button control renders a push
button that you can use to submit a form to the server.
The Button control supports the following properties (this is not a complete
list):
 AccessKey—Enables you to specify a key that navigates to the Button
control.
 CommandArgument—Enablesyou to specify a command argument that
is passed to the Command event.
 CommandName—Enables you to specify a command name that is
passed to the command event.
 Enabled—Enablesyou to disable the Button control.
 OnClientClick—Enablesyou to specify a client-side script that executes
when the button is clicked.
 PostBackUrl—Enablesyou to post a form to a particular page.
 TabIndex—Enables you to specify the tab order of the Button control.
 Text—Enablesyou to label the Button control.
 UseSubmitBehavior—Enables you to use JavaScript to post a form.
Button control also supports the following method:Focus—Enables youto
set the initial form focus to the Button control.
Button control also supportsthe following two events:
 Click—Raised when the Button control is clicked.
 Command—Raised when the Button control is clicked.

Using the LinkButton Control

The LinkButton control, like the Button control, enables you to post a form to
the server. Unlike a Button control, however, the LinkButton control renders a
link instead of a pushbutton. LinkButton control uses JavaScript to post the
form back to the server. Clicking the LinkButton invokes the JavaScript
__doPostBack() method, which posts the form to the server. When the form is
posted, the values of all the other form fields in the page are also posted to the
server.The LinkButton control supports the following properties (this is not a
complete list):
 AccessKey—Enables you to specify a key that navigates to the Button
control.
 CommandArgument—Enables you to specify a command argument that
is passed to the Command event.
 CommandName—Enables you to specify a command name that is
passed to the Command event.
 Enabled—Enables you to disable the LinkButton control.
 OnClientClick—Enables you to specify a client-side script that executes
when the LinkButton is clicked.
 PostBackUrl—Enables you to post a form to a particular page.
 TabIndex—Enables you to specify the tab order of the LinkButton
control.
 Text—Enables you to label the LinkButton control.
 Focus—Enables you to set the initial form focus to the LinkButton
control.
The LinkButton control also supports the following two events:
 Click—Raised when the LinkButton control is clicked.

 Command—Raised when the LinkButton control is clicked. The


CommandName and CommandArgument are passed to this event.

Using the ImageButton Control

The ImageButton control, like the Button and LinkButton controls, enables you
to post a form to the server. However, the ImageButton control always displays
an image.The ImageButton includes both an ImageUrl and AlternateText
property.The ImageUrl contains the path to the image that the ImageButton
displays. The AlternateText property is used to provide alternate text for the
image used by screen readers and text-only browsers.The ImageButton control
supports the following properties (this is not a complete list):
 AccessKey—Enables you to specify a key that navigates to the
ImageButton control.
 AlternateText—Enables you to provide alternate text for the image
(required for accessibility).
 DescriptionUrl—Enables you to provide a link to a page that contains a
detailed description of the image (required to make a complex image
accessible).
 CommandArgument—Enables you to specify a command argument that
is passed to the Command event.
 CommandName—Enables you to specify a command name that is
passed to the Command event.
 Enabled—Enables you to disable the ImageButton control.
 GenerateEmptyAlternateText—Enables you to set the AlternateText
property to an empty string.
 ImageAlign—Enables you to align the image relative to other HTML
elements in the Page .Possible values are AbsBottom, AbsMiddle,
Baseline, Bottom, Left, Middle, NotSet, Right, TextTop,and Top.
 ImageUrl—Enables you to specify the URL to the image.
 OnClientClick—Enables you to specify a client-sidescript that executes
when the ImageButton is clicked.
 PostBackUrl—Enables you to post a form to a particular page.
 TabIndex—Enables you to specify the tab order of the ImageButton
control.ImageButton control also supports the following method:
6.2 Back End: SQL Server

Microsoft SQL Server 2005 is a comprehensive, integrated data management


and analysis software that enables organizations to reliably manage mission-
critical information and confidently run today’s increasingly complex business
applications. SQL Server 2005 allows companies to gain greater insight from
their business information and achieve faster results for a competitive
advantage.

Gaining access to SQL Server 2005 Express


When you open Management Studio Express, a connection window with SQL
Server will be opened, as Figure 1 shows. In this window, you will enter the
data for connection with SQL Express existent in your machine. A detail to be
observed is that you can, through the Management Studio, connect to a server
SQL Server which is in another machine in the net. Just click in the Server
name box and choose the Browser for more option to search for the other
server. In our example, we will connect to the existing SQLEXPRESS instance
in the machine itself (that, in this case, has the name PND).

Relative to the authentication mode, a warning: in case you have installed the
SQL Express along with the installation of an Express Tool or Visual Studio
2005, you will not have the “sa” user password and will not be able to effect the
authentication through SQL Server Authentication. You will have to use
the Windows Authentication option to gain access to the program. In our
example, we will connect using Windows authentication.
Management Studio Work Area
After connected, the work area of Management Studio Express is then
presented, as Figure 2 shows. This window possesses the following areas:
Menu Bar, Toolbar, Object Explorer and Active Files. 

Figure 2. SQL Server Management Studio Express Work Area

Through the Object Explorer box we can navigate among all of the SQL Server
parts, especially the Databases folder, where the created databases and their
objects are contained in(tables,view,etc).In order to create a new database, it is
enough to right-click over the Databases folder and choose the New
Database option.

The window for the creation of the database is then opened, where you insert
the name, choose the owner and configure the initial size of the data and log
files. In our example, we call our new database “Library” and leave the initial
data file size at 3 MB, as you can verify in Figure 3. In the Options page, you
will be able to set some of the new database’s advanced options,
as: Compatibility level, where you choose with which version of the SQL Server
the new database will be compatible; Database Read-Only, where you decide if
the database created will be read-only; and Restrict Access, where you set the
database access restrictions. After performing all the actions, click the OK
button to finish our database creation.

Figure 3. The “New Database” Window

Creating tables
Created the database, we will visualize and add the desired tables, diagrams
and views. To visualize our database’s folders, we will expand
the Databases objects and, after that, Tables, through the Object Explorer.
Once the database is open, the following folders’ structure is presented:

· Database Diagrams: the entity-relationship diagrams are stored in this


location;
· Tables: folder where the database tables are;
· Views: here stay all the views that have been created;
3.3 Requirement Specification

Functional Components

 To facilitate Tourists about the bus timings.


 To give all the information about bus fares.
 Tourists themselves register for passes of buses online.
 Quick access of all records.
 Reduce manual work.
 Quickly updating the new passengers, new routes and buses
 Prevent and reduce human error.

3.4.2 Use Case Description

A use case diagram in the Unified Modeling Language (UML) is a type of


behavioral diagram defined by and created from a Use-case analysis. Its
purpose is to present a graphical overview of the functionality provided by a
system in terms of actors, their goals (represented as use cases), and any
dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Roles
of the actors in the system can be depicted.

3.5. Activity Diagram:

Activity diagrams are graphical representations of workflows of stepwise


activities and actions with support for choice, iteration and concurrency.
5.TABLE USED IN DATABASE
TABLE USED IN DATABASE

Let’s Blog is a social website. Behind this web site there is a sql database
named Blog.

There are four database tables profiles,liking,comments,msgs.

5.1TABLE “Profiles”

Column Name Data Type Allow Description


Nulls

Fname Varchar(50) no First name of user

lname Varchar(50) no Last name of user

email Varchar(50) no Email Id

Pass Varchar(50) no Password of user account

logname Varchar(50) No Desired log in name

gender Varchar(50) No Gender

dob Varchar(250) No Date of birth

photo Varchar(500) No Profile picture

ques Varchar(50) No Security question

ans Varchar(50) No Answer of security question

highsc Varchar(50) No High school

coll Varchar(50) No College name

country Varchar(50) No Country name

state Varchar(50) No state

hometown Varchar(50) No Home town of user


languages Varchar(50) No Languages known

aboutme Varchar(1500) No About the user

status Varchar(50) no User status

Query to create profiles table is given below:-

create table profiles(fname Varchar(50),lname Varchar(50),email


Varchar(50)primary key,pass Varchar(50),logname Varchar(50),gender
Varchar(50),dob Varchar(250),photo Varchar(500),ques Varchar(50),ans
Varchar(50),highsc Varchar(50),coll Varchar(50),country Varchar(50 )state
Varchar(50),hometown Varchar(50),languages Varchar(50),aboutme
Varchar(1500),status Varchar(50))

5.2Table “msgs”
msgs table is used to keep records of massages of users

Column Name Data Type Allow Nulls Description

title varchar(100) no Title of Blogs

msg varchar(500) no Content Of image

font varchar(40) no Font style

color varchar(20) no Font color

size int no Font Size

bold varchar(10) no

italic varchar(10) no

unline varchar(10) no

ownerid varchar(50) no Bloggers Id

posttm varchar(50) no Post Time

postdt varchar(30) no Post Date

writer varchar(50) No Name of Blog


Writer

sql query for create msgs table is given below:-

create table msgs(title varchar(100)primerykey,msg varchar(500),font


varchar(40),color varchar(20),size int,boldvarchar(10),italicvarchar(10),unline
varchar(10),ownerid varchar(50),posttm varchar(50),postdt varchar(30),writer
varchar(50))

5.3Table “liking”
Liking is a table used to keep records for like and dislike comments

Column name Date type Allow Description

title Varchar(500) no Title Of Massage

like Varchar(50) no Like/Unlike

email Varchar(500) no User Email

Fullname Varchar(50) no Full Name Of user

sl int no Serial Number

sql query for create likeing table is given below:-

create table like in (title varchar(500)primerykey,like varchar(50),email


varchar(500),fullname varchar(50),slq int, bold varchar(10))
5.4Table “comments”

comments is a table is used to keep records of comments of users

Column name Date type Allow Description

poster Verchar(250) no Poster Name

time1 Verchar(250) no Post Time

msg Verchar(250) no massage

comments Verchar(500) no Written Comment

email Verchar(50) no Email-id

sl int no Serial Number

sql query for create comments table is given below:-

create table comments(poster varchar(250)primery key,time1 varchar(250),msg


varchar(250),comments varchar(50),sl int,bold varchar(10))
6.DESIGN
DESIGN

Data Flow Diagram:

A Data Flow Diagram (DFD) is a graphical representation of the "flow" of data


through an information system. DFDs can also be used for the visualization of
data processing (structured design). On a DFD, data items flow from an
external data source or an internal data store to an internal data store or an
external data sink, via an internal process.
A Data Flow Diagram or DFD is prepared to clarify system requirements and
to identify major transformation that will become programs in system design.
Also known as ‘Bubble Chart’, it is the first step in structured analysis part of
designing. Hence, it is the starting point of the designing phase that
functionally decomposes the requirements specification down to the lowest
level of detail.
DFD consists of a series of bubbles and other symbols joined by arrows and
lines. However, it should be noted that a DFD describes “What is the logical
data flow?” rather than “How the data are processed?” So, it does not depend
on hardware, software, data structure or file organization. A DFD only shows
the major transformations and flow of data in the whole software system.
It is common practice to draw a context-level data flow diagram first, which
shows the interaction between the system and external agents which act as
data sources and data sinks. On the context diagram (also known as the Level
0 DFD) the system's interactions with the outside world are modelled purely in
terms of data flows across the system boundary. The context diagram shows
the entire system as a single process, and gives no clues as to its internal
organization.
This context-level DFD is next "exploded", to produce a Level 1 DFD that
shows some of the detail of the system being modelled. The Level 1 DFD shows
how the system is divided into sub-systems (processes), each of which deals
with one or more of the data flows to or from an external agent, and which
together provide all of the functionality of the system as a whole. It also
identifies internal data stores that must be present in order for the system to
do its job, and shows the flow of data between the various parts of the system.
There are numerous symbols that are being used in making a Data Flow
Diagram. But, amongst them, only few common ones are used. These are
shown as follows along with their use.
DFD Symbols

Rectangle. It defines a source or destination of


system data.

Circle. It represents a process that transforms


incoming data flow into outgoing data flow.

Oval Bubble. Same as Circle.

Pipe. It shows a data store – data at rest or a


temporary repository of data.

Open Rectangle. Same as pipe.

Arrows. They identify data flow i.e. data in motion.


O LEVEL DFD
1 LEVEL DFD
ER Diagram

In software engineering, an Entity-Relationship Model (ERM) is an abstract


and conceptual representation of data. Entity-relationship modelling is a
database modelling method, used to produce a type of conceptual schema or
semantic data model of a system, often a relational database, and its
requirements in a top-down fashion.
Diagrams created using this process are called entity-relationship diagrams,
or ER diagrams or ERDs for short.
The Entity Relationship Diagram, or ER Diagram, provides a graphical
notation for representing data models that are typically used in the first stage
of information system design. They are used to describe information needs and
the type of the information that is to be stored in the database during the
phase of requirement analysis.
Today all computer software use Data Base Management Systems for
information storage and retrieval along with its manipulation. In such a
scenario, ER Diagram symbolizes the design of an information system that is
based on a database. The conceptual data model is at a later stage of designing
mapped to a logical data model such as the relational model. This in turn is
mapped to a physical model during physical design. Therefore, ER Diagram is a
data model or data diagram for high level descriptions of conceptual data
models.
ER Diagram Symbols

Rectangle. It represents the entities, the things about


which we seek information.

Week Entity. It depends on another entity to exist.

Ellipse. It shows attributes that are properties of the


entity.

Primary Key / Attribute. It is the unique,


distinguishing property of the entity.

Multivalve Attribute. It can have more than one value.

Derived Attribute. It is based on another attribute to


exist.

Diamond. It shows relationships that provide the


structure which draws information from multiple
entities.

Arrows. They identify the flow i.e. movement of


information in a flow chart.
Entity Relationship Diagram
pass delet writer title
pic update
add
e-id

name View blog comment

does
user

does
does msg
title

name D&t

photo

Create blog
Share photo
7.SNAPSHOTS
8.CODING
START
Code Behind The File

Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
MyData.ImagePath = Server.MapPath("~/Images")
Dim strUrl As String = Request.Url.ToString

MyData.Url = strUrl.Substring(0, strUrl.LastIndexOf("/")) & "/Images/"


End Sub

<System.Web.Services.WebMethod()> _
<System.Web.Script.Services.ScriptMethod()> _
Public Shared Function GetPictures() As AjaxControlToolkit.Slide()
Dim di As New DirectoryInfo(MyData.ImagePath)
Dim s(di.GetFiles.Length - 1) As AjaxControlToolkit.Slide
Dim x As Integer = 0
For Each fi As FileInfo In di.GetFiles()
s(x) = New AjaxControlToolkit.Slide(MyData.Url & fi.Name, "",
Path.GetFileNameWithoutExtension(fi.Name))
x += 1
Next
Return s
End Function
End Class

Public Class MyData


Private Shared _Path As String
Private Shared _Url As String

Public Shared Property ImagePath() As String


Get
Return _Path
End Get
Set(ByVal value As String)
_Path = value
End Set
End Property

Public Shared Property Url() As String


Get
Return _Url
End Get
Set(ByVal value As String)
_Url = value
End Set
End Property
End Class
LOG-IN

Code Behind The File

Imports System.IO
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
form1.DefaultButton = "Button1"
End Sub

Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
Response.Redirect("account creation pre step.aspx")
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click
Dim cn As SqlConnection
Dim cmd As SqlCommand
Dim rd As SqlDataReader
cn = New SqlConnection("server=.;database=blog;integrated security=true")
cn.Open()
cmd = New SqlCommand("select * from profiles where email='" + TextBox1.Text +
"' and password='" + TextBox2.Text + "' ", cn)
rd = cmd.ExecuteReader()
rd.Read()
If rd.HasRows = True Then
If rd.GetValue(9).ToString() = "allow" Then
Session("email") = rd.GetValue(2).ToString()
Session("password") = rd.GetValue(3).ToString()
Session("fname") = rd.GetValue(0).ToString()
Session("lname") = rd.GetValue(1).ToString()
Session("gender") = rd.GetValue(4).ToString()

Session("dob") = rd.GetValue(5).ToString()
Session("photo") = rd.GetValue(6).ToString()
Session("ques") = rd.GetValue(7).ToString()
Session("answer") = rd.GetValue(8).ToString()
Session("highsc") = rd.GetValue(10).ToString()
Session("coll") = rd.GetValue(11).ToString()
Session("cnt") = rd.GetValue(12).ToString()
Session("state") = rd.GetValue(13).ToString()
Session("ht") = rd.GetValue(14).ToString()
Session("lang") = rd.GetValue(15).ToString()
Session("abt") = rd.GetValue(16).ToString()
Response.Redirect("home.aspx")
ElseIf rd.GetValue(9).ToString() = "block" Then
Label12.Text = "You are not allowed to visit ..."
Label12.Visible = True
End If
Else
Label12.Text = "Wrong Email/Password"
Label12.Visible = True
End If

rd.Close()
cn.Close()
End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button2.Click
Response.Redirect("start.aspx")
End Sub
End Class
HOME

Code Behind The File

Imports System.Data.SqlClient
Partial Class home
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
Image7.ImageUrl = "~/" + Session("email").ToString() + "/" +
Session("photo").ToString()
Label1.Text = "Welcome " + Session("fname").ToString() + " " +
Session("lname").ToString()
Label2.Text = Session("fname").ToString()
Label3.Text = Session("gender").ToString()
End Sub

Protected Sub LinkButton8_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton8.Click
HiddenField1.Value = DateAndTime.Now.Day.ToString() + "/" +
DateAndTime.Now.Month.ToString() + "/" + DateAndTime.Now.Year.ToString()
HiddenField2.Value = DateAndTime.Now.Hour.ToString() + ":" +
DateAndTime.Now.Minute.ToString() + ":" + DateAndTime.Now.Second.ToString()
Try
SqlDataSource2.Update()
Response.Write("<script>alert('Blog Updated')</script>")
Catch ex As Exception
Response.Write("<script>alert('Error Occurred...Try Again')</script>")
End Try
Label10.Text = "Posted At : " + HiddenField2.Value.ToString() + " On " +
HiddenField1.Value.ToString()
End Sub

Protected Sub LinkButton7_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton7.Click
Dim cn2 As SqlConnection = New SqlConnection("Data Source=.;Initial
Catalog=blog;Integrated Security=true")
cn2.Open()
Dim cmd2 As SqlCommand = New SqlCommand("select * from liking where
title='" + DropDownList1.SelectedItem.ToString() + "' and likes='yes'", cn2)
Dim rd2 As SqlDataReader = cmd2.ExecuteReader()
Dim lk As String = ""

While rd2.Read()
lk = rd2.GetValue(3).ToString() + " , " + lk

End While
If lk = "" Then
Label9.Text = "No one likes ur blog"
Else

Label9.Text = "These people like your blog :: " + l


End If

'If rd2.HasRows Then

'Else
' TextBox2.Text = "No one likes your blog"
'End If
rd2.Close()
cn2.Close()
Dim cn As SqlConnection = New SqlConnection("Data Source=.;Initial
Catalog=blog;Integrated Security=true")
cn.Open()
Dim cmd As SqlCommand = New SqlCommand("select * from msgs where title='"
+ DropDownList1.SelectedItem.ToString() + "'", cn)
Dim rd As SqlDataReader = cmd.ExecuteReader()
rd.Read()
TextBox1.Text = rd.GetValue(1).ToString()

If rd.GetValue(5).ToString() = "true" Then

TextBox1.Font.Bold = True

ElseIf rd.GetValue(5).ToString() = "true" Then

TextBox1.Font.Bold = True
End If

If rd.GetValue(6).ToString() = "true" Then

TextBox1.Font.Italic = True

End If
If rd.GetValue(7).ToString() = "true" Then

TextBox1.Font.Underline = True

End If

'TextBox1.Font.Name = rd.GetValue(2).ToString()
'TextBox1.ForeColor =
System.Drawing.Color.FromName(rd.GetValue(3).ToString())
Dim sr As String = rd.GetValue(8).ToString()
Label8.Text = "Posted At : " + rd.GetValue(9).ToString() + " On " +
rd.GetValue(10).ToString()
Label8.Visible = True

rd.Close()
cn.Close()
End Sub

Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton6.Click
Response.Redirect("change password.aspx")
End Sub

Protected Sub LinkButton4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton4.Click
Response.Redirect("update account.aspx")
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Button1.Visible = True
FileUpload1.Visible = True
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click
If FileUpload1.HasFile Then
Session("photo") = FileUpload1.FileName
Dim st As String = "~/" + Session("email").ToString() + "/" +
FileUpload1.FileName
FileUpload1.SaveAs(MapPath(st))
Dim cn As SqlConnection
Dim cmd As SqlCommand

cn = New SqlConnection("server=.;database=blog;integrated security=true")


cn.Open()
cmd = New SqlCommand("update profiles set photo='" + FileUpload1.FileName
+ "' where email='" + Session("email").ToString() + "' ", cn)
cmd.ExecuteNonQuery()
cn.Close()
Image7.ImageUrl = "~/" + Session("email").ToString() + "/" +
Session("photo").ToString()
Button1.Visible = False
FileUpload1.Visible = False

End If
End Sub
End Class
CREATE BLOG

Code Behind The File

Partial Class create_blog


Inherits System.Web.UI.Page
Public Shared b As Integer = 0
Public Shared i As Integer = 0
Public Shared u As Integer = 0

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button1.Click
HiddenField5.Value = DateAndTime.Now.Day.ToString() + "/" +
DateAndTime.Now.Month.ToString() + "/" + DateAndTime.Now.Year.ToString()
HiddenField4.Value = DateAndTime.Now.Hour.ToString() + ":" +
DateAndTime.Now.Minute.ToString() + ":" + DateAndTime.Now.Second.ToString()
HiddenField6.Value = Session("email").ToString()
HiddenField7.Value = Session("fname").ToString() + " " +
Session("lname").ToString()

Try
SqlDataSource1.Insert()
Response.Write("<script>alert('Blog Created
Successfully')</script>")
Response.Redirect("home.aspx")
Catch ex As Exception
Response.Write("<script>alert('Some problem occurred...try
again')</script>")
End Try
End Sub

Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object,


ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
TextBox2.Font.Name = DropDownList1.SelectedValue.ToString()
End Sub

Protected Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object,


ByVal e As System.EventArgs) Handles DropDownList2.SelectedIndexChanged
TextBox2.Font.Size =
Convert.ToInt32(DropDownList2.SelectedValue.ToString())
End Sub
Protected Sub DropDownList3_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles DropDownList3.SelectedIndexChanged
TextBox2.ForeColor =
Drawing.Color.FromName(DropDownList3.SelectedItem.ToString())
End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button2.Click
b = b + 1
If b Mod 2 = 1 Then

TextBox2.Font.Bold = True
HiddenField1.Value = "true"

ElseIf b Mod 2 = 0 Then

TextBox2.Font.Bold = False
HiddenField1.Value = "false"
End If
End Sub

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button3.Click
u = u + 1
If u Mod 2 = 1 Then

TextBox2.Font.Underline = True
HiddenField3.Value = "true"

ElseIf u Mod 2 = 0 Then

TextBox2.Font.Underline = False
HiddenField3.Value = "false"
End If
End Sub

Protected Sub Button4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button4.Click
i = i + 1
If i Mod 2 = 1 Then

TextBox2.Font.Italic = True
HiddenField2.Value = "true"

ElseIf i Mod 2 = 0 Then

TextBox2.Font.Italic = False
HiddenField2.Value = "false"
End If
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then

Dim i As Integer
For i = 8 To 72 Step 4
DropDownList2.Items.Add(i)
Next

End If
End Sub

Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton3.Click
Response.Redirect("view blog.aspx")
End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Response.Redirect("update.aspx")
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("home.aspx")
End Sub

Protected Sub LinkButton4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton4.Click
Response.Redirect("strat.aspx")
End Sub
End Class
VIEW BLOGG

Code Behind The File

Imports System.Data.SqlClient
Partial Class view_blog

Inherits System.Web.UI.Page

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles CheckBox1.CheckedChanged
Dim cn2 As SqlConnection
Dim cmd2 As SqlCommand

cn2 = New SqlConnection("server=.;database=blog;integrated


security=true;MultipleActiveResultSets=True")
cn2.Open()

If CheckBox1.Checked Then
CheckBox1.Text = "You Like This Blog"
cmd2 = New SqlCommand ("update liking set likes='yes' where
email='" + Session ("email").ToString () + "' and title='" +
DropDownList2.SelectedItem.ToString () + "'", cn2)
cmd2.ExecuteNonQuery ()
Else
CheckBox1.Text = "Unlike"
cmd2 = New SqlCommand("update liking set likes='no' where
email='" + Session("email").ToString() + "' and title='" +
DropDownList2.SelectedItem.ToString() + "'", cn2)
cmd2.ExecuteNonQuery ()

End If
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
HiddenField1.Value = Session("fname").ToString() + " " +
Session("lname").ToString()
HiddenField2.Value = DateAndTime.Now.ToString()

Try
SqlDataSource3.Insert()
Catch ex As Exception
Response.Write("error occurred...try again")
End Try

GridView1.DataBind()
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button1.Click
TextBox2.ReadOnly = False
Dim cn2 As SqlConnection
Dim cmd2 As SqlCommand
Dim rd2 As SqlDataReader
cn2 = New SqlConnection("server=.;database=blog;integrated
security=true;MultipleActiveResultSets=True")
cn2.Open()
cmd2 = New SqlCommand("select * from liking where email='" +
Session("email").ToString() + "' and title='" +
DropDownList2.SelectedItem.ToString() + "'", cn2)
rd2 = cmd2.ExecuteReader()
rd2.Read()
Dim lk As String

Dim fn As String = Session("fname").ToString() + " " +


Session("lname").ToString()
If rd2.HasRows = False Then
cmd2 = New SqlCommand("insert liking(title,email,fullname)
values('" + DropDownList2.SelectedItem.ToString() + "','" +
Session("email").ToString() + "','" + fn + "')", cn2)
cmd2.ExecuteNonQuery()
Else
lk = rd2.GetValue(1).ToString()
If lk = "nothing" Then
CheckBox1.Checked = False
CheckBox1.Text = "Click to like this"
ElseIf lk = "no" Then
CheckBox1.Checked = False
CheckBox1.Text = "Unlike"
Else
CheckBox1.Checked = True
CheckBox1.Text = "You Like This Blog"
End If

End If

Dim cn As SqlConnection
Dim cmd As SqlCommand
Dim rd As SqlDataReader
cn = New SqlConnection("server=.;database=blog;integrated
security=true")
cn.Open()
cmd = New SqlCommand("select * from msgs where title='" +
DropDownList2.SelectedItem.ToString() + "' ", cn)
rd = cmd.ExecuteReader()
rd.Read()
TextBox1.Text = rd.GetValue(1).ToString()
TextBox1.ReadOnly = True

If rd.GetValue(5).ToString() = "true" Then

TextBox1.Font.Bold = True

ElseIf rd.GetValue(5).ToString() = "true" Then

TextBox1.Font.Bold = True
End If

If rd.GetValue(6).ToString() = "true" Then

TextBox1.Font.Italic = True

End If

If rd.GetValue(7).ToString() = "true" Then

TextBox1.Font.Underline = True

End If

TextBox1.Font.Name = rd.GetValue(2).ToString()
TextBox1.ForeColor =
System.Drawing.Color.FromName(rd.GetValue(3).ToString())
Dim sr As String = rd.GetValue(8).ToString()
Label6.Text = "Posted At : " + rd.GetValue(9).ToString() + " On " +
rd.GetValue(10).ToString()
Label6.Visible = True
rd.Close()
cn.Close()
End Sub

Protected Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object,


ByVal e As System.EventArgs) Handles DropDownList2.SelectedIndexChanged

End Sub
End Class
UPDATE ACCOUNT

Code Behind The File


Partial Class update_account
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Me.Load
If Page.IsPostBack = False Then
TextBox2.Text = Session("fname").ToString()
TextBox3.Text = Session("lname").ToString()
DropDownList3.Text = Session("gender").ToString()
TextBox4.Text = Session("highsc").ToString()
TextBox5.Text = Session("coll").ToString()
DropDownList1.Text = Session("cnt").ToString()
DropDownList2.Text = Session("state").ToString()
TextBox6.Text = Session("ht").ToString()
TextBox7.Text = Session("lang").ToString()
TextBox8.Text = Session("abt").ToString()
End If
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles LinkButton1.Click
SqlDataSource1.Update().ToString()
Session("fname") = TextBox2.Text
Session("lname") = TextBox3.Text

Session("highsc") = TextBox4.Text
Session("coll") = TextBox5.Text
Session("cnt") = DropDownList1.Text
Session("state") = DropDownList2.Text
Session("ht") = TextBox6.Text
Session("lang") = TextBox7.Text
Session("abt") = TextBox8.Text
Session("gender") = DropDownList3.Text
End Sub
End Class
UPLOAD PICTURE

Code Behind The Files

Imports System.IO
Partial Class upload_photo
Inherits System.Web.UI.Page
Public Shared i As Integer = 0

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Dim loc As String
loc = Server.MapPath("~/") + Session("email").ToString() + "/" +
FileUpload1.FileName
If FileUpload1.HasFile Then
FileUpload1.SaveAs(loc)
End If

Dim di As DirectoryInfo
di = New DirectoryInfo(Server.MapPath("~/") +
Session("email").ToString())
For Each fi As FileInfo In di.GetFiles()
Dim hl As String
Dim img As New Image

img.ID = "img" + i.ToString()


i = i + 1
img.ImageUrl = "~/" + Session("email").ToString() + "/" + fi.Name

img.Height = 50
img.Width = 50
img.BorderStyle = BorderStyle.Double

hl = "/" + "Bloggers Stop" + "/" + Session("email").ToString() +


"/" + fi.Name
Panel1.Controls.Add(New LiteralControl("<a href='" + hl + "'>"))
Panel1.Controls.Add(img)
Panel1.Controls.Add(New LiteralControl("</a>"))
Panel1.Controls.Add(New
LiteralControl("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"))
Next
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
LinkButton1.Enabled = False
FileUpload1.Enabled = False
If Page.IsPostBack = False Then
Dim di As DirectoryInfo
di = New DirectoryInfo(Server.MapPath("~/") +
Session("email").ToString())
For Each fi As FileInfo In di.GetFiles()
Dim hl As String
Dim img As New Image

img.ID = "img" + i.ToString()


i = i + 1
img.ImageUrl = "~/" + Session("email").ToString() + "/" +
fi.Name

img.Height = 50
img.Width = 50
img.BorderStyle = BorderStyle.Double

hl = "/" + "Bloggers Stop" + "/" +


Session("email").ToString() + "/" + fi.Name
Panel1.Controls.Add(New LiteralControl("<a href='" + hl +
"'>"))
Panel1.Controls.Add(img)
Panel1.Controls.Add(New LiteralControl("</a>"))
Panel1.Controls.Add(New
LiteralControl("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"))
Next

End If
End Sub

Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
LinkButton1.Enabled = True
FileUpload1.Enabled = True
End Sub
End Class
FORGOT PASSWORD
Code Behind The Files

Imports System.Data.SqlClient
Partial Class forgot_password
Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click
Dim cn As SqlConnection
Dim cmd As SqlCommand
cn = New SqlConnection("server=.;database=blog;integrated security=true")
cn.Open()
cmd = New SqlCommand("select*from profiles where email='" + TextBox1.Text + "' ", cn)
Dim rd As SqlDataReader
rd = cmd.ExecuteReader()
rd.Read()
If rd.HasRows Then
Dim newpass As String = Class1.CreateRandomPassword(10).ToString()
Label2.Text = newpass
Label2.Visible = True
Label3.Visible = True
TextBox2.Visible = True
Button2.Visible = True
Label1.Visible = False
TextBox1.Visible = False
Button1.Visible = False
End If

End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button2.Click
If Label2.Text = TextBox2.Text Then
Label4.Visible = True
Label5.Visible = True
DropDownList1.Visible = True
TextBox3.Visible = True
LinkButton1.Visible = True
Label2.Visible = False
Label3.Visible = False
TextBox2.Visible = False
Button2.Visible = False
End If
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles LinkButton1.Click
Dim cn As SqlConnection
Dim cmd As SqlCommand
cn = New SqlConnection("server=.;database=blog;integrated
security=true;MultipleActiveResultSets=True")
cn.Open()
cmd = New SqlCommand("select * from profiles where email='" + TextBox1.Text + "' and
ques='" + DropDownList1.Text + "' and answer='" + TextBox3.Text + "' ", cn)
Dim rd As SqlDataReader
rd = cmd.ExecuteReader()
rd.Read()
If rd.HasRows Then

Label6.Visible = True
Label7.Visible = True
Label8.Visible = True
TextBox4.Visible = True
TextBox5.Visible = True
LinkButton2.Visible = True
Label4.Visible = False
Label5.Visible = False
DropDownList1.Visible = False
TextBox3.Visible = False
LinkButton1.Visible = False
Else
Response.Write("<script>alert('Plz give correct answer')</script>")
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
TextBox4.Visible = False
TextBox5.Visible = False
LinkButton2.Visible = False
Label4.Visible = True
Label5.Visible = True
DropDownList1.Visible = True
TextBox3.Visible = True
LinkButton1.Visible = True
End If
rd.Close()
cn.Close()
End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles LinkButton2.Click
Dim cn As SqlConnection
Dim cmd As SqlCommand
cn = New SqlConnection("server=.;database=blog;integrated
security=true;MultipleActiveResultSets=True")
cn.Open()
cmd = New SqlCommand("update profiles set password='" + TextBox4.Text + "' where
email='" + TextBox1.Text + "' ", cn)
cmd.ExecuteNonQuery()
cn.Close()
End Sub
End
CREATE ACCOUNT
Code Behind The Files

Imports System.IO
Imports System.Data.SqlClient

Partial Class create_an_account


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click
Try
HiddenField1.Value = FileUpload1.FileName
SqlDataSource1.Update()
Dim loc As String
loc = Server.MapPath("~/") + Session("Email")
Directory.CreateDirectory(loc)
Dim st As String = "~/" + Session("Email") + "/" + FileUpload1.FileName
FileUpload1.SaveAs(MapPath(st))

Dim str As String = "Congratulations " + Session("fname") + " " +


Session("lname") + " Your account has been created successfully ... Plz note that your
password is : " + TextBox2.Text + " Security Question : " + DropDownList1.Text + "
And Ans Is " + TextBox4.Text + " Have a nice day... The Bloggers Stop Team"
Label8.Visible = True
Label8.Text = str
Response.Redirect("start.aspx")
'Session("1") = str
'Session("2") = TextBox5.Text
'Try
' MailSender.SendEmail("tmaji70@gmail.com", "9233545892",
Session("2").ToString(), "Account Information", Session("1").ToString(),
System.Web.Mail.MailFormat.Text, "")
' Label15.Text = "Account Created Successfully,Check Mail For More Info..."
' Label15.Visible = True

'Response.Redirect("start.aspx")
'Catch ex As HttpException
' Label15.Text = "Wrong mailid or net connection problem"
' Label15.Visible = True
'End Try

Catch ex As SqlException
Label8.Text = "Some problems occurred...try again"
Label8.Visible = True
End Try
End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button2.Click
Response.Redirect("strat.aspx")
End Sub
End Class
CHANGE PASSWORD
Code Behind The Files

Imports System.Data.SqlClient
Partial Class change_password
Inherits System.Web.UI.Page

Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click

Dim cn As SqlConnection
Dim cmd As SqlCommand

cn = New SqlConnection("server=.;database=blog;integrated security=true")


cn.Open()

cmd = New SqlCommand("update profiles set password='" + TextBox2.Text + "'


where email='" + Session("email").ToString() + "' and password='" +
Session("password").ToString() + "' ", cn)

Dim i As New Integer

If TextBox1.Text = Session("password").ToString() Then


i = cmd.ExecuteNonQuery()
End If

If i = 1 Then
Label4.Text = "Your password has been changed"
Label4.Visible = True
Session("password") = TextBox2.Text
Try
Dim str As String
str = "Congratulations ... Your password has been changed Your New
Password Is: " + TextBox2.Text + " -- Bloggers Stop Team"
MailSender.SendEmail("tmaji70@gmail.com", "9233545892",
Session("email").ToString(), "Account Information", str,
System.Web.Mail.MailFormat.Text, "")
Label4.Text = "Password Changed Successfully,Check Mail For More Info..."
Label4.Visible = True

Catch ex As HttpException
Label4.Text = "Wrong mailid or net connection problem"
Label4.Visible = True
End Try

Else
Label4.Text = "Check Old Password"
Label4.Visible = True
End If

'cn.Close()

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub
End Class
ADMIN LOG-IN
Code Behind The Form

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="admin1.aspx.vb"


Inherits="admin1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">

.style1
{
z-index: 1;
left: 2px;
top: 1px;
position: absolute;
height: 41px;
width: 1339px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
<p>
<asp:Image ID="Image1" runat="server" ImageUrl="~/image/c.png"
CssClass="style1" />
</p>
<asp:Image ID="Image2" runat="server" ImageUrl="~/IMAGE/no_admin.gif"
style="z-index: 1; left: 51px; top: 153px; position: absolute;
height: 490px; width: 694px" />
<asp:Image ID="Image3" runat="server" ImageUrl="~/IMAGE/ADMIN.png"
style="z-index: 1; left: 404px; top: 72px; position: absolute" />
<asp:Label ID="Label1" runat="server" Font-Bold="True"
Font-Names="Blackadder ITC" Font-Size="XX-Large" ForeColor="Maroon"
style="z-index: 1; left: 870px; top: 155px; position: absolute;
height: 72px; width: 337px"
Text="Please Sign In Here"></asp:Label>
<asp:Image ID="Image4" runat="server" ImageUrl="~/IMAGE/Sign_Here.jpg"
style="z-index: 1; left: 991px; top: 193px; position: absolute;
height: 120px; width: 82px" />
<asp:Login ID="Login1" runat="server" BackColor="#99CCFF"
BorderColor="#660066"
BorderStyle="Double"
style="z-index: 1; left: 813px; top: 316px; position: absolute;
height: 181px; width: 405px">
</asp:Login>
</form>
</body>
</html>
ADMIN HOME

Code Behind The Files

Partial Class Default3


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub ListBox2_SelectedIndexChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles ListBox2.SelectedIndexChanged
TextBox1.Text = ListBox2.SelectedValue.ToString()
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Try
SqlDataSource4.Update()
Response.Write("<script>alert('User Blocked')</script>")

Catch ex As Exception
Response.Write("<script>alert('Some error occurred...try again')</script>")
End Try
End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Try
SqlDataSource6.Update()
Response.Write("<script>alert('User Unlocked')</script>")
DropDownList2.Items.Remove(DropDownList2.SelectedItem)
Catch ex As Exception
Response.Write("<script>alert('Some error occurred...try again')</script>")
End Try

End
ACCOUNT CREATION PRE STEP
Code Behind The Form

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="account creation pre


step.aspx.vb" Inherits="Default2" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"


tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:Image ID="Image1" runat="server" ImageUrl="~/image/blog.jpg.png"
style="z-index: 1; left: 70px; top: 6px; position: absolute; height: 88px; width:
102px" />
<asp:Image ID="Image2" runat="server" ImageUrl="~/image/account creation.png"
style="z-index: 1; left: 173px; top: 35px; position: absolute" />
<asp:Image ID="Image3" runat="server" ImageUrl="~/image/blog-3.jpg"
style="z-index: 1; left: 172px; top: 69px; position: absolute; width: 1028px;
height: 590px" />
<asp:Label ID="Label1" runat="server" Font-Bold="True"
style="z-index: 1; left: 197px; top: 119px; position: absolute; height: 48px; width:
206px"
Text="Since we'll be friends, can you tell us your name?"></asp:Label>
<asp:Label ID="Label2" runat="server"
style="z-index: 1; left: 436px; top: 122px; position: absolute"
Text="First Name:"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"
style="z-index: 1; left: 532px; top: 119px; position: absolute; height: 27px; width:
169px"></asp:TextBox>
<asp:Label ID="Label3" runat="server"
style="z-index: 1; left: 756px; top: 123px; position: absolute"
Text="Last Name :"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"
style="z-index: 1; left: 851px; top: 119px; position: absolute; height: 28px; width:
174px"></asp:TextBox>
<asp:Label ID="Label4" runat="server" Font-Bold="True"
style="z-index: 1; left: 201px; top: 189px; position: absolute; height: 25px; width:
200px"
Text="Sorry if we are rude, but when were you born?"></asp:Label>
<asp:Label ID="Label5" runat="server" Font-Bold="True"
style="z-index: 1; left: 688px; top: 194px; position: absolute"
Text="Gender:"></asp:Label>
<asp:Label ID="Label6" runat="server" Font-Bold="True"
style="z-index: 1; left: 288px; top: 288px; position: absolute"
Text="Terms of Service:"></asp:Label>
<asp:Label ID="Label7" runat="server" ForeColor="#FF0066"
style="z-index: 1; left: 419px; top: 290px; position: absolute"
Text="Please review the Google Terms of Service and Orkut Additional Terms
below:"></asp:Label>
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/image/i accept.png"
style="z-index: 1; left: 323px; top: 330px; position: absolute; height: 27px; width:
105px" />
<asp:TextBox ID="TextBox3" runat="server"
style="z-index: 1; left: 452px; top: 188px; position: absolute; height: 28px; width:
153px"></asp:TextBox>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:CalendarExtender ID="TextBox3_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox3">
</asp:CalendarExtender>
<asp:DropDownList ID="DropDownList1" runat="server"
style="z-index: 1; left: 787px; top: 190px; position: absolute">
<asp:ListItem></asp:ListItem>
<asp:ListItem>Feamle</asp:ListItem>
<asp:ListItem>Male</asp:ListItem>
</asp: DropDownList>
<asp:Label ID="Label8" runat="server" Font-Bold="True" Font-Size="Medium"
style="z-index: 1; left: 300px; top: 249px; position: absolute; height: 19px; width:
83px"
Text="Email-Id"></asp:Label>
<asp: TextBox ID="TextBox4" runat="server"
style="z-index: 1; left: 455px; top: 247px; position: absolute; height: 25px; width:
142px"></asp:TextBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings: blogConnectionString %>"
DeleteCommand="DELETE FROM [profiles] WHERE [email] = @email"
InsertCommand="INSERT INTO [profiles] ([fname], [lname], [email], [gender],
[dob]) VALUES (@fname, @lname, @email, @gender, @dob)"
SelectCommand="SELECT [fname], [lname], [email], [gender], [dob] FROM
[profiles]"
UpdateCommand="UPDATE [profiles] SET [fname] = @fname, [lname] = @lname,
[gender] = @gender, [dob] = @dob WHERE [email] = @email">
<DeleteParameters>
<asp:Parameter Name="email" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox1" Name="fname"
PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="lname"
PropertyName="Text"
Type="String" />
<asp:SessionParameter Name="email" SessionField="Email" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="gender"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="dob"
PropertyName="Text"
Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="fname" Type="String" />
<asp:Parameter Name="lname" Type="String" />
<asp:Parameter Name="gender" Type="String" />
<asp:Parameter Name="dob" Type="String" />
<asp:Parameter Name="email" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:Button ID="Button1" runat="server"
style="z-index: 1; left: 489px; top: 332px; position: absolute; height: 25px; width:
101px"
Text="Cancel" />
</form>
</body>
</html>
ABOUT US
Code Behind The Form
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="about us.aspx.vb"
Inherits="about_us" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
<p>

<asp:Image ID="Image2" runat="server" ImageUrl="~/image/c.png"


style="z-index: 1; left: 3px; top: 1px; position: absolute; height: 44px; width:
1338px" />

<asp:Image ID="Image3" runat="server" ImageUrl="~/IMAGE/flower2.jpg"


style="z-index: 1; left: 5px; top: 45px; position: absolute; height: 640px; width:
1360px" />
<asp:Label ID="Label3" runat="server" Font-Bold="True"
style="z-index: 1; left: 417px; top: 279px; position: absolute"
Text="Technology Used:- Asp.Net, Vb.Net, Sql Server"></asp:Label>
<asp:Label ID="Label2" runat="server" Font-Bold="True"
style="z-index: 1; left: 417px; top: 242px; position: absolute; height: 18px;
width: 313px"
Text="Email Id :- ssasmal.2011@gmail.com"></asp:Label>
<asp:Label ID="Label1" runat="server" Font-Bold="True"
style="z-index: 1; left: 419px; top: 206px; position: absolute; height: 27px;
width: 317px"
Text="Name Of Developer:-Suprakas Sasmal"></asp:Label>

</p>
<asp:Image ID="Image4" runat="server" ImageUrl="~/IMAGE/BSTOP.png"
style="z-index: 1; left: 395px; top: 53px; position: absolute" />
</form>
</body>
</html>
9.Testing
Testing

5.1 Software Testing:


Software Testing is an empirical investigation conducted to provide
stakeholders with information about the quality of the product or service under
test, with respect to the context in which it is intended to operate. Software
Testing also provides an objective, independent view of the software to allow
the business to appreciate and understand the risks at implementation of the
software. Test techniques include, but are not limited to, the process of
executing a program or application with the intent of finding software bugs. It
can also be stated as the process of validating and verifying that a software
program/application/product meets the business and technical requirements
that guided its design and development, so that it works as expected and can
be implemented with the same characteristics.
Software Testing, depending on the testing method employed, can be
implemented at any time in the development process, however the most test
effort is employed after the requirements have been defined and coding process
has been completed.

5.2 Software testing topics

5.2.1 Scope
A primary purpose for testing is to detect software failures so that defects
may be uncovered and corrected. This is a non-trivial pursuit. Testing
cannot establish that a product functions properly under all conditions but
can only establish that it does not function properly under specific
conditions. The scope of software testing often includes examination of code
as well as execution of that code in various environments and conditions as
well as examining the aspects of code: does it do what it is supposed to do
and do what it needs to do. In the current culture of software development, a
testing organization may be separate from the development team. There are
various roles for testing team members. Information derived from software
testing may be used to correct the process by which software is developed.

5.2.2 Defects and failures


Not all software defects are caused by coding errors. One common source of
expensive defects is caused by requirements gaps, e.g., unrecognized
requirements, which result in errors of omission by the program designer. A
common source of requirements gaps is non-functional requirements such as
testability, scalability, maintainability, usability, performance, and security.
Software faults occur through the following processes. A programmer makes
an error (mistake), which results in a defect (fault, bug) in the software source
code. If this defect is executed, in certain situations the system will produce
wrong results, causing a failure. Not all defects will necessarily result in
failures. For example, defects in dead code will never result in failures. A defect
can turn into a failure when the environment is changed. Examples of these
changes in environment include the software being run on a new hardware
platform, alterations in source data or interacting with different software. A
single defect may result in a wide range of failure symptoms.

5.3 Testing methods

Software testing methods are traditionally divided into black box testing and
white box testing. These two approaches are used to describe the point of view
that a test engineer takes when designing test cases.

5.3.1 Black box testing


Black box testing treats the software as a "black box," without any
knowledge of internal implementation. Black box testing methods include:
equivalence partitioning, boundary value analysis, all-pairs testing, fuzz
testing, model-based testing, traceability matrix, exploratory testing and
specification-based testing.

Specification-based testing
Specification-based testing aims to test the functionality of software
according to the applicable requirements. Thus, the tester inputs data into,
and only sees the output from, the test object. This level of testing usually
requires thorough test cases to be provided to the tester, who then can simply
verify that for a given input, the output value (or behaviour), either "is" or "is
not" the same as the expected value specified in the test case.
Specification-based testing is necessary, but it is insufficient to guard against
certain risks.

Advantages and disadvantages


The black box tester has no "bonds" with the code, and a tester's perception
is very simple: a code must have bugs. Using the principle, "Ask and you shall
receive," black box testers find bugs where programmers don't. But, on the
other hand, black box testing has been said to be "like a walk in a dark
labyrinth without a flashlight," because the tester doesn't know how the
software being tested was actually constructed. That's why there are situations
when :-
(1) a black box tester writes many test cases to check something that can be
tested by only one test case, and/or
2) some parts of the back end are not tested at all.

Therefore, black box testing has the advantage of "an unaffiliated opinion,"
on the one hand, and the disadvantage of "blind exploring," on the other.

5.3.2 White box testing


White box testing, by contrast to black box testing, is when the tester has
access to the internal data structures and algorithms (and the code that
implement these).

Types of white box testing


The following types of white box testing exist:
 API Testing - Testing of the application using Public and Private APIs.
 Code Coverage - creating tests to satisfy some criteria of code coverage.
For example, the test designer can create tests to cause all statements in
the program to be executed at least once.
 Fault Injection Methods.
 Mutation Testing Methods.
 Static Testing - White box testing includes all static testing.

Code Completeness Evaluation


White box testing methods can also be used to evaluate the completeness of
a test suite that was created with black box testing methods. This allows the
software team to examine parts of a system that are rarely tested and ensures
that the most important function points have been tested.
Two common forms of code coverage are:
 Function coverage, which reports on functions executed
 Statement coverage, which reports on the number of lines executed to
complete the test.
They both return coverage metric, measured as a percentage.

5.3.3 Grey Box Testing


In recent years the term grey box testing has come into common usage. This
involves having access to internal data structures and algorithms for purposes
of designing the test cases, but testing at the user, or black-box level.
Manipulating input data and formatting output do not qualify as "grey-box,"
because the input and output are clearly outside of the "black-box" that we are
calling "the software under test." (This distinction is particularly important
when conducting integration testing between two modules of code written by
two different developers, where only the interfaces are exposed for test.) Grey
box testing may also include reverse engineering to determine, for instance,
boundary values or error messages.
Testing can be done on the following levels:
 Unit testing: Unit testing tests the minimal software component, or
module. Each unit (basic component) of the software is tested to verify
that the detailed design for the unit has been correctly implemented. In
an object-oriented environment, this is usually at the class level, and the
minimal unit tests include the constructors and destructors.
 Integration testing: Integration testing exposes defects in the interfaces
and interaction between integrated components (modules). Progressively
larger groups of tested software components corresponding to elements
of the architectural design are integrated and tested until the software
works as a system.
 System testing: System testing tests a completely integrated system to
verify that it meets its requirements.
 System integration testing: System integration testing verifies that a
system is integrated to any external or third party systems defined in the
system requirements.
Before shipping the final version of software, alpha and beta testing are often
done additionally:
 Alpha testing: Alpha testing is simulated or actual operational testing by
potential users/customers or an independent test team at the developers'
site. Alpha testing is often employed for off-the-shelf software as a form
of internal acceptance testing, before the software goes to beta test
 Beta testing: Beta testing comes after alpha testing. Versions of the
software, known as beta versions, are released to a limited audience
outside of the programming team. The software is released to groups of
people so that further testing can ensure the product has few faults or
bugs. Sometimes, beta versions are made available to the open public to
increase the feedback field to a maximal number of future users.
10.Results and Discussions
Result

Blogger Stop system was successfully designed and developed as per the
specifications. It was extensively tested using a database which contains data similar
to what can be expected in an actual database. The system was found to work
satisfactorily without any errors under all conditions.
11.CONCLUSION
Summary and Conclusions
Summary of Achievements
The following achievements were made during the project:

 We had the opportunity to learn a new technology ASP.net


 Learned to work in visual studio 2005.
 We learned to handle a project efficiently and correctly.
 Learned to tackle various adverse situations while managing and developing
software.
 Learning about the functioning of the IT industry and work ethics
in the corporate world.
 Learning to work with C#.NET and MS SQL Server 2005.
 Learning about the different phases of software development and
the software engineering processes involved in the development of
software.

6.2 Main difficulties encountered

 The main difficulty that was encountered during this project was that we had to
learn a new technology ASP.net as well as a new language C# with which we
were not at all familiar with earlier .
 Time constraint.
 Learning the use of triggers.

7.2 Limitations

Since, every system has some limitations so our proposed system is also not
untouchable in this regard. The main limitations of our system are:

 Users have to remember 1 more parameter in his account is “KEY”.


 Chat is not proposed in this System.
 Imaging is not implemented in this project.
 Private messaging is not implemented.
12.BIBLIOGRAPHY
Website

 C# corner.com

 Codeproject.com

 Dynamicdrive.com

Books

 Microsoft Official Custom Workshop

 Microsoft ASP training kit 2.0 framework(70-528)

You might also like