`
lovnet
  • 浏览: 6712659 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
文章分类
社区版块
存档分类
最新评论

ASP.NET 2.0 Beta 1研究总结

阅读更多

By Ben


ASP.NET 2.0 Beta 1研究总结<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><chmetcnv w:st="on" unitname="a" sourcevalue="3" hasspace="False" negative="False" numbertype="1" tcsc="0">3A</chmetcnv>, 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<chmetcnv w:st="on" unitname="F" sourcevalue="3" hasspace="False" negative="False" numbertype="1" tcsc="0">03f</chmetcnv><chmetcnv w:st="on" unitname="F" sourcevalue="5" hasspace="False" negative="False" numbertype="1" tcsc="0">5f</chmetcnv><chmetcnv w:st="on" unitname="F" sourcevalue="7" hasspace="False" negative="False" numbertype="1" tcsc="0">7f</chmetcnv>11d<chmetcnv w:st="on" unitname="a" sourcevalue="50" hasspace="False" negative="False" numbertype="1" tcsc="0">50a</chmetcnv><chmetcnv w:st="on" unitname="a" sourcevalue="3" hasspace="False" negative="False" numbertype="1" tcsc="0">3a</chmetcnv>"

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 <place w:st="on"><font face="宋体"><span style="FONT-FAMILY: 宋体">Mobile</span></font></place> 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

è<

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics