Enterprise Library for.NET Framework 2.0: Core Architecture.

Slides:



Advertisements
Similar presentations
Malek Kemmou Technology Architect, Application Platform Microsoft Middle East and Africa Overview of ASP.NET 2.0.
Advertisements

Implementing Tableau Server in an Enterprise Environment
Best Practices For Application Development Steven Wilssens & Jelle Druyts Compuware.NET Consultants
CACORE TOOLS FEATURES. caCORE SDK Features caCORE Workbench Plugin EA/ArgoUML Plug-in development Integrated support of semantic integration in the plugin.
Enterprise Library 3.0: Overview. Context  Reusable components are important Address common development challenges consistently across applications 
Web Applications Development Using Coldbox Platform Eddie Johnston.
Enterprise Smart Clients Architecture, Patterns, Design, Best Practices Keith Elder Manager, Sr. Software Engineer Quicken Loans Blog:
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
CSLA Presenter Sergey Barskiy, senior consultant at Magenic Technologies your questions Send an in order.
Leveraging Enterprise Library in Your Applications Keith Elder Quicken Loans Manager, Sr. Software Engineer Microsoft MVP Keith a t keithelder dot net.
Tom Hollander Solution Architect Solutions Development Centre Microsoft Australia ARC307.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Patterns & practices Enterprise Library Brian Button Consultant/Developer patterns & practices.
JAVA BEANS By Madhuri Kakumanu. What is a Java Bean? “ A Java Bean is a reusable software component that can be visually manipulated in builder tools.”
Understanding and Managing WebSphere V5
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
DB2 (Express C Edition) Installation and Using a Database
Creating Business Workflow Using SharePoint Designer 2007 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft SQL Server.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
©2004 Avanade Inc. All rights reserved. The Avanade name and logo are registered trademarks in the US and other countries. Enterprise Library v1.0 A Technical.
SSIS Over DTS Sagayaraj Putti (139460). 5 September What is DTS?  Data Transformation Services (DTS)  DTS is a set of objects and utilities that.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Membership in ASP.Net...if only Presented by: Patrick Hynds President, CriticalSites Microsoft Regional Director.
Java Beans.
Doing Something Useful with Enterprise Library 3.0 Benjamin Day Level: Intermediate.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Enterprise Library for.NET Framework 2.0: Overview.
Enterprise Library 3.0: What’s New?. The Story So Far…  Application Blocks are reusable, extensible source-code components that provide guidance for.
Parsley Introduction Kui Huang Oct. 13, Topics Background Dependency Injection Object Lifecycle Message Bus Sample FW Extensions.
Enterprise Library Building an Application Block Ed Jezierski Solution Architect Scott Densmore Software Engineer Ron Jacobs Product Manager.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
Module 7: Fundamentals of Administering Windows Server 2008.
Scalable Game Development William Roberts Senior Game Engineer
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Composite User Interface Application Block Peter Provost Development Lead – patterns & practices
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Module 7: Accessing Data by Using ADO.NET
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
Unit 4 Object-Oriented Design Patterns NameStudent Number CAI XIANGHT082182A KYAW THU LINHT082238Y LI PENGFEIHT082220L NAUNG NAUNG LATTHT082195L PLATHOTTAM.
Enterprise Library Extensibility Brian Button VP of Engineering Asynchrony Solutions, Inc.
Sofia, Bulgaria | 9-10 October ASP.NET: Developing Portal UI With Web Parts Goksin Bakir Yage Ltd Microsoft Regional Director, MEA Goksin Bakir Yage Ltd.
Enterprise Library Caching Application Block Brian Button Software Design Engineer Ron Jacobs Product Manager Scott Densmore Software Design Engineer.
Data and Middle Tier in an E2E Bart Vande Ghinste Developer Consultant Microsoft Belux.
Web Services Error Handling and Debugging. Agenda Simple SOAP faults Advanced SOAP faults SOAP headers and faults Error handling From a Service Perspective.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
London Connected Systems User Group – Feb “Instrument and Diagnose your BizTalk Solution in an efficient Way” Saravana Kumar BizTalk Server MVP.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
Enterprise Library Caching Application Block Peter Provost Software Design Engineer Ron Jacobs Product Manager Scott Densmore Software Design Engineer.
Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Enterprise Library Overview Tom Hollander Product Manager Microsoft Edward Jezierski ArchitectMicrosoft Kyle Huntley Architect Avanade Ron Jacobs Product.
Alexey Polovinkin Post graduate student, CMC department.
Developing Custom ASP.NET Providers For Membership And Role Manager Stefan Schackow PRS404 Program Manager – Web Platform and Tools Microsoft Corporation.
Mikael Deurell Senior Consultant Microsoft Mail: Blog: blogs.msdn.com/deurell.
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
SQL Database Management
The Holmes Platform and Applications
Self Healing and Dynamic Construction Framework:
Java Beans Sagun Dhakhwa.
Enterprise Library Overview
Leveraging ColdSpring To Make Better Applications
Introduction to ASP.NET Parts 1 & 2
Mark Quirk Head of Technology Developer & Platform Group
Plug-In Architecture Pattern
Presentation transcript:

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 deprecated 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 Configuration 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, Open 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 DataAccessLogging ExceptionHandling Enterprise Library for.NET Framework 2.0 Plug-in ConfigHelpers & Design Instrumen- tation Object Builder Cryptography Core Block Dependency Optional Provider Dependency

Caching Security DataAccessLogging ExceptionHandling Enterprise Library for.NET Framework 2.0 Plug-in ConfigHelpers & Design Instrumen- tation Object Builder Cryptography Core Block Dependency Optional Provider Dependency

Core Architecture  Configuration runtime  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 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.Configuration 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.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 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 Can be used by your apps, but you generally won’t need to

Configuration Sources Application Blocks or Custom Code IConfigurationSource SystemConfigurationSourceFileConfigurationSource SqlConfigurationSource app.config / web.config foo.config app.config / web.config Default ConfigurationSource = … System.Configuration 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 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 when using Enterprise Library  If you access blocks using static façades or factories (Examples: DatabaseFactory, Logger), you will always use the application’s default ConfigurationSource: If you define a ConfigurationSources section in your default.config file, you can specify which type of source should be used If you don’t 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 Examples // Use default source specified in the app.config / web.config file Database db1 = DatabaseFactory.CreateDatabase(“Sales”); // Use the specified source – you don’t need an app.config / web.config file FileConfigurationSource fileSource = new FileConfigurationSource(“tom.config”); DatabaseProviderFactory 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 sectionName, 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 to edit the blocks’ XML configuration files Quickly add default configuration for a block Strongly-typed properties and providers Validate configuration before you save  No major changes to configuration tool user experience from previous versions of Enterprise Library  Configuration design-time subsystem can be used in your own applications and blocks to provide a similar experience for your users

Configuration Design-Time  Improved API Simple base configuration design manager Better node registration and command registration 3 to 4 simple classes to register your custom provider No more OnSited  One configuration design manager per section  Dependent configuration design managers  Easy to interop with any.NET configuration

Instrumentation  All Enterprise Library blocks include instrumentation to assist in development, testing and operations Event Log events Performance Counters Microsoft® Windows® Management Instrumentation (WMI) events  All instrumentation is disabled by default, but each type can be individually enabled using the configuration tool  Instrumentation code contained in common assembly can be reused in your apps

Enabling Instrumentation  Run the installer classes to create the instrumentation artifacts: Run installservices.bat (using an admin account), or Run installutil.exe over each Enterprise Library assembly (using an admin account), or Create your own installers/MSI that do this  Configure instrumentation for your app using the tool

Instrumentation Architecture  Event-driven architecture InstrumentationProviderClass(es) InstrumentationListenerClass(es) InstrumentationConfigurationSettings WMI PerfCounters EventLog Event ObjectBuilder Wires up Application or Block calls

