Web Application - Introduction
Web Application - Introduction
Web Application - Introduction
NET Introduction
Rakesh Singh
NARESH I TECHNOLOGIES Hyderabad
0
Introduction to ASP.NET
ASP.NET
Web Application Development Platform
Building Web Based Application on .NET Platform
To Build Web Based Application on .NET Platform, We must use ASP.NET Web Application Framework or Web
Application Development Platform.
According to Microsoft, "ASP.NET is a web technology for building powerful, dynamic Web applications and is
part of the .NET Framework".
ASP.NET is an open source server-side Web application framework designed for Web development to
produce dynamic Web pages. It was developed by Microsoft to allow programmers to build dynamic web
sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET
Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on
the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET
language such as Visual C# or VB.Net.
ASP.NET provides a unified Web development model that includes the services necessary for you to build
enterprise-class Web applications. While ASP.NET is largely syntax compatible with Active Server Pages (ASP),
it provides a new programming model and infrastructure that allow you to create a powerful new class of
applications. ASP.NET is part of the .NET Framework and allows you to take full advantage of the features of
the common language runtime, such as type safety, inheritance, language interoperability, and versioning.
Microsoft
Initial Release
January 2002
Stable Release
Written in
.NET languages
Website
www.asp.net
ASP.NET is more than the next version of Active Server Pages (ASP); it provides a unified Web development
model that includes the services necessary for developers to build enterprise-class Web applications. While
ASP.NET is largely syntax compatible with ASP, it also provides a new programming model and infrastructure
for more scalable and stable applications that help provide greater protection. You can feel free to enhance your
existing ASP applications by incrementally adding ASP.NET functionality to them.
In other words you can say:
ASP.Net is a programming framework used to develop web applications and web services with the help of any
.NET compatible language such as C# or VB.NET. Basically it is next generation of classic asp. It provides the
easy way to build, deploy & run web application via any browser interface.
ASP.Net is a web development platform, which provides a programming model, a comprehensive software
infrastructure and various services required to build up robust web application for PC, as well as mobile devices.
.NET is language independent, which means we can use any .NET supported language to make .NET
applications. The most common languages for writing ASP.NET applications are C# and VB.NET. While VB.NET
is directly based on VB (Visual Basic), C# was introduced together with the .NET framework, and is therefore a
somewhat new language. Some people call C# "The .NET Language", but according to Microsoft, we can do all
the same things, no matter if we're using C# or VB.NET.
Prerequisites of ASP.NET:
Before proceeding with ASP.NET you should have a basic understanding of .NET programming language, text
editor and execution of programs etc. Because we are going to develop web based applications using ASP.NET
web application framework, so it will be good if you have understanding on other web technologies like, HTML,
CSS, and JavaScript etc.
These are following major elements:
.Net Framework SDK (Software Development Kit) 4.5/4.5.1
.Net Programming Languages:
Visual C#
Visual Basic.NET
Basic Knowledge of ADO.NET (ActiveX Data Object for .NET)
HTML (Hyper Text Markup Language)
CSS (Cascading Style Sheet)
JavaScript (Client-Side Script Language)
XML (Extensible Markup Language)
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
Page |2
Web Application:
A web application is an application that is accessed by users over a network such as the Internet or an intranet.
OR
A Web application is an application program that is stored on a remote server and delivered over the Internet
through a browser interface.
OR
A web based application is a software package that can be accessed through the web browser. The software
and database reside on a central server rather than being installed on the desktop system and is accessed over
a network.
OR
A web-based application is any application that uses a website as the interface (the front-end). Users access
the application from any computer connected to the Internet/Intranet using a standard browser, instead of
using an application that has been installed on their local computer.
OR
A web-based application is any application that uses a web browser as a client. The term may also mean a
computer software application that is coded in a browser-supported programming language (such as JavaScript,
combined with a browser-rendered markup language like HTML) and reliant on a common web browser to
render the application executable.
Web applications are popular due to the universality of web browsers, and the convenience of using a web
browser as a client. The ability to update and maintain web applications without distributing and installing
software on potentially thousands of client computers is a key reason for their popularity, as is the inherent
support for cross-platform compatibility. Common web applications include webmail, online retail sales, online
auctions, e-commerce, real-estate, hospitality and many others.
For example, most of us are familiar with Microsoft Word, a common word-processing application. Google Docs
is also a word-processing application, but users perform all the functions using any web browser instead of using
software installed on their computer. Web-based e-mail such as Gmail, Hotmail is another common web-based
application that performs the same functions as a traditional desktop application. Most any desktop software
can be developed as a web-based application.
OR
A web application is a collection of static and dynamic web pages. A static web page is one that does not
change when a user requests it: the web server sends the page to the requesting web browser without
modifying it.
In contrast, a dynamic web page is modified based upon client supplied input value by the server before it is
sent to the requesting browser. The changing nature of the page is why its called dynamic.
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
Page |3
Accessible anywhere:
Unlike traditional applications, web systems are accessible anytime, anywhere, via a PC with an Internet
connection, putting the user in charge of where and when they access the application.
Easily customisable:
The user interface of web-based applications is easier to customise than it is in desktop applications. This makes
it easier to update the look and feel of the application, or to customise the presentation of information to
different user groups.
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
Page |5
Improved interoperability:
Using internet technologies based on industry-wide standards, its possible to achieve a far greater level of
interoperability between applications than with isolated desktop systems. For example, it is much easier to
integrate a web-based shopping cart system with a web-based accounting package than it is to get two
proprietary systems to talk to each other. Web-based architecture makes it possible to rapidly integrate
enterprise systems, improving work-flow and other business processes.
Security
Web-based applications are typically deployed on dedicated servers, which are monitored and maintained by
experienced server administrators. This is far more effective than monitoring hundreds or even thousands of
client computers, as is the case with new desktop applications.
Conclusion:
Web-based applications are:
Easier to develop
More useful for users
Easier to install and maintain and keep secure
Easier to extend
Web applications commonly use a combination of server-side script (ASP, PHP, JSP, ASP.NET etc.) and clientside script (HTML, JavaScript, etc.) to develop the application. The client-side script deals with the presentation
of the information while the server-side script deals with all the hard stuff like storing and retrieving the
information.
Web Application resides with web server which will located under network server. Clients are going to interact
with web server via following some open standard:
1. Web Server:
It is software which is responsible to serve all the requests which are in the form of HTTP.
OR
A web server is software that serves files in response to requests from web browsers. A web server is sometimes
called an HTTP server. Common web servers include IIS, Netscape Enterprise Server, iPlanet Web Server, and
Apache Tomcat.
2. Web Browser:
It is software which resides on client system and it is responsible to make request in the form of HTTP and HTTP
is the open standard protocol which is applicable for different types of or all types of users. HTTP derived from
W3 ORG.
Presentation-oriented:
A presentation-oriented web application generates interactive web pages containing various types of markup
language (HTML, XML, and so on) and dynamic content in response to requests.
Service-oriented:
A service-oriented web application implements the endpoint of a fine-grained web service. Service-oriented Web
applications are often invoked by presentation-oriented applications. Presentation-oriented applications are
often clients of service-oriented web applications.
Web Services are a technology based on the concept of service oriented computing. Web services are standards
that integrate Web-based applications through connecting and sharing business processes across the network
where applications of different vendors, languages, and platforms communicate with each other and with clients.
Thus applications involve assembling components of Web services.
.NET Extensibility (on Windows 7 and Windows Server 2008) or .NET Extensibility 4.5 (on Windows 8 and Windows
Server 2012)
ASP.NET (on Windows 7 and Windows Server 2008) or ASP.NET 4.5 (on Windows 8 and Windows Server 2012)
ISAPI Extensions
ISAPI Filters
Request Filtering
Windows Authentication
Static Content
HTTP Activation
The procedure is slightly different for the different versions of Windows. For more details, see the following below sections:
5.
On the Start menu, choose Control Panel, and then choose Programs.
Under Programs and Features, choose Turn Windows features on or off.
In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
Expand Application Development Features, and select the following features:
o .NET Extensibility
ASP.NET
ISAPI Extensions
ISAPI Filters
o
6.
7.
Windows Authentication
Expand Common HTTP Features, and then select the Static Content feature.
To install Internet Information Service (IIS) Manager, under Internet Information Services, expand Web Management
Tools, and then select IIS Management Console.
This step is optional. You use Internet Information Service IIS Manager to manage local and remote web servers and
sites.
8.
9.
Note:
To open Internet Information Services (IIS) Manager, on the Start menu, in the Search Programs and Files box, type inetmgr,
and then press Enter.
8.
9.
On the Start page, choose Control Panel, and then choose Programs.
Under Programs and Features, choose Turn Windows features on or off.
In the Windows features dialog box, expand .NET Framework 4.5 Advanced Services, and then select ASP.NET 4.5.
Expand WCF Services, and then select HTTP Activation.
If the .NET Framework 3.50 is installed, then expand Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0), and
then select Windows Communication Foundation HTTP Activation.
In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
Expand Application Development Features, and select the following features:
o .NET Extensibility 3.5 (if .NET Framework 3.5 is installed)
ASP.NET 4.5
ISAPI Extensions
ISAPI Filters
Expand Common HTTP Features, and then select the Static Content feature.
Expand Security, and then select the following features:
o Request Filtering
Windows Authentication
10. To install Internet Information Service (IIS) Manager, under Internet Information Services, expand Web Management
Tools, and then select IIS Management Console.
This step is optional. You use Internet Information Service IIS Manager to manage local and remote web servers and
sites.
11. Choose the OK button to complete the installation.
12. To verify that the web server has been installed correctly, start your browser, and then type http://localhost in the
address.
The default web site opens and should display an IIS 8 image.
Note:
To open Internet Information Services (IIS) Manager, on the Start menu, in the Search Programs and Files box, type inetmgr,
and then press Enter.
Installing IIS:
IIS in Windows is still an optional Windows Feature. To install it, press the Windows + R key combination to bring up a run box,
then type appwiz.cpl and press enter.
This will open the Program and Features part of Control Panel, on the left hand side click on the Turn Windows features on or
off link.
Click Program and Features Option from above All Control Panel Items Window. This will open the Program and Features part
of Control Panel, on the left hand side click on the Turn Windows features on or off link.
Window Features will open. Now scroll down until you see Internet Information Services in the list. Go ahead and click in
the empty checkbox next to the title. It should turn into a small black square.
Note that having the black square instead of the checkmark just means that not all of the sub-items are being installed. For
example, by default, checking IIS will not install the FTP server option. If you want to install FTP Server, you have to expand
the + box and manually check it. Go ahead and click OK at this point and Windows 8 will install IIS 8. You shouldnt need
the DVD to install IIS.
After clicking OK, this dialog will appear on your screen for a while.
Next, you can then go to Control Panel and click on Administrative Tools. Here you will see Internet Information Services (IIS)
Manger. Youll get the familiar IIS console screen:
On the left hand side, you can expand out the server to see the list of sites. To start, you only have the Default Web Site,
which is stored under C:\inetpub\wwwroot.
Creating a Sample Website Using Plain HTML that contains following resources and setup this website in IIS
8 or you can say that required to host a website on a given web server i.e. IIS 8.
For Example:
D:\ - Physical Location on the Server Machine
SampleWebSite Website Folder
Images - Folder
Ads1.jpg
Ads2.jpg
Ads3.jpg
Ads4.jpg
Home.htm
AboutUs.htm
Services.htm
ContactUs.htm
Use the notepad text editor to create all web pages as following:
Home.htm:
<html>
<head>
<title>Home Page</title>
</head>
<body style="background-color: yellow">
<img src="Images/Ads1.jpg" width="100%" height="150" alt="This is Banner Image" />
<div align="center">
<a href="Home.htm">Home</a>
|
<a href="AboutUs.htm">About Us</a>
|
<a href="Services.htm">Services</a>
|
<a href="ContactUs.htm">Contact Us</a>
</div>
<hr />
<h1>::Home Page Contents::</h1>
</body>
</html>
AboutUs.htm:
<html>
<head>
<title>About Us Page</title>
</head>
<body style="background-color: Aqua">
<img src="Images/Ads2.jpg" width="100%" height="150" alt="This is Banner Image" />
<div align="center">
<a href="Home.htm">Home</a>
|
<a href="AboutUs.htm">About Us</a>
|
<a href="Services.htm">Services</a>
|
<a href="ContactUs.htm">Contact Us</a>
</div>
<hr />
<h1>::About Us Page Contents::</h1>
</body>
</html>
Services.htm:
<html>
<head>
<title>Services Page</title>
</head>
<body style="background-color: green">
<img src="Images/Ads3.jpg" width="100%" height="150" alt="This is Banner Image" />
<div align="center">
<a href="Home.htm">Home</a>
|
<a href="AboutUs.htm">About Us</a>
|
<a href="Services.htm">Services</a>
|
<a href="ContactUs.htm">Contact Us</a>
</div>
<hr />
<h1>::Services Page Contents::</h1>
</body>
</html>
ContactUs.htm:
<html>
<head>
<title>Contact Us Page</title>
</head>
<body style="background-color: lime">
<img src="Images/Ads4.jpg" width="100%" height="150" alt="This is Banner Image" />
<div align="center">
<a href="Home.htm">Home</a>
|
<a href="AboutUs.htm">About Us</a>
|
<a href="Services.htm">Services</a>
|
<a href="ContactUs.htm">Contact Us</a>
</div>
<hr />
<h1>::Contact Us Page Contents::</h1>
</body>
</html>
Once The Website is ready with their resources as shown above, You required to Host or setup a website on a given
web server i.e. IIS
Hosting a Web Site to an IIS Web Server:
These are following steps to host or setup a Website to an IIS Webserver:
1. Open IIS Manger
2. To setup a new website in IIS 8, expand Server (Machine Name) -> Sites -> Default Web Site
3. Right-Click on Default Web Site and choose Add Application and enter the details as following:
Once a Website is hosted on IIS Web Server, It can be accessed from the same machine or any other client machine in
the same network by making request to Webserver using Browser Interface as following:
1. Open Any Web Browser
2. Type the following URL:
From The Same Machine:
http://localhost/SampleWebSite/Home.htm
OR
http://MachineName/SampleWebSite/Home.htm
From Any Other Client Machine in the Same Network:
http://ServerMachineName/SampleWebSite/Home.htm
Or
http://IP Address/SampleWebSite/Home.htm
Output:
If you click any of the link such as Home, About Us, Services, Contact Us it redirects to their corresponding page to show
the page contents.
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
P a g e | 19
Perl
PHP
ASP
ColdFusion
Servlets
JSP
ASP.NET
ASP.NET:
ASP.NET is a most acceptable technology for creating strongest, dynamic & scalable Web applications.
ASP.NET is part of the .NET Framework and allows us to take full advantage of the features of the common
language runtime, such as type safety, inheritance, language interoperability, and versioning.
ASP.Net is a web development platform, which provides a programming model, a comprehensive software
infrastructure and various services required to build up robust web application for PC, as well as mobile devices.
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build
dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of
the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built
on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported
.NET language such as Visual C# or VB.NET.
File Name Extension: .aspx
ASP.NET Versions:
The ASP.NET releases with the .NET Framework releases:
ASP.NET 1.0 (2002)
ASP.NET 1.1 (2003)
ASP.NET 2.0 (2005)
ASP.NET 3.0 (2006) Due to WCF (.Net Framework 3.0)
ASP.NET 3.5 (2007)
ASP.NET 3.5 Service Pack 1 (2008)
ASP.NET 4.0 (2010)
ASP.NET 4.5 (2012)
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
P a g e | 20
ASP.Net is a part of Microsoft .NET platform. ASP.Net applications are compiled codes, written using the
extensible and reusable components or objects present in .NET framework. These codes can use the entire
hierarchy of classes in .NET framework.
The ASP.Net application codes could be written in either of the following languages:
C# or VB.NET
ASP.Net is used to produce interactive, data-driven web applications over the internet. It consists of a large
number of controls like text boxes, buttons and labels for assembling, configuring and manipulating code to
create HTML pages.
ASP.NET Web pages, known officially as Web Forms, are the main building blocks for application development.
Web forms are contained in files with a ".aspx" extension; these files typically contain static (X)HTML markup,
as well as markup defining server-side Web Controls and User Controls where the developers place all the
content for the Web page. Additionally, dynamic code which runs on the server can be placed in a page within
a block <% -- dynamic code -- %>, which is similar to other Web development technologies such as PHP, JSP,
and ASP. With ASP.NET Framework 2.0, Microsoft introduced a new code-behind model which allows static text
to remain on the .aspx page, while dynamic code remains in an .aspx.cs or .aspx.vb file (depending on the
programming language used).
ASP.NET is a development framework for building web sites with HTML, CSS, JavaScript and Scripting.
HTML:
HTML stands for Hypertext Markup Language and it is the most widely used language on Web.
HTML is not a programming language, its just a markup language.
Hypertext: It refers to the way in which Web pages (HTML documents) are linked together. When you click a
link in a Web page, you are using hypertext.
Markup Language: It describes how HTML works. With a markup language, you simply "markup" a text
document with tags that tell a Web browser how to structure it to display.
CSS:
CSS stands for Cascading Style Sheet. And it is used to control the style of a web document in a simple and
easy way.
CSS handles the look and feel part of a web page. Using CSS, we can control the color of the text, the style of
fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors
are used, as well as a variety of other effects.
CSS provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined
with the markup languages HTML or XHTML.
JavaScript:
JavaScript is a scripting language produced by Netscape for use within HTML Web pages.
JavaScript is loosely-typed or weakly-typed language (in short a loosely-typed language is a language that does
not require a variable to be defined) and it is built into all the major modern browsers.
JavaScript is a lightweight, interpreted programming language that allows us to build interactivity into static
HTML pages.
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
P a g e | 21
.NET Framework
Keep the good parts of Classic ASP and improve the rest of things
Manageable
Secure
Tool support
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
P a g e | 22
C# (Pronounced C sharp)
ASP.NET Framework
ASP.Net Framework is used to create dynamic website, web application and web
services. It is built on the top of .NET Framework.
Asp.NET Framework provides you various capabilities like Hosting Model,
Site/Service Management, Protocol Abstraction, Security, Caching capability,
Routing and Model Binding etc.
Mainly, Asp.Net can be divides into two parts - Asp.Net Sites and Asp.Net Services.
Asp.NET Site:
There are following flavours of Asp.NET Site Web Forms:
This is the traditional event driven development model. It has drag and drop server controls, server
events and state management techniques. This best for rapid application development (RAD) with
powerful data access.
MVC:
This is a lightweight and MVC (Model, View, and Controller) pattern based development model. It
provides full control over mark-up and support many features that allow fast & agile development.
This best for developing lightweight, interactive and device oriented (i.e. compatible to smart
phones, iPhone, tablet, laptop etc.) web application with latest web standards.
Web Pages
This is also a lightweight and Razor syntax based development model. It has built-in template and
helpers also provide full control over mark-up. It is best for developing beautiful web application
with latest web standards. You can also use WebMatrix which is a free tool and has built-in
template; for developing Asp.Net Web Page.
SPA
SPA stands for Single Page Application which helps you to build web applications that include
significant client-side interactions using HTML5, CSS3 and JavaScript. It is best to make highly
interactive single page dashboard web applications.
Asp.NET Services
There are two ways to make Asp.Net Services as given below
Web API
Asp.Net Web API is a framework for building HTTP services that can be consume by a broad range
of clients including Browsers, Mobiles, iPhone and Tablets.
SignalR
ASP.NET SignalR is a library that simplifies the process of adding real-time web functionality to
applications. Real-time web functionality is the ability to have server code push content to
connected clients instantly as it becomes available, rather than having the server wait for a client
to request new data.
Visual Studio 2012
The Visual Studio IDE offers a set of tools that help you to write and modify the code for your
programs, and also detect and correct errors in your programs. Using Visual Studio 2012 you can
build Windows Store apps, desktop apps, mobile apps, ASP.NET web apps, and web services.
Copyright 2014 https://www.facebook.com/rakeshdotnet All Rights Reserved.
P a g e | 27