Page 1 of 1

R5?

Posted: Fri Mar 29, 2013 4:07 pm
by NC Software
R5 may be my entry point based on timing and product maturity. Any roadmap that outlines what's coming in the releases ahead and proposed timeline for R5? While in beta nhibernate scared me with extremely poor performance. What is the experience with GOLD's performance and comparatively with the well performing 707?

Re: R5?

Posted: Mon Apr 01, 2013 6:09 am
by ForumsAdmin
Hi Neal
Beta as the name said was 'Beta'. There are 5 releases since then. You should certainly have a look a the newer releases for reference.
Built on more scallable foundations AC Gold excells in many areas but has to make few compromises in order to keep the API compatible with AC7x as much as possible. There are many merchants like you who have a lot of custom code on their AC7.x stores. Had we eliminated the old active-record style API completely and gone fully with the NHibernate patters, we would have made it extremely difficult for merchants to upgrade. Although there would have been more performance gains.

Re: R5?

Posted: Thu Apr 04, 2013 2:57 pm
by NC Software
Been working with Microsoft's latest Entity Framework - it is really really good! Shame you all went the direction of nHibernate

Re: R5?

Posted: Fri Apr 05, 2013 4:32 am
by mazhar
Its been more then two years since we looked into EntityFramework and compared it with Nhibernate. It maye have certain improvements by now. The selection of better option from these two is very commonly discussed question in ORM domain and suitable selection may vary depending upon certain requirements. Would like to share what parameters you used to compare it with NHibernate? Also what are your findings about the advantages of using EntityFramework over Nhibernate?

Re: R5?

Posted: Fri Apr 05, 2013 8:01 am
by NC Software
IMHO:

EF is built around the .NET framework AND LINQ. It is far easier to understand as it was built by Microsoft around Microsoft's .NET core. NHibernate has a strange and foreign syntax that is hard for people to understand. I highly recommend revisiting EF and consider it once again. It's well done, works with the native library of controls and/or LINQ datasources, it's just a very well done ORM.

Re: R5?

Posted: Fri Apr 05, 2013 8:23 am
by ForumsAdmin
Unfotunately at the time we were deciding about what to use at data access layer, entity framework was not as mature as it is now. Surely entity framework is not a badk option in its current state.

I don't think in the near future we can make another switch at the data access layer. It would be too much to handle for our existing customers and making such changes is a huge undertaking that one should tackle only in a major product update. When the time comes for a major update we may re-evaluate the available options ... and by that time we may have something even better to use.

Re: R5?

Posted: Fri Apr 05, 2013 8:29 am
by NC Software
Absolutely - concur! Don't make a change now. But something to consider for vNext - I sure would prefer it.

Re: R5?

Posted: Sat Apr 06, 2013 6:40 pm
by mikek
Hi Neal,

You can generate EF model from the existing AbleCommerce schema and use EF for AbleCommerce customizations and custom Tables. We also
feel more comfortable using LINQ and use EF along with NHibernate without any issues.

Below is a simple method that generates EF connection string based on the default AC database.config string.

Code: Select all

	  /// <summary>
      /// Get EF connection from AbleCommerce
      /// </summary>
      /// <param name="connection"></param>
      /// <returns></returns>
      private string GetConnectionString(string connection)
      {
         DbConnectionStringBuilder connectionBuilder = new DbConnectionStringBuilder();
         connectionBuilder.ConnectionString = connection;

         // Initialize the connection string builder for the
         // underlying provider.
         SqlConnectionStringBuilder sqlBuilder = new SqlConnectionStringBuilder();

         // Set the properties for the data source.
         sqlBuilder.DataSource = connectionBuilder["Server"].ToString();
         sqlBuilder.InitialCatalog = connectionBuilder["Database"].ToString();
         sqlBuilder.UserID = connectionBuilder["Uid"].ToString();
         sqlBuilder.Password = connectionBuilder["Pwd"].ToString();
         sqlBuilder.PersistSecurityInfo = true;
         sqlBuilder.MultipleActiveResultSets = true;
         sqlBuilder.ApplicationName = "EntityFramework";

         // Build the SqlConnection connection string.
         string providerString = sqlBuilder.ToString();

         // Initialize the EntityConnectionStringBuilder.
         EntityConnectionStringBuilder entityBuilder = new EntityConnectionStringBuilder();

         //Set the provider name.
         entityBuilder.Provider = "System.Data.SqlClient";

         // Set the provider-specific connection string.
         entityBuilder.ProviderConnectionString = providerString;

         // Set the Metadata location.
         entityBuilder.Metadata = @"res://*/YourEntityDataModel.csdl|res://*/YourEntityDataModel.ssdl|res://*/YourEntityDataModel.msl";

         return entityBuilder.ToString();
      }