Thursday, 25 June 2009

Copy - paste utility

The lack of IntelliSense in the MorphX IDE ( and being too cheap to invest in AxAssist ) made me browse for an alternative. I found ArsClip which is a nifty little tool for copying and pasting; and not just for programming. It can hold your Copy and with the right setup Ctrl-Shift-V will show you a list of you previous Copy ready to be inserted.

Sunday, 14 June 2009

x++ and C# compared

One indicatation that Dynamics AX developers need to learn C# in order to take full advantage of future versions of AX is when MS starts documenting differences in coding practices.

Personally, X++ was the first programming language which I've felt pretty comfortable with even though I've done som Java programming ( and the mandatory html coding which most programmers start out with ).

I see the need for AX developers to hone ( or just begin on ) their C# skills with the introduction of EP ( version 2009 ) and the reporting service integration with e.g. the role center. I've done som Hello Word-ish programming in C# using Visual Studio 2008 and I must say that I like it. One area where X++ and MorphX out ranks C# and VS is form development. After having created some rather basic forms in C# using VS it was a pleasure returning to MorphX's drag and drop design.

From what I can gather future version of AX will include a brand new approach to the layers and id ranges on elements but these advantages a side - MorphX still could adopt some of the features from VS, in my opinion. One thing I really like about VS is it's IntelliSense (Thanks Morten)"smart typing" ( I don't know what else to call it - but it's the feature when you start typing something VS automatically completes the string ) - it can be done; AxAssist does it for you - but why not integrate the functionality into MorphX as a standard? Well - perhaps in AX 6?

ODBC with FoxPro

I recently had the pleasure of adventuring into the ODBC connection territory. I discovered that many others previously had done the same ( obviously ) but there was a surprising lack of how-to and other documentation. After some extensive searching I found Brandon's blog in which he meticulously documented an implementation of ODBC. Many excellent observations are included in his description, including AOS considerations, i.e. code-execution placing vs. maintenance of Windows ODBC connection ( he runs the code on the AOS server so that the system ODBC connection driver only needs to setup there and not on the client which would reduce maintainability as changes to the connection potentially would have to be distributed to all clients ).

If you are implementing an ODBC connection for the first time on AX 2009, I highly recommend reading Brandon's step-by-step description.

So implementig an ODBC connection should be a run of the mill type of assignment, had it not been for one small detail... FoxPro. One of Brandon's main consideratations was exactly that the ODBC connection should be created on the AOS, but the systems requirements for the AOS in the case in question on which the ODBC connection would be created stated that the OS ( Windows Server 2008 ) should be 64-bit, and FoxPro only runs 32-bit and since the AOS instance in AX2009 runs in 64-bit mode - it cannot access the 32-bit FoxPro drivers ( and as far as I could tell there never will be a 64-bit implementation of the ODBC drivers for FoxPro ).

So maintainability aside - I had to distribute the ODBC connection to all clients force the class which handles the code to run on the client. This can be done since the AX2009 client still runs 32-bit ( and in 32-bit mode on 64-bit OS ).

Task completed - but the journey probably would have been longer and more tedious had it not been for Brandon's blog.

Hope my expericences with FoxPro ODBC connection in connection with AX2009 helps someone, just as Brandon's blog helped me.

Happy hacking