Tuesday, March 02, 2010

Warning: A feeling of euphoric power coupled with feelings of invincibility have been noted by the EntitySpaces Development Team when using EntitySpaces 2010. This will be especially true for those customers using Silverlight and WCF together. The interaction between these technologies and EntitySpaces 2010 could prove to be more than some customers can handle. Please check with your IT staff to make sure this combination is safe for you.

Also, the performance increase in EntitySpaces 2010 is significant, customers are urged to throttle back and work their dosage up slowly to maximum as to not overwhelm their DBMS systems.

Finally, in more extreme cases developers have been seen ‘strutting’ down hallways trash talking wildly about how their product is going to destroy their competition. Other signs may include finishing tasks way ahead of schedule, begging team leads incessantly for more work to do, and working seven, dare we say, six hour days, and spending more time with their families.

If you recognize any of these symptoms don’t be alarmed, instead be sure to pat the developer on the back and say to them “Job well done”. If your competition is getting ahead and your company is still struggling you might try to find out if there development team is all hopped up on EntitySpaces. If they’re winning bid after bid and you’re losing out to them there is a good chance this is the case. The good news is you too have the same access to EntitySpaces, no prescription required.

Please, use EntitySpaces 2010 responsibly.

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Tuesday, March 02, 2010 11:10:38 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Saturday, February 27, 2010
kick it on DotNetKicks.com     Shout it

We are very pleased to be able to show you some of the awesome power coming in EntitySpaces 2010. We think ES2010 provides unmatched power when it comes to working with Silverlight and WCF services. Not only do our smart proxies track row state but they also track column dirty state. You can now bring back extra columns that are fetched via joins (or derived columns) to the client . Probably one of the most awesome feature is the ability to bind to these extra columns under Silverlight. As far as we know we are the only architecture that allows you to do this. You can actually bind to properties for which you have no property accessors, think of it as ITypedList for Silverlight if you will.

video

PART ONE

This first video is key to understanding our WCF Serialization capabilities. We think you will be impressed. The XML is shown each step along the way from server to client and back again. We use our own wrapper for the DataContract serializer to make things easy to demo. We think once you see this you will begin to understand what we have accomplished. Don’t skip this video, it is key to able to understanding Part Two.

video

PART TWO

This second video shows everything in Part One working in a real WCF / Silverlight application. We even bind to the extra column brought back via our Dynamic Query. And this column is not a property in our strongly typed entity. However, be forewarned, we don’t show the mechanics behind this for competitive reasons, once we ship ES2010 it will be made known.

 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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Saturday, February 27, 2010 3:52:18 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Thursday, February 25, 2010
kick it on DotNetKicks.com

We have managed to pull off something incredibly cool. We now support totally dynamic data binding under Silverlight. EntitySpaces has been gaining a lot of Silverlight fans lately as it really simplifies writing Silverlight applications and our serializable Dynamic Queries under Silverlight just rock. What we have done is akin to implementing ITypedList support for Silverlight (fancy databinding). Take a look at the sample Dynamic Query example below (running under Silverlight). Notice how we join Employees with Orders and bring back the Orders.Freight column (agreed, the query makes no sense at all but this was just for testing). Our Employees entity doesn’t have Frieght property so how are we going to bind our grid to it under Silverlight? No sweat for ES2010.

Proxies.EmployeesQueryProxyStub q = new Proxies.EmployeesQueryProxyStub("emp");
Proxies.OrdersQueryProxyStub o = new Proxies.OrdersQueryProxyStub("ord");

q.Select(q.EmployeeID, q.FirstName, q.LastName, q.HomePhone, q.HireDate, q.BirthDate, q.City, o.Freight);
q.Where(o.Freight > 100);
q.InnerJoin(o).On(q.EmployeeID == o.EmployeeID);
q.OrderBy(q.LastName.Ascending);

service.GetEmployeesCompleted += new EventHandler(service_GetEmployeesCompleted);
service.GetEmployeesAsync(Proxies.EmployeesQueryProxyStub.SerializeHelper.ToXml(q));

Now, in our XAML code in our Silverlight page we can bind our TextBlock or DataGridTextColumn to the “Freight” column even though our Employees entity has no Freight property at all, pretty darned cool. No other architecture on the market provides this capability. Also, remember ES2010 supports row level state (added, deleted, updated) and column level dirty state so all you need to do is ship your entity or collection back to the server and call Save, it’s that easy. EntitySpaces 2010 will be the premier Silverlight architecture.

We’re not going to show how we accomplished the dynamic databinding just yet (for competitive reasons). However, we are preparing a video that we will be showing soon. When you see it it’s going to knock your socks off. EntitySpaces and Silverlight is just an incredible combination, we are so excited about this release.

Also, we thought we would share a recent comment from our forums …

Interesting to note that coding the same BLL using LINQ ended up being twice as long and not quite as comprehensible (as EntitySpaces).

It just keeps getting better and better …

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Thursday, February 25, 2010 12:23:51 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Sunday, February 14, 2010

All of the templates are converted now, including the C#, the VB.NET, and the the templates that generate stored procedures (they are also much easier to read). The following list of EntitySpaces Data Providers have been converted over to the new faster ES2010 approach.

  • EntitySpaces.MSAccessProvider
  • EntitySpaces.MySqlClientProvider
  • EntitySpaces.Npgsql2Provider
  • EntitySpaces.NpgsqlProvider
  • EntitySpaces.OracleClientProvider
  • EntitySpaces.SqlClientProvider
  • EntitySpaces.SqlServerCeProvider
  • EntitySpaces.SybaseSqlAnywhereProvider
  • EntitySpaces.VistaDB4Provider
  • EntitySpaces.VistaDBProvider

The EntitySpaces core libraries running with the SqlClientProvider provider are passing almost all unit tests (the ones failing we expect to fail). All providers of course will be run through the entire suite of unit tests. The EntitySpaces code generation project files are now “path relative”. We need to convert the Compact Framework providers over and create the new SQLite provider as well (We already have the metadata for SQLite and can generate fine against SQLite). We also need to make sure ES2009 and ES2010 can run side by side.

Finally, we are switching installers, most likely we will be using the Tarma installer.

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Sunday, February 14, 2010 10:18:17 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Friday, January 29, 2010

Here is a snapshot of EntitySpaces 2010 browsing a SQLite database. It’s not complete yet, we need to add the indexes and foreign keys but the metadata provider should be done by the end of this weekend. This is the code generation meta data provider. We still need to create the EntitySpaces data provider (which your SQLite application would use) but things are moving quickly.

SQLite_Metadata

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Friday, January 29, 2010 11:39:54 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]
 Sunday, January 24, 2010

We are making our code generation architecture much more user friendly for those that would like to write custom templates, Here is an example of the changes we are making.

Old Way: (where “col” is an IColumn such as when you are looping through all of the columns in a table or view)

<%= esMeta.esPlugIn.PropertyName(col) %>

New Way:

<%= col.PropertyName %>

The old way still works of course. We will be using this new approach in our templates, it sure makes the templates easier to read and understand. The PropertyName property is still driven by your choices in the EntitySpaces “Settings” tab. We will be doing this for about 30 or 40 such “things” including the EntityName, CollectionName, ParameterName, QueryName, ProxyName, and so on in our code generation engine. We are making these changes to encourage more customer driven template development to accommodate our soon to come online template sharing library as well as making our own template development easier. Of course, there will be a help file available 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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Sunday, January 24, 2010 3:08:02 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Saturday, January 23, 2010

First, before we begin this blog post we wanted to let you know that we have re-enabled the commenting feature on our blog. Secondly, EntitySpaces 2009 already supports these SQL Server2008 data types but it returns them as type “string”. EntitySpaces 2010 allows you to handle them natively.

EntitySpaces has very powerful provider independence support so we have to be careful when implementing “extended” types for a given database engine. For instance, our NUnit test suite is a single binary that runs against all of our supported databases. The only thing we change when targeting a different database engine is the connection string, we don’t have to recompile or regenerate the code for each database because the databases all have essentially the same schema. So the question is, how do we handle non standard types offered by various database vendors? By non standard types we mean types that do not map to a .NET System Type such as System.Int32. We have the solution all worked out and EntitySpaces 2010 will allow us to support non-standard types offered by various database vendors. For instance, Microsoft SQL Server 2008 supports these types which require a separate assembly to work with.

