Archive

Posts Tagged ‘Visual Studio’

CodeFluent Entities and Visual Studio 2013

November 12, 2013 Leave a comment

Good news: Visual Studio 2013 is now available for download and CodeFluent Entities latest build (61214.761) runs great on it!

CFE-VS2013

You can learn the new features of Visual Studio 2013 here:

The Visual Studio 2013 download includes the .NET framework 4.5.1. If you have not seen it yet, you can read about the framework here:

On November 13th, do not miss the Visual Studio 2013 Virtual Launch.  You will discover the breadth and depth of new features and capabilities in the Visual Studio 2013 release.

Note that you can download the latest version of CodeFluent Entities here, or update your version using the Licensing tool.

Remember that you can follow the latest new features and bug fixes of CodeFluent Entities subscribing to this RSS.

Enjoy! :-)
Sabrina Pereira

Categories: News Tags: ,

CodeFluent Entities and Visual Studio 2013 preview


As announced on the //Build/ 2013 event, the Visual Studio 2013 preview is available for download.

Visual Studio 2013 preview sign in

Visual Studio 2013 preview sign in

 

Visual Studio 2013 home page

Visual Studio 2013 home page

You can discover the new features of Visual Studio 2013 here:

The Visual Studio 2013 download includes the .NET framework 4.5.1 preview, so this is the opportunity to discover it:

Finally, the CodeFluent Entities latest build (61214.714) is compatible with the Visual Studio 2013 preview version.

CodeFluent Entities and Visual Studio 2013 preview

CodeFluent Entities and Visual Studio 2013 preview

You can download the latest version of CodeFluent Entities here, or update your version using the Licensing tool.

Remember that you can follow the latest new features and bug fixes of CodeFluent Entities subscribing to this RSS.

So you can start playing around :)

And if you missed the //Build/ 2013:

Regards,

Pablo Fernandez Duran

Create Windows Azure Mobile Services in a few minutes thanks to CodeFluent Entities

April 5, 2013 Leave a comment

You may have heard that a lot of new features were added to Windows Azure during the last few months.

Today we will focus on Windows Azure Mobile Services. First of all, what is it?

Long story short, Windows Azure Mobile Services allows you to expose your data through JSON web services. Microsoft provides SDKs for Windows Store and Windows Phone 8 apps, pre-configured projects for iOS and Android, and JavaScript libraries for HTML.

The SDKs offer a large number of methods that provide access to your data stored in Azure.

So let us create a new CodeFluent Entities project. As an example for this article, we will use the “advertising sample” model. I will also add a class library project which will contain our SQL scripts.

We will not need more for this article since we are just going to generate the SQL Azure database with CodeFluent Entities.

First, we will add the SQL Azure Producer to our project. Regarding the configuration of the producer, we will only set the property “Produce Scripts” of the SQL Azure section to “true”.

1

Also, and this is really important, we will set the “Produce Schema” property to “true”. This property can be found by clicking on the “Advanced Properties” button as shown in the following screenshot.

2

You may wonder why this is so important. It is simply because Windows Azure Mobile Services will use the name we are going to define for our service to map it with the schema name of our database tables. So choose it carefully!

In this example, we are going to name our schema “sampleadvertising”. To do so, we have to open the properties of our entities and fill in the schema property as shown below.

3

Once we have updated the “Schema name” property of each entity we want to expose, we can build our project to produce our database.

When the project has been produced, check the database in SQL Azure to make sure we have our custom schema name on our tables.

4

Let us go back on Windows Azure to create our mobile service. According to the schema name we used in this example, we will name it “sampleadvertising” and we will associate it with the database created earlier.

5

6

Now that our service has been created, click on the “Data” tab of our service to “add a table”. Here we will add tables which names are identical to our database tables; for instance, “Campaign”.

7

8

Note: for the purpose of this article we will set the authorization for all CRUD methods to “Everyone”. Do not do the same on production especially if you work with sensitive data.

Those tables are not new database tables, they are only created to associate the tables created thanks to CodeFluent Entities with our mobile service and therefore expose our database data.

Once the table is added, we can access our data from everywhere in a standardized format.

9

From now on, we will show how to use our data from a sample Windows Store application.

First of all, we need to install the Windows Azure Mobile Services SDK which can be found at this address: https://go.microsoft.com/fwLink/?LinkID=257545&clcid=0x40C

Once the SDK is installed, let us add a new project to our solution, a blank C# Windows Store app, named “SampleAdvertising.App”.

Then add a reference to the SDK we have previously installed.

10

Let us open the file “App.xaml.cs” to register our mobile service. In our case, we will add the following code:

    <br />public static MobileServiceClient MobileService = new MobileServiceClient(&quot;https://sampleadvertising.azure-mobile.net/&quot;);     <br />

In this particular example, we will not need to register the application key since we have set the permissions to “everyone”.

Now that our service is registered, I will show you how to consume our database data.

For instance, we will query our table “Customer” to get the customer “SoftDia”. To do so, we will create an async method that will get our “Customer” table. Then we will use the “ReadAsync” method with a query filter based on our “Customer_Name” column.

Finally, we will get a JsonObject from this IJsonValue and display its content in our Visual Studio output.

Here is the code used:

    <br />GetCustomerByName(&quot;SoftDia&quot;);</p>  <p>private async void GetCustomerByName(string customerName)</p>  <p>{</p>  <p>IMobileServiceTable customerTable = App.MobileService.GetTable(&quot;Customer&quot;);</p>  <p>IJsonValue myCustomer = await customerTable.ReadAsync(&quot;$filter=(Customer_Name eq '&quot; + customerName + &quot;')&quot;);</p>  <p>JsonObject myCustomerObject = myCustomer.GetArray()[0].GetObject();</p>  <p>foreach (var item in myCustomerObject)</p>  <p>{</p>  <p>Debug.WriteLine(item.Key.ToString() + &quot;: &quot; + item.Value.Stringify());</p>  <p>}</p>  <p>}    <br />

And this is what we get from our “Customer” table

11

Cheers,

Aymeric ROLAND

Navigate To… is now supported by CodeFluent Entities

February 13, 2013 Leave a comment

 
I don’t know you, but one of my favorite (and useful) commands in Visual Studio is the “Navigate to…” command (VS 2010 or higher), Menu->Edit->Navigate to… Or Ctrl+, (coma). This is one of my top most used commands in Visual Studio.
 

The Navigate To Command

The Navigate To Command


 
I find very useful to find all kind of custom symbols (classes, enums, attributes, properties, methods, events…) within my Visual Studio solution.
 
Once you have made a search, a list of results is displayed. At the left of each result you can see an icon that represents the type of the matched item (class, property, method…), you can find the entire list of icons here.
 
I have seen other kind of techniques to perform a symbol search. For example, some people do a simple search (string search) at the solution (or project) level Edit->Find and Replace->Find in Files or (Ctrl+Shift+F).
 
Find And Replace Command

Find And Replace Command


 
This works fine but it would not be as accurate as the “Navigate to…” search. Indeed, a global search will also search in string definitions, encapsulated variables and within all kind of files (if the file type has not been specified).
 
Find And Replace Results

Find And Replace Results


 
Well, good news every one! Now the CodeFluent Entities model (Designer Surface and XML representation) is integrated in to the “Navigate to…” search results.
 
Navigate To Results with CodeFluent Entities integration

Navigate To Results with CodeFluent Entities integration


 
Is not that great? On the search results we can distinguish the CodeFluent Entities concepts like Entities, Properties, Relations and even Instances. You can easily identify the CodeFluent Entities related concepts by the suffix [of Entity ‘EntityName’].
 
You may only want to search within the CodeFluent Entities concepts, well this is possible by typing “_cfe ” before the search term. For example, if I type “_cfe Artist” I will only get CodeFluent Entities results.
 
Searching only within CodeFluent Entities concepts

Searching only within CodeFluent Entities concepts


 
You can even search for entities instances. Imagine I have in my model an instance of type “Artist” called “The Police” (value of the Name property), if I type “The Police” in the “Navigate to…” window I will also get results related to the instances in my model matching this term.
 
Searching for instances

Searching for instances


 
Finally, when you choose to navigate to a search result, a nice zoom effect will take you directly to the related entity on the CodeFluent Entities Modeler Designer.
 
Navigating to the Result

Navigating to the Result


 

Hint: if you press “Shift” when navigating to a search result (OK button or Enter key) you go directly to the XML definition (CodeFluent Entities parts).

 

Navigation to the XML definition

Navigation to the XML definition


 

This feature is available since build number (1.0.61214.701), you can download the latest version here or find some information on how to update your CodeFluent Entities version in this post.

 
If you want to know more about the navigation in the modeler you may appreciate this post.
 
I know you will find this feature useful.
 
Regards.
 
Pablo Fernandez Duran

Using CodeFluent Entities with Microsoft Visual Studio Express

October 15, 2012 Leave a comment

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

The Aspects and Producers property grid got better

October 3, 2012 Leave a comment

Remember the Aspects and Producers property grid we talk about in that previous post? Well, it just got better.

The Aspects and Producers property grid allows developers to view and edit all properties brought by aspects and producers which are used in the project of the currently selected object.

What changes is that as of today if you have several producers of the same type their properties will show up categorized under the name of the producer instead of its type name.

As a picture is worth a thousand words here is a before/after changes screenshot for a CodeFluent Entities model using two SQL Server producers:

before
Before

 image
After

That will definitely help to differentiate properties of each producer.

 

Cheers,

Thibault Nestor

September 26th 2012 Links: Visual Studio, Windows, SharePoint 2013, .NET 4.5, Roslyn, eBooks

September 26, 2012 Leave a comment

Here is our new entry in our link-listing series:

 

Visual Studio

Visual Studio 2012 released to the web

Visual Studio 2012 is available for download!

 

Windows 8

Windows 8 RTM is available for developers

Microsoft gives Windows 8 early access builds for developers.

 

Microsoft finally comes clean(er) on post-Metro naming plans

Microsoft is discontinuing its use of the term “Metro” used to describe the tiled user interface in Windows Phone and Windows 8. Its new name might be ‘Windows Store’.

 

Windows Server 2012

Windows Server 2012 is available

Windows Server 2012 is available!

 

SharePoint 2013

What’s Coming in SharePoint 2013

An updated user experience, some upgrades and I/O performance improvements, collaboration and social networking capabilities, better tagging, SkyDrive Pro replacing SharePoint workspaces and so on.

 

Dev

Announcing the release of .NET Framework 4.5 RTM – Product and Source Code

.NET Framework 4.5 is available as well as the reference source code under the Microsoft Reference Source License (MS-RSL). You’ll find improvements brought by this release and some guidelines to debug with the .NET Framework library reference source.

 

Roslyn September 2012 CTP is now available

Good work in progress!

 

Free eBooks

Programming Windows Phone 7

Microsoft Office 365: Connect and Collaborate Virtually Anywhere, Anytime

Large collection of Free Microsoft eBooks for you, including: SharePoint, Visual Studio, Windows Phone, Windows 8, Office 365, Office 2010, SQL Server 2012, Azure, and more.

Here is a compilation of a variety of free Microsoft eBooks including: SharePoint 2013, Office 2013, Office 365, Azure, Cloud, Windows Phone and so on. Enjoy!

 

Cheers,

Thibault Nestor

The CodeFluent Entities Portable Modeler

September 11, 2012 1 comment

CodeFluent Entities has always included out-of-the-box a nifty little tool called the “Portable Modeler”. It’s a standalone CodeFluent Entities modeler application, not dependent on anything but the CodeFluent Entities product binaries. It means it’s not dependent on Visual Studio, but still allows to create, modify and save a CodeFluent Entities model:

It exists as an .exe file located in the installation directory, appropriately named “CodeFluent.Modeler.Portable.exe”. Note the product setup does not install a shortcut on it so you’ll have to create one by yourself, and point to it:

When you run it, it will just display a standard windowed application with Open, Save, etc. menu:

You can start a New CodeFluent Entities project from scratch (“New”), you can import an existing database (“Import”), or open an existing model (“Open”). Note the “Open” command also supports Visual Studio .cfxproj  (the file type of a CodeFluent Entities Model when integrated Visual Studio). If you open an existing CodeFluent Entities model and just see a white panel like this…:

… don’t panic :-) It just means there is no design surface defined for this model, and we don’t do this automatically for you (it requires a model change as a design surface is also a CodeFluent Entities model concept, just like the others), so you can add one like this:

Give this new design surface a name (here I chose ‘def’), press ok on the New Surface dialog box, and then you should this something like this (depending on your surface rendering settings, here I’m using the ‘metro’ style):

That’s it! Now you have access to the modeler ribbon we all love (it’s – almost – the same as the one in Visual Studio), there is also a right-click menu, and a property grid. Design surfaces are displayed as a list of Tabs (we can see the ‘Def’ tab above).

Note this tool is not officially supported – beyond a best effort move as usual :-), but very practical for example if you want to give non-developer users the ability to open, view, and possibly change a model, as it does not requires Visual Studio to run. Of course, it lacks some features, notably source control, the cool solution wizards, and a solution explorer-like tree view.

July 24th 2012 Links: Software development, Windows Azure, Office

July 24, 2012 Leave a comment

Here’s our new entry in our link-listing series:

 

Software Development

Is the laptop doomed?

Ahaha, we’re not quite there yet, but we sure are getting there Winking smile

 

Entity Framework now Open Source

Big news: The Entity Framework source code is today being released under an open source license (Apache 2.0), and the code repository is now hosted on CodePlex (using Git).

 

Monogame

MonoGame is an Open Source implementation of the Microsoft XNA 4 Framework. Its goal is to allow XNA developers on Xbox 360, Windows & Windows Phone to port their games to the iOS, Android, Mac OS X, Linux and Windows 8 Metro.  (PlayStation Mobile development is currently in progress.)

 

