Tuesday, 13 May 2008

Prism Silverlight - Prism Contrib

It seems that I found it, years ago I was looking to create a cross platform composite application in silverlight, its seems that now I will be able to have it and create it with Silverlight 2.0 and Prism (WPF composite application block) thanks to Contribute extension of Prism.

Patterns & Practices: Prism Contrib - Home

Unity Dependency Injection IoC Screencast

David Hayden presents here the new Unity Dependency Injection, which highlights:

UnityContainer Resolve and BuildUp Methods
UnityContainer RegisterType and RegisterInstance Methods
UnityConfigurationSection for Web.config and App.config
ASP.NET MVC Framework. ASP.NET Model View Presenter Pattern.

If you are currently using Dependency Injection this is a pretty good alternative, I do like the ability to define the Registration type for Singleton, resolve properties without the need to decorate them, and from the screencast I like both examples for MVC and MVP.

Monday, 3 March 2008

AD When does my Password Expire?

We are implementing a new password policy and we want to show users when is their password to expire. (Something simple I know...).

Well with a bit of googling I have found this great post by Ryan Dunn

Using the PasswordExpires class from the post, and a bit of refactoring on the main class we can quickly get our personalize expiry page:

protected void Page_Load(object sender, EventArgs e)
PasswordExpires pe = new PasswordExpires();
string[] a = Context.User.Identity.Name.Split('\\');
string userName = a[1];

Response.Write(String.Format("Password Policy: {0} days", 0 - pe.PasswordAge.Days));

TimeSpan t = pe.WhenExpires(userName);
if (t == TimeSpan.MaxValue)
Response.Write(String.Format("{0}: Password Never Expires", userName));
else if (t == TimeSpan.MinValue)
Response.Write(String.Format("{0}: Password Expired", userName));
String.Format("Password for {0} expires in {1} days at {2}", userName, t.Days, DateTime.Now.Add(t)));

Thursday, 28 February 2008

SOA'izing MSMQ with WCF (and Why It's Worth It) - Home

I have found a great example on how to use MSMQ with WCF. SOA'izing MSMQ with WCF (and Why It's Worth It) - Home

Worth having a look!!!

Tuesday, 26 February 2008

JMS based Web Services in Oracle App Server Part 1: WCF Interoperability - Jesus Rodriguez's WebLog

JMS based Web Services in Oracle App Server Part 1: WCF Interoperability - Jesus Rodriguez's WebLog

Jesus Rodriguez explains in his WCF / Oracle interoperability series how WCF can consume a JMS queue exposed as a web service with Oracle app Server.

Monday, 25 February 2008

Upgrading Software Factories from 2005 to 2008 (Problems uninstalling)

So you want to update your software factories to 2008 and cannot uninstall / install.
1st Install the windows installer clean up.
2nd Remove with the windows installer clean up the factories and guidance packages.
3rd Install your guidance package in 2005 version.
4rd Uninstall it again.
5th Using the guidance troubleshoot get all the registry keys
6th Delete registry keys.
7th Install.

Tuesday, 19 February 2008

LINQ to DataSets

I have found this bonus material for the book LINQ in Action at
http://manning.com/marguerie which explains the usage of LINQ with DataSets. Worth having a look.
You will need to search for it, because direct links do not work. (Thanks for the info)

Monday, 18 February 2008


Forget C#, Ruby, F#, Java etc.. The best new language is LOLCODE:

Here are some examples:

Hello world


I think is easier to debug than regular expressions!

Friday, 15 February 2008

SOA Guerrilla (Jim Webber) , ESB and SOA

Jim Webber explains here http://jim.webber.name/2007/10/17/2ae26134-ea19-43de-9a75-d5ef62c0e5b4.aspx
the dangers on why you should not burry your integration, transformation etc in the ESB. (Well why you should not use a proprietary ESB). I myself I am not against it of having an ESB but you should follow standards to stop vendor lock in (BPEL) for system to system processes, and just use the ESB to simplify the management of your SLA (QoS), temporary contract resolution and management of policies, and even addressing. (its just a tool!)

Using standards on web services like WCF and WSIT you can achieve things like policy, reliable messaging, transaction support etc, but nevertheless the ESB will help you on said maintainability.

The majors risk is that the ESB sometimes won’t manage to comply as quick with new standards as development tools (You can overcome this by temporarily bypassing the bus until these are available)… and don’t forget that you will need good governance to don’t replicate or create new spaghetti.

And remember the 4 tenets of SOA: http://www.bpminstitute.org/articles/article/article/the-four-tenets-of-service-orientation.html

Wednesday, 13 February 2008

Continuous Production - Production-ready software…any time

I have found this article on Test Early » Continuous Production - Production-ready software…any time.

And I defenetly agree with the article but in an enterprise enviroment also a good architecture based around Decoupling: SOA, BPM, Composite Applications (portlets, cap, wcsf), Modularitation, dependency injection, and Governance around depencies: services, object, modules will allow you to succeed!!

Enable the Create Translator recipe for all projects.

Well I am back using the Software Factories, and currently using the the Web Client Software Factory June 2007 and the Web Service Software Factory Modelling Edition 2008 CTP both in Visual Studio 2008 Team System. They are defenetly the best way to enforce, teach good patterns to your teams to deliver a good set of maintanable code.

Our agile approach meant that we needed to have installed both factories side by side on the same machine and to overcome the issue that the GAX / GAT is only able to run in either 2005 or 2008 (Orcas) I decided to run WCSF in 2008 following the instructions of Ezequiel.

The Web Client Software Factory does not have the Create Translator recipe so whilst I could translate my model to my data contracts in the WSSF i could not translate my Datacontracts to my client model. After a bit of playing around I have managed to enable it, so here are the steps:
1. Have installed the Web Service Software Factory. :)

2. Modify the file:
%Program Files%\Microsoft Service Factory V3\Guidance Package\Recipes\Binding.xml



3. Close all instances of Visual Studio.
4. Open Visual Studio , go to Guidance Packages and add the Web Service Software Factory.
Note: If it is already there remove it and added it again to refresh the bindings
5. In the project you are creating add a folder “GeneratedCode".