Tuesday, August 01, 2006

EntitySpaces 1.4.2

We have accumulated enough fixed and tested issues that we thought it was important to put out a maintenance release. The new downloads should be posted on Friday, August 4, 2006. We will announce their availability in the forums, once they are up. The following issues are addressed in this version:

  • Change Guid with default newid() to accept input for Saves for Microsoft SQL Server.
  • Add XML comment to LoadByPrimaryKey that warns if the template is run on a table with no primary key.
  • Trim invalid characters from aliases in esPlugin.
  • Add preliminary LINQ support.
  • AddNew rolls back for MySQL provider without error with InnoDb tables.
  • Error in MySQL stored procedure template comment if all fields are in the primary key.
  • IndexOutOfRangeException if the primary key(s) is(are) not the first column(s) in a table.
  • ASPX page template ignores Namespace.
  • Adding fks broke WebServices' serialization.
  • Do not over-write files when generating Custom Master classes.
  • Add using System.ComponentModel when not generating a single file.
  • Multi-line default values not generated correctly.
  • Remove Query.Load("OR") from compiled help and document Query.es.DefaultConjunction instead.
    The default conjunction for Query.Load() is "AND". You can change that with this:
    emps.Query.es.DefaultConjunction = esConjunction.Or;
    
  • Add QueryReset to Entities and EntityCollections.
    TestCollection collection = new TestCollection();
    
    // Get the LastName for active employees
    collection.Query.Select(collection.Query.LastName);
    collection.Query.Where(collection.Query.IsActive == true);
    collection.Query.Load();
    Assert.AreEqual(16, collection.Count);
    
    // These get added to the above.
    // Now we get LastName, FirstName
    // For active employees named "Costner"
    collection.Query.Select(collection.Query.FirstName);
    collection.Query.Where(collection.Query.LastName == "Costner");
    collection.Query.Load();
    Assert.AreEqual(3, collection.Count);
    
    // Reset the query and return all columns and all rows
    collection.QueryReset();
    collection.Query.Load();
    Assert.AreEqual(30, collection.Count);
    
  • Add Scale and Precision to esParameter for output parameters.
    public partial class AggregateTestCollection : esAggregateTestCollection
    {
        public void TestParamsWithScale()
        {
            esParameter myParam = new esParameter("Salary", 12.34);
            myParam.DbType = DbType.Decimal;
            myParam.Precision = 18;
            myParam.Scale = 2;
            myParam.Direction = esParameterDirection.Output;
    
            esParameters parms = new esParameters();
            parms.Add(myParam);
            parms.Add("FirstName", "Entity");
            parms.Add("LastName", "Spaces");
            this.ExecuteNonExec(esQueryType.StoredProcedure, "proc_esTestInsert", parms);
        }
    }
    

EntitySpaces 1.5

We have rescheduled the 1.5 release for the end of August. We understand that this delay is making it difficult, if not impossible, to fully evaluate the product. Installing the 1.4.2 maintenance release will assure that your Trial period does not run out before 1.5 is released. We are especially concerned for our existing customers who are counting on hierarchical support. But, we feel that meeting quality standards takes precedence over meeting deadlines. We will not release something with known bugs and "fix it as we go." When it is ready, 1.5 will be released only to our current customers as a Beta version. A Final version will be released for download by our customers, and as a Trial version to the general public, after we have received sufficient feedback, can be comfortable that it has been tested in a wide variety of environments, and have fixed any hidden issues. We appreciate your patience and believe it will be well rewarded, as the hierarchical API is shaping up very nicely.

  • Hierarchical support
  • Caching

Future Enhancements

We have not forgotten the other features requested. In fact, we are using a new issue tracking system that helps us keep tabs on over sixty items, from ObjectDataSource support to updateable Views. Rather than try to predict when these will be ready, our focus is on putting out a top-notch hierarchical release. As we get closer to delivering it, we will prioritize what we have and post a roadmap for 1.6 and beyond. The new system has already reduced the amount of administrative time we spend on tracking bugs and enhancements. That means more time is available to actually code on them :-)

The EntitySpaces Team

posted on Tuesday, August 01, 2006 1:21:27 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, June 18, 2006

[Upated September 30, 2006]

At first glance one might think that the new LINQ technology is a direct competitor to the EntitySpaces architecture; however that would not be a correct assumption. The LINQ Project is a codename for a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities. EntitySpaces LLC has added the ability to use the LINQ syntax against EntitySpaces collections as of our 1.5 release.

As LINQ nears its official release we will look at translating the LINQ IQueryable<T> expression trees into our query API. In fact, when LINQ is first released it will support SQL Server only and rumor has it that LINQ is still a year or more out though Microsoft hasn't stated a release date yet. 

Have a look at this example: 

EmployeesCollection coll = new EmployeesCollection ();
coll.LoadAll();
// All employees with "i" in the last name ordered by FirstName in decending order
var emps = from e in coll
where e.LastName.Contains("i") orderby e.FirstName descending select e; foreach(Employees emp in emps) { Console.WriteLine(emp .FirstName + ", " + emp.LastName); }

It is even possible to derive your own result sets via the LINQ query against an EntitySpaces collection.


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

// All employees with "i" in the last name ordered by FirstName in decending order
var emps = from e in coll
                where e.LastName.Contains("i") 

                orderby
e.FirstName descending
                select
new { e.FirstName, e.LastName };

foreach(var dude in emps)
{
    Console.WriteLine(dude.FirstName + ", " + dude.LastName);
}

Some links you'll find useful:
Using LINQ with ASP.NET   (Part 1)
Using DLINQ with ASP.NET (Part 2)

posted on Sunday, June 18, 2006 12:47:42 AM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, June 15, 2006

We have had some issues come up that we thought should not wait until 1.5 is released. This maintenance release should hold you over until then. The DataGridView binding issues were the toughest nut to crack. And, unfortunately, those changes will require you to regenerate the Generated Master for your classes.

NOTE: You must regenerate your generated classes with the Master Template

EntitySpaces - Release Notes for 1.4.1 

  • Added “Use Schema” checkbox to SQL Server Stored Procedures template. Default is un-checked (dbo).
  • Changed MySQL Stored Procedure template delimiters from $$ to //.
  • Changed the esEntityCollection.Item Property so that it is no longer obsolete.
  • Fixed SqlClientProvider so that AnsiString output parameters now have the correct size property for computed columns.
  • Fixed bug in QueryBuilder for all 4 providers. If a Like() expression was used in the Where() clause before an Equal(bool) expression, then the parameter type for the boolean was set to a string.
  • Added two protected Methods to esEntityCollection:
    • AssignPrimaryKeys - Assigns the underlying DataTable's 'PrimaryKey' data member using the primary keys as defined in the collection's associated esColumnMetadataCollection.
    • RemovePrimaryKeys - Removes the DataTable's 'PrimaryKey' information by setting it to null. Call this to undo AssignPrimaryKeys().
  • Added three Properties to esEntityCollection:
    • AllowEdit - Default is true. Setting this to false prevents the user from editing a row in a DataGridView.
    • AllowNew - Default is true. Setting this to false prevents the user from adding new rows in a DataGridView.
    • AllowDelete - Default is true. Setting this to false prevents the user from deleting rows in a DataGridView.
  • Fixed esEntityCollection IBindinglList AddNew, ApplySort, and esEntity BeginEdit, CancelEdit, EndEdit, AddNew. This fixes the editing or clicking around in a DataGridView bug.
  • Fixed an issue where Extended Properties were not being included in the collection if MultiProviderMode was set to true.
  • Fixed DeleteAll() so that it honors the Filter(). Only records matching the Filter criteria will be deleted.
  • Fixed a problem that ocurred if your PrimaryKey column was not the first column in the table metadata.
  • Added a specific Exception for when you call Save on an entity that is part of a collection. You must call Save on the collection.


EntitySpaces Trial Version: 

  • The SqlDemo has been replaced by a new and improved EntitySpacesDemo. A zipped version with the runtime references removed is available on the Documentation|Downloads page.


Documentation: 

  • Added entries in compiled help for the new methods and properties.


Note: See the Release Notes for 1.4.1 for detailed installation and upgrade insructions.

posted on Thursday, June 15, 2006 12:03:31 AM (Eastern Standard Time, UTC-05:00)  #   
 Monday, June 05, 2006

We have released the first version of our EntitySpaces Template Suite for ASP.NET. Try the DEMO

Here are the features:

  • All of the databases supported by EntitySpaces should work with these templates.
  • The ASPX pages generated build upon your already created EntitySpaces classes.
  • Both C# and VB.NET ASPX pages can be generated.
  • The look and feel of the ASPX pages are controlled by a very simple style sheet.
  • Master Pages are supported and optional (new with ASP.NET 2.0).
  • The generated ASPX pages use the new ASP.NET MultiView/View controls.
  • Browse, Detail, Edit and Search modes are supported.
  • You control what columns to display and in what order.
  • All column headers are clickable and sort the GridView(s).
  • Required fields use the RequiredFieldValidator control.
  • ForeignKeys are mapped to urls in detail mode and combo-boxes in edit mode.
  • Relationships can be mapped to subgrids in detail mode.

Simply generate your ASPX pages. Add them to your solution. Finally, add these files to your project. (The templates are installed to the EntitySpaces.C#.Web and EntitySpaces.VB.Web folders in MyGeneration. The files below are under WebTemplates in your EntitySpaces program folder.)

  • es_stylesheet.css
  • question.gif
  • GridBase.cs  - C# projects only
  • GridBase.vb  - VB.NET projects only

Both the installer and the DEMO site are available for download to all who have purchased EntitySpaces. See the download menu on the main EntitySpaces site. This new template suite will not be in the trial version. These templates are intended to provide the ability to administer databases over the web. This chore is typically overlooked although it is really needed. Such admin screens can eat up quite a bit of development time and they are much easier to generate. Other than the row of buttons at the top the demo site is 100% generated, no hand coding was done.

These templates are not currently supported on the same level as the templates that generate the EntitySpaces classes. EntitySpaces will not be bogged down in supporting these or allow them to effect the timing of our 1.5 release which is fundamental to our long term strategy. That being said we will of course address issues over time and fix things as time allows.

See the PDF file that describes the template(s) PDF

posted on Monday, June 05, 2006 10:57:32 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, June 04, 2006

We have taken our soon to be released ASPX template suite and generated a site against the Microsoft SQL Northwind database. Nothing you will see on this site was hand coded (except for the row of buttons at the top and the URL link at the bottom - both on our master page). The ASP.NET templates are pretty sophisticated and are style sheet driven so please don't get hung up on the color scheme. We realize you probably wouldn't use these pages as your actual website but the ASP.NET pages do provide a nice admin system that sys-admins can use to administer your database and that developers can use during development. They also act as a very nice reference on how to use EntitySpaces in an ASP.NET application.

The EntitySpaces ASP.NET templates support master pages (optional), use the new Multiview/View construct and the GridView, allow for sorting on the header columns, paging, sub grids, editing, searching, and more. We're only a matter of days until they are released at which point all customers will have access to the templates in the download area. The EntitySpaces ASP.NET templates will not be included in the trial version of EntitySpaces. The documentation and demo site of course will be open to everyone.

Take a look http://www.entityspaces.net/thedemo/Employees_admin.aspx

posted on Sunday, June 04, 2006 1:49:34 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, May 23, 2006

We just posted a video here to illustrate how simple it is to use EntitySpaces for module development on the DotNetNuke 4.x platform. This gets you up to where our standard code generation video starts with generating your EntitySpaces objects. We do plan to post an additional code generation video specifically for DotNetNuke in the near future, so stay tuned.

posted on Tuesday, May 23, 2006 7:06:40 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, May 20, 2006

EntitySpaces release 1.5 currently has a soft target date of July 30th, 2006. We will keep you posted as we get closer to release. The list below is what we are planning for 1.5. Of course, any bug fixes will be included. The ASPX template will be released as soon as it is available, possibly as early as mid-June.

  • Hierarchical support. This is the number 1 priority for this release. It is no small thing and will support many-to-one, one-to-many, and many-to-many relationships,  DataBinding Sub-Collections, and lazy loading. 
  • Caching. There has been a great deal of interest expressed in caching. This will eliminate unnecessary trips to the database while avoiding duplicate objects in memory. It will be well integrated with our hierarchical plans.
  • ASPX template. The template generates pages using the GridView control. This will be an amazing template with very sophisticated features:
    • Versions for both C# and VB output.
    • Sorting, filtering, searching, and editing.
    • Detail pages with hyperlinks to related objects.
    • DropDown ComboBoxes for lookups. You can choose the display column or even define your own concatenation of columns.
    • Paging with user definable number of line items per page.

We have a growing wish list of items for inclusion in future releases. We have not prioritized them, yet, and some may never see the light of day, but feel free to comment on them and add your own:

  • Ability to load a table-based EntitySpaces object from a View. Similar to dOOdads.
  • Improved DataBinding.
  • Add a Clone method to the single entity.
  • Additional Providers.
  • Implement an .IsLoaded() method for entities and collections.
  • .NET Remoting.
  • WinForm templates.
  • Dynamic Query enhancements:
    • Support for common functions like UPPER() in WHERE clauses.
    • Support for JOINs.
  • Some tough ones. These are particularly thorny, especially in a multi-db environment, but we are still considering them as worth-while suggestions:
    • Updateable Views.
    • Add the ability for the EntitySpaces Dynamic Query API to do more than SELECT statements, such as INSERT, UPDATE and DELETE statements.
    • Add the ability to generate EntitySpaces objects from Stored Procedures (as opposed to just Views and Tables).

If your pet feature has not made the list, do not be discouraged. Just let us know what you want in the forums or by commenting on this post. And, don't let that stop you from using EntitySpaces 1.4 right now. It can replace tens (even hundreds) of man-hours of repetitive drudgery with well-tested, high-quality code. You are free to concentrate on the aspects of a project that make it unique. Ask yourself, "What price would I pay if I could spend more time with my family and friends?" Then, let your conscience be the guide.

The EntitySpaces Team


posted on Saturday, May 20, 2006 8:37:34 AM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, May 13, 2006

 

EntitySpaces 1.4 initially was targeted for May 31st, however, we had to make some adjustments. Hierarchical support is now the main focus of our next release (1.5). Also, the ASPX templates are still underway and will be released separately before the 1.5 release. We had also planned on doing some databinding work as well but that has been pushed to 1.5 as well. However, all that said this is a terrific release, we have some very good features, a few fixes, and even a new MySQL provider in 1.4. See the release notes below for the details.         


·          EntitySpaces 1.4

o         Added templates to provide full VB.NET support

§          Includes a full set of Custom, Generated, and MetadataMap templates.

§          It is no longer necessary to pre-compile the generated code under C#.

§          Note: If you are using VBExpress, we recommend opening your Project Properties, selecting the Application properties tab, and clearing the Root namespace that the IDE set by default. That way, when you add “Imports BusinessObjects” to your code, it will work as expected.

o         Added an EntitySpaces provider for MySQL.

§          Works with MySQL 4.x using DynamicSql mode.

§          Works with MySQL 5.x and supports both DynamicSql and StoredProcedure modes, as well as Views.

o         Added an EntitySpaces Template to produce MySQL 5.x stored procedures.

o         Fixed stored procedure parameter name prefix handling for SQL Server, Oracle and Access.

o         Fixed parameter name handling for column names with spaces.

o         Added output parameter support to esParameters.         

public string GetFullName(int employeeID)
{
   
esParameters parms = new esParameters();

   
parms.Add("EmployeeID", employeeID);
   
parms.Add("FullName", esParameterDirection.Output, DbType.String, 40);

   this.ExecuteNonExec(esQueryType.StoredProcedure, "proc_GetEmployeeFullName", parms);

   return parms["FullName"].Value as string;
}

o         Fixed an obscure bug in Transaction Manager. (Special thanx to Graham Scragg and Thomas Coats for working with us on this.)

o         Improved Exception handling. We no longer wrap the exceptions which will make it much easier for you to see the real exception.

o         Updated and improved compiled help.

 

 

·          DotNetNuke

o         Includes an EntitySpaces ControlPanel module for DotNetNuke.

§          Displays EntitySpaces assembly information.

§          Allows you to upload/update EntitySpaces assemblies.

§          Allows you to encrypt/decrypt connection information in config files.

o         Added new template to create Sql scripts for DotNetNuke module development.


 

·          ASP.NET

o         Includes ASP.NET code for an EntitySpaces ControlPanel.

§          Displays EntitySpaces assembly information.

§          Allows you to update EntitySpaces assemblies.

§          Allows you to encrypt/decrypt connection information in config files.


 

·          EntitySpaces SqlDemo

o         Includes code demonstrating encrypting/decrypting app.config connection information.

o         Note: If SqlDemo is run from within Visual Studio, SqlDemo.vshost.exe.config gets encrypted. This file is only used by Visual Studio and should never be distributed with your application. To encrypt SqlDemo.exe.config, run SqlDemo.exe directly from the bin\Debug folder.


 

·          EntitySpaces Test Suite

o         Updated the test fixtures and added NUnit projects to test the EntitySpaces provider for MySQL.

o         Duplicated the C# tests in VB.

Note: Installation instructions at the bottom of the Release Notes for 1.4 contain special instructions for MySQL users. They explain how add the required Language Mapping to MyGeneration.


posted on Saturday, May 13, 2006 11:49:34 AM (Eastern Standard Time, UTC-05:00)  #