
Our never-ending mission to spread the word about using PostSharp to produce cleaner code finds Gael and I in the good ole U.S. of A. for a week of presentations at user groups and businesses in Ohio and Michigan.
Joe Kunk first contacted us about the idea earlier this year and, together with the undying help of David Giard, we were able to build a tour that combines 4 user groups, 3 businesses, and 1 university over a 5 day stretch of interstate travel.
We sprinkled-in some customer visits for good measure, and added an extended layover at TechEd Europe on the way back to Prague and voilà: the perfect summer tour.
Gael has two presentations prepared for the tour:
- “Multithreading Beyond the Lock Keyword.” Dusting-off low-level synchronization primitives, Gael shows how to design programs that make better use of multiple cores. Because playing directly with low-level primitives can be overly complex, you’ll discover how large-scale multi-core software can be simplified using design patterns and how some these patterns can be ultimately simplified using aspect-oriented programming.
- “Intro to Aspect-Oriented Programming (AOP) with PostSharp.” Gael speaks about the problem with conventional programming, gives a gentle introduction to AOP with PostSharp, demonstrates how it works and why you should use it to eliminate scattered, tangled and coupled code from your codebases.
We’re excited to connect with user group leaders, members, and area businesses in Cleveland, Toledo, Detroit and Lansing. We look forward to learning about your current projects, the insight you provide about the solutions you’re looking for, and any feedback you can give about how you’re using PostSharp and our new toolkits.
Tour dates and locations include:
TechEd Europe promises to be one of the summer highlights, connecting us with new and old friends alike. Many thanks to Sara Faatz and the DevExpress team for their generosity. We’re very excited to get to know you and your team better. To our old friend Brady Gaster , who will be in Amsterdam to support the Azure team and participate in some breakout sessions, our apologies in advance to your liver.
If you find yourself in Ohio or Michigan next week, or attending TechEd Europe 2012 at the end of the month, please don’t hesitate to contact me to arrange a meet-up. Here’s to another wonderful summer!
Happy PostSharping!
-britt
p.s. – check out our Community page to find other opportunities to learn about PostSharp this summer.

