![]()
Photographer Camilla Svensk
|
Magnus Mårtensson, Dotway, Sweden
Magnus has a burning passion for technology and for sharing his knowledge with others. As a consultant with Dotway Magnus works as software architect, coach, tutor, lecturer and technical lead. Some of his foci are web technology, web services and distributed applications. Magnus wants to be a consultant in the classical sense; he always goes into an assignment with the ambition to help his client lift his organization both technically and in project process. He is a member of Microsoft Extended Experts Team (MEET) and an INETA speaker and his blog Techie.notepad http://blog.noop.se is about project processes, software architecture, design principles and coding.
Dynamic code
This in depth session will penetrate the advantage of using dynamically created code in your applications. Yesterday we coded the creation of object instances our selves in each location that we needed them with strong references between our code modules. Maintenance in this code base was a nightmare and modular and distributed development was difficult if not impossible. Today the use of object factories is very widespread in our business. By implementing the Factory Pattern we delegate creation of instances to Object Factories. Modularity is enabled and Dependency Injection and other modern techniques empower us and set us free. The lingering problem is that a general solution of any algorithm may cause repetitive code paths to execute unnecessarily and excessive memory to be consumed. An application that creates optimized code dynamically using System.Reflection.Emit is possible. One such solution is the Unity project from Patterns & Practices which will help to exemplify the greatness of this approach. In fact dynamic code is the way code will be created for us tomorrow. To paraphrase C3PO: "Code creating other code! How perverse!" |