mfp's two cents

...on Dynamics AX Development!
  • mfp's two cents

    TFS2010 - a long term successor of Visual SourceSafe

    • 4 Comments

    If you are using the version control integration features in Dynamics AX you may be using Visual SourceSafe as the version control provider. If you do, you are probably aware that Visual SourceSafe has been in maintenance mode for several years. You may even be looking for a replacement - after all your source code is a valuable asset, and it needs a reliable and sustainable home. 

    Team Foundation Server (TFS) is the natural replacement offered by Microsoft - and it is also supported by Dynamics AX 2009. However, TFS has so far been two complex and too costly to be a real alternative for smaller teams.

    With TFS 2010 this is changing - for more information see these two blog posts:

    http://blogs.msdn.com/bharry/archive/2009/10/01/tfs-2010-for-sourcesafe-users.aspx

    http://blogs.msdn.com/bharry/archive/2009/10/19/vs-2010-licensing-changes.aspx

  • mfp's two cents

    Seeing is believing - AX 2012 Type Hierarchies

    • 4 Comments

    This is a sneak preview of two new tools in Microsoft Dynamics AX 2012: The Type Hierarchy Context and the Type Hierarchy Browser.

    Please notice:

    • Microsoft Dynamics AX 2012 supports table inheritance
    • These tools runs off live meta data - no need for cross reference to fuel them
    • These tools improves the navigation and discoverability of meta data

    This video is also available on Channel 9.

    THIS POST IS PROVIDED AS-IS AND CONFERS NO RIGHTS.

  • mfp's two cents

    X++ - A managed language

    • 3 Comments

    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:

    1. New AS and IS keywords - with the same semantics as in C#. In X++ they work for class and table types.
    2. Support for Attributes - just like in C#.
    3. Table inheritance.
    4. Tightening up of various language constructs. X++ no longer allows return type covariance, return type contravariance, parameter covariance, parameter contravariance, and visibility contravariance. This fully aligns X++ with C#. To explain this in less language-savvy terms, it means an overriding method must have the same return type and parameters as the method it is overriding. Further; it cannot reduce the visibility, e.g. it cannot make a public method private.
    5. The dangling semi-colon is not required anymore. The spontaneous applause was much appreciated.

    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.

  • mfp's two cents

    Getting to Microsoft Dynamcis AX 2012

    • 3 Comments

    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!”

  • mfp's two cents

    Dynamics AX 2012 – The compiler output window

    • 3 Comments

    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?

    compileroutput

    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.

  • mfp's two cents

    CombineXPOs official version now in beta

    • 3 Comments

    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

  • mfp's two cents

    Optional parameters in C# and X++

    • 3 Comments

    In the upcoming 4.0 version of C# the language now supports optional parameters – just like X++. The following is a valid method declaration in both languages:

    public void foo(int parameter1, int parameter2 = 0, int parameter3 = 100)
    {
    }

    There are a few differences between the languages with regards to optional parameters:

    Named parameters

    In X++ you can only omit optional parameters starting from the last parameter. C# makes it possible to omit any optional parameter. For example:

    foo(5, parameter3: 1000)

    will call foo(5, 0, 1000).

    prmIsDefault

    C# doesn’t provide a way to determine, if a parameter was omitted by the caller, or the caller passed in a value identical to the default value. In X++ the prmIsDefault() method can be used to determine this. However, the use cases for this method are rare – and often fragile. For example, consider this X++ class:

    class BaseClass
    {
        int value;
        public void init(int _value = 0)
        {
            if (prmIsDefault(value))
            {
                value = /* some complex calculation */
            }
            else
            {
                value = _value;
            }
        }
    }
    Now someone comes along and extends the class:
    class MyClass extends BaseClass
    {
        str myStr;
        public void init(int _value = 0)
        {
            myStr = 'foo';
            super(_value);
        }
    }
    Can you see the problem? This following code will never call the complex calculation (which probably was the intention):
    MyClass myClass = new MyClass();
    To solve the problem MyClass needs to be implemented as:
    class MyClass extends BaseClass
    {
        str myStr;
        public void init(int _value = 0)
        {
            myStr = 'foo';
            if (prmIsDefault(_value))
                super();
            else
                super(_value);
        }
    }

    Which really is terrible, as the implementation of the derived class depends on the implementation of the base class. This is bound to break eventually. Add a few more optional parameters and a few more levels of depth in the class hierarchy, and you'll have a real nightmare. My recommendation is to only use prmIsDefault() in private and final methods - as they can't be overridden. In C# you can easy live without this method, as you can achieve the same in a more robust manner using method overloading:

    class BaseClass
    {
        int value;
        public void init()
        {
            int _value = /* some complex calculation */
            this.init(_value);
        }
        public void init(int _value)
        {
            value = _value;
        }
    }
    <humor>It is a good thing we solved the dangling semicolon issue – otherwise it would haunt the C# community in a not too distant future.</humor>
  • mfp's two cents

    "Inside Dynamics AX 2009" is now available

    • 3 Comments

    The book is now available at amazon.com. You can also browse parts of the book, including the Table of Contents at Amazon.

     

     

     

  • mfp's two cents

    Upgrading to Microsoft Dynamics AX 2009 @ Convergence 2008

    • 3 Comments

    Deepak Kumar and myself will be hosting two sessions on the upgrade process at Convergence in Copenhagen later this month. I hope to see you there.

    Code Title Date/Time Room
    AX14 Upgrading to Microsoft Dynamics AX 2009 11/20/2008 10:30AM-11:30AM Hall A1
    AX14R Upgrading to Microsoft Dynamics AX 2009 11/20/2008 3:30PM-4:30PM Aud 15
     

    This session will take you through the end-to-end flow of upgrading from Microsoft Dynamics AX 3.0 or Microsoft Dynamics AX 4.0 to Microsoft Dynamics AX 2009. We'll overview the code upgrade as well as the data upgrade process, along with recommended best practices. Examples of the improved upgrade documentation, with a focus on the implementation guidelines, will be highlighted, and we'll cover tips on performing the upgrade more efficiently and effectively. You'll also learn the extra upgrade steps needed if you've extended your solution. 

  • mfp's two cents

    Late night discussion on software development #1: Continuous publishing

    • 3 Comments

    “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.

Page 4 of 19 (182 items) «23456»

mfp's two cents

...on Dynamics AX Development!