If learning more about Aspect Oriented Programming is on your to-do list for 2012, we have some very good news for you.
We’ve teamed up with the good folks at Pluralsight to make it easier than ever for developers to get up to speed on developing with aspects. PostSharp users can sign-up to receive a free 30-day trial membership good towards one Pluralsight online course.
Start learning about Aspect Oriented Programming for .NET today >>
Pluralsight, “the leader in high-quality online training for hardcore developers,” has a huge library of online courses to choose from but, naturally, the course we recommend is Aspect Oriented Programming for .NET by PostSharp MVP and Pluralsight Author, Donald Belcham.
Donald is a senior software developer, independent contractor, author, and trainer based in Edmonton, Canada. He spoke about the topic of Aspect Oriented Programming at NDC and DevTeach Montreal earlier this year, and published the online course on Pluralsight in June.
The course is divided into four parts:
- Introduction to AOP
- AOP using Interceptors
- AOP using IL Code Weaving
- AOP beyond decorators
From Donald: “My course is perfect for developers who want to learn how to avoid code repetition by implementing AOP in .NET projects using IL Code Weaving frameworks like PostSharp, Interception frameworks like Castle Windsor, and even how to implement AOP without following the traditional decorator pattern.”
Apply for your free 30-day Pluralsight trial membership today and, upon approval, we’ll email you a unique login code plus a link to a special sign-in page for PostSharp users.
Start your free 30-day trial membership today >>
-Britt
This is one of these unpopular but necessary decisions that every software publisher has to do now and then. It’s generally accepted that pulling off expensive but little-used features is a healthy decision because it frees resources that can be spent on more popular features. This is what we are doing with documentation and support of PostSharp SDK.
What is PostSharp SDK?
PostSharp is made of two principal components: PostSharp.dll and PostSharp.Sdk.dll.
PostSharp.dll is the high-level public API. It mostly contains interface definitions, abstract classes and custom attributes from which developers can derive their own aspects. This library is designed to be used by developers of business applications. It offers transformation primitives (such as: intercepting a method, wrapping a method, introducing an interface) that developers can add to their code. PostSharp.dll leverages real aspect-oriented programming, a disciplined extension of object-oriented programming. Just as a normal compiler, the high-level API enforces syntactic rules, and you will get a reasonable error message if you violate them.
PostSharp.Sdk.dll is the opposite of PostSharp.dll. Its public API allows you to modify .NET assemblies at a very low level. You can do everything. The API does not enforce any programming discipline or syntactic rules. You can create invalid assemblies without even getting a warning. It requires you to learn the MSIL specification and to understand most of the 565 pages of the ECMA-335 specification. PostSharp.Sdk.dll is made of several components. The most low-level ones (code model, image reader, image writer) are also found in Mono Cecil and Microsoft CCI, although PostSharp SDK has its own implementation. PostSharp SDK also includes several middle-level components such as the project loader, the aspect infrastructure (which could allow you to use PostSharp SDK to develop an aspect weaver that has different syntax than PostSharp.dll), the aspect weaver (the implementation of the PostSharp.dll), the custom attribute multitasking components, and much more.
PostSharp SDK is more complex than you think
Contrarily to PostSharp itself, PostSharp SDK has a very steep, but misleading, learning curve. You get quite quickly the illusion that you “got” it, but the devil is in details. The 80-20 rules does not apply to PostSharp SDK: what applies is 95-5: 95% of time is spent in addressing 5% of cases. Think of MSIL programming as hiking in high mountains without a map. You always have the illusion that the top is near, but whenever you climb on what appeared to be top, you discover another, higher top. If you want to have an idea of the effort you’ll need to reach the goal, you need a map; ECMA-335 and the PostSharp SDK class reference will give you a fair overview of the complexity of your task.
So why do we have PostSharp SDK? First, for our own needs. From our own point of view, PostSharp SDK is the most important component of PostSharp. Secondly, because this API is useful to a tiny minority of ISVs with very specific needs (for instance: high focus on speed). They can afford to maintain MSIL skills because the effort is leveraged to thousands of customers. Third, because PostSharp SDK can be used to overcome missing features of PostSharp.dll. But this is where things can go wrong.
PostSharp SDK is undocumented and unsupported
There has been some criticism that PostSharp SDK is undocumented. This is not accurate: the class reference is quite complete and contains more than what’s obvious from the method signature. Many actually claim that PostSharp SDK has the best documentation of all MSIL rewriting tools.
What is true is there is no conceptual documentation. Let me be clear: the lack of conceptual of documentation is a feature, not a defect. The SDK will not be better documented. As any company, we have to allocate limited resources to a potentially unlimited number of features. It does not economically make sense to spend time in documenting a very complex API that is used by a dozen of customers.
The same holds for support. We cannot provide support on a highly complex and incompletely documented API. We cannot guide you through baby steps. PostSharp SDK is not supported. You use it at your own risks.
Nostra Culpa
On the support forum, you could often read answers that sounded like “this is not possible to do with PostSharp.dll but can be done with PostSharp.Sdk.dll”, followed by a disclaimer that PostSharp SDK is hard and you should maybe not try. This had led some customers to ask for more information for these specific cases, which I published on the blog. Mistake! These blog posts have been interpreted as an advertisement of and an invitation to use PostSharp SDK. I apologize for that. I will not advertise PostSharp SDK again. It will remain unsupported and undocumented. The harmful blog posts have been withdrawn.
PostSharp SDK still available
That said, PostSharp SDK is still available for use in the Professional Edition. We are only making it clearer that this feature is not officially supported, and must be used at own risk. I believe that it’s not a good idea to code directly MSIL instructions unless you can leverage the effort to thousands of customers (as we do), but you’re free to try. It’s just that you’re on your own.
I’m aware this decision will be unpopular, but I’m convinced it’s a necessary one to continue provide good support to the community.
Happy PostSharping !
-gael
There’s an old Chinese saying about startups: hire slowly, fire fast. :) As you've probably gathered from the headline above we’re looking to hire a software engineer to join our team in Prague, Czech Republic.
Things have been going well for SharpCrafters since its commercial launch in March 2010. We have been profitable since day one and have enjoyed 15 months of healthy, organic growth. It wasn't easy transitioning from open-source to commercial, but we managed to keep (mostly) everyone happy by striking the right balance between the pricing of our Pro Edition and the free features of our Starter Edition. We discovered that our real challenge is not in selling a commercial product, but in driving adoption of aspect-oriented programming in the .NET community. To meet this challenge, we made a huge evangelism effort (in total 35 AOP talks in just 6 months thanks to our friends) that culminated at NDC 2011, where AOP made its first appearance with a dedicated track at a major conference. This would not have been possible without Britt King, our Communications Director, who joined SharpCrafters in September 2010.
We have come to understand our customers better: not only by industry, but by the technical problems they face and why they turn to PostSharp for solutions. Two industries are distinctly preeminent: financial services (Bank of America, Deutsche Bank, BNP Paribas, Societe Generale…) healthcare (Philips, Siemens, Oracle…). Nearer to the software industry itself: Intel, eBay, NetApp, FullArmor, Telligent and SolidWorks, among others.
We have learned from our customers: how PostSharp allows them to reduce complexity in their code so that junior developers can do a better job faster – reducing the amount of system knowledge needed by new team members before being productive.
Now is our time to grow! We plan to move to new, larger offices in the center of Prague, and have made plans to build a larger team. If you’re a software developer living in Prague or its surrounding area, and want to work in a company that is changing the way your peer developers think about their code… you really don’t want to miss this opportunity.
See our job post: SharpCrafters is Hiring a Software Engineer.
Happy PostSharping!
-gael