Native SQL Type

.NET Type

geography SqlGeography
geometry SqlGeometry
hierarchyid SqlHierarchyId


The .NET types such as SqlGeography are contained in the Microsoft.SqlServer.Type assembly. Obviously we cannot link this library into or core EntitySpaces assemblies as this would require all EntitySpaces customers to have this assembly present even if they were only using Oracle. The good news is we have a solution for this. Here are the language mappings from the ES2010 esLanguages.xml file for the new SQL Server 2008 data types (currently, in ES2009 these map to type “string”, but now we map them to the real extended type).

<Type From="geography" To="SqlGeography" NonSystemType="true"/>
<Type From="geometry" To="SqlGeometry" NonSystemType="true"/>
<Type From="hierarchyid" To="SqlHierarchyId" NonSystemType="true"/>       

Notice that these are marked as NonSystemTypes = “true”, that is to say they cannot be mapped to a standard .NET type such as a “System.Int32” and so on …

During the code generation process we use this flag to generate the properties using the GetSystemObject/SetSystemObject methods as shown below.

virtual public SqlGeography TheGeography
{
    get
    {
        return (SqlGeography)base.GetSystemObject(MasterTypesMetadata.ColumnNames.TheGeography);
    }
    set
    {
        if(base.SetSystemObject(MasterTypesMetadata.ColumnNames.TheGeography, value));
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(MasterTypesMetadata.PropertyNames.TheGeography));
            }
        }
    }
}   

Notice how we simply use GetSystemObject/SetSystemObject and then cast to the specific type. This is done in your generated classes and not in our core assemblies. The property shown below is a standard column that maps to a system type (an integer column) and thus uses GetSystemInt32/SetSystemInt32 and requires no cast.

virtual public System.Int32? TheInt
{
    get
    {
        return base.GetSystemInt32(MasterTypesMetadata.ColumnNames.TheInt);
    }
    set
    {
        if(base.SetSystemInt32(MasterTypesMetadata.ColumnNames.TheInt, value))
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(MasterTypesMetadata.PropertyNames.TheInt));
            }
        }
    }
}   

Since we cannot have a GetSystemSqlGeometry() in our core assemblies without linking to special database provider assembly this works out nicely. It doesn’t effect non Microsoft folks at all.

An Example

Take a look at this rather sophisticated example. Here we create a complex shape and store it to the database. We have created a table in SQL Server 2008 called “MasterTypes” that we are using for testing all possible types.

SqlGeometryBuilder gb = new SqlGeometryBuilder();

// Set the Spatial Reference ID to 1
gb.SetSrid(1);
// Start the collection
gb.BeginGeometry(OpenGisGeometryType.MultiPolygon);
// Start the first element in this collection
gb.BeginGeometry(OpenGisGeometryType.Polygon);
// Define the first element (figure)
gb.BeginFigure(-77.054700,38.872957);
gb.AddLine(-77.057962, 38.872620);
gb.AddLine(-77.058547, 38.870079);
gb.AddLine(-77.055592, 38.868840);
gb.AddLine(-77.053217, 38.870656);
gb.AddLine(-77.054700, 38.872957);
// End the first element (figure)
gb.EndFigure();
// Define the second figure
gb.BeginFigure(-77.056972, 38.870639);
gb.AddLine(-77.055851, 38.870219);
gb.AddLine(-77.054875, 38.870864);
gb.AddLine(-77.055452, 38.871804);
gb.AddLine(-77.056784, 38.871655);
gb.AddLine(-77.056972, 38.870639);
gb.EndFigure();
// End the first polygon
gb.EndGeometry();

