Menu:

Recent Entries

Categories

Archives

Links

Blogs
- Dflying's Night
- David's Untitled Life
- Dflying's Blog in Chinese

This blog is hosted by DreamHost!

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

Dflying | 20 April, 2006 05:42

I want to introduce some of the more advanced Atlas Sys.UI.Data controls in this series, including:

  1. Sys.UI.Data.ListView: Display Listible Data Using ASP.NET Atlas ListView Control
  2. Sys.UI.Data.ItemView: Display One Item in a Collection using ASP.NET Atlas ItemView Control
  3. Sys.UI.Data.DataNavigator: Paging Your List Using ASP.NET Atlas PageNavigator Control
  4. Sys.UI.Data.SortBehavior: Sorting Your List Using ASP.NET Atlas SortBehavior
  5. Sys.UI.Data.XSLTView: Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

This is the fifth, also the last post: Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

 (More)

Posted in Atlas . Comment: (62). Trackbacks:(413). Permalink

Sorting Your List Using ASP.NET Atlas SortBehavior

Dflying | 19 April, 2006 00:18

I want to introduce some of the more advanced Atlas Sys.UI.Data controls in this series, including:

  1. Sys.UI.Data.ListView: Display Listible Data Using ASP.NET Atlas ListView Control
  2. Sys.UI.Data.ItemView: Display One Item in a Collection using ASP.NET Atlas ItemView Control
  3. Sys.UI.Data.DataNavigator: Paging Your List Using ASP.NET Atlas PageNavigator Control
  4. Sys.UI.Data.SortBehavior: Sorting Your List Using ASP.NET Atlas SortBehavior
  5. Sys.UI.Data.XSLTView: Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

This is the fourth post: Sorting Your List Using ASP.NET Atlas SortBehavior

 (More)

Posted in Atlas . Comment: (1). Trackbacks:(302). Permalink

Paging Your List Using ASP.NET Atlas PageNavigator Control

Dflying | 17 April, 2006 23:33

I want to introduce some of the more advanced Atlas Sys.UI.Data controls in this series, including:

  1. Sys.UI.Data.ListView: Display Listible Data Using ASP.NET Atlas ListView Control
  2. Sys.UI.Data.ItemView: Display One Item in a Collection using ASP.NET Atlas ItemView Control
  3. Sys.UI.Data.DataNavigator: Paging Your List Using ASP.NET Atlas PageNavigator Control
  4. Sys.UI.Data.SortBehavior: Sorting Your List Using ASP.NET Atlas SortBehavior
  5. Sys.UI.Data.XSLTView: Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

This is the third post: Paging Your List Using ASP.NET Atlas PageNavigator Control

 (More)

Posted in Atlas . Comment: (70). Trackbacks:(615). Permalink

Introduction to Atlas Controls in Namespace Sys.Data – DataView and DataFilter

Dflying | 15 April, 2006 20:54

This is the third, also the last part of introductions to Sys.Data controls. In my previous posts, we know how to get data from server side and store in client side by using DataSource controls and how to modify the data we get on client side by using DataTable object. We can display the data in the DataTable right now to user but in most cases we need to do some decorations before showing, for example, we may need to page our data if it contains thousands of rows, or our user may be only interested in some of the data such as Dflying’s data. That’s the reason why we have to introduce the DataView and DataFilter objects. Now let’s see how to decorate our data for UI controls by using DataView object and DataFilter object.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(191). Permalink

Introduction to Atlas Controls in Namespace Sys.Data – DataColumn, DataRow and DataTable

Dflying | 14 April, 2006 20:39

In this post we are going to touch the key client side data components of Atlas – the DataTable, which is used to represent a tabular data structure. The DataTable object connects the actual data – the DataSource and the UI control – the ListView. It is the data field of a DataSource object, and can also be decorated by a DataView object by filtering and sorting the rows or doing the page navigations. Here Atlas also shares the ASP.NET/ADO.NET concepts: the Atlas DataSource is similar with ADO.NET SqlDataSource, the Atlas DataTable is similar with ADO.NET DataTable and the Atlas ListView is similar with ASP.NET ListView. Pretty easy to understand, isn't it? A DataTable contains a collection of DataColumn objects and a collection of DataRow objects, so let's begin with the DataColumn and DataRow.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(19). Permalink

Introduction to Atlas Controls in Namespace Sys.Data – DataSource and XMLDataSource

Dflying | 14 April, 2006 06:14