Windows Azure

SOSP Paper – Windows Azure Storage: A Highly Available Cloud Storage Service with Strong Consistency

Wow, that’s interesting: the paper describes how Microsoft provisions and scales out capacity within and across data centers via storage stamps, and how the storage location service is used to manage their stamps and storage accounts. Then it focuses on the details for the three different layers of the architecture within a stamp, why these layers, what their functionality is, how they work, and the two replication engines.

A must read!

 

Office

Microsoft’s new Office: The cloud finally takes center stage

A sneak peek of Office 2013 (a.k.a. Office 15)

 

Microsoft released new Office (Customer Preview)

The new Office is available online (preview).

 

Introducing “Napa” – Office 365 Development Tools

The Visual Studio team released a preview of a new toolset called “Napa”, which is, as they say, “the easiest way to start building apps for the new Cloud App Model”.

 

Hope this helps,

Carl Anderson

New CodeFluent Entities Menu in Visual Studio

July 12, 2012 Leave a comment

Since a few builds now, installing CodeFluent Entities adds a new menu in the Visual Studio toolbar:

image

 

This menu contains a set of shortcuts to get started quickly using CodeFluent Entities:

  • New Project…: equivalent to “File > New > Project…”
  • Import an Existing Database or Model…: launches a new wizard which is a combination of the starter wizard (to create and configure your solution) and the import wizard (to create a model from an existing line of business).

A detailed tutorial is available here: Get started from an existing database or model

  • Starter Wizard…: launches a wizard to help you create a brand new CodeFluent Entities solution.

A detailed tutorial is available here: Get started using the Starter Wizard

  • Getting Started: opens the Get Started page in a browser,
  • CodeFluent Entities Blog: opens this blog Winking smile
  • Online Documentation: opens the product documentation,
  • Submit Feedback: opens a feedback form you can use to send us your comments,
  • Product Updates: a link to the CodeFluent Entities RSS Feature Feed. You can subscribe to this RSS Feed to be automatically notified of new features and bug fixes in the product,
  • Request a FREE License: opens a form letting you retrieve a free personal license from Visual Studio,
  • About CodeFluent Entities…:

image

Cheers,

Carl Anderson

Follow

Get every new post delivered to your Inbox.

Join 41 other followers