This blog is moving…

Print Content | More

it is a requirement! I cannot go on scrounging hosting off Gian Maria and Alessandro and at the same time I do not want to pay an hosting plan just to host my own blog, after 3 years I can safely say that it is not sustainable….and since this blog title is “Mauro and the sustainable development”… Smile

So far so good…but what’s happening?

Well…lot’s of things:

  • if you are reading this post means that the FeedBurner feed has been successfully updated to point to the new blog: http://mauroservienti.blogspot.com/;
  • the “old” blog (http://milestone.topics.it) is still alive and will be online until the posts migration process has been completed:
    • I’ve written a tool to migrate posts from the old blog to Blogger, but blogger has a post limit (well a sort of) of 50 posts a day, so the migration process will last something like 16 days;
  • at the end of the migration process the old blog address will be redirected here in order to complete the migration;

This basically means that by the 15 of February I can free some resources of the Gian Maria and Alessandro server Smile with tongue out

Why BlogSpot?

There were, when I decided to move a couple of weeks ago, 2 main competitor:

  • WordPress;
  • BlogSpot;

Both free and with lots of interesting features, really a lot Smile, but I was looking mainly for 2 features:

  • Custom domain, I need to point milestone.topics.it to the blog;
  • Custom pages: the ability top create “pages” other then posts;

Both the competitors offer these features but the custom domain is a paid feature for WordPress…BlogSpot is the winner…easy Smile

In the End…

I’d like to thank:

  • First of all Ugo for Dexter and the support during these 3 year;
  • Gian Maria and Alessandro for the free hosting during the last months;

Thanks guys, I owe you a dinner.

.m


0 comments

Silverlight navigation: get rid of the view-model-locator

Print Content | More

PostSharp is a must have (period).

Let’s start from the beginning

I’m building a sample application for a friend in order to see if it is possible to have a completely OOB and offline Silverlight application run on a Mac using a document database (RavenDB in this case, a special version) as backend.

On the other side I’m using the same spike to start the Radical Presentation Silverlight 5 implementation, if you recall the first time we spoke about it we state that the main pillar should be simplicity.

Simplicity, IMHO, means also friction-less and friction-less in a Silverlight application, for example, can be translated to “navigation application” that uses all the out-of-the-box services provided by the Silverlight infrastructure such as the navigation framework.

Why?

Easy peasy…fast startup is the answer, startup Visual Studio…create a new project and you expect to be up and running just adding a bunch of references.

Well…all the samples I’ve found out there, the majority of them, does 2 main things:

  • some of them get rid of the default navigation framework and start building their own…
  • some of them use the builtin services and introduce that piece of crap called “view-model-locator”…
  • some of them does both of the above… :-/

view-model-locator: why I hate you?

Basically the main reason is that view-model-locator sounds too much like service-locator that for me is pure evil…view-model-locator is everything other then friction-less, you introduce a class, with pure stupid properties, for the only purpose of linking the view and the view model in a view first scenario where you do not have any control on the view creation (the navigation infrastructure has it).

So?

If you remember some time ago we spoke about the ability, using PostSharp, to intercept the instantiation of a class. Why not using that really simple type load interceptor to do something like:

TypeLoader.Engine.AddInterceptor( new DelegateTypeLoadInterceptor()
{
IsInterestedInHandler = ( o, m ) =>
{
return m == TypeLoadMomentum.AtConstructorExit && o is Page && o.GetType().Name.IsLike( "*View" );
},

InterceptHandler = ( o, m ) =>
{
var viewType = o.GetType();
var aName = new AssemblyName( viewType.Assembly.FullName );
var vmTypeName = String.Format( "{0}.{1}Model, {2}", viewType.Namespace, viewType.Name, aName.FullName );
var vmType = Type.GetType( vmTypeName, true );

var p = ( Page )o;
p.DataContext = container.Resolve( vmType );
}
} );

we basically say:

  1. every time a view, that is a Page, and whose name ends with “View” is instantiated we are interested in intercept the constructor at the end of the instantiation process;
  2. we use a convention to determine the view model type name given the view type name;
  3. we resolve the view model using our favorite IoC container;

Finally we wire up everything using this single line of code:

[assembly: InterceptTypeLoad( AttributeTargetTypes = "*.Presentation.*View" )]

Now we can leverage the Silverlight builtin navigation services without any pain and much more important without any friction.

If you want to give it a try you can simply use nuget to grab a reference to Radical.Extensions.Aspects that now supports also Silverlight 5.

.m


Radical , PostSharp , Aspects

0 comments

The Goal

Print Content | More

I just finished reading The Goal: amazing (period). A must read for everyone involved in a project (every kind of project) aside from the role in the project.

.m


0 comments

Influences on the architecture…

Print Content | More

What are the key points that, at a high level, mainly have influence on the software architecture?

  • User needs;
  • Business needs;
  • Non functional requirements;

These are all customer-related stuff…but there are a couple more:

  • Supplier skills;
  • teams configuration;

Interesting, isn’t it?

While “supplier skills” can be quite obvious the team configuration sounds strange…

The supplier decided to built a modular, stackable, application, even if none of the customer requirements put in evidence that this is required.

Why?

The supplier teams are geographically distributed and a modular architecture (based on UI Composition patterns) would greatly compensate the costs introduced by the organization costs that geographic distribution (cultural differences, time zones, communication barriers, etc.) brings on the table.

.m


Architecture

0 comments

How async/await will change our world.

Print Content | More

well…using Radical AsyncWorker we can write something like:

public void Do()
{
AsyncWorker.Using( this.Id )
.Configure( cfg =>
{
cfg.Before = e =>
{

this.Status = "Running: " + e.Argument;
};

cfg.After = e =>
{
this.Status = "Completed: " + e.Argument;
};
} )
.Execute( e =>
{
//something long running...
Thread.Sleep( 2000 );
} );
}

Cool, interesting, quite easy to read and a really interesting experiment, for me, in writing a complex and intellisense driven fluent interface…

But…

…in a few months everything will drastically change:

public async void Do()
{
this.Status = "Running: " + this.Id;

await Task.Factory.StartNew( () =>
{
//something long running...
Thread.Sleep( 2000 );
} );

this.Status = "Completed: " + this.Id;
}

Amazing Smile

.m


Async

3 comments

Epic (period)

Print Content | More
GTAC 2011: Opening Keynote

The whole keynote is simply wonderful, but if you want to hear something astonishing jump to the minute 42… Winking smile

.m


Testing

0 comments

Cool, really cool!

Print Content | More

Bins (period) Smile

image

4,00€ that worth the money.

.m


Utilities

0 comments

Pressure…a sample.

Print Content | More

I already told my point of view about “pressing” people, some time ago everything I “hate” happened to me.

We were working on a huge application for a huge customer, we were really near to the first staging release and a requirement dramatically changed the shape…

The application is composed of two main parts: a SharePoint application and a set of WCF services that provides data to a SharePoint web part via JQuery/Ajax requests.

The main point was that the 2 parts are hosted in different web applications because SharePoint must run on .Net 3.5 and the other application requires .net 4.0, so the “pain point” is authentication, how can we authenticate calls coming from the SharePoint web page?

trivial…

Using forms authentication on both ends and sharing the same machine key gave us single sign on, once the user is authenticated by SharePoint the forms authentication cookie will be sent by JQuery to WCF services and the user can be trusted even here using the membership API. So far, so good.

But…

In the development environment, due to lack of time (grrrr…), the SharePoint guys used to deploy the SharePoint application using Windows Authentication…bad thing…and when it comes to the first integration between the to environments the SharePoint guys told us that they cannot switch so easily to Claim Based Authentication due to some problems they are facing (problems that I’m not aware of).

Panic!

The first deploy in the customer staging environment was really near and not being able to switch means that we cannot deploy, period.

Pressure :-/

The requirement rapidly changed and the management asked us if we can change the authentication architecture of the WCF services, basically introducing a mixed mode authentication based on the endpoint, under pressure the first reaction was simply: no, it’s impossible.

Peripatetic

Walking helps me think, I love walking around the office, for me it’s the best way to work. That evening I left the office thinking to the problem and walking to the railway station reduced the pressure…lighting the lamp.

The day after it took two hours of fights with the WCF configuration files and no changes at all in the codebase to support the new requirement, no changes to the codebase, cool, really cool.

The lesson learned is (well are):

  • do all what you can to avoid pressure, it’s a waste;
  • WCF extensibility and flexibility is pure power;

.m


1 comments

Obtuseness? Blindness? or what else?

Print Content | More

We’ve spoken about pressure…one side-interesting-thing that happens when a team is under pressure is that, if there is a team, the team synergy increases at its top.

Team is the keyword.

.m


Trust

0 comments

Is he reading in my mind?

Print Content | More

…or is he peeping through the keyhole of my office…? Smile

One more wonderful post: http://blogs.msdn.com/b/eric_brechner/archive/2011/12/01/that-s-not-funny.aspx

.m

P.S.: my current email signature:

image


Trust

0 comments