Mode:  
Friday, March 12, 2010   Search
Jay Wren Reviews Component One Studio for .NET 2.0 Minimize

Component One Studio for .NET 2.0

 

Darrell Hawley asked me to review Component One Studio for .NET 2.0 and handed me a trial CD.  Not being the type of person that can say “No” to a new tool, I took the CD figuring I would be able to run through this in no time. I threw it into my laptop and started the install.  The process was slow because of my antivirus software, but there was nothing difficult about it. The one thing that was different was the prompt asking me if I wanted to install to the GAC. A nice feature that I hope more vendors decide to adopt. After installation was complete, I realized how big this offering from Component One truly was. There were all kinds of goodies for Windows Forms, ASP.NET and the Compact Framework. Since I wanted to keep this review to a reasonable length, I decided to focus on the Windows Forms controls, though I couldn’t help and make a few comments on the ADO.NET portion of the suite.

After the lengthy installation, the Live Examples application opens up. I clicked the play button and watched as my disk thrashed away.  I'm running on less than modern hardware, but it’s not horribly old hardware: an IBM Thinkpad T42 Pentium M 1.7Ghz with 1.5GB of RAM.  When I clicked a node in the tree after hitting the play button I got an unhandled exception, but the app kept on running.

Just looking at the FlexGrid control in the demo I could see that this thing is exactly what it says it is: a flexible grid.  It has the familiar column and row concept of any grid, but the first demo presented has a treeview in the grid.  This is very different.  The demo splits the FlexGrid features among Outlines and Summaries (treeview in a grid), Cell Presentation (the more traditional grid), and Composite Controls.  When Component One claims flexiblility, they are NOT lying.

Next, the True DBGrid for .NET is demoed.  It looks very much like the FlexGrid but with an emphasis on displaying datasets from a database.  It has powerful grouping and filtering features built right into the control.  The filtering will be familiar to anyone who has used Excel to filter data.  The control also allows for nice splitting of grids, keeping one split area stationary, perhaps focused on some identifier like a name, and allowing the other area to scroll horizontally out to whatever column you wish.  There is a similar horizontal split and an interactive split.  All three are similar in functionality to Excel.  The printing and export features are where DBGrid really exceeds expectations.  You can almost consider this a reporting control as well.  It exports to PDF, HTML, RTF, Excel, and allows printing with along with a Print Preview feature.

For even better reporting and printing the next control is Chart for .NET.  This control supports everything you would expect in a charting control.  Line charts include splines and 3D variants.  Area charts, bar charts, column charts, pie charts, financial charts, even scatter charts and surface charts round out their offerings.

 

The rest of the controls must not be a major in C1’s view because they aren’t in the demos section of the example application.  These include an ADO.NET Extender and DataObjects for .NET.  It isn’t clear just what these are for.  FlexGrid does support just binding to a DataSet.  It seems the C1DataViewSet just adds a little bit of functionality to DataSet which C1 felt it was missing.  To be honest, from looking at the example code, I couldn’t exactly figure out what these features are, other than a better design time experience.

 

While I was playing with the demo app, I was reading through the documentation and found this interesting bit about the DataSet Extender:

“DataSet Extender is just a schema which sits on top of an ADO.NET typed

DataSet schema and provides additional properties to the DataTable and

DataColumn objects of DataSet. These additional properties allows you to

define additional functionality aspects of C1DataViewSet.”

 

Wow.  It gets crazier!

 

C1DataObjects provides a powerful replacement for ADO.NET. It has its own dataset layer, where data integrity constraints and other business logic can be defined. C1DataObjects is available for .NET 1.0 and 2.0.

 

C1DataExtender works with and extends ADO.NET. It works with ADO.NET datasets and provides additional rich data views in the native ADO.NET datasets. C1DataExtender is available for .NET 2.0 only.

 

Although both products are related to the data layer of .NET applications, they are fundamentally different. C1DataExtender is not just a new, enhanced version of C1DataObjects. It delegates the data storage and business logic to ADO.NET and concentrates on enhancing its features, rather than trying to replace it.

 

Now, my first instinct is, “YUCK!”  This is overkill.  But I try to give things the benefit of the doubt so I say to myself, “Self.  It isn’t so bad, they are extending ADO.NET.  This is what OO is all about.”  But I can’t embrace that denial.  Here is why this doesn’t work.  No other tool vendor is going to use C1’s C1DataObject or C1DataExtender.  These are C1 tools.  I’m a huge fan of modular code.  I like code reuse and I don’t mean the copy and paste kind.  So if 2 years from now you decide to use VendorX instead of C1 a ton of this stuff is going to have to be rewritten.  If these things used just a DataSet, or better yet your business objects directly, then you can swap out VendorX or VendorY’s tools easily. 

 

Of course I am a huge fan of Castle and NHibernate so take my opinion with a grain of salt.  I’m sure there is a use case for C1DataObject and/or C1DataExtender, I just don’t know what they are.  But these are only 2 small pieces of the C1 suite.  Just ignore them and use the C1 FlexGrid, Chart, etc.

 

So, having looked over the docs, I am wondering just how hard it will be to make my own grid and chart app. An hour or so later, after about 10 minutes actual time in Visual Studio, 5 minutes of reading the docs, and the rest of the time watching Grey’s Anatomy with my wife, I was able to define a custom data type called People (ok, I should have named it Person) with member properties Name and Age.  I data bound this to a FlexGrid and a Chart.  It worked exactly how you expect.  The various elements of the Chart were all bound properly to the appropriate members of my datasource (I was of course using an ObjectDataSource aka System.Windows.Forms.BindingSource).  The Chart control provides excellent design time experience for wiring up the various chart components to the databound members.

 

Overall I think the suite of tools is excellent.  If I were using it on a project I would be cautious to stay away from C1DataObject and C1DataExtender.  Of course, I typically stay away from DataSet as well.  The Chart and Grid controls work great and definitely offer an improved design time experience over the standard Windows Forms controls and this was the most trivial of use cases.  It appears from the excellent documentation that as complexity grows, the benefit of using these controls does too.

 

 

Here's a great way to make money online

Web site powered by web hosting providers of NY