UNIT-I
Introduction to ASP.NET
1.1 Overview of ASP.NET Framework
ASP.NET is a programming framework built on the .NET, and a powerful tool for creating dynamic and interactive web pages. In simple words, ASP.NET is an environment for building and delivering Web-server based applications. It offers features for simplified Web application development, deployment and maintenance. ASP.NET takes the dynamic Web application to the next level, offering Windows-like functionality and ease-of-use in the most complex applications.
ASP.NET 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 introduces two major features: Web Forms and Web Services.
1. Web Forms
Web pages with Web forms that will be accessible by a Web browser. Web Forms are Web pages that serve as the user interface for a Web application. An ASP.NET Web application comprises one or more Web Forms. A Web Form is a dynamic page that can access server resources.
For example, a traditional Web page can run script on the client to perform basic tasks. An ASP.NET Web Form, conversely, can also run server-side code to access a database, to generate additional Web Forms, or to take advantage of built-in security on the server.
Web Form does not rely on client-side scripting, it is not dependent on the client’s browser type or operating system. This independence allows you to develop a single Web Form that can be viewed on practically any device that has Internet access and a Web browser.
2. Web Services
“A software system designed to support inter-operable machine-to-machine interaction over a network.” i.e. A web service is a unit of managed code that can be remotely invoked using HTTP, that is, it can be activated using HTTP requests. Web services allows you to expose the functionality of your existing code over the network. Once it is exposed on the network, other application can use the functionality of your program. In simple words, a web service is a method of communication between two electronic devices over a network.
Consider a bus booking site. When user selects a bus and input all the information, he has to make the payment and for that the site requires user to select a mode of payment. If user selects CREDIT card as the mode of payment then user has to input all the credit card details. Now these details cannot be authenticated by the bus booking site , it has to request the bank to authenticate the details provided by the user. But how will it interact with the bank because the bank application can be developed in any technology . The bus booking site has no control over which technology the bank application has been developed.
That’s where web services comes into picture.
It makes the interaction between two applications possible. It accomplishes by serving the data in the standard format such as XML or JSON.
In our example the bus booking site will send all the CREDIT card related information. The bank application will then authenticate the credentials and then return appropriate response to the bus booking site.
1.1.1 Server-Side and Client-Side Scripting
A script is generally a series of program or instruction, which has to be executed on other program or application. As we know that the web works in a client-server environment. The client-side script executes the code to the client side which is visible to the users while a server-side script is executed in the server end which users cannot see.
Server-Side Scripting
A script is generally a series of program or instruction, which has to be executed on other program or application. As we know that the web works in a client-server environment. The client-side script executes the code to the client side which is visible to the users while a server-side script is executed in the server end which users cannot see.
Client-Side Scripting
Client-side scripting is performed to generate a code that can run on the client end (browser) without needing the server side processing. Basically, these types of scripts are placed inside an HTML document. The client-side scripting can be used to examine the user’s form for the errors before submitting it and for changing the content according to the user input. As I mentioned before, the web requires three elements for its functioning which are, client, database and server.
The effective client-side scripting can significantly reduce the server load. It is designed to run as a scripting language utilizing a web browser as a host program. For example, when a user makes a request via browser for a webpage to the server, it just sent the HTML and CSS as plain text, and the browser interprets and renders the web content in the client end.
1.2 Part of an ASP.NET Application
1.2 Part of an ASP.NET Application
The parts of an ASP.NET Web application include:
- Web Forms, or .aspx pages
Web Forms and .aspx pages provide the UI for the Web application.
- Code-behind pages
Code-behind pages are associated with Web Forms and contain the serverside code for the
Web Form.
- Configuration files
Configuration files are XML files that define the default settings for the Web application
and the Web server. Every Web application has one Web.config configuration file. In
addition, each Web server has one machine.config file.
- Global.asax file
Global.asax files contain the needed code for responding to application level events that are
raised by ASP.NET.
- XML Web service links
XML Web service links allow the Web application to send and receive data from an XML
Web service.
- Database connectivity
Database connectivity allows the Web application to transfer data to and from database
sources.
- Caching
Caching allows the Web application to return Web Forms and data more quickly after the
first request.
Post a Comment