Tuesday, June 5, 2012

"Microsoft Dynamics AX 2012 Development Cookbook" review

Mindaugas Pocius has updated his development cookbook for AX 2009 to this “Microsoft Dynamics AX 2012 Development Cookbook”.
The book gives you detailed recipes for solving common development tasks such as importing data to journals or creating and posting sales and purchase orders.

Each chapter contains an introduction of the tasks covered, the detailed solution and a detailed explanation of how the solutions works. Many chapters also holds a section where the solution is either tweaked a bit or expanded to do more. Accompanied with lots of screen clips you'll never feel lost while working with any of these recipies.

Chapter 1 is about processing data. It's on of the more diverse chapters. It covers tasks like creating new number sequences, adding document handling notes, building query objects, executing direct SQL, working directly with XML files,  using the date effective feature and more. 

I don't think executing direct SQL can be considered an everyday task. I would have preferred more about regular AX queries in stead. But the explanation itself of direct SQL is all right. 

I'm very happy that there's an example on how to enhance the data consistency check. Many developers are not aware of the existence of these checks.

Chapter 2 is all about forms, or nearly all about forms. I'm missing stuff about list pages and security on forms. This chapter doesn't seem to changed much from the previous book.

The chapter covers however important areas, such as how to create dialogs, handle dialog events, build dynamic forms, add form splitters, create modal forms, store usage data, use tree controls and more. 

Chapter 3 is about working with data in forms. It covers areas like using a number sequence handler, creating custom filters, building selected/available lists, preloading images, creating wizards, processing multiple records, coloring records and more. Personally I loath colored records. I prefer other indicators on the lines, such as icons. I don't agree with the author that the colored records makes the system more intuitive and user friendly. 

With the new  checkbox interface for selecting several records, I hope to see more solutions where users are able to work with several records at a time. And I hope that this section for the next book will be expanded to also explain the client/server issues you could get yourself into, if users selects many records and your business logic is executed on the server-tier as it should. 

Chapter 4 is an entire chapter devoted to building lookups. These are automatic lookups, dynamic lookups, form based lookups, tree lookups and more. I can't really think of a lookup type that is not covered. Excellent chapter.

Chapter 5 is called "Processing business tasks" and covers a variety of AX module related business tasks. This is the only chapter you can say is really about module functionality. It covers good ground about using the new segmented entry control, creating journals of different types, creating and posting ledger vouchers, creating and posting sales and purchase orders and more. I think this chapter really hits the nail on the most common, or unavoidable, business tasks you will encounter as an AX developer.

Chapter 6 is about integration with Microsoft Office. It explains, with good examples, how you can work with Excel, Word, and Project files. And it also explains how to send e-mail using Outlook. In relation to Outlook, I would have liked to see some information about the possibilities for getting rid of the dreaded "A program is trying to send an e-mail message on your behalf...." dialog. That's the first thing a user will complain about when implementing a solution where Outlook is used to send e-mail from AX. 
Also I'm missing just a little information about the new service based integration with Excel, even though it might not be directly considered a development task. At some point you will most likely be asked to debug it though.

Chapter 7 covers services; system query services, metadata services, document services, enhanced document  services, custom services and external services. If you need to work with services, you can learn a lot from this chapter.
Chapter 8 is about improving development efficiency and covers stuff like creating editor templates, modifying the Personalization form, modifying the application version and more. This a chapter I'd might have replaced with something else, if I only had a certain number of pages for the book. 

I'm glad however to read the stuff about modifying the application version. I have seen this done wrong, in ways that choke AX's upgrade algorithms, so many times. 

Chapter 9 is about improving the performance of the product. It's an all right chapter, but I might have sacrificed the previous chapter to make more room for this chapter. It explains how to calculate code execution time, write efficient SQL statements, caching display methods, using the Dynamics AX Trace Parser and the SQL Server Database Engine Tuning Advisor. 

I would have liked to see more about reducing client/server chattiness through RPC. If you have too many calls back and forth or move to much data between server and client, it doesn't really matter much how efficient your SQL statements are.

You could always ask for more in a book like this, but for a book of this size the content is well prioritized. I would however suggest that Mindaugas for the next book maybe hook of with some co-writers in order add a few hundred pages more. 

Some of the areas I'm missing recipes about is:
.NET CLR Interop
Writing code in .NET with Visual Studio
Enterprise Portal

The book is well worth the money and if you have it I'm sure you'll be using it regularly, cutting off time from your development projects.

Read more and order the book here: