High Level Overview of Microsoft .NET and Key Related Technologies Howard E. Hinman Architect, Microsoft Consulting Services Version 3.0 June 2, 2008 Table of Contents Introduction ..........................................................................................................................................................4 What is Microsoft .NET? .......................................................................................................................................4 Common Type System (CTS) .......................................................................................................................................... 4 Managed vs. Unmanaged Code ..................................................................................................................................... 4 Verifiable Type Safe Code .............................................................................................................................................. 5 Other Goals in .NET ....................................................................................................................................................... 5 Common Language Runtime (CLR) ................................................................................................................................ 5 SQL CLR ..................................................................................................................................................................... 6 Marshalling and Serialization ........................................................................................................................................ 6 Application Versioning................................................................................................................................................... 6 Figure 1 - The .NET Global Assembly Cache (GAC) .................................................................................................... 7 Figure 2 - .NET Framework Folder Showing versions Installed ................................................................................. 8 .NET Framework Classes and APIs ................................................................................................................................. 8 .NET Frameworks for Mobile Devices and Micro Devices ............................................................................................. 9 .NET Programming Languages ....................................................................................................................................... 9 XML................................................................................................................................................................................ 9 Interoperability in the .NET Environment .................................................................................................................... 10 .NET Platform on other Platforms ............................................................................................................................... 11 Key .NET Technologies ........................................................................................................................................12 User Interface Technologies (UI) ...................................................................................................................................... 12 Windows Forms (WinForms) ....................................................................................................................................... 12 ASP.NET Web Forms .................................................................................................................................................... 12 ASP.NET Master Pages (ASP.NET in .NET Framework 2.0) ...................................................................................... 12 AJAX ........................................................................................................................................................................ 13 Web Client Software Factory .................................................................................................................................. 14 ASP.NET 3.5 Extensions Preview ............................................................................................................................. 14 Windows Presentation Foundation - WPF (.NET Framework 3.0) ............................................................................... 14 Silverlight ..................................................................................................................................................................... 15 Communications (Distributed) Technologies ......................................................................................................16 Web Services ............................................................................................................................................................... 16 COM+ (Enterprise Services) ......................................................................................................................................... 17 .NET Remoting ............................................................................................................................................................. 18 Windows Communications Foundation – WCF (.NET Framework 3.0) ....................................................................... 18 LINQ ....................................................................................................................................................................18 LINQ to Relational Data ............................................................................................................................................... 18 LINQ to SQL ............................................................................................................................................................. 19 LINQ to Entities and the Entity Framework ................................................................................................................. 20 Data Related Technologies .................................................................................................................................22 Simple File and Stream I/O .......................................................................................................................................... 22 XML File I/O and Support ............................................................................................................................................ 22 LINQ to XML ............................................................................................................................................................ 23 ADO.NET ...................................................................................................................................................................... 23 Using LINQ within ADO.NET.................................................................................................................................... 23 ADO.NET Entity Framework .................................................................................................................................... 24 Microsoft Sync Framework .......................................................................................................................................... 24 SQL Server ................................................................................................................................................................... 24 .NET Development Tools .....................................................................................................................................26 2 Visual Studio ................................................................................................................................................................ 26 Team Foundation Server (TFS) .................................................................................................................................... 26 .NET Designer Tools ............................................................................................................................................27 Expression Studio ........................................................................................................................................................ 27 Expression Blend..................................................................................................................................................... 27 Expression Web ...................................................................................................................................................... 27 Expression Design ................................................................................................................................................... 27 Expression Media.................................................................................................................................................... 28 Expression Encoder ................................................................................................................................................. 28 SharePoint Designer .................................................................................................................................................... 28 Other Significant .NET Related Technologies ......................................................................................................28 Internet Information Services (IIS) .............................................................................................................................. 28 BizTalk.......................................................................................................................................................................... 29 SharePoint Services and Microsoft Office SharePoint Server (MOSS) ......................................................................... 29 Windows Workflow Foundation – WF (.NET Framework 3.0) ..................................................................................... 29 CardSpace (.NET Framework 3.0) ................................................................................................................................ 30 Smart Clients and Click Once Deployment .................................................................................................................. 30 Figure 3 –View of a Composite Smart Client Approach. ......................................................................................... 31 .NET Community .................................................................................................................................................32 Community Sites .............................................................................................................................................................. 32 Forums ............................................................................................................................................................................. 32 Source Code ..................................................................................................................................................................... 33 MVP’s and Regional Directors – Empowered Community Leadership ............................................................................. 33 Security Focused..................................................................................................................................................33 .NET Framework Versions and Updates ..............................................................................................................34 Microsoft .NET Development Best Practices Resources ......................................................................................36 Figure 4 – Patterns and Practices Guidance Explorer. ............................................................................................ 38 New York Times Reader - A Disconnected/Offline “Killer Application” written in .NET and WPF .......................38 3 Introduction The purpose of this document is to make available a high level overview of Microsoft’s .NET framework along with some of the key technologies and terminologies involved. As .NET has grown over the years, a significant amount of new terminology and technologies have emerged therein. The following write-up will hopefully provide explanation regarding some of these terms and technologies to those who are new as well as those who have been working with .NET for years. There are a significant number of hyperlinks to related content on the internet. While many of these links are to Microsoft web sites for deeper technical content, a significant number are to other resources including Wikipedia, personal blogs, etc. The idea behind such is to give readers a chance to drill in deeper to any of the technology areas described below (if interested in doing so), while presenting a balanced view of each. What is Microsoft .NET? The Microsoft .NET Framework is a collection of development and execution components that can be leveraged by application developers writing in any number of languages supported by .NET. The object code produced by a native .NET compiler (e.g. VB.NET, C#, and even COBOL.NET) is in a physical format called Common Intermediate Language (“CIL”) which was previously known as Microsoft Intermediate Language (“MSIL”). Along with the CIL generated by a .NET compiler is related metadata that results in a “Manifest” component which is actually included in the resulting executables (known as “Assemblies”, which are Portable Executables). The Manifest portion of a .NET assembly describes relationships of the application components as well as contains some attributes such as version requirements and security identification. Common Type System (CTS) Because a very common issue with cross language interaction revolves around different data types supported by various languages, a key component of the .NET technology is the Common Type System (CTS). This system implements a common set of data types (e.g. String, Integer) that all .NET languages must implement, along with a set of rules regarding behavior of such. This does not, however, preclude languages from having their own unique data types. Instead it guarantees a common set of data types that all languages must support for interoperability between both differing languages (e.g. C# calling VB or even COBOL), as well as seamless interaction with .NET Framework classes. Managed vs. Unmanaged Code The CIL code produced by a .NET compiler is known generically in .NET terminology as “Managed Code”. Code produced by non-.NET compilers and executed outside of the .NET CLR is known as “Unmanaged Code”. Examples of unmanaged code are Windows 32 Bit .DLL’s (Win32) produced by non-NET compilers such as C++ (although managed C++ is available in .NET). Applications written in JAVA are another example of unmanaged code. 4 Verifiable Type Safe Code The .NET framework was created to resolve some significant challenges/problems presented to programmers in today’s world. These include getting different programming languages to interoperate correctly without problems such as differing data types and memory models, for example. Having a common runtime (the CLR) managing all languages also alleviates some significant problems such as memory management and garbage collection. Additionally .NET deemphasizes the use of pointers and other constructs that cause memory leaks and unsafe code in general. This allows for the production of verifiably type safe code – a major feature of .NET. However, Pointers are typically supported in .NET languages that support such (even COBOL by the way), but usage of pointers in some languages may require memory pinning and/or declaring blocks of code using such as “Unsafe”. Other Goals in .NET Additionally, portability (ease of application portability between different releases of the .NET Framework largely within different Windows platforms) and security were other strong goals. A large emphasis of the .NET framework was also massive functionality targeted at creating both Desktop and Web applications as well as easing deployment. XCOPY deployment – which means the ability to install applications by simply copying them to another machine – was a goal which de-emphasized use of the Windows Registry to store configuration information. Common Language Runtime (CLR) Assemblies are loaded at runtime into something called the Common Language Runtime (“CLR”). The CLR ensures that CIL code in Assemblies goes through a native code generation step (known as “Just in Time Compiling” or “JIT”) to create a more machine loadable type of code for performance reasons before executing it. Part of this process places the JIT’ed code into a cache for future execution. This means that the very first time a .NET application is executed, it can seem slow because of the JIT step. You may have encountered this phenomenon when clicking on an .ASPX page (for example) in a web link and watching the blue progress bar move slowly from left to right. The next time you click on it however, it may be instantaneous response because the JIT’ed code has been cached and is ready for immediate execution upon subsequent access. This means that .NET developers should ensure that newly deployed web pages and applications are already JIT’ed. The CLR also manages the execution of .NET assemblies providing a runtime environment that encompasses: process, thread and memory management, garbage collection, a rich exception handling model, and security. 5 SQL CLR Microsoft has recently introduced the .NET CLR within SQL Server which allows for .NET applications to be hosted inside of SQL Server. This means that user defined functions, triggers and even stored procedures can now be written in .NET languages and deployed within SQL Server. Marshalling and Serialization One of the problems that .NET attempts to solve is cross language compatibility which often revolves around significant issues on data typing. In order to implement cross language data typing, techniques are used to massage objects and data into various forms and back. This process of data massaging is known as “Marshalling” in the .NET world. A key feature of .NET (including third party other language compilers as well) is that many of the marshalling requirements are taken care of automatically and “behind the scenes” for developers. For more complex marshalling requirements (including those created by Interop to non-net languages), .NET provides a set of marshalling classes to assist. Serialization is often considered to be synonymous with marshalling, but I disagree slightly and I think it worth noting separately as the term comes up often (serialization in .NET). Serialization is certainly related to marshalling, but I define it as the technique for taking complex items (e.g. Objects or even certain types of complex data structures) and creating linear images of such for storage to disk and transmission over networks (including Internet). An often common example of serialization is taking some object or data structure and representing it in XML (either text or binary XML). This allows the object or data to then be transferred as a file over a network and/or consumed directly by some other technology that is XML aware. Thus we often hear the term “serializing into XML”, when looking at development in this area – particularly in Internet communications. Application Versioning .NET also implemented application versioning to assist deployment and to relieve what many Windows users used to “fondly” refer to as “DLL Hell”. Application versioning allows users to install different versions of applications containing the same executable names on the same machine and to guarantee they stay separated so that wrong version DLL’s do not get called by an application. This is assisted via a .NET technology known as strong names, wherein developers can optionally generate strong name keys based upon information like version number and include them in their .NET executables. Applications may be deployed as either private (typically XCopied to a specific folder and executed from there) or shared which means application components can be shared between multiple applications. Shared Applications and components are installed into a central location known as the Global Assembly Cache (GAC). This is actually a folder in the Windows operating system directory on the machine (typically “c:\windows\assembly”). Figure 1 below is a screen shot of such: 6 Figure 1 - The .NET Global Assembly Cache (GAC) Side by Side execution is a term coined regarding the ability for multiple versions of the .NET Framework to be installed and working side by side on the same machine to provide a high level of application compatibility. So writing an application targeted at version 1.0 of the .NET Framework (for example) is not affected by installing a newer version (e.g. version 1.1) of the .NET Framework, because they execute side by side using versioning technology. You can, however, control versioning with some options that allow you to always interact with a specific version of the .NET Framework or create a default behavior wherein your application always uses the newest version of the .NET Framework installed (in some cases, this may cause problems, however, so you should carefully consider such). 7 You can actually see which versions of the .NET Framework are installed on a machine by looking in the framework directory under the Windows operating system (typically “c:\windows\Microsoft.NET\Framework” as illustrated below: Figure 2 - .NET Framework Folder Showing versions Installed .NET Framework Classes and APIs The .NET framework itself came with over 5000 predefined classes, methods, properties and API’s that can be used as application building blocks. The .NET Framework classes are grouped logically into Namespaces. For example, tasks that caused some customers to purchase 3rd party software packages 8 or to write significant amounts of code to support may now be available in a .NET class such as classes to send emails and even classes to do both high and low level network transports among many other things. And these are quickly becoming the same technologies that Microsoft itself relies on in its products, so these components are typically well tested and tuned for performance. When migrating legacy applications to the .NET environment (e.g. mainframe, PowerBuilder, C++, JAVA), it is often possible that some portion of code might be replaced by calls to .NET Framework classes which helps to simplify a migration or conversion. .NET Frameworks for Mobile Devices and Micro Devices There is a separate smaller .NET frame work for mobile devices and clients that need a smaller footprint while accepting less functionality. This is known as the .NET Compact Framework - sometimes called the Compact Edition or “CE”. Mobile phones running Windows Mobile (for example) utilize the Compact Framework. There is even a new version of the .NET Framework known as the “.NET Micro Framework” for even smaller and/or more constrained devices (.NET in your toaster?). For example, some remote controls can now be programmed using .NET applications written for the .NET Micro Framework. .NET Programming Languages When .NET was first released, Microsoft included new programming languages such as C#, Visual Basic.NET and J# (which is being sunset, by the way). Some may argue that Visual Basic.NET (VB.NET) is not a new language, but an extension of Microsoft’s previously popular Visual Basic. But VB.NET is an extensive rework of the previous VB including a new object model – to the extent that many older VB applications are not upward compatible to VB.NET without some conversion. Microsoft offers tools to assist this conversion, by the way. Microsoft continues to carry Visual C++ into the future including the ability to create .NET managed code C++ applications and for interop between managed .NET programs and unmanaged C++. Microsoft more recently created a new language for .NET known as F#. Additionally, 3rd party software companies have developed a myriad of programming languages (both old and new) for the .NET Framework. These include ADA, COBOL, Eiffel, FORTRAN, LISP, PERL, PHP, PYTHON, RPG and even SCHEME – just to name a few. This means that enterprises have significant new options for dealing with legacy applications as well as newer languages which provides many new options to migrate to .NET. XML XML (Extensible Markup Language) does for data what HTML does for Web pages. It allows for the representation of just about any type of data into a human readable and easily transportable format. Microsoft has immersed itself into XML. Many of what used to be .INI files and configuration settings in registry and/or database or side files for a wide range of products such as Visual Studio are now XML 9 files. The advantage of this is a common approach with the ability to externalize configuration settings outside of applications in a very standard and easily recognizable format. There is a rich set of XML related classes available in .NET. Additionally, both Microsoft and other 3rd Party software products are XML aware, which makes XML an excellent choice for exchanging data between these applications running on a variety of platforms. Microsoft’s SQL Server supports import and export of schemas and data in XML format which allows data extract and synchronization to become very straightforward. The latest release of Office (Office 2007 - also called “Office 12” by some) completely changed the major file formats of most Office components into a new format that relies heavily on XML. This means (for example) that the old MS Word .DOC file format (which is now “.DOCX”) is completely different. The new Office Open XML Format (.DOCX for Word, or .XLSX for Excel, or .PPTX for PowerPoint to name a few) is actually physically a .zip file (you can actually rename any of these file formats to .zip and use WinZip or built in Windows .zip support to extract them). What this means for Office is that the format is now completely opened up and you can manipulate these files outside of Office. For example, one can write a program to take a mainframe report and translate it into ASCII from EBCDIC and format it and pop a .DOCX Word document out the back end – without even touching Microsoft Office. Microsoft has created Visual Studio Tools for Office to allow developers to both make use of these formats and create custom Office applications and integration. Consider (for example) that a user might have his upcoming appointments in his or her Outlook Calendar and an application could actually reach in and get the customer names and details, connect to some Web application, and pull down data and information about the customers ahead of time to populate a local data store in order for the user to be later disconnected but have this information available to any other desktop application he or she might use. Interoperability in the .NET Environment Because at the time .NET was introduced, the world had no applications written in Managed code, Microsoft had to provide support for applications written in .NET to interact with applications not written in .NET (unmanaged code). And this support had to be robust, as .NET itself relies on many Microsoft components and products that are not written in .NET (and this is still so today). Microsoft could not realistically rewrite its entire product set (e.g. Windows, Office, SQL Server, etc.) into .NET and release all of this in one fell swoop. And clearly, .NET developers must in many cases interact with these products as well (e.g. writing a database application in C# that interacts with SQL Server which is not written in .NET). Multiple interoperability features appeared in .NET from day one and this support continues to evolve within the .NET framework. I think this is worth mentioning here because I currently foresee one potential scenario where some legacy applications might become a mixture of .NET and non-.NET code in the short term and thus rely on .NET interop technologies which I’ll discuss later on. This subject is 10 explained in great detail here although it’s a 2003 article and some changes have occurred. Another good article may be found here. Interop with Microsoft’s COM architecture is supported in .NET. This is an example of an area that could be a bit challenging in early versions of .NET but has evolved dramatically over the years. Platform Invocation Services (PInvoke) – Interop is sometimes referred to as communication between two object oriented runtime environments, but I also consider the term to apply to simply calling out to both object oriented and non-object oriented API’s and programs (typically unmanaged .DLL’s in the Microsoft Windows world known as WIN32). For this task, .NET contains a facility known as Platform Invocation Services or “PInvoke” for short. This is a very commonly used facility to call from .NET managed programs to non .NET unmanaged programs (e.g. C# calling unmanaged C++). One of the challenges in doing interop is how to deal with differing data types. In the .NET world, this area is known as “Marshalling”. Historically, massaging data back and forth between different language environments could be extremely difficult and destabilizing. .NET actually automates a significant portion of this and additionally provides marshalling classes to assist in more non-standard cases. One of the challenges of using C++ code in .NET (whether converting to C# or migrating to managed C++) is the use of pointers, which requires the declaration of “unsafe” blocks to signal the .NET Runtime to typically pin these down and be careful with them (in non-technical terms). One place you may need to use pointers is in the interop area – for example when interfacing with unmanaged code. There is a good article on how to use pointers in C# here. A good related article regarding interop in .NET can be found here. .NET Platform on other Platforms There is work going on to create versions of the .NET framework on Macintosh (MAC) and FreeBSD. Some of this work is by Microsoft and some by third parties such as Novell (known as “Mono”). The current Microsoft work is labeled as “Experimental” as I understand. Given what I know currently, I don’t believe it would be wise to plan for a delivery of cross platform .NET application with full GUI on non-Windows OS’ in the next 6-12 months, but this could change if the MS team discloses anything I am allowed to share. It may be worthwhile, however, to factor in that it certainly appears that a .NET Framework for MAC will appear sometime – whether driven by Microsoft or by 3rd parties with or without Microsoft’s cooperation. A .NET 3.0 implementation of Mono known as “Olive” is already underway as well. Additionally, there is a project named “Moonlight” going on driven by Microsoft’s Silverlight browser plug-in technology to enhance cross platform .NET runtime support for it on other platforms. And Microsoft is working on something named “Windows Live Core” (WLC) as part of their “software as a service” initiative related to cloud computing. WLC is being built on top of Silverlight which is discussed below. 11 Key .NET Technologies User Interface Technologies (UI) There are a number of user interface technologies included in the .NET framework targeted at different application scenarios and platforms. While not listed specifically, .NET provides a console interface for simple applications as well. Windows Forms (WinForms) The technology used in .NET from day one for creating desktop GUI interfaces is Windows Forms (also known as “WinForms”). This provides .NET developers with a managed code interface into the Windows API’s for graphical user interfaces. While considered a replacement for the older Microsoft Foundation Class libraries for C++ - because of its event driven programming implementation, WinForms does not implement a good Model-View-Controller paradigm sometimes used in application architecture. While Microsoft will continue to support Windows Forms for years to come, a newer technology named Windows Presentation Foundation (WPF) is quickly becoming the preferred move ahead Graphical User Interface technology for the .NET realm (discussed below). ASP.NET Web Forms The technology used in .NET to create interactive web pages is known as Web Forms which is implemented using ASP.NET - Microsoft’s .NET Web application framework (described in more detail below). Web Forms was well accepted because it implements an event driven programming paradigm which vastly simplifies writing interactive web applications. Web Forms are typically files with an .ASPX extension and may contain HTML or XHTML markup, various types of controls (both standard and user developed), as well as scripting languages. Additionally, .NET languages can be used in ASP.NET pages including a rich code behind model. ASP.NET Master Pages (ASP.NET in .NET Framework 2.0) One of the challenges that has problemed web site developers over the years is how to create sometimes complex web sites and easily enforce and/or carry standardized look and feel throughout by applying methods of inheritance and reuse. The use of a dynamic runtime templating technique was really not available in ASP.NET prior to the advent of the .NET Framework 2.0 which introduced ASP.NET Master Pages. The use of Cascading Style Sheets (CSS) helps somewhat but is not targeted at templating specifically. CSS is the ability to create symbolic declarations for markup items that can be referenced in web pages. The general idea behind CSS (for example) might be to define a special color as “Blue” and reference the symbolic name throughout a web site. If someone later decides that the shade of Blue should change to another variation it can simply be changed in the .CSS file (known as a style sheet) in one place and the change will cascade through all web pages that reference it symbolically. It’s not unlike declaring global variables for a program you are writing in an outside file so you can change it easily without editing the source code all over and recompiling. 12 CSS, however, can be a bit more sophisticated than just label matching and symbolic substitution. It allows for pattern matching defined by sets of rules and even supports the creation of pseudo classes which enhances it power and flexibility. However, CSS is largely targeted at look and feel of web pages – not the actual structure of such from a component level view. Consider web pages that contain more complex items such as controls and frames and navigation bars, etc. While CSS can affect the appearance of such, it does not control the construction of web pages dynamically using predefined pieces and components. Web developers and programmers have come up with various techniques to aid in this area, such as inheritance and even simple include files. ASP.NET Master Pages, however, implements a dynamic templating technology for web designers using ASP.NET and .NET technologies. In essence, it allows users to create one or more master pagers which have standardized content and may contain web controls (e.g. the corporate header and logo, a navigation bar, footer area with copyrights and notices, frames, etc.), and then declare one or more content place holders on the page. Content place holders can then be filled in later (you can even nest master pages or include other entire ASP.NET pages) and all of this is merged at runtime and presented to the browser requesting such as a single unified page. Master pages thus present an excellent opportunity to design web sites and reuse components and enforce standards. CSS can still be used in Master Page driven sites as well. Master Page technology is heavily in use in Microsoft’s highly successful SharePoint products for example. Use of Master Pages is excellent for new sites being developed, but may create a great deal of work and even redesign effort on existing ASP.NET application Web Sites and its usage should thus be weighed carefully. AJAX Asynchronous Java Script and XML (Ajax) is a set of facilities and techniques for creating better interactive web applications. ASP.NET AJAX application services are included in the Microsoft ASP.NET 2.0 AJAX Extensions add-on and later built into .Net Framework 3.5. The general idea in Ajax is to cut down on the number of web page loads and posts back to a web server and instead make use of asynchronous calls to the web server which return much smaller amounts of data (not the whole page posted back) and which can execute while other things are going on. For example, if a user is typing his user id into a textbox, using Ajax, an application can make requests to the web server as he/she types each character to bring a set of potentially matching user id’s back for validation. Or someone selecting a specific state from a drop down list could cause the application via Ajax to download and to auto populate a control with all the counties in that state. Use of Ajax can greatly cut down on web traffic as well as greatly enhance the user experience. 13 (Not meant as a plug ) Microsoft actually is credited with starting the Ajax concept with its foray into remote scripting in the late 1990’s. Today in the Microsoft .NET world, Ajax is implemented in ASP.NET. The main website for Microsoft Ajax can be found here. There are some great examples on Scott Guthrie’s blog as well. Web Client Software Factory Microsoft have released out of its Patterns and Practices area, a new Web Client Software Factory which contains both code and guidance to assist enterprise customers in building enterprise Web client applications properly. Support has recently been added for Model-View-Presenter (MVP) patterns. ASP.NET 3.5 Extensions Preview ASP.NET continues its evolution in the .NET Framework with some extensions to ASP.NET being developed on top of the .NET Framework version 3.5. These are being called the “ASP.NET 3.5 Extensions” currently and a preview version has been made available. There are described as: The ASP.NET 3.5 Extensions Preview is a preview of new functionality being added to ASP.NET 3.5 and ADO.NET. The release includes ASP.NET MVC, ASP.NET Dynamic Data, and ASP.NET controls for Silverlight, ADO.NET Data Services, Entity Framework runtime, and new features for ASP.NET AJAX. Both ASP.NET MVC and ASP.NET controls for Silverlight have been updated since this release. The latest versions can be accessed at: http://go.microsoft.com/fwlink/?LinkID=111960. These include ASP.NET controls for Silverlight, ASP.NET MVC, ASP.NET Dynamic Data, ADO.NET Entity Framework, ADO.NET Data Services, and ASP.NET AJAX. Windows Presentation Foundation - WPF (.NET Framework 3.0) While Windows Forms was the original GUI platform for desktop applications, it’s above noted lack of an MVC pattern along with its tight coupling to GUI generated the need for Microsoft to develop a next generation facility which came to be known as Windows Presentation Foundation or “WPF”. WPF was also influenced heavily by needs in Web development and a significant feature is that GUI interfaces developed in WPF can be hosted on a desktop or in a web browser. WPF also brings into play Microsoft Direct-X graphics capabilities including 2D and 3D along with vector graphics. Because WPF uses a Canvas approach to lay out screens and pages, issues such as control positioning related to Web page development go away. This greatly increases the customer experience as well as eases the development task. WPF was originally codenamed “Avalon”. WPF typically produces Extensible Application Markup Language (XAML) which is an XML based language for declaring values and objects used to initialize such and maps them directly to run time 14 objects in the .NET CLR. XAML can be compiled into a binary form known as BAML and placed in an assembly which improves performance and footprint. Microsoft’s new Silverlight browser plug-in (discussed below) is built with and utilizes a rich subset of WPF with cross platform capability to other browsers and MAC. As a result, Silverlight is actually becoming a GUI cross platform browser based platform for applications. While Microsoft will continue to support Windows Forms for many years to come, the stated direction for future applications is WPF. Because WPF supports both desktop and web browser along with the fact it supports a model view controller approach. Silverlight Microsoft’s Silverlight is a web browser plug-in (sometimes conceptually compared to Adobe’s Flash plug-in) that provides the capability to develop rich Internet applications (e.g. highly graphical and animated) using .NET languages. Rich Internet applications look like and function like Desktop GUI applications for example. An excellent example of a Silverlight application can be seen via the British Library which has taken some of the world’s oldest and most classic books and converted them into digital representations for the world to view. Silverlight is very early in its life. Microsoft very recently released a beta of version 2 of Silverlight. While version 1.0 provided for the usage of rich media types like video and vector graphics, version 2 brings interactive capabilities, as well as the ability to write Silverlight applications in .NET languages like C# and VB.NET, along with development tools for Silverlight integrated into Visual Studio 2008. Silverlight 2 is targeted heavily at the creation of Rich Internet Applications. Microsoft in March of 2008 claimed at the MIX 08 conference that there are 1.5+ million installs of Silverlight daily, which if true indicates rapid adoption. In addition to development support in Visual Studio 2008, Microsoft has released Expression Blend which is a design tool targeted at developing WPF and Silverlight GUI interfaces described in more detail below). While the Visual Studio 2008 tools support developers more or less, Expression Blend is for designers as well as developers who wish to create rich WPF and Silverlight applications. Silverlight is actually compatible with a number of Browsers on both Windows and Mac OS X and a 3rd party implementation named “Moonlight” is under development for Linux. Because it supports a rich subset of WPF as well as being cross browser and cross platform capable, it is envisioned to become an extremely popular GUI platform. In fact, the codename for Silverlight was “Windows Presentation Foundation/Everywhere or WPF/E. Missing from the table below which documents the history of .NET Framework releases and major service packs, is “Silverlight”. The reason for this is that Silverlight 2.0 carries along with its installer a very specialized and slimmed down version of the .NET framework specific to it which is targeted at cross platform compatibility. Silverlight is built on top of .NET and WPF, but uses a subset of each. 15 Because it is targeted as a browser plug-in, it is thus self contained including the .NET framework pieces it needs so no regular .NET framework is required to be installed on the local client to actually execute Silverlight itself, once the Silverlight plug-in has been installed. There were several significant announcements (some involving Silverlight) at the MIX 2008 Conference in Las Vegas, and there is a description and opinion of some of the key happenings in Rockford Lhotka’a blog. A recently released application using Silverlight that is fairly impressive is the Hard Rock Café’s memorabilia collection on-line. You can zoom in to see great detail and move the images around. You will be prompted to install Silverlight 2.0 Beta if go here and have not previously. Additionally, NBC Sports announced that they have chosen Silverlight to create the first truly digital Olympics. There is a video of one of the MIX 2008 Silverlight entitled “Working with Data and Web Services in Microsoft Silverlight 2” given by Eugene Osovetsky that discusses various approaches for using data along with accessing Web Services from Silverlight 2.0. Communications (Distributed) Technologies Microsoft .NET is very rich in communications technologies used as building blocks for distributed applications development. These include web service creation, remote procedure calls and messaging technologies. Additionally, there are low level technologies such as TCP/IP, various network messaging protocols, etc. available in .NET classes. You may in effect hook into well known pipelines (e.g. Web Services) or build your own custom communications mechanisms using .NET. .NET encompasses many well know communications technologies that have been in use in the industry for years including TCP/IP classes, Named Pipes, MSMQ (it is also possible to interface with IBM’s MQSERIES from .NET Applications), etc. There is even an IBM MQSERIES to MSMQ Bridge available. Additionally, given the rich model for Interop (managed code .NET applications calling unmanaged code non-.NET applications), it is possible to write .NET applications that call older and/or even lower level communications technologies. Web Services Web Services (sometimes referred to as “XML Web Services”) is a generic term for an application typically hosted on a Web Server that can be called remotely (effectively a Remote Procedure Call across the Internet) from another application to perform some service and typically return some result(s). .NET provides multiple ways to create web services. ASP.NET Web Services are typically recognized as web links with a file extension of .ASMX. You can think of a Web Service as a program that can be called remotely across the internet (or intranet, or even on the same computer). Parameters may be passed and data returned. Classic web services utilize a protocol known as SOAP and a discovery technology known as Web Services Description 16 Language (WSDL) is utilized to identify and describe what services are exposed by the web service, along with what parameters are expected and what data is returned. A discovery service such as Universal Description, Discovery and Integration (UDDI) is utilized kind of like a phone book for applications to look up and find web services if they do not know where they reside. Microsoft’s Web Services Enhancements (WSE) which are in use at many customers, add in some significant improvements/capabilities for Web Services being developing in .NET, including the ability to send attachments, messaging reliability and security enhancements. Additionally, in the .NET realm, unmanaged code can be leveraged using Interop (e.g. Platform Invocation Services – PInvoke) in creating Web Services. This opens up the ability to take reliable back end code written in an unmanaged language such as C++ and expose the functionality via a Web Service. These components can then be used typically as a common code stream for both Web enabled and desktop enabled applications. This area may be of key interest because one possible long term approach for many legacy applications might be to re-factor them into a set of related backend Web Services and to place a new Web front end on top to provide an Internet version, while creating a GUI Desktop front end that calls the backend Web Services as well for an even better user experience. Web Services are often considered to be a critical component of a Service Oriented Architecture (SOA) strategy. One of the key values of using Web Services comes from the ability to create independently operational building blocks that expose business functions in a manner that supersedes specific programming languages or application platforms and make them available to be consumed by any number of applications that may be given access to such. There are lots of examples of creating web services in .NET, but it’s important to note that Web Services can be created in other languages on other platforms such as JAVA (for example), and more importantly – that applications written in any of these languages hosted on any of these platforms can typically consume (call) Web Services on any other platform they have access to. COM+ (Enterprise Services) .NET was seen as a replacement or evolution past Microsoft’s earlier Component Object Model (COM) and later COM+ (distributed transactions using COM) technologies although .NET can interact with both. Enterprise Services is the terminology given to the COM+ distributed transaction technology available in .NET which can be found in the .NET System.EnterpriseServices class. 17 .NET Remoting .NET provides a facility for .NET to .NET program calls across the Internet (or even on the same machine) known as .NET Remoting which is in use today in some Web Applications. It effectively exposes remote objects across a network (including Internet) and allows for remote procedure calls with a very high degree of coupling – in fact making a remote object look like an instantiation of a local object to the requesting application. .NET Remoting was actually considered by some to be a replacement for a COM+ approach as it solves some of the issues in COM+. Windows Communications Foundation – WCF (.NET Framework 3.0) Microsoft’s enterprise .NET application communications technology is known as Windows Communications Foundation or “WCF”. WCF actually unifies a number of Microsoft communications technologies and techniques for applications including web services, remoting, messaging and distributed transactions with a strong emphasis on providing a master interface for inter-process communications across a number of platforms and protocols. Service Oriented Architectures (SOA) typically leverage Web services heavily in their implementation and WCF provides a platform for SOA as well. WCF provides the foundation for building highly reliable, transaction oriented cross platform applications. It encompasses a remarkable number of features under a common framework. LINQ Microsoft LINQ is a set of extensions to the .NET Framework and languages that creates an SQL like querying capability built into the language. These queries can be used against relational data objects, certain .NET Objects (e.g. enumerable classes, arrays, certain collections, XML and even databases. The following description is from an excellent whitepaper written by Elisa Flasko Johnson of Microsoft: LINQ to Relational Data Microsoft Language Integrated Query (LINQ) offers developers a new way to query data using stronglytyped queries and strongly-typed results, common across a number of disparate data types including relational databases, .NET objects, and XML. By using strongly-typed queries and results, LINQ improves developer productivity with the benefits of IntelliSense and compile-time error checking. LINQ to SQL, released with the Visual Studio 2008, is designed to provide strongly-typed LINQ access for rapidly developed applications across the Microsoft SQL Server family of databases. LINQ to Entities, to be released in an update to Visual Studio 2008 in the first half of 2008, is designed to provide strongly-typed LINQ access for applications requiring a more flexible Object Relational mapping, across Microsoft SQL Server and third-party databases. 18 LINQ to SQL LINQ to SQL is an object-relational mapping (ORM) framework that allows the direct 1-1 mapping of a Microsoft SQL Server database to .NET classes, and query of the resulting objects using LINQ. More specifically, LINQ to SQL has been developed to target a rapid development scenario against Microsoft SQL Server where the database closely resembles the application object model and the primary concern is increased developer productivity. LINQ to SQL has been architected with simplicity and developer productivity in mind. APIs have been designed to “just work” for common application scenarios. Examples of this design include the ability to replace unfriendly database naming conventions with friendly names, to map SQL schema objects directly to classes in the application, to implicitly load data that has been requested but has not previously been loaded into memory, and the use of common naming conventions and partial methods to provide custom business or update logic. Beyond the simplicity of the query experience, LINQ to SQL offers additional features to improve the developer experience with regards to application logic. Partial methods, a new language feature of C# and VB in Visual Studio 2008, allow one part of a partial class to define and call methods which are invoked, if implemented in another part of the class. If the method has not been implemented; the entire method call is optimized away during compilation. By using common naming conventions in conjunction with these new partial methods and partial classes, introduced in Visual Studio 2005, LINQ to SQL allows application developers to provide custom business logic when using generated code. Using partial classes allows developers the flexibility to add methods, non-persistent members, etc., to the generated LINQ to SQL object classes. These partial methods can add logic for insert, update, and delete by simply implementing the associated partial method. Similarly, developers can use the same concepts to implement partial methods that hook up eventing in the most common scenarios. As with any application framework, developers must also have the ability to optimize the solution to best fit their scenario. LINQ to SQL offers a number of opportunities to optimize, including using load options to control database trips and compiled queries to amortize the overhead inherent in SQL generation. By default, LINQ to SQL enables Object Tracking, which controls the automatic change tracking and identity management of objects retrieved from the database. In some scenarios, specifically where you are accessing the data in a read-only manner, you may wish to disable Object Tracking as a performance optimization. Developers who are concerned about query performance can leverage the compiled queries capabilities which offer an opportunity to optimize query performance. In many applications you might have code that repeatedly executes the same query, possibly with different argument values. By default, LINQ to SQL parses the language expression each time to build the corresponding SQL statement, regardless of whether that expression has been seen previously. 19 The primary scenario for using LINQ to SQL is when building applications with a rapid development cycle and a simple one-to-one object to relational mapping against the Microsoft SQL Server family of databases. In other words, when building an application whose object model is structured very similarly to the existing database structure, or when a database for the application does not yet exist and there is no predisposition against creating a database schema that mirrors the object model; you can use LINQ to SQL to map a subset of tables directly to classes, with the required columns from each table represented as properties on the corresponding class. Usually in these scenarios, the database has not and/or will not be heavily normalized. I Want To… LINQ to SQL is Applicable Use an ORM solution and my database is 1:1 with my object model Use an ORM solution with inheritance hierarchies that are stored in a single table Use my own plain CLR classes instead of using generated classes or deriving from a base class or implementing an interface Leverage LINQ as the way I write queries Use an ORM but I want something that is very performant and where I can optimize performance through stored procedures and compiled queries LINQ to Entities and the Entity Framework LINQ to Entities, like LINQ to SQL is a LINQ implementation providing access to relational data, but with some key differences. LINQ to Entities is, specifically, a part of the ADO.NET Entity Framework which allows LINQ query capabilities. The Entity Framework is the evolution of ADO.NET that allows developers to program in terms of the standard ADO.NET abstraction or in terms of persistent objects (ORM) and is built upon the standard ADO.NET Provider model which allows access to third party databases. The Entity Framework introduces a new set of services around the Entity Data Model (EDM) (a medium for defining domain models for an application). This set of services includes the following: Domain Modeling Capabilities and the ability to define conceptual, data store agnostic models Object Relational Mapping Capabilities (full CRUD and state management scenarios) 20 Database independent Query Capabilities using LINQ or Entity SQL More than a simple Object Relational Mapping (ORM) tool, the ADO.NET Entity Framework and LINQ to Entities allow developers to work against a conceptual model with a very flexible mapping and the ability to accommodate a high degree of divergence from the underlying data store. For further discussion of the Entity Framework and EDM, please see the Data Platform Development Center (http://msdn.microsoft.com/data). Microsoft designed the ADO.NET Entity Framework, and in turn LINQ to Entities, to enable flexible and more complex mappings, ideal in the scenario where it is not possible or ideal for the object model to match the database schema. The mapping flexibility available with the ADO.NET Entity Framework allows the database and application(s) to evolve separately and makes development against highly normalized databases simpler and easier to understand. When a change is made in the database schema, the application is insulated from the change by the Entity Framework, and there is no requirement to rewrite portions of the application, but rather the mapping files can simply be updated to accommodate the database change. Similar to LINQ to SQL, LINQ to Entities uses partial classes and partial methods to allow update and business logic to be easily added to generated code. Using partial classes and partial methods allows developers the flexibility to add methods, non-persistent members, etc., to the generated Entity Framework object classes, and for the addition of custom logic for insert, update, and delete by simply implementing the associated partial method. Similarly, developers can use the same concepts to implement partial methods that hook up eventing in the most common scenarios. Like LINQ to SQL, LINQ to Entities enables Object Tracking by default. In some scenarios, specifically where you are accessing the data in a read-only manner, you may wish to disable Object Tracking as a performance optimization. LINQ to Entities also provides the ability to expose stored procedures as strongly typed methods on the generated ObjectContext, and map inserts, updates, and deletes to stored procedures if you choose not to use dynamic SQL. The primary scenario targeted by LINQ to Entities is a flexible and more complex mapping scenario, often seen in the enterprise, where the application is accessing data stored in Microsoft SQL Server or other-third party databases. In other words, the database in these scenarios contains a physical data structure that could be significantly different from what you expect your object model to look like. Often in these scenarios, the database is not owned or controlled by the application developer(s), but rather owned by a DBA or other third party, possibly preventing application developers from making any changes to the database and requiring them to adapt quickly to database changes that they may not have been aware of. 21 I Want To… LINQ to SQL is Applicable Write applications that can target different database engines in addition to Microsoft SQL Server Define domain models for my application and use these as the basis for my persistence layer. Use an ORM solution where my classes may be 1:1 with the database or may have a very different structure from the database schema Use an ORM solution with inheritance hierarchies that may have alternative storage schemes (single table for the hierarchy, single table for each class, single table for all data related to specific type) Leverage LINQ as the way I write queries and have the query work in a database vendor agnostic manner. Use an ORM but I want something that is very performant and where I can optimize performance through stored procedures and compiled queries Data Related Technologies The .NET Framework provides a number of data related technologies. These range from simple text and binary file access all the way up to enterprise database access with transactional integrity. Simple File and Stream I/O In the .NET Framework System.IO namespace, there are several specialized file I/O classes including both binary readers and writers, text readers and writers, string readers and writers, stream readers and writers, and isolated storage classes. Along with these classes, there are a wealth of other classes to support data operations including buffering, compression, and encryption. XML File I/O and Support In the .NET Framework System.XML namespace, there are a wealth of classes to assist in dealing with XML files – both text and binary. These not only include readers and writers, but a large number of other XML related classes too numerous to mention specifically here (see above link). XML files are also often referred to as “XML documents”. A single XML class such as the XML.Document class may expose tremendous amounts of functionality such as a complete set of methods to work with an XML document. Given the importance of XML in today’s programming world, there are actually a number of other .NET Framework namespaces dedicated to XML functionality including System.XML.Linq, 22 System.XML.Schema, System.XML.Serialization, and several others. The System.XML.XPath namespace provides XQuery and XPath implementations which allow for SQL like queries and custom methods for selecting and updating information in an XML file. LINQ to XML LINQ to XML is creating a great deal of excitement as well, and provides extremely powerful capabilities to interact with XML. ADO.NET ADO.NET is the .NET Framework’s main set of data access components targeted largely at relational database access (including support for OLE/DB and ODBC), while also supporting a number of nonrelational data stores including XML. ADO.NET is a key technology in the .NET Framework. ADO.NET classes are found in the .NET Framework System.Data namespace. ADO.NET supports a number of “Data Providers” which provide connections and associated services to interact with various relational databases and other data stores that can be made to appear logically as relational data stores (e.g. accessing an Excel Spreadsheet). Microsoft itself provides a number of ADO.NET data providers including SQL Server, Oracle and OLE/DB and ODBC. There is a large 3rd party marketplace in existence today providing a number of additional (and sometimes competing) ADO.NET data providers. This includes companies like IBM with a .NET provider for DB/2 UDB. ADO.NET allows for data providers that cross machines and even platforms transparently to .NET applications. Programmers can develop Windows applications that interact with DB/2 on an IBM mainframe transparently using technologies like Microsoft Host Integration Server (HIS). A second key component of ADO.NET technology is the ADO.NET DataSet class - an instance of which is a memory resident cache of the data in relational format provided by a data provider. This allows for a disconnected representation of the data which can then be accessed by a program requesting such. The DataSet object will typically contain 1 or more Table objects (it may contain 0 by the way) which themselves contain the actual data returned and collections of related information. These are accessed programmatically to manipulate data (including the ability to create table objects and data). Data provided by interacting with ADO.NET data providers may be accessed directly or placed in an ADO.NET DataSet. Data stores can typically be interacted with using the SQL language and/or a set of predefined methods and properties. .NET Data Providers typically implement a DataAdapter class which serves as a bridge between the data provider and the DataSet. Using LINQ within ADO.NET LINQ to SQL is an exciting new technology that offers the promise of abstracting relational data into more intuitive objects allowing programmers to deal with such and to forget about the intricacies of relational database programming. This effectively provides a more native programming language syntax 23 and object oriented approach to working with relational databases. This technique is known generically as “Object Relational Mapping” or ORM. ADO.NET Entity Framework Most recently, Microsoft has released a new feature known as the ADO.NET Entity Framework which abstracts the logical relational schema of a data base or tables into a conceptual schema which matches an Object Oriented approach (e.g. presents a set of methods and properties related to the database or tables). The above description probably sounds remarkably similar to the topic “Using LINQ within ADO.NET” and this is true. However, you can think of “LINQ to SQL” as the entry level ORM technology, while the Entity Framework provides more sophisticated features (e.g. many to many mapping, more power inheritance mapping, etc.). Microsoft Sync Framework The Microsoft Sync Framework is a new product currently released in its second Community Technology Preview (CTP). It is described as: Microsoft Sync Framework is a comprehensive synchronization platform that enables collaboration and offline scenarios for applications, services and devices. Developers can build sync ecosystems that integrate any application, any type of data, using any protocol over any network. The Microsoft Sync Framework provides a platform for taking web services and databases offline. In addition, it provides optimized P2P sync of any type of file including contacts, music, videos, images and settings. The extensible framework includes built-in support for synchronizing relational databases, NTFS/FAT file systems, FeedSync compliant feeds (formerly known as Simple Sharing Extensions), devices and web services. Sync Framework Highlights Add sync support to new and existing applications, services, and devices Enable collaboration and offline capabilities for any application Roam and share information from any data store, over any protocol, and over any network configuration Leverage sync capabilities exposed in Microsoft technologies to create sync ecosystems Extend the architecture to support custom data types including files The Sync Framework has a strong focus on supporting Occasionally Connected Applications (OCA’s) by providing facilities to automatically upload/download data and keep it in sync with centralized data stores. The Microsoft Sync Framework Developer Center can be found here. SQL Server 24 Although not specifically part of the .NET Framework, Microsoft SQL Server is the primary choice for relational database storage on Windows platforms and thus is highly utilized by many .NET applications. There are various editions of SQL Server available for a number of different needs. These include Enterprise Edition, Standard Edition, Workgroup Edition, Express Edition, and Compact Edition. A feature comparison is available here but does not include Compact Edition. Mobile Device and Desktop applications are typically built on and deployed with either SQL Server CE or SQL Server Express depending on needs. The main reason for selection of SQL Server CE or SQL Server Express is the fact that they are free and may be deployed without charge to any number of desktops (or mobile devices for SQL Server CE). SQL Server Express is a surprisingly high powered relational database system and contains a significant amount of the functionality of the higher level chargeable products. SQL Server Compact Edition is described as: SQL Server Compact is a free, easy-to-use embedded database engine that lets developers build robust Windows Desktop and mobile applications that run on all Windows platforms including Windows XP, Vista, Pocket PC, and Smartphone. SQL Server Express Edition is a highly functional free version of SQL Server. It is the replacement for the older Microsoft SQL Server Desktop Engine (MSDE). It is described as: SQL Server 2005 Express Edition is the next version of MSDE and is a free, easy-to-use, lightweight, and embeddable version of SQL Server 2005. SQL Server Workgroup Edition requires a purchase and is described as: Workgroup Edition is the data management solution for small organizations that need a database with no limits on size or number of users. Workgroup Edition can serve as a front-end Web server or for departmental or branch office operations. It includes the core database features of the SQL Server product line and is easy to upgrade to Standard or Enterprise Edition. SQL Server Standard Edition requires a purchase and is described as: Standard Edition is the data management and analysis platform for small and medium-sized organizations. It includes the essential functionality needed for e-commerce, data warehousing, and line-of-business solutions. Standard Edition's integrated business intelligence and highavailability features provide organizations with the essential capabilities needed to support their operations. SQL Server Enterprise Edition requires a purchase and is described as: 25 SQL Server 2005 Enterprise Edition is a comprehensive data platform that meets the high demands of enterprise online transaction processing and data warehousing applications. .NET Development Tools Visual Studio The key technology utilized by developers to write .NET applications is Microsoft’s Visual Studio. This is Microsoft’s flagship integrated development environment (IDE). It provides the ability to write applications for various scenarios (e.g. Web, Desktop, Mobile Devices and Phones, Micro Devices) using a common set of tools and technologies. Visual Studio and .NET Development are backed up by a number of Web sites (both Microsoft sponsored and non-Microsoft sponsored giving developers massive amounts of information, guidance and sample code at their fingertips. Visual Studio comes packaged in various editions depending on the needs and target skills of the user (e.g. Standard Edition, Professional Edition, Team Suite and Team editions - Architect, Developer, Database Administrator, and Tester). Visual Studio has an extremely flexible and open design which allows other language vendors to plug their managed code compilers into it and make use of the environment. For example, I’ve seen two separate COBOL compilers and one RPG compiler working in Visual Studio. This means that developers utilize a common editor, debugger and project manager. The WinForms and WebForms painters can also be used with these other languages. This becomes a gentle path to bring developers into Windows and .NET for the first time as well. A comparison of the Standard Edition vs. Professional Edition which is targeted at individual developers who do not work on large teams together can be found here. The Visual Studio Team System (VSTS) is the “everything plus the kitchen sink” version of Visual Studio – targeted at IT professional developers working in team environments. It includes all 4 individual Visual Studio Team Suite editions – Architecture, Development, Database, and Test. A comparison of these 4 individual editions can be found here. At the high end, Visual Studio Team System (VSTS) supplies tools for IT professionals to architect, design, create, develop, and test numerous different types of applications. These features are too numerous to discuss herein. It is recommended if you would like more detail to check out the Visual Studio Team System home page. Team Foundation Server (TFS) 26 Microsoft Team Foundation Server (TFS) is Microsoft’s enterprise level team development support facility. It provides facilities to safely store and track program source code, along with a number of related pieces such as project and resource files with sophisticated branching and version tracking. TFS integrates in with Visual Studio Team System. This allows development teams to seamlessly collaborate using TFS facilities such as library check in and checkout, task assignment, bug tracking, code coverage metrics and reporting, tracking of unit tests, etc. TFS’ latest release added in Continuous Integration capabilities as well which allows for automatic builds and testing when application components are checked in – with automated reporting and alerts. More information can be found at the Team Foundation Server Team Center. .NET Designer Tools A new generation of tools targeted not at developers, but rather designers of human interfaces is beginning to emerge in the .NET world. There is a rather interesting argument presented by many that developers are sometimes not the best human interface designers while professional designers may not be the best developers (or developers at all). So the separation of tools between developers and designers is becoming a natural division. However, it is important that key components are easily movable between designers and developers and that each do not make the other’s job difficult. Expression Studio Expression Studio is Microsoft’s new designer suite of tools and contains multiple products for professional designers and graphic/media artists. Expression Blend Expression Blend is Microsoft’s new GUI design tool for WPF (desktop) and Silverlight (Rich Internet) applications. It’s noteworthy that Expression blend itself is a .NET application written using WPF. Expression Blend creates XAML based graphical interfaces, and supports a wide range of features including collaborative team base development, support for a full spectrum of media types and the ability to add and manipulate interactive controls without writing code. Expression Web Expression Web is Microsoft’s new Web site development tool for web designers. It provides facilities for dealing tightly with data, including XML and is ASP.NET capable including generation of HTML and XHTML. Expression Design 27 Expression Design is Microsoft’s new illustration and graphical design tool. It can be used to build compelling elements that can be used in Web pages or in desktop GUI’s. Expression Media Expression Media is Microsoft’s new tool to manage media related assets. It visually catalogs and organizes over 100 media types for easy management of such. It also allows you to create powerful slide shows incorporating this media. Expression Encoder Expression Encoder, a feature of Expression Media, offers encoding, enhancement, and publishing of rich media experiences to Microsoft Silverlight. SharePoint Designer SharePoint Designer is Microsoft’s replace for FrontPage – one of the Web site designer tools in existence for the Windows platform. While it is tied to Microsoft’s SharePoint application platform, it is rich in functionality and users can create web pages using Master Web pages, CSS, Workflows, and allows for the creation of a number of different types of automated processes. Other Significant .NET Related Technologies There are a number of significant Microsoft technologies either embedded in the .NET Framework or highly utilized by such. This paper cannot even begin to document all of the technologies in the .NET Framework – in fact, with everything discussed herein; we have touched on a small fraction of the overall features in .NET. The intent here is to try to document the more commonly referenced features that IT professionals need to be aware of to make decisions and understand how to architect solutions using .NET. Internet Information Services (IIS) Internet Information Services (formally known as Internet Information Server) is a set of services available for Microsoft Windows operating systems that provide internet based functionality. In essence, IIS is viewed as a Web Server by many, but it contains significant unique capabilities as well. IIS comes with Windows XP, Windows Vista, Windows Server 2003 and Windows Server 2008 for free. It is an optional component install by the way. One of the primary features of IIS is its tight integration with and ability to execute ASP.NET applications. Windows XP comes with version 5.1 of IIS. It is not capable of running newer versions. Windows Vista comes with version 6.x of IIS. Windows 2003 comes with version 6.x of IIS. Windows 2008 comes with version 7.x of IIS. 28 There is a good article describing the feature differences between versions 5.1 and 6.x here. IIS 7 is new with Microsoft Windows 2008 and information regarding it can be found here. BizTalk Microsoft BizTalk Server is not part of the .NET Framework, but is a technology for which development is done in .NET using Visual Studio. BizTalk is a business process management server. BizTalk is described as: With the introduction of the fifth full version, BizTalk Server 2006 R2 builds upon the Business Process Management and SOA/ESB capabilities in prior releases to help organizations extend core process management technologies even further with new capabilities like native support for Electronic Data Interchange (EDI), AS2 and RFID and close alignment with the releases of 2007 Microsoft Office system and Windows Vista, including key .NET Framework technologies such as Windows Workflow Foundation and Windows Communication Foundation. BizTalk contains a workflow engine which allows for the development of high level business process flows. More information regarding BizTalk can be found here. SharePoint Services and Microsoft Office SharePoint Server (MOSS) Microsoft SharePoint is a multi-functional web based collaboration and document management platform. It is quickly becoming its own application platform. Development for SharePoint is done using .NET and Visual Studio. SharePoint contains capabilities to manage lists of information and documents, along with its ability to create and automatically deploy and provision web sites from templates. It also utilizes ASP.NET master pages and web parts along with containing a workflow engine and the ability to plug in custom written code (known as “Features”). One of the beauties of SharePoint is that is creates Web sites and Portals that are ASP.NET web applications, which makes it very open, scalable and highly reliable. MOSS adds in Enterprise Search and the Business Data Catalog (BDC) that provides the ability to connect to Line of Business Applications including Oracle and SAP (for example) and to develop custom providers to other complex data sources as well. There are two different flavors of SharePoint – SharePoint Services which are available for Windows Server 2003 at no additional charge and Microsoft Office SharePoint Server (MOSS) which requires purchase. MOSS sits on top of SharePoint Services. Microsoft SharePoint is currently Microsoft’s fastest growing product. MOSS is the first product to surpass $1 billion in sales so early in its lifecycle and is rapidly being adopted by a number of large corporations around the world. Windows Workflow Foundation – WF (.NET Framework 3.0) 29 Windows Workflow Foundation is the .NET technology for creating, executing and managing workflows in the .NET environment. It consists of .NET Classes, an in-process workflow engine and tools for Visual Studio 2005 and 2008 for developing and testing workflows. Workflow Foundation is available for both client and server versions of Windows. Windows Workflow Foundation includes support for both system workflow and human workflow across a wide range of scenarios including: workflow within line of business applications, user interface pageflow, document-centric workflow, human workflow, composite workflow for service oriented applications, business rule driven workflow and workflow for systems management. (more) Like WPF, WF produces Extensible Application Markup Language (XAML) which is an XML based language for declaring values and objects used to initialize such and map them directly to run time objects in the .NET CLR. Additionally, WF workflows may be created using .NET programming languages such as C# and VB.NET with tools in Visual Studio to assist such. Microsoft’s highly successful SharePoint product ships with WF as the default workflow engine, although other workflow engines can be plugged into SharePoint. However, one of the current complaints regarding Microsoft making WF the preferred Workflow engine in .NET relates to the BizTalk product. Because BizTalk has been in the marketplace for several years, it already had its own workflow engine and as I understand the current BizTalk 2006 product does not utilize the newer .NET WF. It appears that the next major release of BizTalk will encompass the WF engine. In the meantime, there is a good article explaining the issues and offering guidance regarding such here. CardSpace (.NET Framework 3.0) CardSpace is Microsoft’s new approach to identity management and protection. The general idea is to store information about users into personal digitized cards. Users can create different versions of their identities (some with more information than others) and even control what information is surfaced to those requesting a digital identity card. It provides technology to prevent intrusion and spoofing. More information can be found here. Smart Clients and Click Once Deployment Smart Client applications attempt to combine the best of the Web and the Desktop worlds. They are applications distributed through the web that execute on the Desktop machine. In doing so, they utilize local Desktop resources which means they can be fully graphical (not limited to typical browser based GUI’s) and can often be much higher performing. There is an excellent article by David Hill explaining what a “Smart Client” is and some of the history behind such, including a link to a video of Windows 2008 vision for Smart Clients down the road. Because smart client applications execute on the client desktop PC (although they may call back to web services for centralized processing and data needs), some footprint is required on the end user PC. In the Microsoft world, the .NET framework is required to be installed on the PC (which is becoming built 30 into Windows OS’ as they evolve today, but may require a download for an older Windows OS or for a very new version of the .NET Framework). The actual custom written .NET application is deployed to the client machine through a browser and executes locally. Microsoft smart client applications leverage the .NET framework which allows them to be small and compact. “Click Once” is a term synonymous with Smart Clients indicating that the user only has to click once on a link on a web page to have a smart client application downloaded and installed and ready for execution. The Microsoft WindowsClient.Net site is an excellent resource for more information on this topic. Additionally, Microsoft have created in its Patterns and Practices area, a new Smart Client Software Factory (SCSF) and released code to CodePlex. CodePlex is Microsoft’s repository for Open Source Projects. The Software Factories approach is being well received by enterprise customers. SCSF is described as: The Smart Client Software Factory is a guidance offering that provides comprehensive architecture guidance to help customers build Composite Smart Clients using the Microsoft platform (Win Forms, WPF, etc). An SCSF solution is composed of a number of discrete, independent, yet functional assemblies and components. These pieces are dynamically loaded and integrated together at runtime within a shell to form a fully coherent application. Figure 3 –View of a Composite Smart Client Approach. 31 .NET Community As this document illustrates the Microsoft .NET Framework, related technologies and product families provide an impressive amount of options for companies to build almost any type of application imaginable. That being said, the sheer number options and technologies available in .NET may present a challenge to developers trying to design solutions if they are not familiar with such. Training, books and online help systems such as the MSDN Library do provide a baseline from which people can start to create systems, but in some cases additional levels of resources available for .NET development become invaluable. The following additional community resources make it possible for software developers to not only stay familiar with the options available but also provide a wealth of valuable resources. Community Sites Microsoft provides a variety of community sites to help foster technical reference material and community content, some examples includes: ASP.NET brings together a large variety of resources for Developers focused on Web Development using the .NET Framework. This includes Blog references, Forums, Training Resources and Community Content IIS.NET brings together a large variety of resources for IT Pros and Developers focused on the IIS 6.0 and 7.0 hosting platforms. This includes Blog references, Forums, Training and Community Content Channel9 brings together a combination of resources such as: o Video content featuring both training material and Interviews o Community discussion areas around Microsoft technologies o Various shows featuring topics such as .NET Architecture Forums The MSDN Forum is a consolidated website for discussion on topics such as .NET Development, Mobile Device development, Language specific forums (C#, VB.NET, etc), and products such as Team System and SQL Server. This sites strength comes from its more than 1 million users, 500,000+ discussion threads and close to 2 million postings. 32 Source Code Microsoft recognizes that Source Code sharing and Open Source developments are crucial for building excellent products and communities. To cover these areas sites like CodePlex for Open Source development and Code Gallery for code sample sharing are dedicated resources to empower our customers in these areas. Additionally, Microsoft provides its Patterns and Practices site which provides information and code samples regarding best practices for developing different types of applications. MVP’s and Regional Directors – Empowered Community Leadership Most developers and architects that have experience un software development and interacting with online communities realize that some people give more than others to ensure people find answers and get help. Microsoft recognizes these individuals through two programs that provide them not only with titles but better access to internal product groups and discussions on areas they represent. The MVP (Microsoft Valued Professional) program is one example that provides hundreds of people focusing on particular technologies such as ASP.NET, Smart Clients, WCF/WF, etc. an opportunity to be recognized as leaders in their respective areas. This title is gained using a Microsoft internal nomination process (yearly) that awards those visibly giving their time to help others produce good code and products. Many MVPs maintain extremely valuable community oriented blogs and wikis that are sometimes a goldmine of assistance to developers. Security Focused At the dawn of the Internet, security was not a consideration as most of the uses for this new technology revolved around sharing information in as open of a system as possible. In today’s world of inter-connected corporate systems, banking applications, ecommerce sites and hundreds of other implementations the landscape has drastically changed. Security threats to electronic systems now dominate the media and minds of all IT workers while challenging all product vendors to build more secure applications and infrastructure. Microsoft’s family of products and technologies has always had security considerations built-in but with each year the commitment to this critical business area grows ever stronger and can easily be demonstrated by these examples: The .NET Framework contains hundreds of relatively easy to use techniques and framework components to help developers build security into their products, this includes: Encryption libraries, declarative and imperative security constraints on code classes and methods, SSL support at many levels, and more. WS* standard libraries for Security have been packaged into Web Services Extensions (currently v3.0) to increase the ability to make easy implementations of these standards possible without waiting for the longer release cycle of the .NET Framework. 33 Internally security is now one of the primary focuses on any software development project and is strongly emphasized through reviews and process within Microsoft’s product lifecycles. Products such as IIS 6.0 and SQL Server 2005 have had excellent security ratings compared to competing products. Patching sites such as Windows and Office update have made a tremendous difference in deployment ease and patch adoption rate for both average at-home customers and our corporate clients. Microsoft continues to improve and evolve these systems to ensure we can deliver fixes quickly and efficiently .NET Framework Versions and Updates The Microsoft .NET Framework was released as version 1.0 in 2002 and a version 1.1 a little over a year later containing new features. Version 2.0 was released in 2005. Beginning with Version 2.0, a parallel set of .NET frameworks appeared for 64 bit as well. The version 2.0 .NET Framework was the most substantial evolution, including a wide array of new features. Version 3.0 of the .NET Framework was released in late 2006 and included some significant new Microsoft technologies. The .NET Framework version 3.0 was issued solely to include the following technologies in the .NET Framework and in the Windows Software Development Kit (SDK): Windows Communication Foundation Windows Presentation Foundation Windows Workflow Foundation Using CardSpace in Windows Communication Foundation Version 3.5 of the .NET framework was released in late 2007 and actually contains a number of improvements most notably – support for AJAX. There is a parallel set of .NET framework and service packs for .NET CE as well as for 64 Bit Windows operating Systems. Below is a table showing the major versions and release dates for 32 bit Windows: Version Version Number Release Date ReDistributable Size 34 Major Features 1.0 1.0.3705.0 01-05-2002 19 Meg 1st .Net Framework ? Fixes and Performance Enhancements Fixes and Performance Enhancements 1.0 Service Pack 1 ? 1.0 Service Pack 2 08-07-2002 6.4 Meg Includes Service Pack 1 04-22-2003 and 2? 19.7 Meg 1.0a 1.0 1.1 Service Pack 3 08-30-2004 1.1.4322.573 9.6 Meg Security Issues, Better WDSL, better XP SP2 Support, fixes 23.1 Meg Better Scalability, Mobile Device Support, IPv6 support, ODBC for ADO.NET and Oracle, code access security to enable lockdown of ASP.NET applications 10.2 Meg Improved Security, fixes 22.4 Meg Scalability, Performance, ASP.NET Version 2, 64 bit support, ACL support, COM Interop enhancements, Data Protection API, Distributed Computing and SOAP enhancements, Expanded Certificate Management, FTP Support, Generics, Globalization, I/O enhancements, numerous other enhancements 23.6 Meg Security and Performance Enhancements, prerequisite support for .NET 3.0 and 3.5 Features 04-01-2003 1.1 Service Pack 1 08-30-2004 2.0 2.0.50727.42 2.0 11-07-2005 Service Pack 1 11-19-2007 35 2.8 Meg Implements New Managed Code programming model: (Built into Vista) 3.0 3.0.4506.30 11-06-2006 2.4.Meg 3.0 Service Pack 1 11-19-2007 3.5.21022.8 Windows Communication Foundation (WPC) Windows Workflow Foundation (WF) Windows CardSpace (formerly “InfoCard” Fixes, Prerequisites for .Net Framework 3.5 Note: This .NET framework set of technologies was originally named “WinFX” 2.7 Meg 3.5 Windows Presentation Foundation (WPF) 11-19-2007 New Feature Sets for WorkFlow Foundation, WCF, WPF and CardSpace, Deep Integration for LINQ, AJAX, New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards, Enhancements to Visual Studio 2008 for above noted new technologies, New Base classes that address customer’s requests Microsoft .NET Development Best Practices Resources A common question that comes up from .NET developers and architects is “What is the best practice for doing xxxxxx?” where “xxxxxx” might be a number of different technologies and application types. While searching the Internet for these types of questions can be quite enlightening, it is worth mentioning that Microsoft actually created the Microsoft Patterns and Practices Developers Center whose mission is to: “Microsoft patterns & practices are Microsoft's recommendations for how to design, develop, deploy, and operate architecturally sound applications for the Microsoft application platform.” 36 This facility actually provides not only documentation but actual libraries of code that can be leveraged by developers to perform certain sometimes complex tasks in a best practices manner. This includes facilities such as the Microsoft Enterprise Library which includes: “This release of Enterprise Library includes: Caching Application Block, Cryptography Application Block, Data Access Application Block, Exception Handling Application Block, Logging Application Block, Policy Injection Application Block, Security Application Block and Validation Application Block.” There are additionally a number of “software factories” beginning to appear such as the Web Client Software Factory (which provides assistance in the area of AJAX for example), the Web Service Software Factory for assistance in building enterprise Web Services, and the Guidance Automation Toolkit. Additionally, there is an excellent free tool on Microsoft’s CodePlex Open Source site named the Patterns and Practices Guidance Explorer that provides a wealth of information to Architects, Designers and Developers regarding coding and design best practices complete with samples as shown in Figure 3 below: 37 Figure 4 – Patterns and Practices Guidance Explorer. New York Times Reader - A Disconnected/Offline “Killer Application” written in .NET and WPF A new generation of applications is beginning to appear that make use of .NET, WPF and WCF as well. One that has been highly touted as a on the Internet “killer application” is the New York Times Reader Client which is written entirely in .NET and makes extensive use of WPF (I’m trying to determine if it is using WCF as well, but have received no acknowledgement as of yet). This application was selected as one of PC World’s top 25 applications of 2007. I downloaded this last Friday and paid the $14.95 registration fee to begin using it so I could try it out. It’s really good. You can supposedly download it and try it for free for some period of time as well. The download location is here. 38 This application effectively provides a really pleasing reader experience for New York Times content. When connected to the Internet, it automatically syncs information using RSS feeds, and when offline, the New York Times newspaper as it existed at last sync time is available to read. It also automatically archives previous content so you can step back to previous day’s stories. While this is a really great application, I must note that it is primarily a read only content delivery application. Many applications are obviously more complex as they require user interaction. I thought it worth mentioning however because it is a really good small example of the latest .NET technologies in production usage today to solve a problem. One of the people evidently involved with the development of the NY Times Reader is Josh Smith who has a very good blog on using WPF for those interested. Microsoft has created a Syndicated Client Experiences Starter Kit Beta & Reader Beta SDK to assist customers in building these types of applications. 39