Archive

An interesting post on The Simple Part explains how to use PostSharp to implement an "Undo" feature in Jasema, a tool to create WPF Path Geometry in an easy user friendly way.

The trick is to apply a "journaling" aspect on some front-end methods. The aspect record the object state before and after execution.

Congratulations to 'Karlagius' for this original use of AOP!

Gael

Ruurd Boeke has recently released PostSharp4ET, a PostSharp plug-in allowing to use Microsoft Entity Framework without plumbing code -- PostSharp generates it for you at build-time. PostSharp4ET is released as a part of Entity Framework Contrib hosted on CodePlex.com.

With PostSharp4ET, enabling persistency on a class should be as easy as decorating it with a custom attribute:

[Poco("ConnectionName")]
public class Person
{
   public int PersonID { get; set; }
   public string Firstname { get; set; }
   public string Lastname { get; set; }
}

Under the hood, EF-specific interfaces are implemented automatically at build time.

Ruurd explains everything extensively on his blog. And even if you are not interested in Microsoft Entity Framework, Ruurd's blog is a great introduction to how to write more complex aspect libraries with PostSharp.

Thank you Ruurd for this excellent work!

I am pleased to announce the long awaited second release candidate of PostSharp 1.0 available for download.

This is a stability release solving all bugs discovered in the previous release, which has been downloaded over 6 thousand times.

Additionally to 40 bug fixes, this release brings important changes in licensing and minor improvement in the installer and packaging.

Relicensing

With this release (and from revision 287 exactly), the whole PostSharp code base has been relicensed from GPL/LGPL/MPL to a GPL 3 / LGPL 3 scheme. Don't be afraid: this relicensing actually affects only a few of you. Run-time components are licensed under LGPL, compile-time components under GPL. So it is still free to use PostSharp and PostSharp Laos in your applications, but if you distribute an application that uses PostSharp to transform assemblies (like an O-R mapper), and don't want to release your work as open-source, then you are kindly requested to acquire a commercial license.

This licensing scheme is really directed to have ISV making money on PostSharp contributing to the project. Commercial licenses will be available to "a selected few" under a partnership program.

Don't be afraid: I have no plan to "lock" end-users in GPL licenses.

You will find more about licensing on the website. If you have any question, or if you think you will need a commercial license, do not hesitate to contact me.

Improved Distribution Packages

A minor improvement of the MSI package is that you can now choose not to install PostSharp in the GAC. PostSharp actually does not need to be in GAC; I put there to benefit from NGen. If you want to disable GAC installation and NGeneration, choose the custom installation mode and disable the option.

Another improvement is that I now provide a package for xcopy deployment as well as instructions describing how to insert PostSharp in the MSBuild process at global or project level.

What's next?

I'm sometimes asked for a roadmap with dates... and when I give some I suddenly get in the incapacity to respect them! I acknowledge it took me to long to deliver this release. The reason is that I had to work on another project and I had to invest the remaining time in the website migration, which became really urgent. Now that the website is up and that I will have some time dedicated to the project (I will blog about it soon), things should go more smoothly. The idea is to deliver a release candidate every month and to declare the 1.0 branch as stable as soon as the number of reported bugs become acceptable. It's difficult to predict how many iterations it will take, but I still hope to have the stable release for Q2 of this year.

Happy aspecting and keep on good work reporting bugs!

Gael