Since there are no introductions or official documents about the Atlas controls in namespace Sys.Data, and data accessing is so important a part is current web applications, I decided to share some of my ideas and experiences on this part of Atlas by a series of posts. Hope may help. Please keep in mind that this series is just the introductions. That is, I will only tell how to use these controls but not how they are implemented or worked. If you are interested in the more advanced topics, please be a little patient for I prefer finishing this kind of introduction series firstly. By the way, I am still in the progress of learning, so anything incorrect please point me out directly. And, any ideas please shout out by commenting down.

You have to manage data in most of your web applications. I mean retrieving and displaying to user and saving back to database after modifying. This is a common task that we have to perform in almost every project, so ASP.NET abstract it as a build-in object, DataSource. Atlas client side script library, as well as ASP.NET, has the same concept of DataSource.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(636). Permalink

Build Your Own Actions in ASP.NET Atlas

Dflying | 13 April, 2006 03:09

Components derived from the Action class in Atlas are used to specify the code to execute in response to events, which is similar to the event handlers. Action components enable you to declaratively bind actions to client events for common tasks such as calling methods, setting properties, and triggering PostBacks.

The best reference of Atlas is the source code you know, and we can find there are three kinds of Atlas build-in Actions, which inherit from Sys.Action base class:

  1. Sys.InvokeMethodAction: Defines an action that calls a method.
  2. Set.SetPropertyAction: Defines an action that sets an object property to a specified value.
  3. Sys.WebForms.PostBackAction: Defines an action that performs a PostBack.
 (More)

Posted in Atlas . Comment: (100). Trackbacks:(858). Permalink

Build Your Own Behaviors in ASP.NET Atlas

Dflying | 12 April, 2006 00:30

Behaviors in Atlas are used to define what a control will behave when an event got fired. Behaviors encapsulate actions that can be associated with DHTML events, such as the click or hover events. They can also be a kind of components that can be attached to the client control to provide more sophisticated UI and behavioral characteristics, including complex operations such as drag-and-drop behavior, auto-completion, and floating actions. They are defined in a collection named behaviors on the client control.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(192). Permalink

Atlas Client Side JavaScript Debugging

Dflying | 09 April, 2006 20:36

Introduction

It is much more challenging to write Atlas code than C# code, for there’s no compile time check or IntelliSence in coding, and you have to trace the traffic between the client and server in runtime. Still there’s no powerful IDE/debugger for JavaScript.

I’ve been working on Atlas for about half a year, and in this post I want to share some of my knowledge and experiences about Atlas debugging issues to make life easier.

 (More)

Posted in Atlas . Comment: (62). Trackbacks:(486). Permalink

Display One Item in a Collection using ASP.NET Atlas ItemView Control

Dflying | 08 April, 2006 20:36

I want to introduce some of the more advanced Atlas Sys.UI.Data controls in this series, including:

  1. Sys.UI.Data.ListView: Display Listible Data Using ASP.NET Atlas ListView Control
  2. Sys.UI.Data.ItemView: Display One Item in a Collection using ASP.NET Atlas ItemView Control
  3. Sys.UI.Data.DataNavigator: Paging Your List Using ASP.NET Atlas PageNavigator Control
  4. Sys.UI.Data.SortBehavior: Sorting Your List Using ASP.NET Atlas SortBehavior
  5. Sys.UI.Data.XSLTView: Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

This is the second post of the series: Display One Item in a Collection using ASP.NET Atlas ItemView Control

We need to display user a detailed view about our items in a collection, such as the details about your product in a shopping application. ASP.NET Atlas ItemView client side control provides this feature for you, just like the ASP.NET server control DetailsView behaviors, but it runs totally on the client side.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(96). Permalink

Display Listible Data Using ASP.NET Atlas ListView Control

Dflying | 08 April, 2006 06:27

I want to introduce some of the more advanced Atlas Sys.UI.Data controls in this series, including:

  1. Sys.UI.Data.ListView: Display Listible Data Using ASP.NET Atlas ListView Control
  2. Sys.UI.Data.ItemView: Display One Item in a Collection using ASP.NET Atlas ItemView Control
  3. Sys.UI.Data.DataNavigator: Paging Your List Using ASP.NET Atlas PageNavigator Control
  4. Sys.UI.Data.SortBehavior: Sorting Your List Using ASP.NET Atlas SortBehavior
  5. Sys.UI.Data.XSLTView: Apply XSLT to XML Using ASP.NET Atlas XSLTView Control

