ASP.NET 2.0 Beta 1研究总结

By Ben


ASP.NET 2.0 Beta 1研究总结

 1. 课题简介

ASP.NET 2.0 的出现, 更方便了开发者的系统开发, 更全面强大的设计工具Visual Studio .Net 2005 beta1 大大提高开发效率.

2. 研究过程

2.1. 概述

VS.NET 2005 beta1 以强大的IDE环境, 加上豪华的功能开发界面, ASP.NET 1.1开发量比较大的部分编码变成可视化无代码设计. 结合建模工具使开发更科学严谨有序. 强大的新控件实现更人性化功能更强大的ASP.NET 2.0  ……

2.2. 研究环境

(Virtual Server)WinXP,  SQL Server 2000 + SP 3A ,  VS.NET 2005 Beta1, .Net Framework 2.0

附件:        

2.3. 研究思路

1. 新开发运行环境等特性

2. 新控件使用和特点, 分析可取程度

3. Security 管理

4. Web Parts and Portal Framework

5. 了解The New Browser and Mobile Device Controls 

6. 了解Cache, Configuration and Administration

2.4. 新页面

2.4.1. Master Page

Master page相当于是网页模板, .master为扩展名。

在一个普通的asp.net页面的Page里加入:

<%@ Page language="*" masterpagefile="~/mysite.master"

指定一个Master Page. 相关控件: <asp:ContentPlaceHolder>

2.4.2. Website Map

Website Map是定义网站导航路径文件, 符合XML标准. 利用XML的树型结构和页面关系树型结构的共同点所设计. 相关控件: <asp:SiteMapPath>

2.4.3. Class Diagram

2.4.4. Generic Handler

2.4.5. Image Generator

2.5. ASP.NET 2.0控件摘要

2.5.1. Standard

1) Wizard

可以帮助实现一些向导类型UI的控件

2) 其他: ()

2.5.2. Data

1) GridView

asp.net 1.1DataGrid的升级版控件, 使用大致相同.

2) DetailsView(新控件)

 逐页显示单条记录详细信息控件

3) FormView(新控件)

可以实现记录新增, 编辑页面的控件.(WSS2.0中的FormView Web Part相类)

4) SiteMapDataSource

将自动获得web.sitemap内容数据

2.5.3. Validation ()

2.5.4. Navigation

1) Introduction: 为系统的导航而设计的控件
2) 应用

SiteMapPath: 必先定义网站路径(Web.sitemap)

Menu:

è 支持数据源: ReportSource, SiteMap(Web.sitemap), XmlDataSource

è 动态与静态菜单 ()

2.5.5. Login

主要为实现用户登录, 注册, 取回/修改密码等使用

2.5.6. WebParts

1) Introduction: SharePoint比较相似, 设计目的可以让用户人性化定义页面. 亦可以自定义设计Web Part
2) 应用

è 使用Web Part 必须要有且仅一个WebPartManager控件

è Web Part必须放置于WebPartZone

è 特殊的Web Part使用特殊的Web Part Zone

è 可以实现Web Part间的Connnection

2.5.7. Crystal Reports ()

2.5.8. HTML ()

2.6. ASP.NET Security

2.6.1. Membership

Membership provides secure credential storage with simple, easy-to-use APIs. 更简单地实现安全性管理, 更易于系统的扩展.

The Membership provider model


我们可以比较方便地实现
Membership Provider. 所以Membership可以支持:

è Sql server

è Access(mdb)

è AD  (Not available with the beta release of ASP.NET 2.0.)

2.6.2. Web Site Administration Tool

1) Web管理器

http://localhost/aspnet_webadmin/2_0_40607/default.aspx?applicationPhysicalPath=[site folder path]&applicationUrl=[application url]

2) Security Configuration: user role管理, 并分配role user的目录访问权限
3) Profile Configuration:()
4) Counter Configuration:()

The Membership Configuration

<system.web>

           <membership defaultProvider="AspNetAccessProvider" userIsOnlineTimeWindow="15">

                 <providers>

                      <add name="AspNetAccessProvider"

                      type="System.Web.Security.AccessMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b 03f 5f 7f 11d 50a 3a "

                      connectionStringName="AccessFileName"

                      enablePasswordRetrieval="false"

                      enablePasswordReset="true"

                      requiresQuestionAndAnswer="false"

                      applicationName="/"

                      requiresUniqueEmail="false"

                      passwordFormat="Hashed"

                      description="Stores and retrieves membership data from the local Microsoft Access database file"/>

                 </providers>

           </membership>

