Yesterday at Microsoft Dynamics AX Technical Conference 2011 Peter Villadsen, Senior Program Manager gave one of his best performances ever. Anyone who have seen Peter live in the past knows what this statement carries. And it certainly didn't hurt, that Peter had excellent news to share with us.
Peter is a dear friend of mine, a top professional program manager, and a class entertainer. In his own laid-back, eloquent and well-articulated manner Peter owns the room and the audience's attention. Peter's presentation took place in the Kodiak room - the largest of the rooms we use for breakout sessions at the Microsoft Conference Center. It seats 400 people, and many more were standing along the walls - including me. Peter masters the English language to an extend where it is impossible to tell (and believe) that he is actually a native Dane. Over the course of the years I've had the pleasure of traveling with Peter to Italy, Spain and France - and I can testify that Peter also masters these dialects of the human linguistic. I do not believe it is a coincidence that Peter works in our Language team.
The session's title were: "Developing in .NET Managed Code and other X++ enhancements". Based on that title no one expected to find such fine jewels in the treasure chest. Peter started by going through some of the "minor" improvements in the X++ language in Microsoft Dynamics AX 2012. These includes:
As if the above in itself was not enough to warrant a new release - Peter moved on to the real topic: X++ as a managed languages.
The BC.NET component has been re-engineered. In Microsoft Dynamics AX 2009 it is basically a face-less client that allows the managed world to call into the AX stack. The X++ code in AX 2009 can call out into the managed world using interop. Notice that when you call out into managed code, you cannot call back into the same AX session. I.e. no round-tripping. In Microsoft Dynamics AX 2012 this is changed. The new BC.NET component is a now thin conversion layer that can attach itself (in-process) to the AX client(s), the AOS and regular managed code. It will ensure all marshaling and type conversions happen seamlessly between the two realms. Peter demonstrated this by having a X++ class pass itself to a C# class, and let the C# class change the state of the object, by invoking a method on the X++ class. It just worked exactly like you would expect.
But wait - there is even more. In Microsoft Dynamics AX 2012 we are compiling X++ code to the CLR. At compile time we generate an XML representation of the pcode, which we can convert into IL. At run-time we will be executing the IL for batch jobs, service calls and RunAs constructs. (RunAs is a new method allowing you to request the X++ logic to be executed as IL.). Peter demonstrated how the performance characteristics are vastly different particular in situations with extremely many objects or extremely many methods calls. Even in less-extreme situations running X++ as IL is beneficial as for example it reduces the time database locks are held, and thus improves performance and scalability.
Peter started the session by quoting Bob Dylan's The Times They Are A-changin' - I believe everyone in the audience agreed.
Wrapping up Microsoft Dynamics AX Technical Conference 2011 Deepak Kumar, Senior Program Manager, presented the data upgrade framework in Microsoft Dynamics AX 2012.
Data upgrade is an intrinsic difficult subject to demonstrate in a breakout session. “Seeing is believing”, and Deepak had invested the time in preparing no less than six AX instances each at a different stage in the data upgrade process. With this setup Deepak was able to demonstrate all the improvements at various points in the data upgrade process. I’ve had the pleasure of presenting with Deepak a few times in the past. I know how much attention he pays to detail, and how much time he spends preparing just his slideshow. With this setup I will not even guess how much time Deepak has invested in helping us understand the data upgrade process in AX 2012. As one of the 400+ attendance in the audience, I felt I got spoiled. Thank you Deepak!
“Fear – Challenged – Rewarded – Joy” is the emotional evolution you go through during the data upgrade process.
Fear is the naturally emotion that kicks in when you are facing a big unknown change. To reduce the fear an Upgrade Readiness tool will be available. You install this tool on your live AX 4 / 2009 system. The tool offers a lot of benefits. First, it enables you to verify that the data in your live system can be upgrade. For example, if an optional column is being converted to an mandatory column, and your current production data has <blank> contents in the field – then the data upgrade is bound to fail. In the past you discovered issue like this much later in the process – you could call it trial-n-error. This pre-verification allows you to fix your data on your live production system before starting the actual upgrade.
Challenged replaces fear, as you now know you are in good hands. The Upgrade Readiness tool will secondarily enable you to enter data that is required to run AX 2012. In the past you would be entering this type data after the actual data upgrade but still during the downtime. Now you can enter the data up-front while the system is live. It is a quite comprehensive amount of data you need to provide, covering global address book, site, financial dimensions, organizational model etc. Next the live Preprocessing allows you to process live data to a staging area. It will be doing data transformations in the process, and the idea is to lower the complexity (and thus execution time) for the upgrade scripts that needs to run during the downtime. This process is of course delta-based, so any updates happening in the live system can be reapplied to the staging area. You can even control how much of your live system’s resources should be used for this, e.g. you may only want to use 0% during peak hours, 20% during night time, and 40% in the weekends.
On the AX 2012 installation you can connect to the live production system. The upgrade process now prioritize the actual upgrade scripts and data copy tasks based on the data composition of the production data you have. You can of course tweak the prioritization of the upgrade scripts and data copy tasks to further tune your data upgrade. At this point you have completed about 80% of the data upgrade process, and now is the time to take the system offline to do the actual data copy/transformation. Reward is in sight.
True joy is when the upgrade is completed, and you uninstall the upgrade model. The upgrade model contains all the DEL_ tables/fields/indexes, and as you don’t need them anymore – you might as well remove them completely from your system. This way your developer experience on the system gets much improved. Take a look here:
Let me wrap up my coverage of the Microsoft Dynamics AX Technical Conference 2011 with a quote I heard yesterday: “AX is like Hotel California – once you get there, you can never leave!”
This is a prominent and frequently used form in the developer workspace – so shouldn’t it be sleek and user friendly?
Here is an annotated screenshot of the final result (click the image for a large version). What do you think?
Sometimes the value added by a garage-project becomes so obvious to everyone, that it must be productized. This is an example. This was literally the last developer feature that made it into AX 2012. Working in an environment where last minute changes to scope is possible despite the project’s (huge) size and extensive engineering processes is another thing I love about my job.
If you are using a version control system and want an automated build process, I have some great news for you. Microsoft has just published a beta version of CombineXPOs, which is a small utility required in the build process. For more information see here: http://blogs.msdn.com/b/axtools/archive/2012/06/29/combinexpos-new-version-official-beta-has-started.aspx
“So tell me”, I start, “when was the last time you used a help system?”
Søren pours himself another glass of red wine and leans back in his armchair. He is silent for a while. “What do you mean when you say help system?”
I open my mouth, and close it again. It always amazes me, when I realize the depth of such a seemingly naïve question. My immediate response seems too narrow. I have to break out of my standard way of thinking. A help system is not just a part of a larger system that helps you when you are stuck. It is even more than this. What comes out of my mouth is: “A help system is a system that helps you accomplish your tasks.”
“In that case I use help systems daily”, Søren proclaims.
“Really? I thought you already knew all the answers.”, I cannot resist the temptation.
Søren smiles, “You are also a developer, how do you manage to get anything done without a help system?”
Apparently Søren is into one of his moods where he answers all my questions with a new question. I sip my wine, take a deep breath and start to elaborate. “As a developer my work is quite dependent of the phase my project is in. Let's look at my favorite, the implementation phase. While writing code I never press the F1 button. I have worked with my current code editor for so long, that I’m fully aware of what it can and cannot do for me.”
Søren says: “So you have turned off IntelliSense?”
“No way – I don’t even know any developer crazy enough to do that. Actually I don’t even know an code editor that allows you to turn off IntelliSense.”
“Please go back to your definition of a help system.”
It dawns on me. Help system are more than just F1 help. It is anything that enables me to do my job. “Ok”, I say, “So what other help systems do you use?” I ask. I’m starting to feel confident I will earn more than a hangover from tonight.
“Well,” Søren says, “as a developer I often need to lookup API reference information. To do that I use the web constantly.”
“So you actually find any useful information out there? I’ve tried a few times but given up. Instead I browse objects locally searching for something that will satisfy my need.”
“That is one of the industry’s dilemmas. Users who have been disappointed by the documentation available in the help system, usually never come back. So why bother writing documentation, if it is not going to be read?“
“Exactly, if the documentation isn’t there, then there is no point in looking.”
Søren continues, “The users also suffers here, instead of looking for information where it is obvious they eagerly jump into the haystack looking for the needle. How can this destructive habit be reversed?”
A simple question, I think to myself. I answer: “Well, if the software providers just wrote the documentation we need, we wouldn’t have the problem.”
Søren promptly replies: “The question to ask is: How do you know it is not already there?” I feel like I’m being maneuvered into a corner. “When I installed my environment about 2 years ago, I browsed through the reference documentation, and it was primarily empty placeholders.”, I pause to think about what I just said. “Naturally these placeholders might have been populated in the meantime.“ I make a mental note to reserve some time on Monday morning to give the online documentation a second chance.
Søren finishes off his glass of red wine. He looks content.
All 3 flavours enable check-in/check-out/undo check-out/change history/change descriptions/quality bar enforcements etc. Using a version control system can dramatically improve the quality, predictability and productivity of your MorphX projects.
This channel 9 screencast gives a preview of the version control system integration options in the next release of MorphX - the IDE of Dynamics AX. It shows a side-by-side comparison of the integration options with Team Foundation Server, Visual Source Safe, and MorphX VCS. The last half of the screencast gives a demonstration of MorphX VCS.
Finally I want to wish everyone a "God Jul" (as you say this time of year where I live.)
We are happy to announce that the new Microsoft Dynamics AX 2009 Pre-Release (CTP3) Demonstration Toolkit is now available on Partner Source.
The Dynamics AX 2009 Pre-Release (CTP3) VPC is an unsupported ready to use pre-release of AX 2009. The Virtual PC image of Microsoft Dynamics AX 2009 Pre-Release (CTP3) enables you to demonstrate the features of Microsoft Dynamics AX 2009 using a single PC or laptop computer.
AX 2009 Pre-Release (CTP3) Demonstration Toolkit Demo Data.
This version of the Dynamics AX Pre-release Demonstration Toolkit is based on the new Contoso Demo Data Company. The current demo data version will only have base data and no transactions. We are planning to upload a demo data version with transactions shortly.
Today is ZBB for Milestone 1 for the next version of Dynamics AX. ZBB is short for Zero Bug Bounce, which basically means all known defects introduced since last release must be fixed. For the Partner Productivity team it means that all known defects in the new Code Upgrade toolbox are fixed. It also means I get to do what I like the most: Share exciting technology with you!
A big thank you is due to everyone who helped make this happen. All the cool ideas stem from talks with customers, partners and from online surveys. Thank you for providing us your valuable feedback!
Please notice that the icons and text resources below are not finalized yet.
This dialog replaces the dialog you used to get, when you click "Create upgrade project". As you can see, you now have more options. For the normal upgrade conflicts, you are still able to delete obsolete elements (those casting a shadow on an identical element in the lower layer). A new option is to "Auto-resolve property conflicts". Enabling this will automatically resolve conflicts where one property is changed in Your revision, and another property is changed in Their revision on the same AOT node. If the same property is changed in both Yours and Theirs it will still be marked as a conflict.
With the new toolbox you can also create upgrade projects for stale code, that needs to be revisited. By stale code I mean code that violates certain practices, and must be updated before going live. Basically the feature runs the best practice tool on your code and looks for certain types of violations and creates an upgrade project with the violating elements.
The Upgrade Project
The upgrade project itself also offers new functionality. Each conflict, and resolved conflict will have a new icon on the individual node. This makes it quite easy to get an overview of where conflicts are, and where to pay attention. As you work your way through the conflicts, you can mark a conflict as resolved, and the conflict icon changes from a red alert to a green checkmark.
Compare
The compare dialog has also had a facelift. First off all the stylesheet has been updated to include some nice gradients. While this is merely eye-candy we also added many new cool features. First of all the compare dialog can now be started by a short-cut key (CTRL-G), and it is promoted to be at the same level as Find in the context menu. This should save you for some mouseclick. Secondly your preferences are now being stored, so the next time you open compare, you don't have to select (again) what you want to compare. And as if that wasn't enough, more information is now available to assist you making the right decisions more easily. For properties the Original value is now included, so you now can see both: Yours, Theirs and Original in the same window.
Estimation report
Do you need to tell your boss when you'll be done with your work? I do. For code upgrade the help is near. You can now print a report, that is fully configurable with estimates for solving the detected conflicts of the various types. The estimates are broken down to the same granularity as the detected conflicts, which is on a per node level. Please note, that the data in the screenshot is staged, and not really meaningful.
Convergence
At Convergence in Dallas next week, my team will be present. They will share the same information as in this post. If you are there, make sure to pay them a visit.
This posting is provided "AS IS" with no warranties, and confers no rights.
The new installment of AX screencasts is now available on Channel9. It is a 20 minute video on MorphX Best Practices in Dynamics AX 4.0 - one of my favorite topics!
Here is the link:
http://channel9.msdn.com/ShowPost.aspx?PostID=292988
I've attached the PowerPoint slide deck to this post. The deck contains a transcript of the talk in the slide notes.
In version 3.0 the class TextBuffer had two methods: Encrypt and Decrypt. For version 4.0 the Encrypt method has been removed, and the Decrypt method renamed to DecryptOld.
The change happened for security reasons.
If you require to encrypt and decrypt strings in Dynamics AX 4.0, you can use the functionality provided in the .Net System.Security.Cryptography namespace.
By doing so, you should be aware of the dangers, including:
To help you get going, I've created an X++ Cryptography class. It uses the implementation of the encryption algorithm Rijndael from .Net. The class is attached to this thread.
Here is an example on how to use it:
static void main(Args _args){ Dialog dialog = new Dialog("Cryptography Demo"); DialogField dfText = dialog.addField(typeid(description), "Text to encrypt"); DialogField dfKey = dialog.addField(typeid(description), "Key to encrypt with"); str encryptedString; str decryptedString; if (dialog.run()) { encryptedString = Cryptography::Encrypt(dfText.value(), dfKey.value()); decryptedString = Cryptography::Decrypt(encryptedString, dfKey.value()); info(strfmt("Encrypted string: %1", encryptedString)); info(strfmt("Decrypted string: %1", decryptedString)); }}
A big thank you to Ivan Medvedev for providing the C# implementation that I rewrote to X++. You can find the original article here - including more security considerations: http://www.dotnetthis.com/Articles/Crypto.htm