Beginning ASP. NET 2.0 and Databases Study Notes (1)

Source: Internet
Author: User
Tags configuration settings classic asp sql server express

The services (and corresponding namespaces) offered by these class libraries include the following:

  • System Types (System ):Includes definitions for most simple data types, conversion functions between types, some mathematical functions, arrays, and ways to handle exceptions.

  • Input/Output (System. IO ):Except des classes to read and write to data streams (for example, output to an external device such as a Pocket PC) and to files on drives.

  • Data Access (System. Data ):Except des classes to interact with external data, typically a database. this namespace has des most of ADO. NET, which is used by the ASP. NET 2.0 data controls, and thus is of participation ular interest to this book.

  • Security (System. Security ):Except des the classes to implement the foundations of security, and the system of permissions.

  • Data Structures (System. Collections ):Except des classes to organize and maintain sets of data. NET including lists, dictionaries, and hash tables. (Note that the System. data names-pace is for communicating with sets of external data .)

  • Configuration (System. Configuration ):Except des classes to establish configuration settings and to handle errors using the settings.

  • Networking (System. Net ):Except des classes to work with networking protocols such as IP and Sockets.

  • Reflection (System. Reflection ):Except des classes that allow a program to look at itself to identify its own characteristics, such as specialty data types and the organization of the code.

  • Globalization (System. Globalization ):Except des classes that hold culture-specific settings such as syntax of dates and currency.

  • Painting and Drawing (System. Drawing ):Provided des classes that can interface with the graphical user interface. This namespace provided des provided classes for specific types of renderings, including Pen, Brush, and Imaging.

  • Tracing and Diagnostics (System. Diagnostics ):Using des classes to analyze problems, including the dissection of system processes, process counters, and event logs.

  • Windows (Client) Application Model (System. Windows. Forms ):Except des classes that allow implementation of the Windows user interface.

  • Web Application Model (System. Web ):Includes classes that provide a programming model for producing Web pages. the Web page code runs on the server and renders HTML to the client's browser. this class implements des over a dozen subclasses that focus on various types of browsers and server services. these are of great interest in this text because System. web is, essentially, ASP. NET.

Note that the. NET Framework contains two application programming models, one for client applications (System. Windows. Forms) and one for Web-based applications (System. Web ).

ASP. NET also introduces Web programming innovations that greatly improve the development model over classic Active Server Pages (ASP ):

  • Language-independence:Because ASP. NET is part of. NET Framework, ASP. NET applications can be constructed in the language of your choice, for example Visual C #, Visual Basic. NET, or J #. classic ASP (versions 1, 2, and 3), on the other hand, was generally used only with JScript or VBScript pages.

  • Compiled instead of interpreted:Unlike classic ASP, which interprets programming instructions every time the page is requested, ASP. NET dynamically compiles pages on the server into native programming instructions that can be run much, much faster. frequently, an ASP. NET page will run an order of magn1_faster than the same page written in Classic ASP.

  • Event-driven programming model:In classic ASP, pages are always executed in a top-down linear fashion, and HTML markup is often mixed in with the programming instructions. anyone with experience in Classic ASP knows that this can make your pages difficult to read, and even more difficult to maintain. ASP. NET introduces an event-driven model that allows you to separate code from markup content and to factor code into meaningful units for handling specific tasks, such as responding to a button click from the client. this VB-like eventing model greatly improves the readability and maintainability of your pages.

  • Server controls:Classic ASP requires you to dynamically construct a page rendering by piecing together HTML fragments in code, which often results in writing the same code over and over again loss SS your applications. (How many times have you constructed a table of data from a database query ?) One of the great advancements that ASP. NET brings to Web programming is Microsoft's encapsulation of code to perform common behavior into server controls that can be easily reused within an application.Server controlIs created declaratively, just like an HTML tag, but represents a programmable object on the server that can interact with your code and output a custom dynamic HTML rendering. ASP. NET registrdes over 80 server controls that encapsulate behavior that ranges from standard form elements to complex controls such as grids and menus.

  • Design time improvements to controls (when used with Visual Web Developer ):Developers can decrease the time it takes to develop a complex page by using design time interfaces such as the Smart Tasks panels, tag-level navigation bars, and wizards that can set control properties.

A number of data source controls are available for your types of databases and even nonrelational data sources. although additional controls are already in development by third parties, the following five data source controls ship with ASP. NET 2.0:

  • SqlDataSource control:To connect to the Microsoft SQL Server and other T-SQL databases that have a managed provider

  • AccessDataSource control:To connect to Microsoft Access files (extension of. MDB)

  • ObjectDataSource:To connect to middle-tier business objects

  • XmlDataSource:To connect XML content

  • SiteMapDataSource:To connect XML files in the format of the ASP. NET 2.0 site map (or site data through a custom provider)

