Tuesday, July 8, 2008

Sculpture - The New Vision

After 1 month from publishing the CTP version of Sculpture, and some wide discussions with group of architects and developers, we collect great feedback about the current state and the future of sculpture.
Here I will draw a clear picture about the new vision of sculpture.
Sculpture with the current version is powerful tool but very restricted, from the model elements to its properties to validations to templates, all of that in one package, so you must use Sculpture as it is, no flexibility available, we will not spend our time in discussion the shortage points of the current version of Sculpture, let’s talk about the new one.

Sculpture Definition:
Sculpture is a .NET open source Model-Driven Development code generation framework ideal for creating and managing .NET Enterprise Applications, with Sculpture you can model your application components, and then transform this model to deployable components for your favorite technology, Sculpture comes with a host of ready-made Molds (The word “Molds” come from Molding) like (DAAB, NHibernate, LINQ, WCF, ASMX, SQL Server, MYSQL …), Sculpture also contains a Guidance Package for building your own Mold or customize existing ones. Using this Guidance Package, you can build a custom code generator with your favorite Technology. All of these raise the level of abstraction, for example the data access layer part in your model may be transformed to NHibernate implementation and with minor changes it can be transformed to LINQ implementation, and in the future can be transformed to “X” framework, which we don’t know it now.

Sculpture is divided into:

* Sculpture Core Engine: it is a platform that hosts the molds, takes care of making all the Molds work together. It includes the Model Designer, Mold discovery and loader, generic validation engine, generic code generation engine, command holder, and editor controls holder.

* Mold: The primary plug-in of the Sculpture framework, with Molds you can extend all the power of Sculpture to manage the model and the produced code as your needs, Molds provide the ability to process model elements, mold is not another definition of the templates.

With Mold you can:

1. Add new properties to the model elements, these properties will be shown in the Sculpture property window, so the user can set values for these dynamic properties, for example you can add property called “Table Name” to the Entity Element.
2. Add new validation to the model, you might need to set additional validations to your model, so when the user validates the model, the core engine calls the validation methods for all plugged Molds.
3. Add property monitor, which can be used to monitor any changes to the model elements, and notify the mold when property of specific element type changed, for example you can change the new property “Table Name”, when the entity name changed.
4. Add command set which will appear in the top of tool window that host the editor controls, with these commands you can made any changes to the model, for example you can add command that adds elements to the model based on specific database.
5. Add user control editor to the model, with this user control you will notify when selection changed, so you can build your editors that can be used to simplify the access of model elements.
6. The last one is the template, the mold contains list of templates, and each template has some properties as (Output Pattern, Output Condition, Overwrite …), these properties configure how the engine will transform it.

With this vision you can use the Out-of-the-box Molds, or build your own mold that serves your custom needs.

This is a quick overview of the new vision of Sculpture; we are planning to produce a release at the end of July.

Thanks to all advisors who provided invaluable assistance in this new vision!!

1 comment:

yagna said...


i am not able to view sculpture properties and details window. It is howing empty tabs. How to solve this issue.