very basic question about CSLA and database.

very basic question about CSLA and database.

Old forum URL: forums.lhotka.net/forums/t/2216.aspx


SethSpearman posted on Saturday, January 27, 2007

I am developing a commercial winforms application.  For the record, it may be ported someday to asp.net and even have components running on pocket pc.  This is one reason, among others, that attracts me so strongly to the framework.  But I am having trouble on deciding on a database engine.  Keeping in mind that right now I am thinking of a COMMERCIAL WinForms APP and that deploying my app with sql express edition would be a total nightmare (50+ meg redist, permissions etc) and so I am thinking of other options.  I have narrowed it down to 2 choices.  The first is SQL Compact edition because it embeds right into the app and can be deployed with just a couple of files.  The downside is that it has no native support for stored procs which is very limiting (although MS makes a decent case that this is not all bad).  And I also know that I could use CSLA to do the data portal and just put the CRUD right into the portal code rather on the DB but my instinct is to not do it that way.  Secondly, however, I am thinking of using the firebird DBMS because it is “embeddable” just like SQL compact edition but also can execute stored procs.  In fact, it seems just right, except that it is a NEW engine and would require me to learn all of its particular oddities and differences and will have much less tool support (like CodeSmith templates for example).  So the learning curve is scaring me a bit.


What  would you do?

Seth

JoeFallon1 replied on Saturday, January 27, 2007

I would use SQL compact edition myself.

SP support is not critical. I only use a handful of them right now on regular SQL Server.

I have separate classes to support the SQL code. Basically one class per table. So I can get the SQL from it using code like: 

SQLForTable1.SelectAll

SQLForTable1.Delete(id As Integer)

etc.

This keeps the DataPortal code neat and clean.

I also have a DataAccess Layer so the ADO.Net code is also abstracted out of the DataPortal.

dr = DAL.ExecuteReader(SQLForTable1.SelectAll)

Joe

 

Copyright (c) Marimer LLC