Thursday, February 28, 2008
We are calling this an Alpha however EntitySpaces is well tested. The alpha will have passed all of our unit tests so it will be very stable. The only reason we are not calling it a Beta is that initially we are only supplying the C# templates, our VB.NET templates will follow in the subsequent Beta. You will not have to register on our site to download the Alpha (same goes for our trial versions).

If you are a CodeSmith fan consider taking a look at EntitySpaces, here are some of the features:

  • Mono Support
  • Medium Trust Support
  • Compact Framework Support
  • Hierarchical Data Models
  • Powerful Dynamic Query API
  • Data Provider Independence
  • Binary and XML Serialization
  • Two Different Transaction Models
  • Saving via Stored Procedures or Dynamic SQL
  • Design Time Data Binding
  • Generated from your Database Schema
  • LINQ Support for Collections 
  • Regenerate Without Losing Custom Business Logic
  • Admin Grid Template Suite for ASP.NET
  • Admin Grid Template Suite for DotNetNuke
  • Source Code Available

Providers Available:

  • Microsoft SQL Server / SQL CE
  • Microsoft Access
  • Oracle
  • MySQL
  • VistaDB 
  • PostgreSQL  
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 Thursday, February 28, 2008 9:33:52 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, February 26, 2008

VistaDB 3.3 Express Edition

VistaDB has decided to release a free Express version. Here is an excerpt from their Blog post:

What is it?

VistaDB Express is a free edition of VistaDB for non commercial use.  This includes hobbyists, mono developers, open source projects, personal websites, user groups, sample application, schools, and much much more.

Why an Express Edition?

We get asked quite a bit about distribution with free and open source projects (especially mono developers), we needed  a license to specifically help these developers use all the cool features of VistaDB in their community as well.

