Skip to main content

Posts

ReportViewer got an upgrade in Visual Studio 2010

Microsoft plans to release significantly updated and improved versions of both the Winforms and ASP.NET Report Viewer controls in Visual Studio 2010 .  This is going to include the long awaited local mode support for the new report processing engine , originally released with SQL Server Reporting Services 2008.  Most importantly, this provides RDL 2008 features (e.g. tablix, enhanced charts, gauge, rich text) in local mode without connection to a report server.  If you wanted to use RDL 2008 features with the report viewer controls available before, server mode was your only viable option, because report processing is performed remotely on a Reporting Services 2008 server.  Below are some of the other new features or changes who are coming as well. Support for the 2008 RDL schema in local mode.  This will give you all of the new features available in RDL in SQL Server 2008, including tablix, rich text, updated chart visualizations, gauge, and many other...

C# and it’s lifecycle

Everything becomes obsolete sooner or later. The same thing counts for programming languages.  The lifecycle of a programming language can be divided in 7 phases: Conception Adoption Acceptance Maturation Inefficiency Deprecation Decay Scot Allen is starting an in interesting discussion about the language phase where C# is today. Can things only get worse after C# 4.0? Or will there still be some interesting evolutions for the C# programming language? Maybe the dynamic keyword is just a sign for what will be next…

VSTS 2010 Beta 2 Training Kit released

The Beta 2 version of Visual Studio 2010 Training Kit is now live. This training kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize a variety of Visual Studio 2010 and .NET Framework 4 technologies. The Beta 2 release of the Training Kit contains 15 presentations, 19 hands-on labs, and 13 demos. Many technologies are covered in this release, including: C# 4, VB 10, F#, Parallel Extensions, Windows Communication Foundation, Windows Workflow, Windows Presentation Foundation, ASP.NET 4, Entity Framework, ADO.NET Data Services, Managed Extensibility Framework, and Visual Studio Ultimate.

Laws of dependency injection

As a heavy user of dependency injection, I’m always careful when applying it. “If you have a hammer, everything looks like a nail.”   Nikola Malovic mentions on his blog the following laws about the usage of an IOC container. Nikola’s 5 laws of IoC: “Store in IoC container only services. Do not store any entities.” "Any class having more then 3 dependencies should be questioned for SRP violation" “Every dependency of the class has to be presented in a transparent manner in a class constructor.” “Every constructor of a class being resolved should not have any implementation other then accepting a set of its own dependencies.” “IoC container should be explicitly used only in Bootstrapper. Any other “IoC enabled” code (including the unit tests) should be completely agnostic about the existence of IoC container." Although I don’t agree with all of his laws, he makes some good points.

Generic Comparer

A requirement in most of our applications is a default sorting for our codetable data. For example if you want to populate a combobox with all the countries in the world, it must be sorted by default in alphabetical order. I heard my colleagues discussing about it during one of our whiteboard design meetings. Possibilities passed by from using a custom attribute to a metadata class. While they were discussing I build the following solution; a generic comparer. Specify the properties to sort on using expressions and pass it on to the Sort method. No direct coupling between a class and it's sorting, type safety and extensible. What do you need more? The implementation of the Comparer is very simple, it just iterate over the expressions array and compares each property in both objects:  1: public class GenericComparer<T> : IComparer<T> 2: { 3: private readonly Func<T, IComparable>[] _expressions; 4:   5: public GenericCom...

Database Change Notification in Oracle

The SQL Server driver for ADO.NET has the SqlDependency class. It enables applications to receive notifications when there is a change in a query result set, schema objects, or the state of the database. Using SqlDependency, an application can maintain the validity of the client-side cache easily. At one of my clients we aren't using SQL Server but Oracle. As I searched throught the standard ADO.NET driver for Oracle (System.Data.Oracle) I couldn't find a similar class. After some digging on the Oracle site I found that Oracle has a separate driver for .NET next to the standard ADO.NET driver. If you download the Oracle Data Provider for .NET (Oracle.DataAccess) you'll find the OracleDependency class that has the same functionality as the SqlDependency class. A simple example to show this functionality: 1: public class Notification 2: { 3: public static bool IsNotified = false ; 4: 5: public static void Main( string ...