By Ben
ASP.NET 2.0 Beta 1 研究總結(jié) <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
ASP.NET 2.0 的出現(xiàn) , 更方便了開(kāi)發(fā)者的系統(tǒng)開(kāi)發(fā) , 更全面強(qiáng)大的設(shè)計(jì)工具 Visual Studio .Net 2005 beta1 大大提高開(kāi)發(fā)效率 .
2.
研究過(guò)程
2.1.
概述
VS.NET 2005 beta1 以強(qiáng)大的 IDE 環(huán)境 , 加上豪華的功能開(kāi)發(fā)界面 , 將 ASP.NET 1.1 開(kāi)發(fā)量比較大的部分編碼變成可視化無(wú)代碼設(shè)計(jì) . 結(jié)合建模工具使開(kāi)發(fā)更科學(xué)嚴(yán)謹(jǐn)有序 . 強(qiáng)大的新控件實(shí)現(xiàn)更人性化功能更強(qiáng)大的 ASP.NET 2.0 ……
2.2.
研究環(huán)境
(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. 新開(kāi)發(fā)運(yùn)行環(huán)境等特性
2. 新控件使用和特點(diǎn) , 分析可取程度
3. Security 管理
4. Web Parts and Portal Framework
5. 了解 The New Browser and Mobile Device Controls
6. 了解 Cache, Configuration and Administration
2.4.
新頁(yè)面
2.4.1.
Master Page
Master page 相當(dāng)于是網(wǎng)頁(yè)模板 , 以 .master 為擴(kuò)展名。
在一個(gè)普通的 asp.net 頁(yè)面的 Page 里加入:
<%@ Page language="*" masterpagefile="~/mysite.master"
|
指定一個(gè) Master Page. 相關(guān)控件 : < asp : ContentPlaceHolder >
2.4.2.
Website Map
Website Map 是定義網(wǎng)站導(dǎo)航路徑文件 , 符合 XML 標(biāo)準(zhǔn) . 利用 XML 的樹(shù)型結(jié)構(gòu)和頁(yè)面關(guān)系樹(shù)型結(jié)構(gòu)的共同點(diǎn)所設(shè)計(jì) . 相關(guān)控件 : < 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
可以幫助實(shí)現(xiàn)一些向?qū)ь愋? UI 的控件
2)
其他
: (
略
)
2.5.2.
Data
1)
GridView
是 asp.net 1.1 中 DataGrid 的升級(jí)版控件 , 使用大致相同 .
2)
DetailsView(
新控件
)
逐頁(yè)顯示單條記錄詳細(xì)信息控件
3)
FormView(
新控件
)
可以實(shí)現(xiàn)記錄新增 , 編輯頁(yè)面的控件 .( 與 WSS2.0 中的 FormView Web Part 相類 )
4)
SiteMapDataSource
將自動(dòng)獲得 web.sitemap 內(nèi)容數(shù)據(jù)
2.5.3.
Validation (
略
)
2.5.4.
Navigation
1)
Introduction:
為系統(tǒng)的導(dǎo)航而設(shè)計(jì)的控件
2)
應(yīng)用
SiteMapPath : 必先定義網(wǎng)站路徑 (Web.sitemap)
Menu :
è 支持?jǐn)?shù)據(jù)源 : ReportSource, SiteMap(Web.sitemap), XmlDataSource
è 動(dòng)態(tài)與靜態(tài)菜單 ( 略 )
2.5.5.
Login
主要為實(shí)現(xiàn)用戶登錄 , 注冊(cè) , 取回 / 修改密碼等使用
2.5.6.
WebParts
1)
Introduction:
與
SharePoint
比較相似
,
設(shè)計(jì)目的可以讓用戶人性化定義頁(yè)面
.
亦可以自定義設(shè)計(jì)
Web Part
2)
應(yīng)用
è 使用 Web Part 必須要有且僅一個(gè) WebPartManager 控件
è Web Part 必須放置于 WebPartZone 內(nèi)
è 特殊的 Web Part 使用特殊的 Web Part Zone
è 可以實(shí)現(xiàn) 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. 更簡(jiǎn)單地實(shí)現(xiàn)安全性管理 , 更易于系統(tǒng)的擴(kuò)展 .
The Membership provider model
我們可以比較方便地實(shí)現(xiàn)
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
的目錄訪問(wèn)權(quán)限
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 : 數(shù)據(jù)庫(kù)連接串的名字 ( 數(shù)據(jù)庫(kù)連接串定義在 web.config).
* passwordFormat : include Encrypted and Clear . The default value is Hashed .
* 使用 Web Site Administration Tool 可以自動(dòng)生成相關(guān)的 Web.Config 的 Configuration.
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
由于運(yùn)行環(huán)境問(wèn)題 , 比如 : 由于 asp.net 輸出不一定是 IE 瀏覽 , 比如要在 Mobile Device 上瀏覽 . 在 asp.net 2.0 上不需要重要做一套支持 Mobile Device 瀏覽的 UI, 可以通過(guò)配置相關(guān)的 Configuration 來(lái)定義瀏覽輸出 .
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 Configuratio
n
2.8.1.
Cache Configuration
1)
SQLCache
利用 Command Line 工具 aspnet_regsqlcache.exe 配置 SQLCache( 具體使用參數(shù)可以查看 help)
2)
ASP.NET Cache
ASP.NET 將一些緩沖數(shù)據(jù)存于 SQL AspNet_SqlCacheTablesForChangeNotification 表中 .
在 Web.Config 里需要設(shè)置 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)
頁(yè)面
Output-Cache
除了在 Web.Config 可以設(shè)置 Cache, 也可以在頁(yè)面的 <%@ OutputCache %> 設(shè)置 sqldependency 屬性 , 如 :
<%@ OutputCache duration="9999"
varybyparam="none"
sqldependency="Northwind:Products" %>
|
4)
SqlCacheDependency Class
和
CacheDependency Class
SqlCacheDependency 是 ASP.NET 2.0 的新 Class, 在 System.Web.Caching namespace 下 , 是用來(lái)建立 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 也有相當(dāng)?shù)母淖? . 新增配置部分主要體現(xiàn)在 :
è Anonymous identification
è Code DOM
è Connection strings
è Data
è<
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
