Category Archive.NET
.NET nhs on 09 Nov 2006
The next generation technology ASP.NET ‘Atlas’
Introduction
Developers are facing following problems while development of Web based applications :
- Limitations of HTML UI
- Complexities of JavaScripts
- Cross browser compatibility
Now a days, most of the browsers are having advance capabilities like :
- Support for programmable document object model (DOM)
- Capabilities to communicate directly between the client and the server without complete postback and round trip.
New generation of responsive web application like Microsoft Virutal Earth and Microsoft Windows Live , that provide UI features like drag and drop, and that process data in real time, are using these advance capabilities.
To create these web application is not an easy task. You have to code in JavaScript and understand browser DOMs, which differ between browsers. And JavaScript does not offer the full range of object-oriented, type-safe features that .NET Framework developers are used to. In short, creating client-oriented Web applications requires expertise with a new programming language and a new development platform.
This is where ASP.NET ‘Atlas’ comes in. ‘Atlas’ is a new ASP.NET Web development technology that integrates client script libraries with the ASP.NET 2.0 server-based development framework. ‘Atlas’ offers you the same type of development platform for client-based Web pages that ASP.NET offers for server-based pages. And because ‘Atlas’ is an extension of ASP.NET, it is fully integrated with server-based services. Using ‘Atlas,’ you can move significant portions of an application’s processing to the client, while retaining the ability to communicate with the server in the background. The result is that you can create ASP.NET pages with a rich, responsive UI and server communication.
‘Atlas’ and AJAX
In the world of Web development, the set of technologies available to create client-server communication and rich UI is collectively known as AJAX, for Asynchronous JavaScript and XML. AJAX is an approach to creating responsive and interactive Web pages that leverages the capabilities built into browsers. ‘Atlas’ enables you to create AJAX-style applications, and goes substantially beyond this to offer a complete framework for creating applications that can target the appropriate platform (client and server) for application tasks, providing the same level of programmability on both platforms.
What ‘Atlas’ Offers
The primary goal of ‘Atlas’ is to integrate client script features with the features ASP.NET on the server to provide a comprehensive development platform.
Client Features
For client-side development, ‘Atlas’ manages the complexity of JavaScript-based development and offers the following development features:
A consistent, object-oriented set of APIs for developing in JavaScript. You can create client code using OOP features that are familiar from working with the .NET Framework.
Automatic browser compatibility, so that no special coding is required to make your applications run in multiple browsers.
Client-script APIs and components that support rich UI features, such as drag-and-drop behavior. You can add these features to HTML controls with little or no coding.
A declarative model for client development that is similar to the declarative syntax for ASP.NET server controls.
Server Features
‘Atlas’ also integrates client scripting with ASP.NET server-side development, so you can handle application tasks wherever it makes the most sense. ASP.NET provides the following server-side features for ‘Atlas’ applications:
Web services that are useful to integrate with ‘Atlas’ applications, such as a profiles service.
ASP.NET Web server controls that automatically emit all the client script needed for ‘Atlas’ applications, so you do not need to write JavaScript code.
Integrated Visual Studio development tools for client-side development, which gives you debugging, statement completion, and other productivity-enhancing features.
Note : Reference ATLAS
.NET pushkar on 25 Aug 2006
Data Reader OR Data Adapter???????
The OleDbDataReader (and SQLDataReader) runs a query and provides once-only access to the results. The DataReader is appropriate for once-off recovery and display of data.
The OleDbDataAdapter (and SqlDataAdapter) runs a query and stores the results in a DataTable.
This is used when the results need to be counted, paged, sorted and so on.
A DataSet contains one or more DataTables
A DataTable stores data in a database-type row-and column format. It is an in-memory object which stores the information in rows and columns. The DataTable uses the DataAdapter’s ‘fill’ method to run the query and retrieve the data (and the field name and data type). The DataTable is a copy in memory to the data in the database and it does not remain connected to the database whilst it is scrolled or paged or sorted.
A DataRelation defines a logical relationship between two DataTables
A DataView provides a sorted or filtered view of the contents of a DataTable
The objects used to make connections, provide a connection string, open a connection and so on are contained in the Namespaces “System.Data” and “System.Data.OleDb” or (for SQL Server) “System.Data.SqlClient”
Most of the rest of the example code (and the DataGrid) is the same. These are the differences:-
Dim dap As OleDbDataAdapter
Dim dst As DataSet
The dataset is defined and then filled. This is the datasource for the Grid, which is then bound.
dst = New DataSet()
dap.Fill(dst,”text”)
grid.DataSource = dst.Tables(”text”)
grid.DataBind
Use DataReader when you need just to display the data in one go - which is not all that common.