mars 17

To conclude my Tech Days 2008 posts, I wanted to add a section with the list of question I have asked to the different speakers and their answers.

  • Ingo Rammer - after the "Advanced Debugging" Session
    • For debugging purposes, I have been working with the Performance tools of Visual Studio and I have experience some strange behaviors : when trying to visualise the function call tree to see which par of my code was taking long, I could not visualize the full call tree. Do you have seen any limitation on this tool that could explain this problem ?
      • Unfortunately, I mainly work in "Production Debugging mode" where I don't have any Visual Studio installation available and so I don't know very well the performance tools of Visual Studio.
    • And when you need to trace performance of you application, which tool do you use ?
      • There is the tool of RedGate (Note : ANTS), but I don't like it so much. I prefer using dotTrace  
  • Nikhil Kothari - after the "Ajax Patterns" Session
    • I have been really interested by the last part of your demo, using Silverlight to read a client file. Is there currently any possibilities for Silverlight to interact with client resources ? eg getting access to a card reader ?
      • Currently only the ReadFile function allow to access client resources. So unless the card reader allow this kind of API, no it's not possible.
    • Do you know if there is something planned ?
      • There are of course improvements planned for Silverlight, but I don't know if this kind of enhancements is foreseen  
  • Jelle Druyts - after the "Domain-Specific Developments with Visual Studio DSL Tools" Session
    • I have been workinng with the DSL tools but a very long time ago and I am curious to compare what I have seen at this time - when it was immature - and now. Does the T4 template files are still shipped with a model ? (and so copied multiple times for each solution we will use the DSL tool ?)
      • Unfortunately yes. This does not really makes sense and moreover it does complicate any patch or upate to the tool. But what is possible - and what I have done for the Configuration Section Designer - is to provide a very small  T4 template file that will just link to the real file, installed in a common location, eg in the program files folder.
    • And can the T4 templates generate now multiple files ?
      • No still not. It's a pity because it could me more readable (Note : even if the generated files should not be read) to generate several files, and also in different locations, as for example in different projects to allow a full separation of concerns. This will probably arrive in the future.
    • And do we still have the limitation to have only one model by project ?
      • No. The transformation is based on file extension. As a consequence, we can now have as many model as we want.
  •  Roy Osherove - after the "Deep Reflection" Session - Get the slides here
    • I'm curious to know, when you would generate IL at runtime using the techniques you have shown, and when you will use an AOP framework to do the same at compile time ?
      • Well I have never been needint to use an AOP framework. But anyway philosophically speaking, I would never generate IL at runtime Laughing
    • Laughing Honestly me neither. But sometimes we need Smile
    • I wanted also to re-ask the same question about the performance tools that I haved asked to Ingo Rammer, but I got the same answer.
    • And are you still working on "the Regulator"

Thanks all to all theses comments ! I would have liked to speak more about the sessions, but the schedule is so fast we couldn't continue. But great event, and great speakers !


Steve Degosserie

Posted on lundi, 17 mars 2008 17:12

Hi Pierre-Emmanuel,

Concerning the capabilities of the DSL Tools, it's possible use a CustomTool to process the dsl file created by the developer (the CustomTool can be registed at the same time as the DSL is installed on the developer's machine). The CustomTool can, internally, merge your template file that is embedded as resource in your package assembly. This is not so complicated to do and bring a much better integration with Visual Studio than the 'simple' deployment of the template. This possibility is not well-advertised by it's used in some open-source tools such as Altinoren's ActiveWriter (DSL for Castle Project's ActiveRecord). Also, it's possible to generate more than 1 file, and not just 'under' the DSL file, but anywhere in the Visual Studio project's hierarchy (using EnvDTE API).

Concerning AOP at runtime, it's usefull in a number of cases : when using an IoC container (see Castle Project's Dynamic Proxy & Windsor container) to apply cross-cutting concerns, when using an ORM that respects the Persistence Ignorance of your Domain Model (see NHibernate, it uses a lot of Reflection ... that can be optimized thanks to techniques like LCG, Dynamic Methods). You will use compile-time AOP when, for example, Code access security prevents you to use Reflection at runtime. Smile

AOP is a key tool when building loosely-coupled systems, not just a nice theory to be shown during presentations ;o) lol

As a side note, using the Decorator pattern actually allows you to do low-risk AOP (no Reflection, Code generation, ...).


Posted on lundi, 17 mars 2008 22:47

Hello Steve

Interesting comment about the DSLs ! It has really changed a lot since I used them. I have send your comment to Jelle Druyts, he may be interested too.

Related to AOP, well I'm currently doind some using various techniques : by myself using reflection or ContextBoundObjects or using an AOP framework (currently I'm using Gaël Fraiteur's PostSharp that Didier Danse recommanded me.)
However for now, I don't see so many scenario where we MUST use runtime AOP except the case you gave me. On my current project, we use both and I think reflection is easier to get in (for someone not used to AOP or reflection) whether compile time AOP is more hard to understand. It's maybe more powerful and quick, but will also decrease compilation time, that may be highly penalizing when using TDD.

Steve Degosserie

Posted on mardi, 18 mars 2008 15:58

You can also have a look there:

This library is supposed to contain some helpers to build Bi-Directional DSLs (model-code synchronization). I haven't checked it yet but it looks good on the paper ... and it's made by French people ;o)

Sears Parts

Posted on mercredi, 9 décembre 2009 15:22

Vielen Dank für eine gute post

Ajouter un commentaire

  • Commentaire
  • Aperçu immédiat