Microsoft decided a long time ago that the Express Development tool (VB Express, C# Express, C++ Express) editions are not allowed to load third party plugins.  These editions were specifically aimed at the non professional developer community.  Since they can't load the GUI plugins for Visual Studio 2005 and 2008 anyway, we decided to simplify the offering for these users.

Where do I get it?
Read the rest of the story HERE ...

posted on Tuesday, February 26, 2008 12:24:03 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, February 21, 2008

In mid March we are going to offer an Alpha release of EntitySpaces 2008 (ES2008) for CodeSmith users. If you are a MyGeneration fan don't worry, your support will be in the Beta release of ES2008 the date of which hasn't been announced yet. This is an image heavy post and we apologize for that, it was really the best way to demonstrate our CodeSmith support. For those interested in code generation if you follow along you will see just how easy our new code generation syntax is.

This post will serve to introduce to you our new EntitySpaces esMetadataEngine which is a pure C# assembly that doesn't rely on COM interop. The esMetadataEngine combines some of the best features of the MyMeta engine from MyGeneration and also combines the esPlugIn assembly and the Dnp.Utils assembly all into a single assembly which is installed in the GAC. Our esMetadataEngine supports Microsoft SQL Server and SQL Server CE, Oracle, MySQL, PostgreSQL, VistaDB, and Microsoft Access. Other database engines will be added as we add support for them. The esMetadataEngine works equally well under both CodeSmith and MyGeneration. For those wishing to extend and customize EntitySpaces we think you are really going to like the EntitySpaces esMetadataEngine.

 

image

In the CodeSmith Template Explorer (shown above) we use the right mouse button to execute our "Generated Classes Master (C#)" template. Take a look at the user interface shown below.

image 

Because we use our own metadata engine and not the CodeSmith Schema Explorer we need to provide our own connection information. However, we make this very easy. Notice the little " ... " button above on the "CLICK HERE FOR EASY SETUP" property. When you click on that button you will be presented with the dialog shown below.

image

In our setup dialog above you can connect to your database and choose any number of tables (multiple selection) or views for which to generate EntitySpaces classes. Once you press the "Ok" button we work some "magic" and all of the appropriate properties in the CodeSmith property dialog are auto-filled with your selections.

image

In the image above you can see how the ConnectionString, Database, and Entities have now been populated. If you click on the Entities property you will see that it is a normal CodeSmith StringCollection and will be presented as follows (shown below) if you were drill into that property.

image

Again, our easy "SetupDialog" makes all this setup painless and supports multiple selection for your tables and views. You can generate your entire EntitySpaces 2008 Architecture in a single template run. We play well and fully support CodeSmith projects as well.

Our Master Template


So let's take a look at how the esMetadataEngine makes life very simple. Take a look at our Master template shown below.

 

image

 

First we register and import our esMetadataEngine assembly followed by the registration of our subtemplates (which you can see in the first image in this post). Next, we declare our user interface properties. This is all pretty straightforward for the average CodeSmith developer.

 

image

The image above shows how we create an instance of the esMetadataEngine and connect it to the database using the UI properties from the CodeSmith property grid. Next, we add all of the user interface variables to a Hashtable built into the esMetadataEngine for just such a purpose (the sub templates will grab their values from here). Remember, we want our templates to be 98% the same for both CodeSmith and MyGeneration (and they are).

image

The above image shows how we instantiate all of our subtemplates being sure to hand them a reference to the esMetadataEngine.

image


The master template simply loops through a list of entities (tables or views) chosen by the user and invokes each subtemplate within a foreach loop asking it to RenderToString() its content. That's pretty much our entire master template. You'll be even more impressed at how simple our subtemplates look (and are to to create).

A Subtemplate

Now, let's take a quick look at one of the subtemplates.

 

image


The above image shows an entire subtemplate. Notice that there is no looping. The master template does the looping and calls the subtemplate for each table or view selected by the user. A subtemplate will extract the UI variables it needs from the esMetadataEngine.Input Hashtable. Notice also the syntax "esMeta.esPlugIn", this shows our ES2007 esPlugIn has been built right into the esMetadataEngine. Finally, at the bottom you can see the "TheMetaData" property that the master template uses to pass itself to the subtemplate. Granted the above template is a very simple subtemplate but it should give you an idea of how this all works. I loved the full intellisense and easy debugging built into CodeSmith as well.

What is important is that other than the few tags at the very top there is no native CodeSmith API calls in any of our subtemplates. The master templates account for the 2% difference we will have between our CodeSmith and MyGeneration support. Basically, the master templates deal with the unique UI techniques and subtemplate execution methodologies between CodeSmith and MyGeneration (which is very easy to handle). The subtemplates are nearly and entire wholesale copy paste between code generation engines. Now, if you're looking forward to customizing and extending EntitySpaces and even sharing templates with others this is how you want to do it, and you can reach out to both CodeSmith and MyGeneration users. This isn't the whole story however, still much to come concerning customizing and extending.

However, code generation enhancements are not all we are doing. In our team meeting tonight I was shown our SubQuery unit test fixture an almost flipped. In about a week we are going to do an amazing blog post on SubQueries that promises to really WOW you.

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 Thursday, February 21, 2008 12:28:54 AM (Eastern Standard Time, UTC-05:00)  #   
 Friday, February 15, 2008
kick it on DotNetKicks.com

Imagine never having to leave Visual Studio while creating and shaping your EntitySpaces based application. Simply pop into the "CodeSmith Explorer", right mouse on our "Master Template", execute it, include the newly generated files into your solution, compile, and you're off and running in a matter of a few minutes. So Sweet.

CodeSmith

We are very excited about our upcoming CodeSmith support for ES2008 and will post more as soon as we are generating a complete EntitySpaces based application from within Visual Studio.

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 Friday, February 15, 2008 7:52:00 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, February 10, 2008

If you are an EntitySpaces customer, then you know how serious we take our forum support. When issues or feature requests are posted in our forums, we create a ticket in our Trac system. This Trac ticket will have a description of the issue, offer some thoughts and comments on it, and finally tie the ticket back to the originating forum post via a URL. Before each EntitySpaces release, the EntitySpaces team will, in one of our weekly Skype meetings, go through the Trac system and create a milestone, which typically consists of several key new features and a list of issues as reported in the forums. Below is a (partial) snapshot of our first ES2008 Beta milestone, however, the 0315 date is not to be taken literally, it could be before or after that date.

The key to the success of EntitySpaces lies in it's ease of use, which in large part comes from an elegant and intuitive API. However, none of that would matter if it wasn't backed by excellent forum support, tracking issues as they are reported, and extensive unit testing. Sometime in the ES2008 cycle we will do a blog post describing how our unit testing methodology is used to deliver a rock solid architecture to our customers.

image 

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, February 10, 2008 10:48:33 AM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, February 07, 2008
kick it on DotNetKicks.com

We're busy working on EntitySpaces 2008 (ES2008) and thought we would demonstrate to you how subqueries will work. If you are familiar with our Join syntax then subqueries will feel like a perfect extension. The EntitySpaces 2008 architecture allows subqueries on the Select, the Where, the From, and the Join statement. Before we look at subqueries take a moment to review how our join syntax works. The EntitySpaces DynamicQuery API has proven to be very popular, so much so that other architectures are following suit.

EntitySpaces Join Syntax Review

Notice that we create three query objects and then relate them through InnerJoins and finally ask the CustomerCollection to load the query.

CustomerQuery cust = new CustomerQuery ("c");
OrderQuery order = new OrderQuery ("o");
OrderItemQuery item = new OrderItemQuery ("oi");

cust.Select(cust.CustomerName, (item.Quantity * item.UnitPrice).Sum().As("TotalSales"));
cust.InnerJoin(order).On(order.CustID == cust.CustomerID);
cust.InnerJoin(item).On(item.OrderID == order.OrderID);
cust.GroupBy(cust.CustomerName);
cust.OrderBy("TotalSales", esOrderByDirection.Descending);

CustomerCollection coll = new CustomerCollection ();
coll.Load(cust);

Pretty sweet and that is supported in ES2007 which is shipping now. But we're just getting started. Now let's look at some subquery samples.

EntitySpaces SubQuery in the Select Statement

This subquery determines the Maximum Unit Price for each order in the system.

OrdersQuery orders = new OrdersQuery("orders");
OrderDetailsQuery details = new OrderDetailsQuery("details");

orders.Select
(
    orders.OrderID,
    orders.OrderDate,
    details.Select(details.UnitPrice.Max()).Where(orders.OrderID == details.OrderID).As("MaxUnitPrice")
);
OrdersCollection coll = new OrdersCollection();
coll.Load(orders);

The resulting SQL generated by our SqlClientProvider is as follows.

SELECT orders.[OrderID],orders.[OrderDate],
(
    SELECT MAX(details.[UnitPrice]) AS 'UnitPrice' 
    FROM [Northwind].[dbo].[Order Details] details
    WHERE orders.[OrderID] = details.[OrderID]
) AS MaxUnitPrice 
FROM [Northwind].[dbo].[Orders] orders

The resulting data is as follows:

OrderID     OrderDate               MaxUnitPrice
----------- ----------------------- --------------
10248       1996-07-04 00:00:00.000    34.80
10249       1996-07-05 00:00:00.000    42.40
10250       1996-07-08 00:00:00.000    42.40
10251       1996-07-08 00:00:00.000    16.80
10252       1996-07-09 00:00:00.000    64.80
10253       1996-07-10 00:00:00.000    16.00
10254       1996-07-11 00:00:00.000    19.20
10255       1996-07-12 00:00:00.000    44.00
10256       1996-07-15 00:00:00.000    26.20

EntitySpaces SubQuery in the From Clause

Now let's look at using a subquery used in the From clause which returns the average freight per company.

OrdersQuery o = new OrdersQuery("o");

CustomersQuery c = new CustomersQuery("c");
c.Select(c.CompanyName, c.Country, o.Freight);
c.From
    (
        o.Select(o.CustomerID, o.Freight.Avg()).GroupBy(o.CustomerID)
    ).As("s");
c.InnerJoin(c).On(c.CustomerID == o.CustomerID);

CustomersCollection coll = new CustomersCollection();
coll.Load(c);

The resulting SQL generated by our SqlClientProvider is as follows.

SELECT c.[CompanyName],c.[Country],s.[Freight] 
FROM
(
    SELECT o.[CustomerID],AVG(o.[Freight]) AS 'Freight' 
    FROM [Northwind].[dbo].[Orders] o
    GROUP BY o.[CustomerID]
) AS s
INNER JOIN [Northwind].[dbo].[Customers] c
ON c.[CustomerID] = s.[CustomerID]

The resulting rows look like this:

CompanyName                              Country         Freight
---------------------------------------- --------------- -------
Alfreds Futterkiste                      Germany         37.5966
Ana Trujillo Emparedados y helados       Mexico          24.355
Antonio Moreno Taquería                  Mexico          38.36
Around the Horn                          UK              36.3038
Berglunds snabbköp                       Sweden          86.64
Blauer See Delikatessen                  Germany         24.0371
Blondesddsl père et fils                 France          56.6963
Bólido Comidas preparadas                Spain           63.7233
Bon app'                                 France          79.8747
Bottom-Dollar Markets                    Canada          56.7107

EntitySpaces SubQuery in the Where Clause

Here we have returned a list of countries where customers live where there is no supplier located in that country. Here we pass a subquery to the NotIn() operator.

SuppliersQuery supp = new SuppliersQuery("supp");
supp.es.Distinct = true;
supp.Select(supp.Country);

CustomersQuery cust = new CustomersQuery("cust");
cust.es.Distinct = true;
cust.Select(cust.Country);
cust.Where(cust.Country.NotIn(supp));

CustomersCollection coll = new CustomersCollection();
coll.Load(cust);

The resulting SQL generated by our SqlClientProvider is as follows:

SELECT DISTINCT cust.[Country] 
FROM [Northwind].[dbo].[Customers] cust
WHERE cust.[Country] NOT IN
(
    SELECT DISTINCT supp.[Country] 
    FROM [Northwind].[dbo].[Suppliers] supp
)

The resulting rows look like this:

Country
---------------
Argentina
Austria
Belgium
Ireland
Mexico
Poland
Portugal
Switzerland
Venezuela

Although not shown here it is also possible to use a subquery in the Join statement. Of course, subqueries can be nested in various ways too. We hope this gives you a glimpse of what is coming in ES2008. We are making great progress. The beauty of course is this will work on all of the databases we support.

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 Thursday, February 07, 2008 10:31:21 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, February 02, 2008
kick it on DotNetKicks.com


  

That's right ... "EntitySpaces running under Mono on Linux using MySQL as the backend".

 

 

If you are an EntitySpaces customer, you can now travel anywhere. From Windows, to Mono/Linux solutions, to the Compact Framework and all kinds of wireless devices, to Web Applications including "Medium Trust" support, or to high-end Enterprise Applications, EntitySpaces can take you there. EntitySpaces is truly a tiny, lightweight, powerful architecture for the Microsoft.NET Framework, and uses zero reflection. If you are a Mono developer, EntitySpaces is a terrific architecture for you. With it, you can work on both sides of the isle. Our database independence can free you from most of the complexities of supporting many types of databases, including those that run under Mono, such as MySQL and VistaDB. No longer will you have to invent new architectures with every new challenge that comes down the road.

Our contest winner goes by the title Pro.Coder, and is a independent contractor. We have received his entry to our Mono contest, and were quite pleased. Pro.Coder sent us a DVD with the EntitySpaces demo running under Mono. Thank you Pro.Coder, you did an excellent job. An image of it is shown below. Pro.Coder added the CRUD and DynamicQuery Join examples, to satisfy our contest requirements.

 

image

Below are some comments we received with Pro.Coder's DVD on how he got our EntitySpaces Demo to run under Mono ...

As for EntitySpaces on Mono application development, I did the following Steps:

  1. Download and Install Latest Version My Generation 
  2. Download and Install Latest Trial Version Of EntitySpaces 2007 
  3. Download and Install Latest Version of MySQL Community Edition
  4. Download and Version 5.0.7.0 of MySQL .net/Connector (Otherwise EntitySpaces gives Version conflict error)
  5. Download and Install Latest Version of Mono for windows
  6. Download and Install Latest Version VMware Player
  7. Download Mono Suse 10.2 VMware Virtual Machine
  8. Imported the Northwind database to MySQL from Sql Server
  9. Created CRUD procedures for MySQL Northwind database using My Generation EntitySpaces Template

Once all the installation was done, I was ready develop EntitySpaces on Mono. I used Visual Studio 2005 to develop, and used Mono to test it first on Windows. Once everything was working, I used VMware player and Mono Suse 10.2 VMware Virtual Machine to test it on Linux.

Instead of developing an application from scratch, I used the VB.net example that was shipped with the Trial version of EntitySpaces 2007. The first thing I did was to make EntitySpaces use the configless connection string support, which was very easy. Then, I started the build and debug process. From the features I have tested, CRUD process and Dynamic Query all work fine. While modifying the example application, the main issues I faced were:

Data Binding and Windows Forms
Binding the Windows Forms DataGrid Control to a Data Source
Binding Class
BindingContext Class
BindingsCollection Class 

I think many methods and properties are not yet supported on Mono. Maybe they are supported, and I just have to do some tweaking. I'm not sure. I have not yet gone through the Mono documentation. Grid.DataSource = EntityCollection gives a type conversion error, so I used CreateColumnsForBinding. Even after using it, I still got type conversion error. I'm not sure what exactly CreateColumnsForBinding is for. I thought it should correct it. So, as it didn't work, I did the next best thing, and added a ToDataTable() method to collection class and used it to bind to the grid.

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 Saturday, February 02, 2008 11:02:11 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, January 31, 2008
kick it on DotNetKicks.com

If you are a CodeSmith guru, and well versed in writing CodeSmith templates, you are the kind of person we are looking for. We have a set of templates written for MyGeneration that we would like ported to CodeSmith. This will be pretty easy actually, as we have our own assemblies that will all run under CodeSmith. We use the MyMeta engine, which is now under the BSD license, and therefore can run under CodeSmith, as well. So, basically, we just need our templates converted, but the "core" of the templates will run as is. There is very little code that actually needs converting. Once you've done one of them, the rest will fall right into place. We have two sets of templates, one that creates our C# architecture, and one that creates our VB.NET architecture, but both sets of templates are written in C#.

There are two master templates (they have a simple UI), and eleven sub templates (no UI) per language (C# and VB.NET). If you, or your company, are interested in contracting out to convert these templates, please reply to this thread, or send an email to support @ entityspaces dot net. This is something we are ready to start on immediately.

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 Thursday, January 31, 2008 8:24:02 AM (Eastern Standard Time, UTC-05:00)  #