… …

* connectionStringName: 数据库连接串的名字(数据库连接串定义在web.config).

* passwordFormat  : include Encrypted and Clear. The default value is Hashed.

* 使用Web Site Administration Tool 可以自动生成相关的Web.ConfigConfiguration.

2.7. The New Browser and Mobile Device Controls

2.7.1. Brower Definitions

由于运行环境问题, 比如: 由于asp.net 输出不一定是IE浏览, 比如要在Mobile Device上浏览. asp.net 2.0上不需要重要做一套支持Mobile Device浏览的UI, 可以通过配置相关的Configuration来定义浏览输出.

2.7.2. Mobile Device Controls

1) Standard form- and page-based controls, such as the bullet list and FileUpload controls
2) Rich controls, such as the DynamicImage control and the Wizard control
3) Login and authentication controls, used in conjunction with the ASP.NET authentication and access control features
4) Navigation controls, such as the tree view and site map controls, and counters
5) Data access and display controls designed to display relational data, XML data, and data held in other formats
6) Mobile device controls, such as the phone call and pagination controls

2.8. Cache and Application Configuration

2.8.1. Cache Configuration

1) SQLCache

利用Command Line 工具aspnet_regsqlcache.exe 配置SQLCache(具体使用参数可以查看help)

2) ASP.NET Cache

ASP.NET将一些缓冲数据存于SQL AspNet_SqlCacheTablesForChangeNotification表中.

Web.Config里需要设置SQL Server Cache Dependency

<configuration>
       
       
  <connectionStrings>
       
       
    <add name="Northwind"
       
       
         connectionString="server=localhost;
       
       
                           database=Northwind;
       
       
                           uid=sa;pwd=00password" />
       
       
  </connectionStrings>
       
       
  <system.web>
       
       
    <caching>
       
       
      <sqlCacheDependency enabled="true">
       
       
  <databases>
       
       
        <add name="Northwind"
       
       
     connectionStringName="Northwind"
       
       
             pollTime="500" />
       
       
  </databases>
       
       
 </sqlCacheDependency>
       
       
    </caching>
       
       
  </system.web>
       
       

</configuration>

3) 页面Output-Cache

除了在Web.Config可以设置Cache, 也可以在页面的<%@ OutputCache %>设置sqldependency属性, :

<%@ OutputCache duration="9999"
       
       
                varybyparam="none"
       
       

                sqldependency="Northwind:Products" %>

4) SqlCacheDependency ClassCacheDependency Class

SqlCacheDependency ASP.NET 2.0的新Class,   System.Web.Caching namespace , 是用来建立cache dependencies on Microsoft SQL Server 7, 2000, and 2005 databases.

CacheDependency (, Introduced in asp.net 1.0)

2.8.2. Application Configuration

Web.Config Machine.Config 也有相当的改变. 新增配置部分主要体现在:

è Anonymous identification

è Code DOM

è Connection strings

è Data

è Caching

è _Expression builders

è Hosting

è Image generation

è HTTP cookies

è Membership

è Site maps

è Site counters

è Personalization Profile

è Protocol bindings

è Role Manager

è Mail servers

è URL mappings

è Web Parts

è Web Site Administration Tool

è Protected data

è Health monitoring

3. 总结

è 功能性能实现上

ASP.NET 2.0在软件工程管理上的有一个理念的提升: 开发员将主要的精力专注于系统业务逻辑, 而非UI等层;

验证授权方面上设计了Membership, 更方便Form验证授权的开发(虽然相比Authorization and Profile Application Block之下, 实现的业务逻辑相对简单点, 但仍非常实用, 可以应用到我们众多的一般性系统上);

为迎接未来Mobile Device时代趋势, ASP.NET 2.0更比之前版本和其他Web程序语言具备了对Mobile Device的支持;

面向SQL, 更提出SqlCacheDependency有效的提高SQL的缓存性能.

è 软件程序设计上

大量强大实用的控件足可以解决一般应用系统的所有UI等的功能性和性能性问题, UI等层开发成本大大降低

去除ASP.Net 2.0之前版本的Project的概念, 直接发布本地目录;

Web Part的结合, 便UI设计上更人性化;

动态编译的运行模式, 令开发员不用重新编译和重新启动调试.

 

ASP.NET 2.0 是一个激动人心的产品, 让我们期待它的正式版发布吧.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值