online blogging

137
MAJOR -PROJECT ON BLOGGERS’ STOP Developed By Suprakas Sasmal BCA Roll No-821159064

Upload: suprakassasmal

Post on 12-Nov-2015

7 views

Category:

Documents


1 download

DESCRIPTION

Documentation on blogging

TRANSCRIPT

MAJOR -PROJECT ON BLOGGERS STOP

Developed By Suprakas Sasmal BCA Roll No-821159064

Project TitleBloggers 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:[email protected]

Index

01. Introduction

02. Software Requirements Specification 03. System Development Life Cycle.04. Analysis.06. Table Used In Database05. 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 others blog .User can also share their photos, document and delete their blogs/comments.

1.2 Survey

Bloggers Stop aims to develop a web application which aims at providing sharing views, documents, and photos to the different user and views others 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 PurposeA.2 ScopeA.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 consistentModifiable 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 FeasibilityMeaning: 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 projects2. 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, HTTPIt 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 resource2. HTTP is used to send the GET request to the Web server.3. The web server processes the request4. 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 browser10. HTTP is used to send the HTTP response to the web browse

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

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 serverThe 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

Complete?Construct and TestingDesign complete?Design PhaseFunction specification complete?

NO

YES

No

NO

Production and maintenanceGoing LiveAlthough Visual Studio combines most Web technology development into a single interface and assists and simplifies writing HTML and other file formats, 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: 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 scriptingIn 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 scriptsScripting 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.

Processing DataWeb client:BrowserWeb server: CGIScripts

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.

Web server:CGI scriptsyhhhData Web client: browserJavaScript vbScript

ProcessingProcessing

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 usermouse 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

User inputHTML form

Java script data validationNo No

Data Valid?

Yes

Submit data to serverValid Data

3.2 Feasibility Study

Feasibility studiesaim to objectively and rationally uncover the strengths and weaknesses of the existing business or proposed venture, opportunities and threats as presented by theenvironment, theresourcesrequired to carry through, and ultimately the prospects forsuccess.In its simplest term, the two criteria to judge feasibility arecostrequired andvalueto be attained.As such, a well-designed feasibility study should provide a historical background of the business or project, description of theproductor service, accounting statements, details of theoperations andmanagement,marketing researchand policies, financial data, legal requirements and tax obligations.]Generally, feasibility studies precede technical development and projectimplementation.

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.Hardwares 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 TestingMaintenanceImplementation 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 representationsThe 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/USB4.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 Chromeetc.

4.2.2 Front EndASP.NET Framework:The Microsoft.NET is a frameworkforMicrosoftWindowsoperating systems. It includes a largelibrary, and it supports severalprogramming languageswhich 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'sBase Class Libraryprovidesuser interface,data access,database connectivity,cryptography, webdevelopment, numericalgorithms, andnetwork communications. The class library is used by programmers, who combine it with their owncodeto produce applications.Programs written for the .NET Framework execute in asoftware(as contrasted tohardware) environment, known as theCommon Language Runtime(CLR). The CLR is anapplication virtual machineso that programmers need not consider the capabilities of the specificCPUthat will execute the program. The CLR also provides other important services such as security,memory management, andexception 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'sSDK for Windows 7 or .NET Framework 4(or newer) orVisual Studio 2010installed on your computer.

Principal design featuresInteroperabilityBecause 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 toCOMcomponents is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework; access to other functionality is provided using theP/Invokefeature.

Common Runtime EngineTheCommon 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 IndependenceThe .NET Framework introduces aCommon Type System, or CTS. The CTSspecificationdefines all possibledata typesandprogrammingconstructs supported by the CLR and how they may or may not interact with each other conforming to theCommon 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 LibraryTheBase 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 providesclasseswhich encapsulate a number of common functions, includingfilereading and writing,graphic rendering,databaseinteraction,XMLdocument manipulation and so on. Simplified DeploymentThe .NET Framework includes design features and tools that help manage theinstallationof computer software to ensure that it does not interfere with previously installed software, and that it conforms to security requirements. SecurityThe design is meant to address some of the vulnerabilities, such asbuffer overflows, that have been exploited by malicious software. Additionally, .NET provides a common security model for all applications. PortabilityThe design of the .NET Framework allows it theoretically to be platform agnostic, and thuscross-platformcompatible. 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 lightand theAlternative implementationssection below). Microsoft submitted the specifications for theCommon Language Infrastructure(which includes the core class libraries,Common Type System, and theCommon Intermediate Language), theC#language, and the C++/CLI language to bothECMAand theISO, 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.

