Enterprise Library for Framework 2.0-Core Architecture.ppt
《Enterprise Library for Framework 2.0-Core Architecture.ppt》由会员分享,可在线阅读,更多相关《Enterprise Library for Framework 2.0-Core Architecture.ppt(30页珍藏版)》请在麦多课文档分享上搜索。
1、Enterprise Library for .NET Framework 2.0: Core Architecture,Enterprise Library for .NET Framework 2.0,Major new release of Enterprise Library Designed for Microsoft .NET Framework 2.0 Leverages key new capabilities provided by the platform Certain features from Enterprise Library v1.x have been dep
2、recated in favor of the platform Scenarios and features largely unchanged Public application programming interfaces (APIs) not identical, but changes are minor but many improvements are hiding under the covers!,Key Changes from Enterprise Library 1.x,Configuration now built on System.Configuration C
3、onfiguration Application Block no longer exists Easier to use blocks with or without configuration files Instrumentation configurable and disabled by default Much improved Logging Application Block Flexibility and performance Simpler and more powerful Data Access Application Block Use with OLE-DB, O
4、pen Database Connectivity (ODBC) or any managed provider Most of the Security Application Block has been removed Deprecated in favor of .NET Membership and Profile features,Caching,Security,Data Access,Logging,Exception Handling,Enterprise Library for .NET Framework 2.0,Cryptography,Core,Block Depen
5、dency,Optional Provider Dependency,Caching,Security,Data Access,Logging,Exception Handling,Enterprise Library for .NET Framework 2.0,Plug-in,Config Helpers & Design,Instrumen- tation,Object Builder,Cryptography,Core,Block Dependency,Optional Provider Dependency,Core Architecture,Configuration runtim
6、e Configuration design and tooling Instrumentation Factories and object builder,Configuration in Enterprise Library,All Enterprise Library blocks are configurable Controls how the blocks work in your application Specifies which plug-ins you are using Previous versions of Enterprise Library included
7、a Configuration Application Block Supported reading/writing complex configuration objects from pluggable storage Used by all Enterprise Library blocks, and can be used by customer code In Enterprise Library for .NET Framework 2.0, the requirements are the same but the solution is different,System.Co
8、nfiguration in .NET 2.0,Much more powerful than the Microsoft .NET Framework 1.x classes Supports reading and writing rich graphs of objects Automatic serialization and deserialization between configuration classes and XML using ConfigurationSection and ConfigurationElement Some Enterprise Library 1
9、.x features are not directly supported Storing configuration somewhere other than XML Files Monitoring external changes to configuration,Configuration Runtime,Enterprise Library for .NET Framework 2.0 uses System.Configuration, but provides additional helper classes to provide more functionality All
10、 blocks provide ConfigurationSections which are stored in app.config / web.config by default All System.Configuration features such as encryption and using external files are supported Configuration Runtime helper classes are in the Common assembly Used by all Enterprise Library application blocks C
11、an be used by your apps, but you generally wont need to,Configuration Sources,Application Blocks or Custom Code,IConfigurationSource,SystemConfiguration Source,FileConfiguration Source,SqlConfiguration Source,app.config / web.config,foo.config,app.config / web.configDefault ConfigurationSource = ,Sy
12、stem.Configuration,File Watcher,File Watcher,Configuration Sources,Abstract interface that supports loading/saving configuration and monitoring for changes Two implementations included in the core SystemConfigurationSource defers to System.Configuration to read from default configuration file (plus
13、adds file watchers) FileConfigurationSource defers to System.Configuration but reads from arbitrary files SqlConfigurationSource included as a sample Requires that sections derive from SerializableConfigurationSection,Choosing a Configuration Source,Several ways of choosing a configuration source wh
14、en using Enterprise Library If you access blocks using static faades or factories (Examples: DatabaseFactory, Logger), you will always use the applications default ConfigurationSource: If you define a ConfigurationSources section in your default.config file, you can specify which type of source shou
15、ld be used If you dont have this section, SystemConfigurationSource is used If you use the instance factories (Examples:DatabaseProviderFactory, LogWriterFactory) you can specify a configuration source of your choosing Instantiated directly or using ConfigurationSourceFactory,Configuration Source Ex
16、amples,/ Use default source specified in the app.config / web.config file Database db1 = DatabaseFactory.CreateDatabase(“Sales”);/ Use the specified source you dont need an app.config / web.config file FileConfigurationSource fileSource = new FileConfigurationSource(“tom.config”); DatabaseProviderFa
17、ctory factory = new DatabaseProviderFactory(fileSource); Database db2 = factory.Create(“Sales”);,Change Notifications,IConfigurationSource supports monitoring configuration data for changes AddSectionHandler(string sectionName, ConfigurationChangedEventHandler handler) RemoveSectionHandler(string se
18、ctionName, ConfigurationChangedEventHandler handler) Any code can register for changes and respond accordingly In Enterprise Library, only the Logging Application Block currently registers to receive change notification events,Configuration Design and Tooling,Configuration tool eliminates the need t
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ENTERPRISELIBRARYFORFRAMEWORK20COREARCHITECTUREPPT

链接地址:http://www.mydoc123.com/p-374449.html