Wednesday, April 25, 2012

A Simple Introduction to AX 2012 Services Architecture



Hi there!

I hope that everyone is having a super productive and challenging week.  On this thought, I thought on challenging myself and talk a bit more about the AX 2012 services architecture. Please refer to my post about AX 2012 Services Types for more information on services.

Ok, so what’s new in AX 2012 around services? Well, I have to say that things have change quite a bit for the better as in Ax 2012 we see that Microsoft has expanded the support for WCF beyond the basic HTTP and HTTPS bindings.  In fact, the Microsoft Message Queuing (MSMQ) and BizTalk Server adapters provided in AX 2009 have been removed, but cheer up; Microsoft is providing the same functionality through WCF.

The following diagram depicts the new AX 2012 architecture.



As we can see in the above diagram, the AOS is the WCF service host in AX 2012. This idea extends even further, the services that are hosted by the AOS work both with internal and external applications. So does this mean that we don’t need IIS anymore?

Well, yes and no. If you are planning to have only internal application using the WCF services, then you no longer need IIS. However, if the services are going to be consumed by external application, then you have to host the services on IIS.

Also, it is important to point out that the WCF services in AX 2012 are contained in a single WSDL file. This simplifies the use of services when using visual studio for example. The reason is because we would just need to add one single reference instead of 90, which is cool and smart.

Another cool new architectural change of AX 2012 services are the data contracts, and the business operation framework.

AX 2012 now supports the use of .NET and X++ types as data contracts to use as service operation inputs, and to also return parameters.  The following are the new changes:

o   You can pass complex data types without having to explicitly implement XML serialization and deserialization from them.

o   The data contract serialization and deserialization is now handled by Windows Communication Foundation (WCF).

o   X++ provides support for data contract functionality through the DataContractAttribute and DataMemberAttribute attributes (which I will cover in my next post)

o   Any .NET type that is serializable by WCF can be used as a parameter or return type by a service in Microsoft Dynamics AX 2012.

Another new enhancement of AX 2012 is the Business Operation Framework, which is a service operation exposed from the AOS. Remember that in AX 2009 we would have to use the RunBase batch class to execute AIF calls asynchronously? In AX 2012, we can now use the business operation framework, which support both synchronously and asynchronously operations. In addition, although the RunBase framework is still supported in AX 2012, Microsoft recommends using the new Business Operation Framework instead because it provides a clean separation between the data contract, user interface and the service operation. 


This is all for now and I hope this post can be helpful to you. Please check my blog again later this week as I will be posting how to create services in AX 2012 and consume them from C# this week soon.


Take care!


2 comments:

  1. Hi,

    Thanks for shared you’re thought about AX2012 internal services architecture design.

    I am waiting for your next and new blogs comment for AX2012.

    ReplyDelete
    Replies
    1. Hi,

      No problem! Thanks for reading my blog and YES! This week I will write a bit more about AX 2012 services, so keep in tune :)

      Delete

Thank you for your thoughts. Your comment will appear in my blog shortly after review.

Have a great day!