ArchitectureCommon 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 forException 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 theCommon Language Runtime or CLR.AssembliesTheCILcode is housed in.NET assemblies. As mandated by specification, assemblies are stored in the Portable Executable(PE) format, common on the Windows platform for allDLLandEXEfiles. The assembly consists of one or more files, one of which must contain the manifest, which has themetadatafor 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, andpublic keytoken. 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 theGlobal Assembly Cache).MetadataAll CIL is self-describing through.NET metadata. The CLR checks the metadata to ensure that the correct method is called.Metadatais 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 programmingcapabilities 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 callingcode is granted a specified permission. The demand causes theCLRto 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 theCLRperforms various tests. Two such tests are validation and verification. During validation theCLRchecks that the assembly contains valid metadata andCIL, 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 usesApplication Domainsas a mechanism for isolating code running in aprocess. 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 theCLR.Class libraryThe .NET Framework includes a set ofstandardclass libraries. The class library is organized in a hierarchy ofnamespaces. Most of the built in APIs are part of eitherSystem.*orMicrosoft.*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 allCLI compliant languages. The .NET Framework class library is divided into two parts: the Base Class Library and the Framework Class Library.TheBase Class Library(BCL) includes a small subset of the entire class library and is the core set of classes that serve as the basicAPIof theCommon Language Runtime.The classes inmscorlib.dlland some of the classes inSystem.dllandSystem.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 lightandMono.TheFramework 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, includingWindows Forms,ADO.NET,ASP.NET,Language Integrated Query,Windows Presentation Foundation,Windows Communication Foundationamong others. The FCL is much larger in scope than standard libraries for languages like C++, and comparable in scope to thestandard libraries of Java.Memory managementThe .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 contiguouslyfrom 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 agraphof 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 collectorwhich runs periodically, on a separatethreadfrom the application's thread, that enumerates all the unusable objects and reclaims the memory allocated to them.The .NETGarbage 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, itrecursivelyenumerates all the objects reachable from the root objects and marks them as reachable. It uses .NET metadata andreflectionto 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 themarkphase.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 thencompacted 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 actuallygenerational.Objects are assigned ageneration; newly created objects belong toGeneration 0. The objects that survive a garbage collection are tagged asGeneration 1, and the Generation 1 objects that survive another collection areGeneration 2objects. 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.

VersionsMicrosoft 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 withWindows Server 2008andWindows Vista. Version 3.5 is included withWindows 7, and can also be installed onWindows XPand theWindows Server 2003family of operating systems. On April 12, 2010, .NET Framework 4 was released alongsideVisual Studio 2010.The .NET Framework family also includes two versions formobileorembeddeddevice use. A reduced version of the framework, the.NET Compact Framework, is available onWindows CEplatforms, includingWindows Mobiledevices such asSmartphone. Additionally, the.NET Micro Frameworkis targeted at severely resource-constrained devices.VersionVersion NumberRelease DateVisual StudioDefault in Windows

1.01.0.3705.02002-02-13Visual Studio.NET

1.11.1.4322.5732003-04-24Visual Studio.NET 2003Windows Server 2003

2.02.0.50727.422005-11-07Visual Studio 2005Windows Server 2003 R2

3.03.0.4506.302006-11-06Windows Vista, Windows Server 2008

3.53.5.21022.82007-11-19Visual Studio 2008Windows 7, Windows Server 2008 R2

4.04.0.30319.12010-04-12Visual 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. DLLS 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# languageC#(pronounced "see sharp")is amulti-paradigm programming languageencompassingimperative, declarative,functional,generic,object-oriented(class-based), andcomponent-orientedprogramming disciplines. It was developed byMicrosoftwithin the.NETinitiative and later approved as a standard byEcma(ECMA-334) and ISO(ISO/IEC 23270). C# is one of the programming languages designed for theCommon Language Infrastructure# is intended to be a simple, modern, general-purpose, object-oriented programming language.Its development team is led byAnders 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, whats 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 ModifiersC# supports the following access modifiers, which you can use when declaring a class, method, or property: Publica public class, method, or property has no access restrictions. Protecteda protected method or property can be accessed only within the class itself or a derived class. InternalAn 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. PrivateA 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. PublicA Public class, method, or property has no access restrictions. ProtectedA Protected method or property can be accessed only within the class itself or a derived class. FriendA 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 FriendA 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. PrivateA 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 ControlsThe 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. ValidationControlsThe 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 ControlsThe rich controls enable you to render things such as calendars, file upload buttons, rotating banner advertisements, and multi-step wizards. Data ControlsThe 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 ControlsThe navigation controls enable you to display standard navigation elements such as menus, tree views, and bread crumb trails. LoginControlsThe login controls enable you todisplay login, change password and registration forms. HTMLControlsThe HTML controls enable you to convert any HTML tag int server-side control.

