Category Archives: Web @en

Why I prefer PaaS over IaaS

A small digression on my techy blog mostly on a subjective aspect of what I like a bout Cloud services in General: PaaS.

I am not going to enter into a complete explanation to differentiate IaaS over PaaS, so I just chose to reuse a couple of well know picture around the subject to highlight my view:

AzureServicesOverview PaaSPizza

The point of these 2 pictures is to show that PaaS offers more managed components than IaaS does.

It is true that PaaS, dues to offered services costs more than traditional IaaS does…

Price/Cost is a thing for sure, but having your team losing time on infrastructure building/patching/deployment/reboots is in today’s world not something you wanna do for multiple reasons:

  • When you teams do these tedious things, they aren’t producing value; neither for you of for your customers,
  • Doing these activities is not something that will make your team happy on the long run, better having it off your plate to let them work on things they like and that will make them learn,
  • Building software these days in more about playing with Legos, and it’s a good thing; building your infrastructure should be the same (of course you still need to know what’s in those boxes, and what are their limitations in what you wanna do with it).


Happy legoing!


“Invalid service definition or service configuration” when accessing a Windows Azure role definition.

This happened to me recently, when accessing roles configured inside one of my project after adding a new Worker role into it.


It then has automatically something to do with this, but I did this operation a lot of times… Then Is remebered that I did had some extra Nestwork configuration inside of on of my cloud CSCFG files…

Solution: Roles need to be next to each other in the Solution definition, which makes the Role designer to work again; just move the “NetworkConfiguration” section at the bottom of the CSCFG file.


Happy coding!

Windows 8.1: Here it is!

Build is gone, lots new things have been showed up during the MS mass.

So far from all sessions I saw/watched over Channel9, a lot of good things hasve been coming out of Build 2013, and consequently a lot of good things have been coming up for Windows 8!

As a result, here is the set of videos I encourage you to watch from my development perspective to get a great dev insight on Windows 8.1 and other MS tech stuff:

Continue reading Windows 8.1: Here it is!

How to deal with different environments in Windows Azure

Hi everyone,

For those of you who are working with Windows Azure and looking for flexibility in their different environments, here are a couple of points I have been using during my projects to help being flexible and fast.

Web.config transformations:

Since Visual Studio 2010, one can use XML transformations on web.config, to help getting different file versions when you build your app in Debug or in Release.

Here is a small example on how to do it for the SessionState:

In file Web.Debug.config:

<sessionState xdt:Transform="Replace" mode="InProc" />

In file Web.Release.config:

<sessionState xdt:Transform="Replace"
mode="SQLServer" allowCustomSqlDatabase="true"
sqlConnectionString=";Database=MyDB;User ID=admin;Password=password;Trusted_Connection=False;Encrypt=True; MultipleActiveResultSets=True;" />

You can then do the same for the DB connection you use to you SQL Azure back end when using Entity Framework.

The problem here is that transformations only apply to “built” config files (stored in bin or debug folders), so this doesn’t apply when debbuging locally your Web project!!

To do this, leave DEV related entries in the Web.config directly, so that transformations will only apply when building the Azure packages in Release using the Web.Release.config:

In file Web.config:

<add name="RMOPEntities" connectionString="metadata=res://*/Data.RMOP.csdl|res://*/Data.RMOP.ssdl|res://*/Data.RMOP.msl;provider=System.Data.SqlClient;provider connection string=&quot;data\galatea;initial catalog=RMOP;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

In file Web.Release.config (to transform it when building package):

<add name="RMOPEntities"
connectionString="metadata=res://*/Data.RMOP.csdl|res://*/Data.RMOP.ssdl|res://*/Data.RMOP.msl;provider=System.Data.SqlClient;provider connection string=&quot;data;initial catalog=RMOP;;User ID=ctpadmin;Password=pass@word1;multipleactiveresultsets=True;App=EntityFramework&quot;"
providerName="System.Data.EntityClient" />

Conditional Symbols:

You certainly know already DEBUG and RELEASE constants (used with “#if DEBUG” in code).

You can also build you own, to address specific purposes; you can eevn build your own build configurations to include these conditional symbols or not.

Here is a sample of a Project properties set to use conditional symbols:

In that case I created a “NOAUTH” symbol to bypass user having to log in the application for debug purposes.

Verifying if you are  REALLY in Azure:

In certain cases (e.g. layout modifications) , you are not forced to run your whole project using the DevFabric.

To avoid this you can just run the WebApp project, but of course you won’t be able to leverage anything from Azure APIs like Storage.

You can then do it using Dummy Data to return through your layers to test more rapidly your application and keep on having it to work without Azure.

A small sample here:

if (RoleEnvironment.IsAvailable)
    return AzureBlobMaganer.GetDataItems();
    return new List<DataItem>() {new DataItem() {Label = "Test", Value = 12}};

Config Items in Roles:

The last point here is to play a bit with Azure connections; which on will we connect to: DevFavric or Azure ?

Here is a sample of an Azure project configuration:

The simple solution here is:

var account = CloudStorageAccount.FromConfigurationSetting("StorageDev");
var account = CloudStorageAccount.FromConfigurationSetting("Storage");

A clever way would be to encapsulate this in a method to return the right storage account, or even a static property set to different variables depending on constant definition:

public const string CloudAccountName = "StorageDev";
public const string CloudAccountName = "Storage";

Thanks for reading, and don’t hesitate to give me feedback!

Entity Framework on performance side

This is a post about my findings when conducting a project based on EF.

There is a really nice article on Technet you shouldn’t be missing about optimizing Entity Framework.

There are quite a lot of points noted there, but here are for me the most important ones:

  1. Use compiled LINQ queries: compiling your LINQ queries will make your query to be evaluated once instead of having to do it each time you run it; this is making your request (that can be given still a certain number of parameters!) the near speed of a ADO.NET DataReader 🙂
  2. Pre-generate views: once your nice EF model is fixed and only when it is, you can pre-generate views on which all EF queries are based upon. Follow carefully the link provided before and don’t forget to use a class library for you EF  model if you use a Website project type 🙂
  3. NoTracking merge option for queries: if you are not planning to do any modification on some objects you are querying from EF, don’t forget to mark them using the NoTracking merge option when executing the query.

Thanks for reading, I hope it helps!

jQuery Templates and Data Linking

For those of you who knows about Binding in .NET with Databinding in Winforms and ASP.NET, You should have been waiting like me for such a powerful thing as in WPF with its Dual Way Binding for web apps…

Don’t wait anymore! The templating jQuery plugin allows already Javascript objects templates in HTML, but now there’s a new one called Data Linking that fills the gap between temaplted and object sync. To make it simple, a JS object can be linked to a set of editor controls in a template, and get changes sent to this object or populated to controls wihtout any specific job!

Such a technology goes in creating web apps only by creating Services and static HtML pages that will not require server-side rendering anymore!

And the nice thing is: Data Linking is a Plugin developped by Microsoft and pushed freely to jQuery 🙂

A really nice article with examples can be found on Scott’s website.

Gentlemen open your Notepad!!!

Internet Explorer 9 preview

On the second day of MIX in Las Vegas, Microsoft (with the announcement on the first day of Windows 7 Phone Development Toolkit and Silverlight 4 RC), has gone for the announcement of the preview of Internet Explorer 9, with new cool things for our web developer friends, have a look yourself on this table:

When coming about the Acid Test 3, this preview is behaving quite well compared to its predececor with a score of 55%.

This can be downloaded here, and install without having to reboot your computer 😉

Javascript and Ajax controls for your Web projects

On, you’ll find a resourceful list of JavaScript controls, based on Javascript frameworks like Mootools, jQuery, Scriptaculous or Prototype, you’ll find many controls only using JavaScript, but also controls related to a specific technology (asp. NET, Php …) to match your needs.

All controls are also tagged to allow a precise search for the type of control that you need, very useful!