Microsoft is now adding Git support for Visual Studio and TFS, so that you can open, clone and commit projects directly with you preferred Git provider.
More details on the Channel9 video here;
Happy coding
Microsoft is now adding Git support for Visual Studio and TFS, so that you can open, clone and commit projects directly with you preferred Git provider.
More details on the Channel9 video here;
Happy coding
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.
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="Server=tcp:mysqlserver.database.windows.net;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="data source=ariel.ctp-int.com\galatea;initial catalog=RMOP;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" 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="data source=wyopqjbi6s.database.windows.net;initial catalog=RMOP;;User ID=ctpadmin;Password=pass@word1;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
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.
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();
}
else
{
return new List<DataItem>() {new DataItem() {Label = "Test", Value = 12}};
}
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:
#if DEBUG
var account = CloudStorageAccount.FromConfigurationSetting("StorageDev");
#else
var account = CloudStorageAccount.FromConfigurationSetting("Storage");
#endif
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:
#if DEBUG public const string CloudAccountName = "StorageDev"; #else public const string CloudAccountName = "Storage"; #endif
Thanks for reading, and don’t hesitate to give me feedback!
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:
Thanks for reading, I hope it helps!
After Bob Muglia’s interview by Marie Joe Foley, the Silverlight community has gone though some sort of drama on the future of Silverlight.
An event that will happen tonight to cover new stuff coming is the Silverlight topic.
Click on Scott (gently!) to get you to the event, that will take place 6pm our time.
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!!!
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
On Ajaxrain.com, 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!