This is the first post: Display Listible Data Using ASP.NET Atlas ListView Control.

You have to find a way to show user a table of data in most of the current web applications. Just like the ASP.NET GridView server control does, Atlas ListView control provides the same behavior on client side in the AJAX way. Though you can use traditional ASP.NET GridView server control and then simply add an Atlas UpdatePanel to let you GridView work in AJAX way, but this is low efficient and not the ‘pure’ Atlas way. You may need to use the full client side Atlas control ListView to make it better. Do not be afraid, this is just as simple as the GridView with similar concepts such as ItemTemplate, but keep in mind there’s no IntelliSence provided by the IDE so you must pay more attention on typing the code.

 (More)

Posted in Atlas . Comment: (58). Trackbacks:(860). Permalink

Build Your Own Validators in ASP.NET Atlas

Dflying | 06 April, 2006 20:08

Validators are a powerful way of checking the data entered by the user into ASP.NET Atlas client side controls of type InputControl, such as the Web.UI.TextBox control. If you are familiar with ASP.NET, you must know the validators provided by ASP.NET as server controls. Atlas validators provide the same behavior but runs totally on client side. There are a number of built-in validators:

  1. requiredFieldValidator. Checks that data was entered.
  2. typeValidator. Checks the type of the data, such as Number.
  3. rangeValidator. Checks the input value between an upper and lower bound.
  4. customValidator. Defines a custom expression handler.
  5. regexValidator. Checks the data using a regular expression. The regular expression value must be delimited with "/" characters.
 (More)

Posted in Atlas . Comment: (2). Trackbacks:(89). Permalink

Build Your Own Transformers in ASP.NET Atlas

Dflying | 05 April, 2006 07:53