Instrumentation Attributes  Instrumentation is wired up using attributes: [InstrumentationListener] Defined on a type within the block or application Specifies which listener will deal with instrumentation events [InstrumentationProvider] Defined on an event within the block or application Specifies the name of the event being fired [InstrumentationConsumer] Defined on a method within the instrumentation listener The method contains the instrumentation logic, and the name must match the one used in an [InstrumentationProvider] declaration

Instrumentation Example public class Database : IInstrumentationEventProvider { DbConnection OpenConnection() { // Do stuff // Do stuff instrumentationProvider.FireConnectionOpenedEvent(); instrumentationProvider.FireConnectionOpenedEvent(); } public object GetInstrumentationEventProvider() { public object GetInstrumentationEventProvider() { return instrumentationProvider; } return instrumentationProvider; }} [InstrumentationListener( typeof(DataInstrumentationListener), typeof(DataInstrumentationListenerBinder) )] public class DataInstrumentationProvider { public class DataInstrumentationProvider { [InstrumentationProvider("ConnectionOpene d")] public event EventHandler public event EventHandler connectionOpened; connectionOpened; public void FireConnectionOpenedEvent() { public void FireConnectionOpenedEvent() { connectionOpened(this, new EventArgs()); connectionOpened(this, new EventArgs());} internal class DataInstrumentationListener : InstrumentationListener { public DataInstrumentationListener(string instanceName, bool perfCountersEnabled, bool eventLogEnabled, bool wmiEnabled) : base(perf…, event…, wmi…) {} base(perf…, event…, wmi…) {} [InstrumentationConsumer( “ConnectionOpened")] public void ConnectionOpened(object sender, EventArgs e) { if (PerformanceCountersEnabled) connectionOpenedCounter.Increment(); connectionOpenedCounter.Increment();}

Instrumentation Installation Attributes  Running installutil over an instrumented class should install all required event log sources, WMI schemas and performance counters  Enterprise Library provides a ReflectionInstaller which uses reflection to find these, with the help of some attributes  [HasInstallableResources] Indicates that there is instrumentation to install  [PerformanceCountersDefinition] Defines the counters used by the block or app  [EventLogDefinition] Defines the event log sources used by the block or app

Factories and Object Builder  Objects inside application blocks need to be constructed and configured  There are different ways you can construct objects depending on what you want to do Use a default configuration source Use a custom configuration source Don’t use any configuration at all Inject instrumentation  Although each block is different, all rely on similar types of factories for construction

Object Builder  New subsystem shared between EntLib and Composite UI Application Block  Responsible for building objects inside the application blocks Invoking the necessary custom factory using data from configuration Configuring instrumentation for the blocks  Can be leveraged from your own apps, but understanding ObjectBuilder is not required to use Enterprise Library

Core Application Block Factories Static Factory or façade Instance Provider Factory Enterprise Library Factory Factory Custom Block Objects Object Builder Strategies UserCode ConfigurationSource

Using Static Facades and Factories  Easiest way to use the blocks  Configuration is retrieved from the default configuration source  Instrumentation is wired up (but may be disabled)  Results in a call to an instance factory behind the scenes  Examples: Dim db As Database = DatabaseFactory.CreateDatabase(“Sales”) Logger.Write(“My message”, “My Category”)

Using Instance Provider Factories  You get slightly more control on how objects are created  You can choose your own configuration source  Instrumentation is wired up (but may be disabled)  Examples: Dim factory As New DatabaseProviderFactory(configSource) Dim db As Database = factory.Create(“Sales”) Dim factory As New LogWriterFactory(configSource) Dim writer As LogWriter = factory.Create()

Creating Objects Directly  New up the object and any dependent objects yourself  Configuration sources are not used  Object Builder is not involved  Instrumentation will not be automatically wired up (but you can add it yourself)  Example: Dim db As SqlDatabase = New SqlDatabase("server=(local)\SQLEXPRESS;database=EntLibQuic kStarts;Integrated Security=true")

Resources  Download Enterprise Library and related resources from:  Join the Enterprise Library Community at:  Read blogs from the Enterprise Library team at: