By Ben
ASP.NET 2.0 Beta 1研究总结<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
ASP.NET 2.0 的出现, 更方便了开发者的系统开发, 更全面强大的设计工具Visual Studio .Net 2005 beta1 大大提高开发效率.
VS.NET 2005 beta1 以强大的IDE环境, 加上豪华的功能开发界面, 将ASP.NET 1.1开发量比较大的部分编码变成可视化无代码设计. 结合建模工具使开发更科学严谨有序. 强大的新控件实现更人性化功能更强大的ASP.NET 2.0 ……
(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
附件:
1. 新开发运行环境等特性
2. 新控件使用和特点, 分析可取程度
3. Security 管理
4. Web Parts and Portal Framework
5. 了解The New Browser and Mobile Device Controls
6. 了解Cache, Configuration and Administration
Master page相当于是网页模板, 以.master为扩展名。
在一个普通的asp.net页面的Page里加入:
masterpagefile="~/mysite.master" |
指定一个Master Page. 相关控件: asp:ContentPlaceHolder>
Website Map是定义网站导航路径文件, 符合XML标准. 利用XML的树型结构和页面关系树型结构的共同点所设计. 相关控件: asp:SiteMapPath>
可以帮助实现一些向导类型UI的控件
是asp.net 1.1中DataGrid的升级版控件, 使用大致相同.
逐页显示单条记录详细信息控件
可以实现记录新增, 编辑页面的控件.(与WSS2.0中的FormView Web Part相类)
将自动获得web.sitemap内容数据
SiteMapPath: 必先定义网站路径(Web.sitemap)
Menu:
è 支持数据源: ReportSource, SiteMap(Web.sitemap), XmlDataSource
è 动态与静态菜单 (略)
主要为实现用户登录, 注册, 取回/修改密码等使用
è 使用Web Part 必须要有且仅一个WebPartManager控件
è Web Part必须放置于WebPartZone内
è 特殊的Web Part使用特殊的Web Part Zone
è 可以实现Web Part间的Connnection
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.)
http://localhost/aspnet_webadmin/2_0_40607/default.aspx?applicationPhysicalPath=[site folder path]&applicationUrl=[application url]
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.Config的Configuration.
由于运行环境问题, 比如: 由于asp.net 输出不一定是IE浏览, 比如要在Mobile Device上浏览. 在asp.net 2.0上不需要重要做一套支持Mobile Device浏览的UI, 可以通过配置相关的Configuration来定义浏览输出.
利用Command Line 工具aspnet_regsqlcache.exe 配置SQLCache(具体使用参数可以查看help)
ASP.NET将一些缓冲数据存于SQL AspNet_SqlCacheTablesForChangeNotification表中.
在Web.Config里需要设置SQL Server Cache Dependency
<configuration><p></p></configuration> <connectionstrings><p></p></connectionstrings> <add name="Northwind"></add> connectionString="server=localhost; database=Northwind; uid=sa;pwd=00password" /> <system.web><p></p></system.web> <caching><p></p></caching> <sqlcachedependency enabled="true"><p></p></sqlcachedependency> <databases><p></p></databases> <add name="Northwind"></add> connectionStringName="Northwind" pollTime="500" />
|
除了在Web.Config可以设置Cache, 也可以在页面的设置sqldependency属性, 如:
varybyparam="none" sqldependency="Northwind:Products" %> |
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)
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
è 功能性能实现上
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 是一个激动人心的产品, 让我们期待它的正式版发布吧.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=225157