mfp's two cents

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

    Microsoft Dynamics Lifecycle Services is Live

    • 1 Comments

    lcs2

    Microsoft Dynamics Lifecycle Services are designed to manage and optimize customer implementations – powered by Azure. The customer creates project workspaces for implementation, upgrade and maintenance activities, and will invite implementation experts from partner organizations and Microsoft into these workspaces for the execution of related activities. Partners will be able to create projects for learning and presales purposes. This enables partners to build out expertise around Lifecycle Services, and demonstrate this in sales cycles.

    lcs

    Take it for a test drive @  https://lifecycleservices.dynamics.com.

     

     

    COLLABORATION WORKSPACE

    • Customer-managed collaboration workspace
    • Cloud-based, secure environment
    • Project management using SureStep or other methodologies
    • Project-specific dashboard
    • Tools & data that connect multiple lifecycle phases to enable better decision making by key stakeholders

    Business process modeler

    • Aligns industry processes (APQC) with process maps for Microsoft Dynamics AX.
    • Create cross-functional flowcharts based on rich metadata.
    • Map processes & perform fit-gap analysis.
    • Integration between BPM & RapidStart.
    • Quickly generate documents and flowcharts using TaskRecorder (KB#2863182).

    CODE & UPGRADE ANALYSIS

    • Leverages a cloud-based rule engine to analyze code and identify potential best practice, performance and upgradeability issues.
    • Generates actionable reports in Excel & HTML that can be imported into MorphX IDE as actionable to-do’s for developers.

    License sizing estimator

    • Estimate how many licenses you need (CAL)
    • Model the effect of custom roles on license needs.
    • Get automatic CAL-level estimates

    USAGE PROFILER

    • Model user & batch AX loads.
    • See graphic representation of load volumes.
    • Identify a starting point for infrastructure sizing.

    Issue search

    • Search a repository of reported, in-progress & fixed issues.          
    • Identify specific code objects & lines of code affected by hotfixes.
    • Get notifications for issue state changes, and new fixes for AX functional areas.

    DIAGNOSTICS

    • Automate & monitor health checks for AX ecosystem.
    • Collect data from AX environments.
    • Evaluate data against pre-defined rules & health checks.
    • Generate reports to provide monitoring & actionable corrective action summaries.

  • mfp's two cents

    Debug::Assert in X++

    • 3 Comments

    Update 4th of August 2014: Clarification of the AX runtime behavior when non-developers hit an assert statement.



      defect free software

    “In computer programming, an assertion is a predicate (a true–false statement) placed in a program to indicate that the developer thinks that the predicate is always true at that place.”    

    http://en.wikipedia.org/wiki/Assertion_(computing)

    What would you rather have: A piece of source code with or without assertions? I’d definitely prefer source code with assertions – it makes the code easier to read, debug and troubleshoot.

    My recommendation is to use assertions in X++ when all of the following are true:

    1. The condition can never be false if the code is correct, and
    2. The condition is not so trivial it obviously be always true, and
    3. The condition is in some sense internal to the component, and
    4. The condition can be verified without any method calls.

     

    1. The condition can never be false if the code is correct

    Assertions and error handling are two different things.

    • Assertions should be used to document logically impossible situations in a correctly implemented program. If the impossible occur, then something is wrong – a programming error has been discovered.
    • Error handling – as the name implies – is the implementation of what should happen when an error occurs. Error handling are valid code paths that determines how the software reacts to various erroneous conditions, like incorrect data entered by the user, to system error conditions like out-of-memory.


    In a nutshell, it should be possible to write unit test for error handling – but not for assertions.

    2. The condition is not so trivial it obviously be always true

    Assert statements takes time to write and read – and if the condition they are asserting is obviously always true, then the assertion is pure clutter – and we are better off without it.

    3. The condition is in some sense internal to the component

    A failing assertion is an indication of a problem with the implementation. Something within the component – regardless of input from the outside world – is broken and needs fixing. Typically, I’d use assertions for input validation in private methods, and exceptions in public methods. Conversely, you don’t want consumers of your component to be hit by assertions – regardless of how they use your component.

    4. The condition can be verified without any method calls.

    Assert statements in X++ are a little special, as the X++ compiler always includes assert statements. In other languages (like C#) you can have multiple compiler targets – and typically the release build would not include the assert statements. In AX when a non-developer is hitting an assert statement, then the runtime will suppress eventual errors. I.e. in a production system assert statements have no functional impact.

    Given assert statements in X++ are always evaluated, and thus degrades performance, they should be used with a bit of caution. If the condition can be verified with minimal overhead – for example that a variable has a certain value – then there is no problem. However; if the assertion requires execution of complex logic, RPC or SQL calls then it should be avoided, due to the performance impact. In cases where the performance impact is significant, but you don’t want to compromise on assertions, the assertions can be wrapped inside a call to Debug::debugMode().

    “without any method calls” is just a guiding principles. Sometimes it makes sense to factor the condition into a Boolean method – for reuse or for clarity – here I would not object.

    Examples

    Here is an example of good use of assertion in X++:

    private void markDetailRecordAsEdited(
    RecId _journalControlDetailId,
    RecId _draftConstraintTreeId) { Debug::assert(_journalControlDetailId != 0); Debug::assert(_draftConstraintTreeId != 0); if (! modifiedDetailRecords.exists(_journalControlDetailId)) { modifiedDetailRecords.insert(
    _journalControlDetailId,
    _draftConstraintTreeId); } }

     

    Here is another example where Debug::debugMode() is used:

    private void render()
    {
        ...
        
        if (Debug::debugMode())
        {
            Debug::assert(this.hierarchyCount() > 0);
            Debug::assert(segments != null);
            Debug::assert(totalSegmentCount > 0);
        }
    
        ...
    }

    Closing remarks

    I once saw a t-shirt with this print on the front: “If debugging is the process of removing bugs, then programming must be the process of putting them in”.  I wish the back had read: “Programming with assertions is one way to keep bugs out.”

  • mfp's two cents

    Microsoft Dynamics ERP software now available on the Azure cloud

    • 0 Comments

    Cloud

    Read more here.

  • mfp's two cents

    SysExtension Framework – to the rescue

    • 5 Comments

    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)

    image

    Now; the problems with this approach are many.

    • First of all the base class has references to the sub classes. Why is that a problem? Consider the base class is a framework class – is it a good idea for framework classes to have references to consumer classes of the framework? Of course not – we don’t like that coupling.
    • Secondarily; the 3 subclasses are all referenced by the same method. Any new sub class would require an update to the factory. This turns the method into a congestion point, and it creates a coupling between sub-classes.

    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:

    image

    Then you can rewrite the factory method to this:

    image

    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!

    Now notice:

    • Truly decoupled! New subclasses can be added without any changes to the base class.
    • Less code is required! In the example here the delta is not significant – but sometimes you have switch statements spanning hundreds of lines.
    • No change in the public API! The contract stays the same – this is an easy and low risk refactoring.

    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.

  • mfp's two cents

    An amazing AX day in Moscow

    • 0 Comments

    Navicon’s AX Fair in Moscow was a big success. Around 150 peopled gather to learn about Microsoft Dynamics AX 2012. There were a few keynotes followed by two breakout tracks, hands-on labs to allow everyone to interact with AX 2012. Also every attendee got a free copy of the Russian version of Inside Dynamics AX 2012. The book has been translated by Navicon – the host of the conference.

    The Fair was dressed in traditional Russian style and colors, including a guy playing the mandolin (I think) most of the day.
    WP_20130607_022
    WP_20130607_003 The first keynote was by Алёна Геклер from Microsoft Russia – I ‘m sorry to say that I missed some of the details, as both the slide deck and the talk was in Russian.

    I followed next, speaking about developing large scale software, and how a MS-Press book is written.

    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.

    WP_20130607_010
    WP_20130607_011 The final keynote was by Oleg Ognev, Director of IT at IZOVOL. He spoke about Izovol’s AX implementation. Izovol is the first live Russian customer running Microsoft Dynamics AX 2012. The talk also covered why AX was chosen over SAP and Oracle - again the talk was in Russian – but my interpretation was that AX is simply much better.

    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.

    Being a bit challenged by the language, I selected to attend the few English sessions. I saw Keith Thaulow, EMEA Sales Director, Demand Solutions speaking about the importance of good Forecasts for Sales and Production. The forecasting solution from Demand Solutions can free up cash tied up in Inventory – you can expect to reduce the inventory levels by at least 10%; and whats equally amazing is that the vast majority of companies installing Demand Solutions’ AX Forecasting solution is able to have it fully implemented within the first 6 months. WP_20130607_017
      

    Tonight I’m having a tradition Russian/Ukrainian dinner with developers from the Russian community.

    Спасибо Москва

  • mfp's two cents

    Navicon AX Fair in Moscow

    • 0 Comments

    Navicon

     

    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.

  • mfp's two cents

    Microsoft’s new domicile in Denmark

    • 0 Comments

    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.

    Kanalvej_birds_eye

    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.

  • mfp's two cents

    A new AX development book: Microsoft Dynamics AX 2012 Services

    • 3 Comments

    7546EN_cov A new development book has been published by Packt.

    If you are developing with Dynamics AX 2012, you’ll need this book. For two reasons. Firstly, as you’ll need to deal with services. Secondly, because it is a great book.

    The book is 200 pages, and it does a great job of explaining how to build and how to consume services.

     

    I think the book is great for several reasons:

    • It is technical. The level of contents and technical depth is comparable to Inside Dynamics AX 2012.
    • It is unique. The contents is written for this book. You will not find it anywhere else.
    • It is self-contained. Whenever a concept is used, it will be explained – even when it is not directly related to services. So be prepared for excursions to the lands of CIL, WCF, Runbase, AX Security, Visual Studio, UI builders etc.
    • It is actionable. Each chapter shows step-by-step, line-by-line what to do in various scenarios. Urging you to try it out yourselves.
    • It is opinionated. I’m not sure how they managed, but the book somehow captures the atmosphere we had when building AX 2012 – we knew we were on to something special. The book deals out appraisals where due, and explains why AX 2012 is a huge leap forward for services.
    • It is jovial. The tone in the book is welcoming and direct – I think the most used word is “you”. This is quite refreshing for a technical book.

     

    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.

  • mfp's two cents

    Microsoft Dynamics AX 2012 R2 is here

    • 1 Comments

    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.

    clip_image001

    For more information see http://www.microsoft.com/en-in/dynamics/erp-ax-2012-r2.aspx

  • mfp's two cents

    Dynamics AX 2012 R2 achieves "Compatible with Windows 8" certification.

    • 2 Comments

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

Page 3 of 19 (187 items) 12345»

mfp's two cents

...on Dynamics AX Development!