Monday, February 04, 2008
Enterprise Library 3.5 for Visual Studio 2008
After releasing Enterprise Library 3.X last May, and starting the Enterprise Library Contrib project, the team is currently working on porting Enterprise Library to work with Visual Studio 2008. According to Grigori Melnik, this includes improving existing application blocks as well as guidance on how to use them. Melnik also mentions, that moving to Enterprise Library 3.5 does not include introducing new application blocks. No official date was provided, but we can expect the release to be available after February 2008, after Visual Studio 2008 is officially launched.
Together with this release we can also expect to find updated Hands On Labs that will also include labs for the Validation Application Block and Policy Injection Application Block that were introduced in Enterprise Library 3.0.
Friday, January 11, 2008
Visual Studio 2008 Features
Even though I just said that Visual Studio 2008 doesn't look to be a revolutionary upgrade, that doesn't mean there aren't plenty of goodies to go around. Some of the notable improvements include:
- LINQ support
- .NET Framework 3.5 support
- ASP.NET AJAX now built into the .NET Framework
- Improved JavaScript Intellisense and debugging
- Improved Web designer with better CSS support (based on Expression Web)
- Nested Master Pages
- ASP.NET ListView control
- Multi-targeting - allows you to target different versions of the .NET Framework. Finally one dev environment for .NET 2.0, 3.0, and 3.5!!!
Friday, January 04, 2008
Service-Oriented Architecture
When we say services, it refers to a discretely defined set of contiguous and autonomous business or technical functionality. A service is much like a function that is well-defined, self-contained, and does not depend on the context or state of other services. In fact, they just provide/offer a service by it’s own.
The term service oriented approach is not new; it is there from the long olden age of COM /DCOM and still survives and finds its existence in the software architecture space. Recently Microsoft has used this approach to design and implement WCF (Windows Communication foundation formerly known as Indigo) in Microsoft .Net framework 3.0
In an SOA environment independent services can be accessed without knowledge of their underlying platform implementation or other internal details which helps us greatly in interconnection like scenarios.Normally in this scenario, there will be a service consumer or service agent sending a service request message to a service provider. The service provider returns a response message to the service agent. The request and subsequent response connections are defined in some way that is understandable to both the service consumer and service providerOne of the other features of this approach is that the client is not tightly coupled to these services, both the client and services are independent of each other, thus the client is free to interact with whatever services are required
Thursday, January 03, 2008
Accessing Master Page Properties from a content page
One way of doing this in the content page,
int valueNeeded = ((MyNameSpace.MyMasterPageClassName)Master).MyProperty;
Or you can do this by doing like this in ContentPage.aspx page
<%@ MasterType VirtualPath="~/MasterPage.master" %>
Just below the Page directive and then you can access the proeprty in codebehind in content file as as:
int valueNeeded = Master.MyProperty;
Using these methods you can access a property of a masterpage file.
VS 2008 Features and support
Multi-Targeting
Past few releases of Visual Studio, each Visual Studio release only supported a specific version of the .NET Framework. For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked with .NET 1.1, and VS 2005 only worked with .NET 2.0.
One of the big changes starting with the VS 2008 release is to support "Multi-Targeting" - which means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to start taking advantage of the new features Visual Studio provides without having to always upgrade their existing projects and deployed applications to use a new version of the .NET Framework library.
Now when you open an existing project or create a new one with VS 2008, you can pick which version of the .NET Framework to work with - and the IDE will update its compilers and feature-set to match this. Among other things, this means that features, controls, projects, item-templates, and assembly references that don't work with that version of the framework will be hidden, and when you build your application you'll be able to take the compiled output and copy it onto a machine that only has an older version of the .NET Framework installed, and you'll know that the application will work.
Creating a new project in VS 2008 that targets .NET 2.0. While creating a project you can notice with dropdown with different .NET framework in it. You can select what type of Framework you want to use.After you select the framewrork, it will automatically filter the project list to only show those project templates supported on machines with the .NET 2.0 framework installed. If you create a new ASP.NET Web Application with the .NET 2.0 dropdown setting selected, it will create a new ASP.NET project whose compilation settings, assembly references, and web.config settings are configured to work with existing ASP.NET 2.0 servers.
why use VS 2008 if you aren't using the new .NET 3.5 features?
Well, the good news is that you get a ton of tool-specific value with VS 2008 that you'll be able to take advantage of immediately with your existing projects without having to upgrade your framework/ASP.NET version. A few big tool features in the web development space I think you'll really like include:
- JavaScript intellisense
- Much richer JavaScript debugging
- Nested ASP.NET master page support at design-time
- Rich CSS editing and layout support within the WYSIWYG designer
- Split-view designer support for having both source and design views open on a page at the same time
- A much faster ASP.NET page designer - with dramatic perf improvements in view-switches between source/design mode
- Automated .SQL script generation and hosting deployment support for databases on remote servers
And also, you can upgrade or downgrade to any version on .NET framewrok by pulling properties and selecting the desired framework you want. This will automatically remove the newer assembly references from your project, update your web.config file, and allow you to compile against the older framework (note: if you have code in the project that was written against the new APIs, obviously you'll need to change it).
What about .NET 1.0 and 1.1?
Unfortunately the VS 2008 multi-targeting support only works with .NET 2.0, .NET 3.0 and .NET 3.5 - and not against older versions of the framework. The reason for this is that there were significant CLR engine changes between .NET 1.x and 2.x that make debugging very difficult to support. In the end the costing of the work to support that was so large and impacted so many parts of Visual Studio that we weren't able to add 1.1 support in this release.
VS 2008 does run side-by-side, though, with VS 2005, VS 2003, and VS 2002. So it is definitely possible to continue targeting .NET 1.1 projects using VS 2003 on the same machine as VS 2008.