Sunday, June 28, 2009

We are pleased to make this new release available to current customers, there is no trial version available at this point. This release provides our DynamicQuery API built into the Client Side Proxy Stubs. The new serializable DynamicQuery’s should be Silverlight compliant as well. This release is for those who are using WebServices, Silverlight, or WCF and would like to explore our new DynamicQuery serialization feature. We will be making the source code available for our source code customers for this Alpha release as well. The release notes along with some breaking changes are at the end of this blog post (READ BEFORE INSTALLING). An upcoming Beta release will consist of much of what was requested in the Q2 Wish List forum. Just a reminder the current production release is version 2009.1.0209.0.

For more information on our new Serializable DynamicQuery’s see these two posts:

Because the two blog posts above are only in C# here is a VB.NET sample (without the proper cleanup code on the streams and such)

Private Sub QuerySerializerForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim o As New Proxies.OrdersQueryProxyStub("o")
    Dim q As New Proxies.EmployeesQueryProxyStub("emp")
    q.SelectAll()
    q.Select(q.LastName.ToLower().Substring(2, 4), o.Freight, (q.FirstName + "," + q.Address).As("Mike"))
    q.LeftJoin(o).On(q.EmployeeID = o.EmployeeID)
    q.Where(q.EmployeeID > 30)
    q.OrderBy(q.LastName.Descending)
    q.es.Top = 50

    Dim xml As String = q.Serializer.ToXml()

    Dim memoryStream As New MemoryStream(Encoding.Unicode.GetBytes(xml))

    Dim reader As XmlDictionaryReader
    reader = XmlDictionaryReader.CreateTextReader(memoryStream, Encoding.Unicode, New XmlDictionaryReaderQuotas(), Nothing)

    Dim types As New List(Of System.Type)
    types.Add(GetType(EmployeesQuery))
    types.Add(GetType(OrdersQuery))

    Dim emp As New EmployeesQuery()
    Dim dcs As DataContractSerializer
    dcs = emp.Serializer.GetSerializer(types)

    emp = CType(dcs.ReadObject(reader), EmployeesQuery)

    Dim coll1 As New EmployeesCollection()
    coll1.Load(emp)

End Sub

Now, in reality you shouldn’t have to do any of the manual serialization we are doing here, but of course you can if you want to. You will want to use the [KnownTypes] attribute if you are using WCF on the Server Side.

 

             RELEASE NOTES

                EntitySpaces 2009.1.0629.0 Alpha Release
                            June 29th, 2009
==================================================================================

  • This release will not run side by side with your current ES2009 installation, it will overwrite the installation even if you choose another folder. You should uninstall any prior release before installing the Alpha version.
  • The new Serializable DynamicQuery functionality requires .NET 3.5 SP1.
  • The Silverlight version of the EntitySpaces.DynamicQuery.dll is in the “C:\Program Files\EntitySpaces 2009\Runtimes\.NET 3.5\Silverlight” folder
  • There is a new checkbox on the "Advanced" tab of the "Generated Master" template named "Serializable Queries (requires .NET 3.5 SP1)" that you must check in order to use the new serializable queries.
  • When you generate your client side proxies via the "Client Side Proxy/Stub" template you will now have a client side DynamicQuery class.
  • The only data provider in this Alpha - EntitySpaces.SqlClientProvider.dll

NOTE: The breaking changes listed below should generate compile time errors, not runtime errors. Adding a reference to Entityspaces.DynamicQuery.dll to your project, and adding a "using EntitySpaces.DynamicQuery;" line to each file that has a "using EntitySpaces.Interfaces;" line should clear most of the compile errors. ("Imports EntitySpaces.DynamicQuery" for VB users.)

  • Breaking change - There is a new assembly named EntitySpaces.DynamicQuery.dll which is now a required assembly reference for all applications. This assembly should be Silverlight compliant and is the only EntitySpaces assembly needed to use the DynamicQuery's under Silverlight. The inheritance is different for the full blown server side DynamicQuery's versus the client side queries.

       Server Side DynamicQuery

          EmployeesQuery -> esEmployeesQuery -> esDynamicQuery –> esDynamicQuerySerializable

       Client Side Proxy DynamicQuery

          EmployeesQueryProxyStub -> esDynamicQuerySerializable

NOTE: The esDynamicQuery class lives in EntitySpaces.Interfaces.dll just as always, however, most of the logic behind the DynamicQuery now lives in the new esDynamicQuerySerializable class which lives in EntitySpaces.DynamicQuery.dll.

  • Breaking change - There is a minor change in the DynamicQuery API with the ".es" property. This is only for the DynamicQuery class, the Entity and Collection classes have no change in this area.

   Before the Alpha you could do this:

     EmployeesQuery query = new EmployeesQuery();
     query.es.Connection.Name = "SomeName";


   Now the connection is accessible this way ...

     EmployeesQuery query = new EmployeesQuery();
     query.es2.Connection.Name = "SomeName";

     ** Notice we use "es2" however all of the other properties are still available under the ".es" property.

   There is also a new helper when using the DynamicQuery features:

     EmployeesQuery query = new EmployeesQuery();
     query.es.Serializer.[helper methods]


   which can be used if necessary to serialize.

  • Breaking change - Many Enums that used to be in EntitySpaces.Interfaces are now in EntitySpaces.DynamicQuery

    These included:

    esQueryType
    esQuerySubOperatorType
    esOrderByDirection
    esConjunction
    esSystemType

    As well as some other internal enums.

  • Breaking change - esWhereItem was renamed to esComparison and now lives in EntitySpaces.DynamicQuery.dll. Unless you are manually creating this class which is rare you will not be affected.
  • Breaking change - esSelectItem was renamed to esExpression and now lives in EntitySpaces.DynamicQuery.dll. Unless you are manually creating this class which is rare you will not be affected.

 

We hope to have an entirely new Silverlight / WCF Demo available to coincide with and built from the upcoming Alpha release. Of course we will do a blog post on that as well. When you see it in action you will be amazed how easy it is. We still have a few issues to work out but things are moving very rapidly now. Imagine having what appears to be the full EntitySpaces API available to you on a client somewhere and only needing to have a single 52k assembly present, and it is fully Silverlight compliant as well. This is just one thing our upcoming release will provide.

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 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

Comments are closed.