// Define the second polygon
gb.BeginGeometry(OpenGisGeometryType.Polygon);
gb.BeginFigure(-77.056408, 38.875290);
gb.AddLine(-77.056947, 38.875224);
gb.AddLine(-77.057466, 38.873598);
gb.AddLine(-77.057273, 38.872737);
gb.AddLine(-77.055335, 38.873020);
gb.AddLine(-77.055499, 38.874058);
gb.AddLine(-77.056408, 38.875290);
gb.EndFigure();
gb.EndGeometry();
// End (close) the collection

gb.EndGeometry();

MasterTypes m = new MasterTypes();
m.TheGeometry = gb.ConstructedGeometry;
m.Save();

This code works prefectly and saves complex shape to the database. Of course, you can read it back and access the "TheGeometry” property (we named the database column ‘TheGeometry’).

The screen shot below is what it looks like in the debugger when we inspect our “TheGeometry” property after reading it back from the database.

TheGeometry

One thing we have decided on is whether we should always make these extended types as nullable types, the answer will probably be yes.

We are also looking at supporting the SqlFileStream functionality but that is a little more complex. This approach should allow us to support non-standard data types for other database systems 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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Saturday, January 23, 2010 11:21:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Thursday, January 21, 2010
Now having looked at the video this morning I promise not to make a video at 1 in the morning when I can barely hold my head up. I'm buying a professional quality microphone and will make video's in the morning after a fresh cup of coffee, still, the proxies are very cool ...

This preview should really get you fired up for ES2010. Our proxies are now even smarter. In EntitySpaces 2009 (ES2009) our proxies track row state for you automatically which is cool, however in ES2010 they also track column level dirty information. The proxies can also be decorated with DataContract, XML, and JSon serialization attribute tags all at the same time. This is very cool for client side proxies as clients can then serialize the data to disk, or to the Browser, or simply change the data and send it back to the server.

Our client side proxies are also great candidates for MVC development. With the coming release of .NET 4.0 you will have WCF and Workflow (WF4) integration capabilities and our client side proxies will make great data envelopes for traveling around inside of WF4 and ensure that your row state and column level dirty information are always up-to-date. We are making sure EntitySpaces can go where ever you need to go and do so effortlessly, and this includes the Cloud (more on that in an upcoming preview).

Our next preview video will show you ES2010’s ability to generate your WCF endpoints automatically. You can generate all of your WCF end points for your data in one big “mombo” WCF Service or have each entity type housed in it’s own WCF Service. This EntitySpaces template is highly customizable as well since it does not generate the core classes. It merely creates WCF Services and you can tweak it to meet your specific needs. Also, we are adding an online sharable template library that is accessible from within the EntitySpaces Visual Studio AddIn. That means you can upload and download templates directly from the template browser. So, if you create a cool tweak to our WCF template or create an awesome REST template for EntitySpaces and you want to share it you can, and it will automatically show up in the EntitySpaces Template Browser for all EntitySpaces users. Are you excited yet?

Take a look at this preview and see what you think.

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Thursday, January 21, 2010 12:40:42 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Monday, January 11, 2010
video

In this video we take a quick look at enhancements to Extended Properties (custom properties you add manually to your entities) and the ability to Clone both collections and single entities. The clones are shallow clones, that is to say, they do not clone the entire hierarchical model.

To watch the video click HERE or on the image on the left …

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Monday, January 11, 2010 7:45:46 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Sunday, January 03, 2010
video

Click the link above to watch the video …

This is another quick progress video on EntitySpaces 2010. In this video we show off our esEntityCollectionView<> class which in ES2009 relied on ADO.NET DataViews. However, these are now entirely our own creation and far superior. Remember, we do not use ADO.NET under the hood anymore (see Part I here if you missed it). However, our data providers which read and write to the database of course.

Also, we show off some very cool new debugging features that will really help you when debugging your EntitySpaces applications. And finally, with the use of implicit type casting operators, working with the proxy stub classes has become basically, well, transparent.

For instance, this is now possible … (and more)

public EmployeesCollectionProxyStub GetEmployees(string serializedQuery)
{
    EmployeesCollection coll = new EmployeesCollection ();
    coll.LoadAll();

    return coll;  // But where's the creation of the proxy stub collection?
}

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, a Silverlight/WCF application, a Mono application, 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.

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

posted on Sunday, January 03, 2010 8:16:37 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]