Getting Started with ASP

Source: Internet
Author: User

First, Introduction 1. Concept

Asp. NET is part of the. NET Framework, a Microsoft technology, a server-side scripting technology that enables scripts in embedded Web pages to be executed by Internet servers, which can then be dynamically created on the Web server when requesting documents over HTTP.

2. Advantages

ASP. NET is a programming framework built on the common language runtime that can be used to build powerful WEB applications on the server. Compared to the previous WEB development model, ASP. NET provides several important advantages:


(1) Enhanced performance.

ASP. NET is the compiled common language runtime code that runs on the server. Unlike the explained predecessors, ASP. NET can take advantage of early binding, real-time compilation, native optimization, and out-of-box caching services. This is equivalent to significantly improving performance before writing lines of code.


(2) World-class tool support.

The ASP. NET Framework complements a large number of toolboxes and designers in the Visual Studio integrated development environment. WYSIWYG editing, drag-and-drop server controls, and automatic deployment are just a few of the features provided by this powerful tool .

(3) power and flexibility.

Because ASP. NET is based on the common language runtime, WEB application developers can take advantage of the power and flexibility of the entire platform. the. NET Framework class Library, message processing, and data access solutions are seamlessly accessible from the Web.

ASP. NET is also language-independent, so you can choose the language that best suits your application, or split the application across multiple languages.

In addition, the interoperability of the common language runtime guarantees that existing investments in COM-based development are preserved when migrating to ASP.


(4) simplicity.

ASP. NET makes it easy to perform common tasks, from simple form submission and client authentication to deployment and site configuration.

For example, the ASP. NET page framework enables you to build a user interface that clearly separates application logic from presentation code, and handles events in a simple form-processing model like Visual Basic.

In addition, the common language runtime simplifies development with managed code services such as automatic reference counting and garbage collection.


(5) Manageability .

ASP. NET uses a text-based hierarchical configuration system that simplifies the application of settings to server environments and WEB applications. Because the configuration information is stored as plain text, you can apply the new settings without the help of the local administration tools. This "0 local management" philosophy is also extended to the deployment of ASP. NET Framework applications. You can deploy an ASP. NET Framework application to a server by simply copying the necessary files to the server. You do not need to restart the server, even when you are deploying or replacing a running compiled code.


(6) scalability and availability.

The design of ASP. NET is designed with scalability in mind, adding features specifically designed to improve performance in clustered environments and multiprocessor environments.

In addition, processes are closely monitored and managed by the ASP. NET runtime, so that when the process behaves abnormally (leaks, deadlocks), new processes can be created in place to help keep the application always available for processing requests.


(7) Customization and Extensibility.

ASP. NET comes with a thoughtful architecture that allows developers to "insert" code at the appropriate level. In fact, you can extend or replace any subcomponents of the ASP. NET runtime with custom components you write. Implementing a custom authentication or State service has not been made easier.


(8) security.

With built-in Windows authentication and per-application-based configuration, applications are guaranteed to be secure

Second, ADO1. Concept

Ado. NET's name originates from ADO (ActiveX data Objects) and is a library of COM components used to access data in previous Microsoft technologies. The ADO name is used because Microsoft wants to show that this is the first data provider to use in a net programming environment

Microsoft's next-generation technology is a successor to the ADO component. The primary purpose is to access data on the. NET Framework platform. Provides a consistent object model to access and edit data from a variety of data sources, providing a consistent way of data processing for these sources.
Ado. NET saves and passes data by using XML format. Can be implemented with other platform applications to Exchange data with XML files.




3. Introduction to Objects(1) connection

Connection Object
You can establish a connection to the data source, and to the database, it is also responsible for initializing the database.

Transaction Object

Transactional objects, you need to organize a series of commands together to execute the objects that you need, that is, "either all is executed, or none is executed." Command Object
Commands can be executed against the data source, which is the execution of the SQL command for the database. Asp. NET programs can use command objects to send SQL commands to insert, delete, update, and query records for a data table.
Before you can use the command object to execute SQL commands, you need to establish a database connection using the Connection object.

DataReader Object
You can use the command object from the data source to execute commands that get "Read Only" (Read-only) and "Forward only" (forward-only) streaming data.
You can only read one row of data from the data source at a time to memory.
The data obtained is read-only and does not allow inserting, deleting, and updating records, which are intended to display query results.

(2) Middle

DataAdapter Object

DataAdapter Connect to the database, execute the query, and populate the DataSet.

When DataAdapter calls the Fill or Update method, all data transfers are done in the background. Each data provider for the. NET Framework has a DataAdapter object. DataAdapter can control the interaction with existing data sources. DataAdapter can also transfer changes to the dataset back to the data source.

(3) Not connected

DataSet Object

is the primary data storage tool in the ADO disconnected architecture. When populating a dataset, you must create a DataAdapter to populate the dataset.

A dataset represents a complete set of data, including tables, constraints, and table relationships. Datasets can store local data created by code, store data from multiple data sources, and disconnect from the database.
DataSet and DataTable objects
A DataSet object is a collection object that consists of a DataTable object and can represent a database that is stored in memory. Each DataTable holds record data for a data table and can set the correlation between data tables. belongs to the System.Data namespace and fills the data table data into the DataSet object using the method fill () of the DataAdapter class.
Rows can be inserted and deleted in a DataTable object, that is, the records of the data table are processed, and finally the data in the DataTable object is updated to the database using the DataAdapter class.

DataRow object

Represents a collection of DataRow (row) objects that can be enumerated.

DataColumn Object

DataColumn is the basic building block of the schema used to create the DataTable. Generate this schema by adding one or more DataColumn objects to the DataColumnCollection

DAtaview Object

A view in a similar database. DataView allows you to create a "view" on a DataTable that creates multiple views on a DataTable. Third, contrast

ASP. NET is the B/s (Web orientation) framework technology under Microsoft's. ADO is an umbrella of the data access layer written by the ASP.
In plain words: ASP. NET is used to write Web pages, and the Web must be connected to the database for data exchange. The technology used to exchange data is called ADO, and it is still written in the programming language of the current ASP. It's just a concept.
Ado. NET is the technology of data exchange, it can be used without ASP, including the use of WinForm, C + + MFC, WPF, ASP, and so on, if you like, you can use the ADO in the console program       In short:

ADO is a way of accessing the database and cannot be compared to ASP. NET is based on. Netframdwork Web Development Technology. In the database access mainly uses the ADO, the main performance object is: the DataSet memory load data Way!
Ado. NET is much better than the previous ADO approach or OLE DB performance ...
ADO is a later version of the update, using it to manipulate the data in the database!
VB.net is a subsequent upgraded version of VB6.0 that can be developed directly from Windows applications
ASP. NET is for developing Web applications!

Getting Started with ASP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.