Wednesday, December 26, 2007
MyGeneration 1.3.0.3 Released - Code Generation, O/R Mapping, and Architectures

  • The Free Code Generator / OR Mapping Tool the competition doesn't want you to know about
  • The #1 .NET Development Tool on Download.com of all time.
  • A $199 value given away 100% free. No Adware or Spyware.
  • Supported Architectures - EntitySpaces,  EasyObjects.NET/EntLib,  Gentle.NET,  Opf3,  NHibernate,  Microsoft's DAAB,  DotNetNuke,  iBatis
  • Support for Twelve Different Database Systems.
  • Microsoft SQL,  Oracle,  IBM DB2,   PostgreSQL,  Microsoft Access,  FireBird,  Interbase,  VistaDB,  SQLite,  MySQL,  Advantage and Pervasive
  • Template Based Code Generator Supporting Four Template Languages - JScript, VBScript, C# and VB.NET
  • Ability to Create Your Own Embedded User Interface in your Templates
  • Online Template Library for Publishing and Downloading Templates



Update - 2008-01-03: There are specific EntitySpaces installers available for use with MyGeneration 1.3. They can be found on the Trial download page, or, for customers, under the latest Products -> Downloads page. Our recommendation is to install MyGeneration1.3 with the defaults. This will give you a side-by-side installation, with MyGeneration 1.3 in its own program folder. Make sure both versions of MyGeneration are closed before installing EntitySpaces. Again, we recommend taking the EntitySpaces for 1.3 installer defaults, for the best side-by-side experience.

posted on Wednesday, December 26, 2007 1:17:16 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, December 06, 2007

mono

 

EntitySpaces, LLC is offering $1,000 U.S. dollars to the first person or company to successfully create an EntitySpaces application that runs under Mono version 1.2.5.1 or higher and does so within the constraints of the rules outlined below. We will also make a follow up blog post announcing the winner which could help push traffic to your site if you are interested (and make you famous for at least 15 minutes).

The Rules

  1. The Application or Website must use Mono version 1.2.5.1 or higher.
  2. The Application must use EntitySpaces 2007 v1119 or higher.
  3. The Application must insert, update and delete data from the database using our standard EntitySpaces generated classes via the Save() method.
  4. The Application must use the EntitySpaces DynamicQuery API to perform a join and display the results.
  5. The Application must be created as an image in the "VMware Virtual Image" file format as found on http://www.mono-project.com/Downloads so that we can run it out of the box with no modifications.
  6. The image mentioned above in rule 5 must be submitted on a CD. 
  7. All submissions become the property of EntitySpaces, LLC and we reserve the right to make them available for marketing purposes.
  8. Your Submission must be received by January 31st, 2008 (only the first working solution submitted by January 31st, 2008 will receive the $1,000 U.S. dollars prize money).

If you are interested write to support@entityspaces.net and we can tell you where to forward your submission.

Most likely this application will use MySql or VistaDB as those are two of the databases we support that run under Mono (others we support might also run under Mono). Also, you might need to use the configless connection support for EntitySpaces configuration information. If you run into issues we are willing to work with you, however we are fairly confident that our assemblies are mono compliant. Of course, the nicer the UI the better, but the idea is to show off EntitySpaces running under Mono.


kick it on DotNetKicks.com 

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, December 06, 2007 6:15:10 AM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, December 01, 2007
image

 

Our mid-December maintenance release for v1119 offers a new class, the esEntityCollectionView. The esEntityCollectionView acts like the ADO.NET DataView class only for EntitySpaces Collections. This new class will allow you to have multiple views on the same collection each with a different sort and filter acting independently of other views. Also, the esEntityCollectionView class does not effect the Sort or the Filter properties on the collection itself. This means that you can use a collection as a cache and have various views on it displayed throughout your application. You can use the foreach syntax against the esEntityCollectionView class as well as the indexer (the foreach syntax is faster).

The esEntityCollectionView class uses the .NET Generic syntax mechanism. We really haven't needed to create many "generic" classes since we use code generation techniques to create our classes. It is too bad Microsoft didn't stick with the term "Template class" from the C++ world because this more clearly defines what the "generic" mechanism does. The compiler see's the "generic" class and literally generates a class (behind the scenes) for each type it encounters. So, you can think of a generic class as a template that is code generated at compile time, and since we code generate everything we haven't needed to use generics that often.

The new esEntityCollectionView is very useful, but it will not assume full power until EntitySpaces 2008 which will add full binding support to the esEntityCollectionView class. However, the LowLevelBind method is implemented which will let you bind directly to the underlying DataView.

Let's look a sample to get a feel for how to use this new class. In this case we create a collection and load all of the records, then we create two views on the collection and filter different ways and use the foreach syntax to enumerator over the collection. Notice both views operate independently of on another. If there was a sort or filter directly on the collection the views would be unaffected as well.