For those of you who don’t yet subscribe to .NET Rocks! and its training video counterpart, dnrTV, you’re missing out on some wonderfully entertaining and informative talk shows.
Since 2002, Carl Franklin and Richard Campbell have been speaking with guests about programming in Microsoft .NET and, after nearly 650 episodes, show no signs of slowing down.
Gael was invited to be on .NET Rocks! in early February but, due to a bad phone line, he had to reschedule. Luckily both he and Carl attended this year’s NYC Code Camp, where they could finally sit down and record face-to-face. Or so he thought…
Listen to the first few minutes of the podcast to learn how Carl and Richard were finally able to record the show with Gael. Then, after you’ve had a good chuckle, continue listening to the podcast to learn more about programming with aspects.

Listen to the podcast: http://www.dotnetrocks.com/default.aspx?showNum=640
Highlights include:
10:32 – What is an aspect?
12:10 – Using PostSharp for more than just Tracing and Logging
14:12 – Why having a bug in your aspect is safer than in the implementation of the manual line
20:20 – Two multithreading issues that can be solved using aspects
25:41 – Richard’s favorite example of AOP
36:43 – Static versus Dynamic AOP
40:08 – What’s next for PostSharp
Show the Code.
Gael also recorded a PostSharp demonstration with Carl on dnrTV. The shows on dnrTV are equally as entertaining as those on .NET Rocks! but with one very important difference: the code!
In this webcast-like format, guests are able to demonstrate technical topics in greater detail. That’s exactly what you’ll see in the recording with Gael as he dives deep into PostSharp – showing both common and advanced aspect usage.

Watch the recording: http://dnrtv.com/dnrtvplayer/player.aspx?ShowNum=0190
Highlights include:
02:10 – TraceArgumentsAspect : OnExceptionAspect
13:47 – TracePerformanceAspect : OnMethodBoundaryAspect
23:15 – CacheAttribute : MethodInterceptionAspect
45:57 – Undo/Redo
Special thanks to Carl and Richard for inviting Gael as a guest on both shows. And many thanks to all of you who watched the shows and provided feedback. Keep it coming.
Happy PostSharping!
-Britt
Have you heard all the talk about Microsoft AppFabric Caching lately?
According to Microsoft, “AppFabric Caching provides a distributed, in-memory, application cache service for Windows Azure and SQL Azure applications - giving high-speed access, scale, and high availability to application data.”

