Monday, June 9, 2008

Second CTP version for Sculpture

A new version of sculpture published on codeplex.

In this version:
• Many bug fixes, along with a number of functional improvements.
• Support for Visual Studio 2008.
• Some improvements in the Power Point presentation (add a section that describes how to consume the generated code).
• Remove the topics related to Microsoft .NET Framework 3.0 from the version that work under VS2005, so it can be run under .NET Framework 2.0.

You can download it form here


Dave said...

I really like what you guys have done with Sculpture!

Also, the VS2005 version is a nice touch for thoughs of us still using it for one reason or another.

Can you provide a example of what should be done inside BusinessLogic Component classes?

Thanks Again!

Ahmed Negm said...

Hello Dave,
I am happy to hear your opinion.
We will always deliver Sculpture with 2 versions for VS2005 & VS2008.

Business Logic Component classes are the Business layer which usually has your business logic code, Sculpture give you the ability to build the skeleton of this layer, so you can review it from the model quickly, Sculpture build initial classes for your business logic and interfaces for these classes, so you can start immediately write your code in the proper method.

So this classes just the skeleton that you will write your own business logic in it.

We will try to write examples about this layer in Sculpture documentation.

If you have any ideas, you are welcome!

Thanks Dave

Dave said...


I am basically wondering what you consider best practice for managing the database connection in this scenario. Either not at all from the BizLayer, or in the bizLayer?

I also found an issue in the code with how GetAttachments() assigns values. e.g. Helpers.GetWhereValue(obj.FKID.ToString())))[0]; This assumes there will always be a value assigned, which is not always the case. Null FKID basically.

Otherwise, I would be willing to cook up a couple examples. =)


Ahmed Negm said...

Hi Dave,
Thanks for interest,

First you have two scenarios to handling Database Connection:

1. by the static Connection, you open it once in the first of your application, then it is still opened till you close the application.

2. you can create your own DBConnection and pass it to the repositories as

Database _database = DatabaseFactory.CreateDatabase(databaseName);
DbConnection _connection = _database.CreateConnection();
SectorReprository sectorRep = new SectorReprository(_database, _connection);

in the second scenario, you have full responsibility about the Connection.

About the Database connection and the Business layer,
the database connection stores in app.config file, which must be in the host project (it is the default for Data Access Application Block , and Repository Factory.
so it is not in the Business layer , it is in the host project where you can change it without rebuild your code.

Second, About the Foreign key issue, it will be fixed in the next version

Thanks again for your interest Dave..

Patrik Cedendahl said...

Hi Ahmed,
Do you have any good ideas how Sculpture and Web Client Software Factory can work together?

We are using WCSF but we dont have this kind of tool generating DataAccess and Entities. I can't figure out how to use it in a good way with WCSF. Is there any plans that WCSF and Sculpture will cooperate in any way??

By the way, this product has good potential to be a good Code Generator.

Should'nt you upload the code to CodePlex so people can join and work with this??


Patrik Cedendahl said...

Why dont you have all the discussions and Issues at CodePlex??


Patrik Cedendahl said...


Should it be a good thing to generate the Entities classes as Partial??

Patrik Cedendahl said...

Sculpture does'nt generate my Custom Methods that I add. Is this a known bug??


Ahmed Negm said...

Hi Patrik,
I try to answer all of your concerns in the Sculpture Discussions

I hope that the answer help you using and examining Sculpture.

About the partial class of the entities, from the model driven development point of view, if the entities was partial class so you can extend it with new members, then the model will not reflect totally your application state.
it is not recommended to change them to partial classes.

Thanks for your interest, and keep in contact, Sculpture still have fantastic features in it's bag.