EmployeesCollection coll = new EmployeesCollection();
coll.LoadAll();

esEntityCollectionView<Employees> view1 = new esEntityCollectionView<Employees>(coll);
esEntityCollectionView<Employees> view2 = new esEntityCollectionView<Employees>(coll);

view1 .Filter = "LastName = 'Griffin'";
view2 .Filter = "LastName <> 'Griffin'";

foreach (Employees emp in view1 )
{
    string s = emp.LastName;
}

foreach (Employees emp in view2 )
{
    string s = emp.LastName;
}

// Show how to use the indexer ...
Employees e = view2 [10] as Employees;

We are sure that when EntitySpaces 2008 comes out you will find the esEntityCollectionView classes to be extremely useful. Not only will we build full data binding into it (as exists on the esEntityCollection) but thread synchronization too. The esEntityCollectionView class is perfect for use on cached collections. We are also implementing lots of tweaks/fixes as we gather them from the forums as well for our mid-December release which will include the esEntityCollectionView class.


kick it on DotNetKicks.com

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, December 01, 2007 11:03:56 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, November 20, 2007

Now that EntitySpaces 2007.1.1119.0 has been released we thought we would start a series of blog posts that highlights some of API enhancements. The most obvious place to begin is the Dynamic Query API as that is what many of our customers work in every day. We start off with some simple queries and work up to more complex queries.

Query - Simple select with where clause

Here is a simple query that brings back only the FirstName column for only those records that begin with the letter "M". Notice we use the % sign to indicate any characters after. You also use the % signs for all other supported databases. The EntitySpaces data providers will adjust accordingly for all other databases. Also, notice that we are using the built in query object on the collection itself. We recommend that you use this syntax always when there is no join involved.

EmployeesCollection coll = new EmployeesCollection ();
coll.Query.Select(coll.Query.FirstName);
coll.Query.Where(coll.Query.FirstName.Like("M%");
if(coll.Query.Load())
{
    // at least one record was loaded
}

The resulting SQL:

SELECT [FirstName]  FROM [Northwind].[dbo].[Employees] WHERE [FirstName] LIKE @FirstName1

Query - Arithmetic operators and complex where clause with AND/OR

This query shows off some of the natural language features of the EntitySpaces Dynamic Query API. Notice the use of the + operator to concatenate the FullName and LastName and providing the new derived column with an alias. Also notice the Where clause and it's use the | operator. You can use & for AND and | for OR and you can use ( ) for precedence.

EmployeesCollection coll = new EmployeesCollection ();
coll.Query.Select((coll.Query.LastName + "," + coll.Query.FirstName).As("FullName"));
coll.Query.Where(coll.Query.City == "Indianapolis" | coll.Query.Region == "Northeast");
if(coll.Query.Load())
{
    // at least one record was loaded
}

The resulting SQL:

SELECT ([LastName]+','+[FirstName]) AS 'FullName'  FROM [Northwind].[dbo].[Employees] WHERE ([City] = @City1 OR [Region] = @Region2)

Query - Aggregates with OrderBy and GroupBy

This query shows off some of the natural language features of the EntitySpaces Dynamic Query API. Notice the use of the + operator to concatenate the FullName and LastName and providing the new derived column with an alias. Also notice the Where clause and it's use the | operator. You can use & for AND and | for OR and you can use ( ) for precedence. Also, we had to use two calls to OrderBy because of the dynamic column created by the alias, however, you can pass multiple columns in like this -> coll.Query.OrderBy(coll.Query.ProductID.Descending, coll.Query.CategoryID.Ascending)

OrderDetailsCollection coll = new OrderDetailsCollection ();
coll.Query.Select
(
    coll.Query.ProductID,
    (coll.Query.Quantity * coll.Query.UnitPrice).Sum().As("TotalPrice")
);
coll.Query.GroupBy(coll.Query.ProductID);
coll.Query.OrderBy(coll.Query.ProductID.Ascending);
coll.Query.OrderBy("TotalPrice", esOrderByDirection.Ascending);
if(coll.Query.Load())
{
    // at least one record was loaded
}

The resulting SQL:

SELECT [ProductID],SUM(([Quantity]*[UnitPrice])) AS 'TotalPrice'  FROM [Northwind].[dbo].[Order Details] GROUP BY [ProductID] ORDER BY [ProductID] ASC,[TotalPrice] ASC

Query - Join Syntax

Notice the syntax here is a little different. When creating join based queries you do not use the embedded query object on the collection, you create your own and be sure to give it an alias. When you are not creating a join use the embedded query object as the examples above show. Also, in join scenarios you can select all from a particular column by passing the query into the select statement as follows -> Select(cust, order.OrderId) in this example the select will be Customer.*, Order.OrderId.

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); // Notice we load the query via the Collection.Load() method

The resulting SQL:

SELECT c.[CustomerName],SUM(oi.[Quantity]) AS 'TotalSales'
FROM [ForeignKeyTest].[dbo].[Customer] c
JOIN [ForeignKeyTest].[dbo].[Order] o ON (o.[CustID] = c.[CustomerID])
JOIN [ForeignKeyTest].[dbo].[OrderItem] oi ON (oi.[OrderID] = o.[OrderID])
GROUP BY c.[CustomerName]
ORDER BY TotalSales DESC

Miscellaneous Tips and Tricks

  • You can trick a query object and force it to load from a database view instead of the table as follows

query.es.QuerySource = "SomeView";

  • Top, CountAll, Distinct, PageNumber, PageSize, LastQuery are all available in the coll.query.es data member.

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, November 20, 2007 12:14:19 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, November 18, 2007

I made a blog post a while ago in a thread entitled "Microsoft ruined data binding in ASP.NET 2.0 when they dropped component support from the design surface" and thought it worthy of a follow up.

ICustomTypeDescriptor

In order to allow strongly typed entities to tack on dynamic properties (extra columns brought back via a dynamic query) for data binding in ASP.NET data grid scenarios you must implement the ICustomTypeDescriptor interface. Since our latest release (v1119) supports joins it is now common to bring back extra columns for display purposes in EntitySpaces. Well, we implemented the ICustomTypeDescriptor interface on our esEntity class and it worked perfectly in ASP.NET, however, testing then showed it broke data binding in certain Windows.Forms scenarios. Why? There is a BUG in the Microsoft.NET Framework. It's not like bugs are not found in EntitySpaces of course, this is merely an explanation of how we have arrived to this point.

We have a few ways to work around the issue. One is to use our Collection.LowLevelBind() method and the other is adding properties to your entity (not very attractive). Our esDataSource control allows you to bring back extra columns and it binds just fine, there is a "LowLevelBind" method on the esDataSource for just this scenario. This only effects ASP.NET as Windows.Forms uses ITypedList which works like a champ (in hierarchical mode also).

HierarchicalDataSourceControl

The new HierarchicalDataSourceControl binding set of interfaces proved utterly incapable of displaying a hierarchical object model. We had it "kind of working" when we realized that this new binding model only supported a single parent/child relationship. This means it cannot display the EntitySpaces hierarchical object model. So, we withdrew the implementation of this feature. Scott Piegdon has a code sample on CodeProject, you can see his response to my "Ya, Butt" comment which validated my suspicions (nice article by the way).

Summary

Again, the new Microsoft ASP.NET data binding has proven to be flawed. It is next to impossible to support both ASP.NET and Windows.Forms binding with the same codebase due to a serious bug in the .NET Framework. Also, the HierarchicalDataSourceControl implementation suffers from a lack of foresight by its designers.

And finally (whining here) this all worked in the Microsoft .NET 1.x framework, see Part One as to how we got to where we are. The same ITypedList implementation worked for both ASP.NET and Windows.Forms. However, it was swapped out for some crazy DataSource model that is clearly geared for heavily reflected architectures. Well, EntitySpaces didn't take the bait. We are still 100% reflection free. We still run in "Medium Trust" and yes, we support the DataSource control but not the HierarchicalDataSourceControl. We have a plan to work around this issue entirely in a future 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, November 18, 2007 9:24:47 PM (Eastern Standard Time, UTC-05:00)  #   

The official EntitySpaces 2007.1.1119 Release (Trial Version) is now available now on our home page. Sunday night we will post the Developer and Source downloads. The release notes can be found here. Please, if you find anything report it right away. We are very pleased with this release and we hope you will be too.  We recommend you uninstall your current trial before installing.

- The EntitySpaces Team 

posted on Sunday, November 18, 2007 12:00:57 AM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, November 10, 2007

Our next beta will sport "pure" WCF client side proxies. These proxies allow the client side of a WCF conversation to seemlessly  communicate with your heavier server proxies without the need for EntitySpaces on the client side. Our new client side proxies are very lightweight, strongly typed, and match your server side. The first scenario below showing EntitySpaces on both sides of the conversation is of course still possible, however, we have added the "EntitySpaces on the Server Only Model" which we will discuss in further detail now.

For those interested in our new client side proxies there is a new template that you will need to run to create them. These generated proxies would be placed in a tiny class library and used by the client to communicate with your server.

Your client side proxies will look like this, first, the collection class.

Notice that the collection is a partial class. This will allow you to add functionality if needed. Also notice that there is no link to EntitySpaces whatsoever. You serialize from your Server Side Proxy and deserialize into your Client Side Proxies.  Now let's take a look at the entity class (which is also contained in the collection).

Again the single entity client side proxy has no link to EntitySpaces yet you can deserialize your heavier server side proxies into these tiny lightweight proxies on the client side. Notice the partial class definition as well. The row state is maintained for you as well. All you need to do is modify your data on the client side and ship it back to the server.