ASP.NET controlsLabel 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 doesnt fit in the controls 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 followingThree values:. SingleLineDisplays a single-line input field.. MultiLineDisplaysa multi-line input field.. PasswordDisplaysa 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 dont 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 controls Text property.Styles of the Combo Box ControlValue 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.

DropDownListThis style is a drop-down list, from which the user can select one of its items but cant enter a new one.

SimpleThe control includes a text box and a list that doesnt 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 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): DayNameFormatEnables you to specify the appearance of the days of the week.Possible values are FirstLetter, FirstTwoLetters, Full, Short, and Shortest. NextMonthTextEnables you to specify the text that appears for the next month link. NextPrevFormatEnables you to specify the format of the next month and previous month link. Possible values are CustomText, FullMonth, and ShortMonth. PrevMonthTextEnables you to specify the text that appears for the previous month link. SelectedDateEnables you to get or set the selected date. SelectedDatesEnables you to get or set a collection of selected dates. SelectionModeEnablesyou to specify how dates are selected. Possible values are Day, DayWeek, DayWeekMonth, and None.

SelectMonthTextEnables 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 element when rendering as HTML.in source view, the panel control is represented as the element and can contained many controls. HyperLink ControlThe 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): EnabledEnables you to disable the hyperlink. ImageUrlEnables you to specify an image for the hyperlink. NavigateUrlEnables you to specify the URL represented by the hyperlink. TargetEnables you to open a new window. TextEnables you to label the hyperlink.

Validation Controls

Six validation controls are included in the ASP.NET 3.5 Framework: RequiredFieldValidatorEnables you to require a user to enter a value in a form field. RangeValidatorEnables you to check whether a value falls between a certain minimum and maximum value. CompareValidatorEnables you to compare a value against another value or perform a data type check. RegularExpressionValidatorEnables you to compare a value against a regular expression. CustomValidatorEnablesyou to perform custom validation. ValidationSummaryEnables 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 element.this control generates and 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):

AdvertisementFileEnables you to specify the path to an XML file that contains a list of banner advertisements. AlternateTextFieldEnables you to specify the name of the field for displaying alternate text for the banner advertisement image. The default value is AlternateText. DataMemberEnables you to bind to a particular data member in the data source. DataSourceEnables you to specify a data source programmatically for the list of banner advertisements. DataSourceIDEnables you to bind to a data source declaratively. ImageUrlFieldEnables you to specify the name of the field for the image URL for the banner advertisement. The default value for this field is ImageUrl. KeywordFilterEnables you to filter advertisements by a single keyword. NavigateUrlFieldEnables you to specify the name of the field for the advertisement link. The default value for this field is NavigateUrl. TargetEnables you to open a new window when a user clicks the banner advertisement.AdRotator control also supports the following event:AdCreatedRaised after the AdRotator control selects an advertisement but before the AdRotator control renders the advertisement.

Submitting Form DataThe 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): AccessKeyEnables you to specify a key that navigates to the Button control. CommandArgumentEnablesyou to specify a command argument that is passed to the Command event. CommandNameEnables you to specify a command name that is passed to the command event. EnabledEnablesyou to disable the Button control. OnClientClickEnablesyou to specify a client-side script that executes when the button is clicked. PostBackUrlEnablesyou to post a form to a particular page. TabIndexEnables you to specify the tab order of the Button control. TextEnablesyou to label the Button control. UseSubmitBehaviorEnables you to use JavaScript to post a form.Button control also supports the following method:FocusEnables youto set the initial form focus to the Button control.Button control also supportsthe following two events: ClickRaised when the Button control is clicked. CommandRaised when the Button control is clicked.

Using the LinkButton ControlThe 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): AccessKeyEnables you to specify a key that navigates to the Button control. CommandArgumentEnables you to specify a command argument that is passed to the Command event. CommandNameEnables you to specify a command name that is passed to the Command event. EnabledEnables you to disable the LinkButton control. OnClientClickEnables you to specify a client-side script that executes when the LinkButton is clicked. PostBackUrlEnables you to post a form to a particular page. TabIndexEnables you to specify the tab order of the LinkButton control. TextEnables you to label the LinkButton control. FocusEnables you to set the initial form focus to the LinkButton control.The LinkButton control also supports the following two events: ClickRaised when the LinkButton control is clicked.

CommandRaised when the LinkButton control is clicked. The CommandName and CommandArgument are passed to this event.