Data-bound controls include parameters that are familiar from ASP. NET 1.X, As well as some that are completely new for ASP. NET 2.0:

  • GridView and DataGrid:For tabular data. GridView is new for version 2, whereas the legacy DataGrid remains largely unchanged for ASP. NET 1.X.

  • DetailsView and FormView:Display data for one record at a time.

  • DataList and Repeater:Display multiple data records in flexible layouts defined by the page programmer.

  • ListBox, DropDownList, BulletedList, CheckBoxList, and RadioButtonList:Display a group of options with the expectation that the user will make a selection.

  • AdRotator:Display an advertisement from a store of advertisements. This control was offered in ASP. NET version 1.XBut has been updated to be compatible with data source controls.

  • TreeView and MenuView:Display hierarchical data.

 

Review of Terminology

To round out the introductory material, this section provides a review of some of the terminology used throughout the book.

  • Access:An RDMS that is based on the MDB (Access) file format, the JET engine, and a series of tools for building and using databases. access is inexpensive, easy to learn, widely understood, and currently deployed on login machines. however, it does not support more than a few concurrent users.

  • ADO. NET:A collection of classes that acts as an intermediary between data stores (such as Access or an XML file) and a data consumer (such as an ASP. NET page ).

  • ASP. NET:A set of class libraries in the. NET Framework for building and running dynamic Web applications.

  • Command:An ADO. NET object that represents a SQL statement that can be passed to a database.

  • Common Language Runtime (CLR ):The. NET runtime environment. It enables programmers to write in one of these languages, and then compile the code to a single, uniform language for deployment.

  • Connection:An ADO. NET object that represents a unique path between a data consumer and data provider.

  • Data Engine (MSDE ):Similar to SSE, but based on an earlier version of the SQL Server engine. MSDE will work for the exercises in this book.

  • Data store:A place where data is kept and usually managed. All RDMS are data stores, but some data stores are not RDMS because they are not relational.

  • Database or Relational Database Management System (RDMS ):The software that enables reading and manipulation of data. most systems include tools to design and test databases as well as tools to optimize sets of procedures. an RDMS must store data in compliance with some form of normalization (a relational format ). these databases include SQL Server, Oracle, Access, and the other main database products.

  • Database schema (or database metadata ):The structure of the database, including the design of the tables and relationships. Schema does not include the actual data values.

  • Data-bound control:A server-side control that takes data from a data source control and renders it on the page. data-bound controls abstract from the programmer the HTML tags such as <table>. data-bound controls are available to render tables, lists, trees, and other structures.

  • Data source control:A server-side control that creates a connection to a database. it provides an alternative action of the data store and makes programming ASP. NET 2.0 pages faster and easier to build. data source controls are available for Microsoft SQL Server, Microsoft Access, XML, and other sources of data.

  • DataSet:An ADO. NET object representing a group of data organized into rows and columns.

  • Dynamic Web pages:Files stored on the Web server as code and then converted to HTML at the moment they are requested. when they are converted, they can take into account the real-time situation of the user and the owners of the Web site, and thus take different forms for different requests.

  • Extensible Markup Language (XML ):A markup language commonly used for data in which each value is stored and described. XML is not maid (the space required for the descriptions generally exceeds the size of the data), but it is easily read by partition different data management systems.

  • Integrated Development Environment (IDE ):A set of tools that assists programmers in developing code.

  • Internet Information Server (IIS ):A built-in Web server in Windows that serves Web pages to requestors via TCP/IP. IIS operating on Windows 2000,200 3, or Windows XP Professional has the capability to use. NET 2.0 Framework classes to serve ASP. NET 2.0 Web pages.

  • JET:A database engine that runs in the background and uses MDB (Access) files. JET accepts commands directly from other software (such as. NET or Access) to read or modify MDB files.

  • NET Framework:A group of classes written by Microsoft that make applications easier and faster to develop and more suitable for operation over the Internet.

  • Parameter:An ADO. NET object that represents a variable piece of data that can be sent to the SQL Server with the Command Object (SQL statement) and inserted by the SQL Server prior to execution of the statement

  • Server control:An object that derives from System. web. UI. control that performs its tasks on the server to contribute to an HTML page that is sent to the browser. server-side controls can maintain a state through ViewState.

  • SQL Server:An enterprise-strength RDMS designed to support large amounts of data and concurrent users.

  • SQL Server Express (SSE ):A database engine (currently free) based on the Microsoft SQL Server database engine. unlike SQL Server, SSE is limited in the number of simultaneous data connections it can serve and has only a few utilities. this book uses SSE in most examples.

  • Structured Query Language (SQL ):A language used by data consumers to request a read or write from a data provider. For over a decade, SQL has been the standard for communication with an RDMS.

  • ViewState control:A string (frequently very long) that describes the current state of the page and is posted back to the server when the page is refreshed. the server uses the ViewState string to then take the next appropriate action for the user.

  • Visual Studio ():A very powerful IDE that is optimized for. NET development. Visual Studio supports des an editor to design pages, an Explorer-like file manager, and development tools increase developer productivity.

  • Visual Web Developer Express (VWD ):Another IDE from Microsoft that is similar in look and feel to VS but with a balanced CED set of features. Currently VWD Express is free, so we use it in this book.

  • Web Page Editor:Software that allows pages to be opened and changed. one of the most basic editors is Notepad. visual Studio, Visual Web Developer, and ASP. NET Web Matrix include an editor with other tools to improve productivity.

Related Article

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.