Here is a simulated converation between the server and client side proxies.

In the above sample we are serializing from the server proxy into a string which simulates your packet being sent over the wire to the client. Next we deserialize into our lightweight client proxy, change the employee's FirstName, and then ship it back over the wire to the server to be saved. The nice thing is that when you deserialize on your server you merely grab the true Employee business object from the proxy and save it, it's so easy.

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, November 10, 2007 10:56:44 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, November 04, 2007

The first official MyGeneration since it has gone open source on SourceForge.net under the BSD licensing model is coming soon. There are some very cool new features as well. First, and very importantly, you can now install the new MyGeneration side-by-side with the MyGeneration 1.2.0.7 release that is on Download.com. MyGeneration is still going strong with over 100,000 downloads on download.com and MyGeneration already ranks 172nd on SourceForge.net. Many have joined in on the project. MyGeneration is getting much more powerful, please help us keep this wonderful, totally free, code generation tool moving forward. Many have done so and we thank you. The next EntitySpaces beta we put out will support this version of MyGeneration also.

You will want to thank Justin Greenwood for this release, not to take away from the others who have also worked on this release, but I know Justin has put a lot of time in on this.



The current MyGeneration beta is 2007.11.03 1.3 Beta 7 and is pretty stable, and remember, you can install it side-by-side with your current install and not worry about messing up your current installation. Here are some new features listed below with more complete notes found HERE.

The user interface has been reworked, the DockPanel Suite has been upgraded, the default settings dialog is now an MDI window. You will notice that intellisense is being added, while not yet on par with the capabilities of Visual Studio there is some support for intellisense for C# and VB.NET templates now. There is a much improved error window with the ability to email errors to the developers working on MyGeneration. There is a powerful new PlugIn API that will even allow your PlugIn to operate as an MDI window within MyGeneration giving you full graphical control as well. Some of the new plug-ins are:

1) CodeSmith2MyGen converter

Converts CodeSmith templates to MyGeneration Templates (only partially).

2) MyGenXsd3b

MyGenXsd3b providerplugin for MyGeneration

MyGenXsd3b is a provider plugin that allows MyGeneration to

  • Use a XML model file instead of an online database
  • To create model file from an existing database
  • To create model file from an existing model file

Benefits:

  • You can use MyGeneration even if the database is not available.
  • You can share database models with other developpers.
  • You can connect MyGeneration with the xml input or output of other modeling tools.
    • UML/XMI ( Xsd3bImportFromUml )
    • XSD ( XSDFile, Dot Net Typed Dataset )
    • XDM entity relationship model file ( MogwaiERDesignerModelXdm )
    • You can integrate MyGeneration with new XML sources using xsl-files ( XSD3bXSLT ) and share these with other users .
  • MyGenXsd3b-s native xml fileformat XSD3bFile
    • is mutch more intuitive than XSDFile
    • can be viewed with any xsl-capable htmlbrowser

MyGenXsd3b is autamtically installed with MyGeneration Version 1.3 or newer ( MyGenXsd3bInstallation )

Implementation Details

MyGenXsd3b

  • is implemented as a MyGeneration-Plugin dll MyMeta.Plugins.Xsd3b.dll.
  • is linked against the MyGeneration-Api dll MyMeta.dll
  • is linked against the Xsd3bEngine Dl3bak.Xsd3b.dll that handles all the xmlstuff.

The Xsd3bEngine has Xsd3bPlugin-dlls for specific fileformats

  • UML/XMI ( Xsd3bImportFromUml ) Dl3bak.Xsd3b.Uml14Xmi12Import.dll
  • XSD ( XSDFile, Dot Net Typed Dataset ) Dl3bak.Xsd3b.Xsd.dll
  • Convert from and to foreign XML via XSL ( XSD3bXSLT ) Dl3bak.Xsd3b.Xslt.dll

The xsl engine XSD3bXSLT uses xsl files in the folder Templates/xsd3b/

  • Mogwai ERDesignerModel.xdm.xsd3b.xsl to convert Mogwai ERDesignerModel from xdm to xsd3b ( MogwaiERDesignerModelXdm )
  • DatabaseReport.xsd3b.htm.xsl to create a DatabaseReport from xsd3b to htm format

3) SQL Tool

Allows you to execute SQL queires in a window against your database, can be very handy.

I have only touched on the new features, there is so much more that could be said ...


MyGeneration - The Free Code Generator / OR Mapping Tool the competition doesn't want you to know about


Download your copy of MyGeneration 1.3 now ==> DOWNLOAD  and don't forget the install the two plugins as well (seperate installs)

 

kick it on DotNetKicks.com
posted on Sunday, November 04, 2007 11:40:06 AM (Eastern Standard Time, UTC-05:00)  #