Thales Information Systems – a business unit of Thales Group – designs, operates, and maintains critical IT systems from their offices in Brussels, Belgium. More specifically, its staff develops turnkey IT systems and assists clients in project management and architecture.
During the early stages of a new project, Pierre-Emmanuel Dautreppe, architect and senior engineer at Thales Information Systems, began seeing more and more pollution in his code. “The application was not very complex but the business code was polluted with some technical code, and I was searching for a way to extract the technical logic just to have only my business logic,” he says. “At that time, I knew a bit about the concept of AOP but I didn't have any experience with it and I had no idea of how it could be implemented [in the project].”
Recognizing the importance of maintaining a separation between his business code and technical logic, Pierre-Emmanuel began looking for solutions within the .NET framework. “When I started to investigate I discovered the notion of context attributes and the context bound object could be used to do a kind of AOP,” he says. “I implemented a solution using that and later discussed it with a developer friend of mine.”
The friend told Pierre-Emmanuel of an easier way to extract technical logic from his business code, using PostSharp. “My friend had a good experience and got good results with the product,” he says.
Pierre-Emmanuel followed his friend’s advice and tried PostSharp – getting started fast with the aspect examples available on the SharpCrafters website, such as Performance Tracing. After understanding how PostSharp aspects work, Pierre-Emmanuel then began building aspects for his real projects.
“Later on, we had the opportunity to do a big refactoring on a project because the business context had changed a lot, and so we were needing to touch the core architecture of the project and more or less start from scratch,” he says. “When I started to use PostSharp very intensively in our project the code became much simpler and homogeneous.”
Pierre-Emmanuel’s team consisted mostly of junior developers. “By giving them code that was much simpler, because it was just the business logic and nothing more, I think for them it was much easier to maintain and easier to [reproduce] for similar cases,” he says. “So it really helped them to do the development much faster. They were much more productive and were able to implement the functionality much more quickly, which really helped to reduce the number of bugs in the business logic.”
Read how PostSharp can weave diagnostic capabilities into your application without modifying the underlying business logic.