What's more, these capabilities are provided entirely as a service (no installation or management of instances, dynamically increase/decrease cache size as needed).
In our very first Live Webinar, Gael Fraiteur (SharpCrafters Founder) and Kendall Miller (Gibraltar Software Co-Founder) speak with special guest Brian Prince (Microsoft) about AppFabric Caching capabilities and show you how to use PostSharp + Gibraltar to AppFabric enable your applications.
This webinar includes:
- AppFabric concepts walkthrough
- DIY caching versus caching with PostSharp
- Advanced caching problems
- Monitoring cache effectiveness and performance with Gibraltar
- AppFabric futures
- PostSharp futures
- Q&A
This live webinar is free and kicks off Thursday, February 24th at 10:00am PT
Signup for the Live Webinar here >>
**Those who signup will receive a Live Meeting URL prior to kickoff.
UPDATE: The recording is now available.
I’ve been lucky enough to be selected as a speaker for NYC Code Camp 2011 on February 19th. You’ll find me in the Radio City room at 9h15. I'll deliver my introduction talk Produce Cleaner Code with Aspect-Oriented Programming.
I’ll be in Manhattan from Wednesday evening till Sunday afternoon. If you don’t attend the code camp and want to meet up, please contact me by email (gael@sharpcrafters.com) or by phone at +420 775011188.
It’s the first time I’ll cross the Atlantic so I feel a bit like Tintin in America. I’ve been in the land of Soviets and Congo (although I lived Congo before visiting Russia), so I’m pretty much respecting the order of the series.
Next stop: the Cigars of Pharaoh?
-gael
VSone kicks-off February 16th in Munich, Germany and will feature two days of presentations on Microsoft technologies including Silverlight, Life Cycle Management Application, SQL Server and data modeling, Azure, Web development, UI and devices, architecture and core programming, etc.
We recently caught up with Johannes Hoppe, who will speak at VSone on February 17th, invited him for a chat about his session on Aspect-Oriented Programming, and convinced him to give our German readers a sneak preview.
Britt: Why did you choose to speak about Aspect-Oriented Programming at VSone?
Johannes: The Clean Code movement has really taken off in Germany in the past few years and writing pragmatic clean code is something I’m passionate about. I shifted to aspect-oriented programming on some projects recently and have been amazed at the number of lines of code it has saved me. I wanted to share these insights with VSone attendees.
Britt: Why should VSone attendees care about AOP?
Johannes: For the same reason they care about clean code. AOP is an effective way to produce cleaner code and I believe it deserves to be used by more developers. Developers attend events like VSone because they’re looking for quick wins – learning things that they can implement right away – and my presentation is perfect for developers who want a quick introduction to Aspect-Oriented Programming. During the presentation I’ll show some production-ready aspects that I’ve prepared and make them available to attendees for download so they can start to use them right away in their own code.
Britt: What was your first experience with AOP?
Johannes: Early last year I was working on a project that had a tight deadline. My team had done unit tests and they all showed green but we still felt something wasn’t quite right. My boss told us to do a soft release and we sent 300 visitors (from a mailing list) to the website and the webserver nearly exploded.
We smartly decided not to go live with the project and instead looked at where the peaks were coming from. That was the first time I used AOP. We made a summary of the method runtimes and I used an aspect to log the method execution times to find the problem – a mistake on one of the most frequently used methods which made everything super slow – and later used a caching aspect to fix it. I’ve been addicted ever since.
Britt: Have you ever lectured about AOP to your students?
Johannes: No, not yet! My previous lectures have been about other topics but I’m hoping to introduce it in an upcoming “Software Architecture and Development” course. In the meantime my students are using “AOP- flavored” code without knowing it – for example the ASP.NET MVC HandleError Attribute and the Dependency Attribute from Unity. I like it when aspects are unobtrusive.
Britt: What will VSone attendees see in your presentation that’s not shown in your sneak preview?
Johannes: In addition to the introduction to AOP and showing how to make messy code clean again using common AOP patterns, attendees will see a live example of a logging aspect – I’ll show how easy it is to apply – followed by validation and caching aspects in real world scenarios. If there is time, I’d love to show my StackOverflow aspectthat finds unwanted recursion, including a real world disaster story of when it showed up in my life.
Britt: Where can our readers learn more about you?
My blog is a good start: http://blog.johanneshoppe.de/. I’m planning to publish some articles in print magazines soon, too. Readers can also go to my ADO.NET Unit Testable Repository Generator: http://repositorygenerator.codeplex.com/ which is something I’m quite proud of.
Britt: Which technologies interest you most and why?
Johannes: My daily work covers a lot of Microsoft technologies. At the moment I’m concentrated on ASP.NET MVC – the best MS platform for building websites, EXT.NET framework – a great tool for building RIA apps really fast, and Windows Phone 7 development. Microsoft gave me two Windows Phone 7s for ”free,” one as a finalist in the Imagine Cup and the other one I got for my Microsoft Student Partner Program efforts. Now I have to develop something for it.
Britt: Which sessions are you planning to attend at VSone?
There are so many good sessions at the same time it’s hard to decide which to attend. I will definitely go to Rouven Haban’s session “ASP.NET MVC in Practice.” In which he will talk about one of his recent projects of which I’m very interested. Thankfully his session is an hour before mine.
Britt: What’s this I hear about you and footbagging?
I was VERY into footbagging a few years ago and loved it so much that I built a footbag online shop http://www.footbag-shop.de/and later realized their potential as marketing vehicles http://www.promotion-footbags.de/. Footbagging is still one of my favorite outdoor games to play during breaks. Whenever I find some time, I like to make that little ball dance with my feet. I can’t wait for spring, it’s the best time for footbagging really!
Britt: You had me at “very.”
Johannes is a lecturer at SRH University Heidelberg and is very involved in the Microsoft Student Partner program on campus – running workshops and mentoring students. He has been working independently for over 10 years, is crazy about web design, and currently works on ASP.NET MVC and PHP projects. When he’s not working on projects or footbagging, Johannes keeps a blog about his adventures in lecturing at http://blog.johanneshoppe.de/.
Just a quick note to ask you to complete the PostSharp Community Survey 2010 we just put online today.
Thanks!
-gael
Kendall Miller likes a good challenge.
As Principal at Gibraltar Software his day is filled with them. So imagine our surprise when, over drinks in London earlier this month, he told us how he recently turned the tables on a doubting customer with a challenge of his own:
“Give us 15 minutes to prove our value.”
The statement was so bold we just had to take out our recording equipment and get it on video. Watch to find out how Gibraltar turned the customer into a true believer, with the help of PostSharp, in under 15 minutes.
Do you have your own stories of exceeding customer expectations? Share them with us in the comments below.
-Britt