Development of online RSS reader based on ASP.net Ajax technology (next article)

Source: Internet
Author: User

V. Logical layer Design

(i) Add RSS Channel

Before you start the real logic layer design, let's take a quick look at the following sketch 4. Figure 4 illustrates my understanding of the proposed implementation of the client data binding architecture for two important asp.net AJAX client controls-listview and DataSource, as well as MS Ajax official data.

Figure 4:asp.net The typical client data binding architecture recommended in the AJAX framework

From the above illustration, we can conclude that, in the actual combat environment (also in this case), when adding a new RSS channel, we do not need to immediately store this data in the server-side SQL Server database. Instead, it is temporarily stored in a data source control that is associated with the client control ListView. So you can guess that the DataSource control is a batch update operation-it supports temporary storage of client-modified data and ultimately updates the server-side database in batch mode. The two important methods in the sketch above-"Save" and "Load"-play an important role in this implementation logic.

In this section, we only need to temporarily store the user's newly entered RSS channel information on the client. Here, I encountered the first challenge in manipulating the ListView control. Now let's take a look at the corresponding source code.

List 1

<script language="javascript" type="text/javascript">
var g_RSSNameList;
function pageLoad(sender, args) {
g_RSSNameList=$find('RSSNameList');
…………
}
function Add_onclick() {
g_RSSNameList.addItem();
var index=datatable.get_length()-1;
datatable.getItem(index).setProperty('Rss_ID', index);
datatable.getItem(index).setProperty('Rss_Name', $find('txtRssName').get_text());
datatable.getItem(index).setProperty('Rss_URL', $find('txtRssUrl').get_text());
}



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.