Using the ImageButton ControlThe 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): AccessKeyEnables you to specify a key that navigates to the ImageButton control. AlternateTextEnables you to provide alternate text for the image (required for accessibility). DescriptionUrlEnables you to provide a link to a page that contains a detailed description of the image (required to make a complex image accessible). CommandArgumentEnables you to specify a command argument that is passed to the Command event. CommandNameEnables you to specify a command name that is passed to the Command event. EnabledEnables you to disable the ImageButton control. GenerateEmptyAlternateTextEnables you to set the AlternateText property to an empty string. ImageAlignEnables 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. ImageUrlEnables you to specify the URL to the image. OnClientClickEnables you to specify a client-sidescript that executes when the ImageButton is clicked. PostBackUrlEnables you to post a form to a particular page. TabIndexEnables you to specify the tab order of the ImageButton control.ImageButton control also supports the following method:

6.2 Back End: SQL ServerMicrosoft SQL Server 2005 is a comprehensive, integrated data management and analysis software that enables organizations to reliably manage mission-critical information and confidently run todays 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 ExpressWhen you open Management Studio Express, a connection window with SQL Server will be opened, as Figure 1shows. 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 theServer namebox and choose theBrowser for moreoption 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 throughSQL Server Authentication. You will have to use theWindows Authenticationoption to gain access to the program. In our example, we will connect using Windows authentication.Management Studio Work AreaAfter connected, the work area of Management Studio Express is then presented, asFigure 2shows. This window possesses the following areas: Menu Bar, Toolbar,Object ExplorerandActive Files.

Figure 2. SQL Server Management Studio Express Work Area

Through theObject Explorerbox we can navigate among all of the SQL Server parts, especially the Databasesfolder, 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 overtheDatabasesfolder and choose theNew Databaseoption.

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 inFigure3. In theOptionspage, you will be able to set some of the new databases 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; andRestrict 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 tablesCreated the database, we will visualize and add the desired tables, diagrams andviews. To visualize our databases folders, we will expand theDatabasesobjects and, after that,Tables, through theObject Explorer. Once the database is open, the following foldersstructure is presented:

Database Diagrams: the entity-relationship diagrams are stored in this location; Tables: folder where the database tables are; Views: here stay all theviewsthat 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

Lets 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 NameData TypeAllow NullsDescription

FnameVarchar(50)noFirst name of user

lnameVarchar(50)noLast name of user

emailVarchar(50)noEmail Id

PassVarchar(50)noPassword of user account

lognameVarchar(50)NoDesired log in name

genderVarchar(50)NoGender

dobVarchar(250)NoDate of birth

photoVarchar(500)NoProfile picture

quesVarchar(50)NoSecurity question

ansVarchar(50)NoAnswer of security question

highscVarchar(50)NoHigh school

collVarchar(50)NoCollege name

countryVarchar(50)NoCountry name

stateVarchar(50)Nostate

hometownVarchar(50)NoHome town of user

languagesVarchar(50)NoLanguages known

aboutmeVarchar(1500)NoAbout the user

statusVarchar(50)noUser 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 NameData TypeAllow NullsDescription

titlevarchar(100)noTitle of Blogs

msgvarchar(500)noContent Of image

fontvarchar(40)noFont style

colorvarchar(20)noFont color

sizeintnoFont Size

boldvarchar(10)no

italicvarchar(10)no

unlinevarchar(10)no

owneridvarchar(50)noBloggers Id

posttmvarchar(50)noPost Time

postdtvarchar(30)noPost Date

writervarchar(50)NoName 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 commentsColumn nameDate typeAllowDescription

titleVarchar(500)noTitle Of Massage

likeVarchar(50)noLike/Unlike

emailVarchar(500)noUser Email

FullnameVarchar(50)noFull Name Of user

slintnoSerial 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 nameDate typeAllowDescription

posterVerchar(250)noPoster Name

time1Verchar(250)noPost Time

msgVerchar(250)nomassage

commentsVerchar(500)noWritten Comment

emailVerchar(50)noEmail-id

slintnoSerial 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

titlewriter

deletupdatepasspic

e-idadd

commentView blogname

does

user

does

doesmsg

title

nameD&t

photo

Create blog

Share photo

7.SNAPSHOTS

8.CODING

STARTCode Behind The File

Imports System.IOPartial 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

_ _ 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 FunctionEnd 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 PropertyEnd Class

LOG-IN

Code Behind The File

Imports System.IOImports System.Data.SqlClientPartial 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 SubEnd Class

HOME

Code Behind The File

Imports System.Data.SqlClientPartial 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("alert('Blog Updated')") Catch ex As Exception Response.Write("alert('Error Occurred...Try Again')") 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 SubEnd 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("alert('Blog Created Successfully')") Response.Redirect("home.aspx") Catch ex As Exception Response.Write("alert('Some problem occurred...try again')") 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