Sunday, October 21, 2007

To help compliment the release notes for EntitySpaces 2007 v1.1021.0 we decided to create this post. We have now implemented more than half of the functionality planned for this release, which is the last major release for ES2007 (ES2008 is the next major release). We feel this is a very strong beta especially for Windows.Forms developers. Our hierarchical binding and extra column support really compliments the new "join" syntax. Also, the Compact Framework data binding is no longer disabled, it's fully functional again in this beta.

Let's jump right in.

Take a look at this design time snapshot which contains three grids on a Windows.Forms page. The first grid is the "old" DataGrid which supports hierarchical data binding, the second is the DataGridView which does not support hierarchical binding, while the third grid is the DevX grid which of course supports deep frying a whole turkey if that's what you need it to do.

On the above form we dropped an EntitySpaces "EmployeeCollection" along with a binding source. The binding source has its DataSource set to the "employeeCollection1" and all three grids are then bound to the binding source. Take a look at the form as it appears during runtime.

So what's the big deal here? Well, let's take a look the query that retrieves the data.

We're not using a join here to bring back the extra columns, however, the effect is the same. What is cool about this is that you can bring back all kinds of crazy columns and they will be present and available for runtime data binding. Notice that I bring back two extra columns not in my Employees table. The first is the FullName column which is a calculated column created via our expression support (the + operator concatenates strings in this case). The second column is merely the LastName column aliased to "LastNameRenamed".

Now, if you look at the runtime snapshot of the grids above you'll notice that you can see both the FullName and LastNameRenamed columns. Notice that the middle grid (the DataGridView) doesn't show the LastNameRenamed column. That's because it is not setup to perform auto-layout and displays only those columns that were available at design time. Yet, it shows the FullName column? We'll explain all that soon. But before we recount that, our enhanced binding functionality ensures that all columns brought back via a query, a stored procedure, whatever, are available during runtime data binding, and you can still bind directly to your EntitySpaces collections.

Take a look at our class definition.

Notice the FakeColumn and FullName properties. The FakeColumn property is really nothing special, we've just added a custom property in our Custom class and backed it with a local string property. It doesn't come from the underlying DataTable. However, notice in the GetLocalBindingProperties method, which we've overridden, that we add our FakeColumn to the esPropertyDescriptor list. That is what allows the FakeColumn property to appear in our grids, and it is even available during design time (true for all columns returned by GetLocalBindingProperties). Notice that our FullName property is backed by data in the underlying DataTable (indicated by the fact that we use GetColumn to get at the data). It is also added during GetLocalBindingProperties. This is not necessary, we only did this because we wanted FullName to be available during design time. We could have created a view of course that returned FullName and generated an EmployeeView class from that. However, we wanted to fully explain the enhanced functionality. So, we add FullName to our GetLocalBindingProperties only so we can see FullName during design time binding. Remember, all columns in the underlying DataTable are available via runtime binding. Note also that the old CreateExtendedProperties() method is no longer supported.

So that explains why we see both FakeColumn and FullName in our grids, but what about LastNameRenamed?

If you look at the above design time property editor for our DevX grid, you will see the core columns from the Employee table in the red box. You can also see both colFakeColumn and colFullName which were retrieved automatically (thanks to GetLocalBindingProperties ). However, notice the <LastNameRenamed> column mapping. This was manually added by clicking the "Add" button and providing "LastNameRenamed" as the FieldName and Caption. EntitySpaces will serve up all your extra columns to whatever control you're binding to at runtime automatically. All you need to do is add the mapping to the control and it will display. This is why our new join support becomes particularly useful.

That's quite a bit to digest. One thing we have also done is to make our GetColumn and SetColumn methods fault tolerant. GetColumn will never throw an exception. If the column doesn't exist then null/Nothing is returned. SetColumn will have no effect, if the column doesn't exist.

Also, one final tidbit, for those of you waiting for hierarchical XML serialization, you can try this if you want to (however, do not start writing coding assuming this is how it will work). If you want to test hierarchical XML serialization, go into one of your hierarchical properties and remove the XmlIgnore attribute. You should be able to serialize and de-serialize hierarchical XML data. Remember, this is unsupported as of this beta as we haven't thought this through yet. In a few days we will follow up with another blog post and explain what else is in our final ES2007 release. We can say however it is mostly XML serialization, esDataSource improvements including hierarchical support, and killer new dumb proxies that can operate on the client side without the need for EntitySpaces, yet do everything our full proxies do now. Yep, this is going to be a killer release.

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 21, 2007 8:41:22 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, October 16, 2007

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, October 16, 2007 11:33:51 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, October 07, 2007

Okay, two posts back-to-back on Hierarchical Binding in the same day. Using the standard DataGrid in my previous post I was pretty unimpressed (nothing against Microsoft, this feature isn't something they focus on). However, I downloaded the DXperience v2007 Vol 2 by Developer Express and did a simple binding test. Now I see the power of hierarchical binding. 

Take a look my DevExpress XtraGrid showing my EntitySpaces hierarchical object model. The image below shows me drilling down from an Employee into an Order and finally into the OrderDetails collection, notice the tabs for other collections which are peers of each other (on the same level).


Take a look at the design support image below. You can customize each sub collection including what columns to display and so on, there is also a flag that will indicate that you want to control what sub-collections you want to be shown. Thus you have total control over the data that is displayed.


We will also be posting a sample using the Telerik Windows.Forms suite soon as well, as we are big fans of Telerik as well. 

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 07, 2007 11:31:29 AM (Eastern Standard Time, UTC-05:00)  #   

I'm still not sure how useful this feature is or how it can be "tamed". I've been playing around with this via the old DataGrid control and it seems to work pretty well. However, nothing I do in the TableStyles seems to limit or control what is displayed? I simply load a collection and bind it to the DataGrid and it shows the entire hierarchical model by default and nothing I do seems to limit it. It's been a long time since I played around with hierarchical grids as IMHO they really aren't a great way to convey information.

 

 

So far this is for Windows.Forms only as all this work is done in ITypedList and ASP.NET 2.0 doesn't support this interface any longer (don't even get me started). We will be focusing next on our esDataSource control which will be receiving some major enhancements including hierarchical support and will be using it's own AppDomain to prevent it from locking DLLs. When all done, the esDataSource should be able to find your ASP.NET DLL automatically, no more browsing to it. I've downloaded one of the major Windows.Forms commerical grid suites and will be trying it out as well.

This will be in our next beta release coming soon ...  Comments welcome and encouraged, especially from the expert hierarchical "GridBinders" lurking about ...

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 07, 2007 10:02:13 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, October 02, 2007

EntitySpaces "Hierarchical" Skypecast

               This is scheduled for October 04, 17:30 (5:30 EST Time)

This is our first Skypecast, hopefully it will be productive. The Skypecasts feature of Skype are still in beta so hopefully this will work as planned. We are only going to talk about Hierarchical Databinding, Serialization and improvements related to our esDataSource. This is your chance to have some input on how these features will be implemented. If all goes well we might turn this into a bi-weekly EntitySpaces architecture discussion.

Click on the image above or HERE to join ...

 

 

posted on Tuesday, October 02, 2007 8:43:53 AM (Eastern Standard Time, UTC-05:00)  #