There is a coding pattern that has been proliferating the X++ code base for years. It is not an X++ best practices – nor is it object oriented; yet it is used quite heavily (unfortunately). Consider a simple class hierarchy with an abstract base class and 3 derived classes. A typical implementation of a factory would be a static method on the base class, like this: (Please ignore the type of the parameter – it could be anything, I choose str for simplicity)
Now; the problems with this approach are many.
The coupling between the 4 classes spells trouble. If you try to modularize an application written like this, you will quickly realize that the pattern above is bad. You cannot have references from lower-level models (aka. assemblies/modules) to higher-level models. Yet; having a single factory method is valuable and a good practice.
SysExtension Framework to the rescue.
Consider you decorate the subclasses with an attribute, like depicted here:
Then you can rewrite the factory method to this:
The extension framework returns an instance of the right subclass automatically. It uses the attribute to determine which subclass instance to create. Quite simple – extraordinary powerful!
A few words of caution: There is a small performance impact on cold systems when using the SysExtension framework. In most cases you will not notice it; however – for performance critical paths, you should measure the impact of this change before going for it.
To learn more about the SysExtension framework see here.
The next keynote was by Vadim Korepin – who among other things gave Navicon’s expectations to future AX versions.
Vadim is also my host for the conference, and he has been the main translator of the Russian version of Inside Dynamics AX 2012. He has done a great job, and I’m sure he will be tired tonight.
During lunch there was a book signing session. The excitement around the book truly amazed me – I stopped counting how many hands I’ve shaken and how many dedications I’ve written.
Tonight I’m having a tradition Russian/Ukrainian dinner with developers from the Russian community.
I’ve been invited to speak at the Navicon AX Fair in Moscow on June 7th 2013. I’m looking forward to my first visit to Russia – and meeting customers and partners, who are as excited about AX 2012 as I am.
If you are in the neighborhood and want to join the Fair, make sure to sign-up here.
Microsoft will be co-locating the current two offices in Hellerup and Vedbæk (MDCC) to Lyngby. According to plan the new facilities should be ready for operation in 2015. The new domicile will be near DTU (Danish Technical University) and the shopping mall, restaurants, cinemas and sports facilities in Lyngby.
It is the internationally recognized Henning Larsen Architects from Denmark who have designed the new domicile Henning Larsen Architects are known for creating the Copenhagen Opera House.
Oh yes, I’m looking forward to moving in.
I think the book is great for several reasons:
A big “Thank You!” to the team behind the book for increasing the AX community’s knowledge: Klaas Deforche, Kenny Saelen, Palle Agermark, José Antonio Estevan and Tom Van Dyck.
If you, like anyone else, want to get your hands on R2 – here are the links for customers and partners.
R2 is an incredible engineering achievement. Let me mention just one remarkable improvement: We have collapsed all GLS layers into the SYS layer. This means that for the first time you can have one instance supporting local requirements in 41 countries simultaneously. Learn more here. I’m proud to have been part of the team making it happen.
With any great product launch a lot of material is made available. That is also true for R2 – and yet something stands out. In collaboration with Microsoft Studios a number of short videos have been created. I think they are truly amazing – what do you think? Try out the links below.
Question What does it feel like to be in control, highly responsive, agile, connected and dynamic?
Answer Explore in the lives of a; CIO, CFO, HR Manager, Practice Manager, Retail Manager and a COO of Manufacturing.
For more information see http://www.microsoft.com/en-in/dynamics/erp-ax-2012-r2.aspx
Microsoft Dynamics AX 2012 R2 has successfully passed compatibility testing and has achieved the “Compatible with Windows 8” certification.
The Compatible with Windows 8 certification means that the product has passed Microsoft testing criteria for compatibility with Windows 8. The Microsoft Windows Compatibility and Certification program defines a set of compatibility test cases that must be completed successfully-covering areas of Compatibility & Resiliency, Adhere to Windows Security Best Practices, Support Windows Security Features, Adhere to System Restart Manager Messages and perform a Clean, Reversible Installation. The testing is performed using Microsoft’s automated Application Certification framework and tools.
Microsoft Dynamics AX 2012 R2 is now listed among the products that have been certified on the Microsoft Windows compatibility center site.
For more information on TypeScript visit: http://www.typescriptlang.org/
FYI - Anders Hejlsberg covered the same material on Channel 9.
The Microsoft Dynamics AX Technical Conference 2012 is coming to an end. Over 1100 attendees, 75 break-out sessions and tons of networking have happened in Bellevue.
The venue of this third conference has been perfect, large and roomy, great equipment for presenters, skillful and helpful staff and short queues for meals. Ok, there has been a few minor glitches, some of the sessions were full, but the venue had room for repeats, which were readily scheduled. The first session I attended today was a repeat of the Development Life Cycle and Model Store Management – a topic close to my heart. Senior Program Manager Robert Badawy walked us through the best practices for the process when using TFS and managing the model store. At the last 2 technical conferences we presented a conceptual overview of the new model store capabilities, this prompted several questions, that were left unanswered until now. Robert’s session answered these questions and even better announced availability of white papers containing all the information. Here are the links to the white papers: Deploying Customizations Across Microsoft Dynamics AX 2012 Environments, Change management and TFS integration for multi developer projects and Developing solutions in a shared AOS environment. Petur Chief Architect Snaeland from ToIncrease commented on the session during the Q&A: “This session has been worth the entire conference.” I couldn’t have put it better – well done, Robert!
The next session I attended was Sverre Thune’s presentation of the Product Configurator. A session full of Norwegian charm, warmth, and humor – and great demos. Sverre showed the fundamentals of the Product Configurator – which is based on the Solver that Peter Villadsen showed yesterday – he showed how attributes and constraints are added, and how the constraints are automatically (and instantly) applied when a product is sold – this results in both a BOM and a Route being created so the product and be produced according to the user’s selections. Sverre showed the additions in R2 in the Product Configurator including how attributes could be hidden based on a condition – to not clutter the configuration experience, and how the Configuration form is now a regular MorphX form and can be customized and personalized as any other form. Sverre received a well deserved applause after showing the API capabilities added. It is now possible to create a class that can get/set attributes when the product has been configured. This is based on the SysExtension framework – one of my favorite application frameworks in AX. The Product Configuration creates an instance of the right class based on the class’s attributes – this allows for truly non-intrusive extensions that can easily customize how a product in configured.
Have a safe pleasant travel home.
The second day of Microsoft Dynamics AX 2012 Technical Conference is coming to an end. The over 1100 attendees have been treated to yet another day of amazing sessions and tons of information. The phrase “drinking from a fire-horse” seems applicable.
The day kicked off with a key note from General Manager Sri Srinivasan. One of the announcements was the availability of Dynamics AX 2012 R2 CTP on InformationSource – it is now ready for download. Tao Wang joined Sri on stage and presented the new Application Life Cycle (ALM) tool box, including a cloud service where you can upload your model files and have them analyzed for various issues and metrics. Technical Fellow Mike Ehrenberg took the stage after Sri, and gave an inspiring and promising talk of the future of Microsoft, starting this week with Windows 8 and Surface – and how the Dynamics products will become the fabric that units the innovations from across the Microsoft division to deliver an outstanding experience for professional users.
After the key note I headed directly to the largest break-session room 405. Here Peter Villadsen, Principal Program Manager on the X++ team was going to “push the envelope”. I needed to see that – and so did about 300 others. Peter is always great on stage, and he always comes with a lot of interesting demos. Today Peter showed the AX LINQ Provider, allowing you to query AX data via LINQ from C#. This feature fills a gap in our managed story – now you have access to both X++ classes (via proxies) and AX data. Peter then moved into talking about the Solver that is a component shipping with AX. With this you can solve a great deal of otherwise very hard problems. For example the Traveling Sales Man problem. (What is the shortest route to visit N cities once and return home?). Peter showed how fast such problems can be solve with the Solver (5 ms) and of course Peter showed the route on a Bing map hosted on an AX from using the WPF host control. This is just one of the problems the Solver can solve, almost anything that can be expressed mathematically can be solved (at least if it has a solution). Finally Peter showcased the Code Upgrade Tool build on XLNT (X++ Language Toolkit) allowing to generate Abstract Syntax Trees for X++ and write reliable rules to analyze and refactor X++ code. Thanks for a great session Peter!
Senior Program Manager Anders Even Girke was hosting the next session I attended. For some reason Anders’ session was in a smaller room that could fit 150 – and it was packed. The session covered Inventory Valuation. In a session full of demos Anders showed the new Moving Average costing model. This is a perpetual costing model based on the average principle, where cost of an issue transaction does not change once posted. Any Invoice price difference is proportionally expensed to P&L in case On-hand inventory is not matching the invoice quantity. Anders also mentioned that Inventory Closing has been optimized dramatically for certain data distributions, by allowing items to be bundle for the parallel batch processing. Finally the conflict report that now also can detect conflicts between ledger and WIP transactions and a new cube for slicing and dicing costing data was shown. A solid presentation from Anders – after his AXUG sessions last week, Anders is on a roll.
I also saw that the Inside Microsoft Dynamics AX 2012 book is available – they have copies in the Hands-On Labs. The wait is over :-)
An amazing day is coming to an end – I enjoyed it, I hope you did too?