Home > Developing Using CodeFluent Entities, SoftFluent Products > Using CodeFluent Entities with Microsoft Visual Studio Express

Using CodeFluent Entities with Microsoft Visual Studio Express


Since 2005 Microsoft provides Visual Studio Express. This edition is a lightweight and free version of the Visual Studio product line. It is a great tool for users other than professional software developers. Unfortunately, it comes with some limitations that prevent CodeFluent Entities from being integrated to it. Indeed, Visual Studio Express does not support tool extensions. But don’t worry, CodeFluent Entities works perfectly as a standalone application too.

When installing CodeFluent Entities you have the choice to install the Core Edition with or without the Modeler:

  1. The Core Edition refers to the CodeFluent Meta Compiler without Microsoft Visual Studio integration.
  2. The Modeler Edition refers to the edition shipping the CodeFluent Meta Compiler as well as the CodeFluent Entities Modeler which is a designer integrated into Microsoft Visual Studio.

Working with Visual Studio Express you’d rather choose to install the Core Edition only. You’ll have access to the CodeFluent Meta Compiler which can be invoked by command line to generate ready to use components from a CodeFluent model. CodeFluent models are just plain-old XML files that you can create or edit with the editor of your choice such as your Visual Studio Express or with the Portable Modeler. The Portable Modeler is a standalone application which is the perfect tool for users working with Visual Studio Express (or without Visual Studio) who wish to get a graphical representation of a model.

Here is an example that shows a CodeFluent model and how to use the meta compiler:

A Model that defines a Customer entity, and the Microsoft SQL Server Producer as well as the Business Object Model Producer:

<!-- Sample.xml -->
<cf:project xmlns:cf="http://www.softfluent.com/codefluent/2005/1"
            defaultNamespace="Sample"
            defaultKeyPropertyTypeName="int"
            defaultConnectionString="server=(local)\SQLEXPRESS;
database={1};Integrated Security=true">
    <!-- Microsoft SQL Server Producer -->
    <cf:producer typeName="CodeFluent.Producers.SqlServer.SqlServerProducer, 
CodeFluent.Producers.SqlServer">
        <configuration targetDirectory="..\Generated\Sql" />
    </cf:producer>
    <!-- Business Object Model Producer -->
    <cf:producer typeName="CodeFluent.Producers.CodeDom.CodeDomProducer, 
CodeFluent.Producers.CodeDom">
        <configuration targetDirectory="..\Generated\Model" 
outputName="{0}.dll" />
    </cf:producer>
    <!-- Entities -->
    <Customer>
        <Id typeName="int" />
        <FirstName typeName="string" />
        <LastName typeName="string" />
    </Customer>
</cf:project>

The content of a Generate.bat batch file to launch CodeFluent.Build.exe:

call "%ProgramFiles%\SoftFluent\CodeFluent\Current\CodeFluent.Build.exe" Sample.xml

The command line including cfvars.bat set some environment variables needed by the meta compiler. I invite you to read the documentation here to learn more about the meta compiler.

In addition, CodeFluent Entities is shipped with other sweet tools located in your installation directory:

    • The Importer (CodeFluent.Import.exe) that allows you to create a CodeFluent Entities model starting from an existing database or model.
    • The Meta Model Explorer (CodeFluent.View.exe) that provides a user interface to load a model and explore the inferred model.

MetaModelExplorer

    • The Portable Modeler (CodeFluent.Portable.exe) which is a standalone version of the Visual Studio Integrated Modeler!

PortableModeler

To sum up, even though Visual Studio Express does not support extension tools such as CodeFluent Entities, you can still use CodeFluent Entities as a standalone application and still benefit of the power of command lines or user interfaces to create your CodeFluent model and generate your components.

Note: if you can’t find the Core Edition of CodeFluent Entities, it’s because the download is not directly available since june 2012. So if you really need it, please contact our support at support@softfluent.com :-)

Cheers,

Thibault Nestor

  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

Follow

Get every new post delivered to your Inbox.

Join 44 other followers