Home > Developing Using CodeFluent Entities > CodeFluent Entities: Multiple surfaces, multiple parts

CodeFluent Entities: Multiple surfaces, multiple parts

As discussed in the “What is a CodeFluent Entities model?” post, CodeFluent Entities projects contain:

  • surfaces, which are graphic views of your model,
  • XML parts, which are storage units.

By default, when creating a new project, you have a single surface named “Default” and a single model part named <DefaultNamespace>.cfp which will both contain all your entities:



In the screenshot above you can tell that I have several namespaces, let’s say I want to chunk my model up, so I have one surface per namespace in addition to my default surface. Select the Surfaces folder, and create a new one, you’ll see that a dialog pops-up letting you choose which concepts you want to import:



Here’s the result after repeating this logic for each of my namespaces, isn’t it a lot more readable?!



Yet, all entities are still stored in the same, unique, model part “AdventureWorksReloaded.cfp”, making it hard to work collaboratively (doing edits on any of my surfaces would automatically check-out the AdventureWorksReloaded part as all entities are stored in this one).

This again can be changed: select a namespace and from the property grid, switch the default part to a new part.




If I do this for all my namespaces, in the end my main part will just contain project level settings, producers and import other parts:



Organizing my CodeFluent Entities project this way, each developer can be in charge of a functional namespace and work in his scope without stepping on someone else’s shoes.

Finally, you could even go one step further by enabling the “Create One Part Per Type” option which creates one part per entity or enumeration:



Not only is this a very handy option when collaborating on the same source-controlled model, but you can also get great performances on big models as it avoids to have one big XML file containing all your project.


Hope this helps,

Carl Anderson

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s