Binding in ASP.NET Altas is really a powerful way to connect two objects (You may find more info about binding here: http://dflying.dflying.net/1/archive/109_atlas_unleashed-bindings.html). Atlas will automatically apply the changes of the property in source object to the target object if you bind them together. But what if you want to have some modifications to the data before applying? Say if you want to show user a list with item indexes, and you want the indexes start at 1 instead of the default JavaScript start index 0. Here you should use the Atlas transformer. A transformer in Atlas is something just like a pipe connects the source binding and target binding, which filters/decorates/transforms the incoming value in some way (in this case is add 1) and then applies to the outgoing value.

Atlas provides some build in transformers such as Add, Multiply and Compare. But you may also need to create your own transformers in the real world development. Let’s see how to build your own transformers by going through a CustomBooleanTransformer demo.

 (More)

Posted in Atlas . Comment: (117). Trackbacks:(592). Permalink

Atlas Unleashed - Bindings

Dflying | 04 April, 2006 00:37

Atlas provides a binding model which is much more powerful than the data-binding model in ASP.NET. It is quite a flexible binding mechanism; just something like the binding models in WPF (Windows Presentation Foundation).Atlas binding lets you bind any property of one component to any property of another object. It may connect everything in Atlas. Therefore we call them bindings, not only the data-bindings, for we can even bind the style of one control to a property of another control.

In this post, I will try to explain what is inside this and how Atlas makes this work by zooming in the Atlas framework code.

 (More)

Posted in Atlas . Comment: (2). Trackbacks:(403). Permalink

Prefer Web Services to Page Methods in Atlas Server Side Implementation

Dflying | 03 April, 2006 01:42

There are two ways to expose a server side method to the client side Atlas controls, Web Service and Page Method. The one I prefer is the Web Service way.

The important thing everyone should keep in mind is that the Page Method calls and Web Service calls work very differently from each other. In the Web Services case, a simple call is made, passing only your method parameters as data. On the other hand, a call to a Page Method is much more heavy weight, for it includes the content of ALL your form fields, also the large ViewState. On the server, it works almost the same as a PostBack. That is, all your server controls receive their states before the method is called. That is what makes it possible to access your controls' values from the method.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(92). Permalink

Atlas UpdatePanel Tips and FAQs

Dflying | 31 March, 2006 06:28

The first Atlas control a developer may use should be the UpdatePanel, which is really powerful and easy to use. It provides us a closer view of Atlas.

I’ve posted a simple introduction (http://dflying.dflying.net/1/archive/96_introduction_to_atlas_updatepanel.html) to UpdatePanel here and got a lot of questions in the Chinese community. So I think it is better to summarize this kind of questions and answers to a single post about UpdatePanel tips.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(533). Permalink

Building a Real Time ProgressBar using ASP.NET Atlas

Dflying | 27 March, 2006 23:44

That will be very cool and useful if you can show your user a ProgressBar on a web page which displays the actual progress of some long operations. Now let’s try to make it possible by using ASP.NET Atlas. This post can also show you some basic conceptions about extending Atlas client side controls. Also, the source code and demo can be downloaded here.

The basic ideas to implement this will be easy. Build an Atlas client side control and query a service to find how much we’ve done every tick. Then get the response and update the UI of progress bar. So in this demo, we separate the code into four parts:

  1. Web Service which processes a time consuming task.
  2. Web Service which is used to query the time consuming task and get the progress.
  3. Client side Atlas ProgressBar control which renders the UI and client side logic. This is the core component of the demo and can also be reused in other pages/projects without any changes.
  4. ASP.NET page contains the Atlas controls and Web Service references, which runs the application.
 (More)

Posted in Atlas . Comment: (26). Trackbacks:(5418). Permalink

Introduction to Atlas UpdatePanel

Dflying | 24 March, 2006 20:08

UpdatePanel is so important an Atlas control that connects the traditional ASP.NET application and the new Web 2.0 AJAX implementation. That is, if you own applications wrote by ASP.NET, you do not need to take many changes to get it runs as the cool AJAX way by using UpdatePanel. Or, if you are not familiar with the whole branch of AJAX staffs such as JavaScript/DOM, UpdatePanel provides you a very simple way to use AJAX by warping you dynamic contents in an UpdatePanel, just like the Magic AJAX Framework does.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(193). Permalink

Introduction to Atlas DataTable

Dflying | 15 March, 2006 05:50

Atlas provides Web.Data.DataTable control which is just like the behavior of ADO.NET DataTable object and the Atlas Framework can also make the conversion between the two types for you automatically. Here are some common operations on Atlas DataTable.

Get DataTable from server

Server side code in C#:

[WebMethod]
public DataTable GetDataTable()
{
    DataTable dt = new DataTable();
 
    dt.Columns.Add(new DataColumn("FirstName", typeof(string)));
    dt.Columns.Add(new DataColumn("LastName", typeof(string)));
    dt.Columns.Add(new DataColumn("Email", typeof(string)));
 
    dt.Rows.Add("Dflying", "Chen", "dflying@dflying.net");
    dt.Rows.Add("Someone", "Else", "someone@someone.net ");
 
    return dt;
}

Client side code in JavaScript:

function getDataTable() {
    MyWebService.GetDataTable(onComplete);
}
function onComplete(result) {
    var dataTable = result; 
}

 (More)

Posted in Atlas . Comment: (72). Trackbacks:(492). Permalink

Atlas Drag & Drop Overview

Dflying | 13 March, 2006 04:53

The Atlas framework provides amazing cross-browser support for drag & drop operations. Basically, to create a UI with drag & drop is really simple and we just need:

 (More)

Posted in Atlas . Comment: (2). Trackbacks:(310). Permalink

Extending the AutoCompleteExtender in Atlas

Dflying | 12 March, 2006 00:20

The recent release of Atlas introduces the concept of ExtenderControls. Extenders are server controls that allow extending a set of ASP.NET server controls by adding client side functionality.

Basically, an ExtenderControl

 (More)

Posted in Atlas . Comment: (1). Trackbacks:(2). Permalink

Atlas Hello World

Dflying | 11 March, 2006 23:42

Let's begin with the classic ‘Hello World!’ example.

The HelloWorld.aspx page has one button. When the button is clicked, data is retrieved from the server and displayed in an alert box.

One of the core features of Atlas is getting data form web server by asynchronous calls. In this example we'll see how to make it, that is, how to retrieve data from the server without doing a traditional ASP.NET PostBack. To do this, we can invoke a server method from client code.

Using Atlas, we can  (More)

Posted in Atlas . Comment: (4). Trackbacks:(596). Permalink

ASP.NET Atlas Overview

Dflying | 11 March, 2006 21:23

Atlas is about Javascript OOP, AJAX, it offers client and server controls, cross-browser compatibility, UI enhancements, it supports flexible binding and a declarative programming style. Atlas integrates the ASP.NET server technology and allows to develop web applications.

At the moment, Atlas is a Preview Technology.

The January release of the Atlas CTP can be downloaded here.

This blog entry by Nikhil Kotari introduces some features of this release, while an Added/Fixed list can be found here.

 (More)

Posted in Atlas . Comment: (0). Trackbacks:(88). Permalink