Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

Опции темы Поиск в этой теме Опции просмотра
Старый 04.10.2007, 05:15   #1  
Blog bot is offline
Blog bot
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Inside Dynamics AX 4.0: Inside the Business Connector

As stated earlier, the Business Connector is a versatile platform component. The Business Connector itself comprises two components: one that provides Microsoft COM interoperability, and another that provides interoperability with the .NET Framework. You should choose the component that is appropriate to the environment in which you are working. Both Business Connector components contain the Dynamics AX kernel and provide a run-time environment for executing X++ code and interacting with other elements in the AOT. This is because virtually the entire Dynamics AX development and run-time environment is based on X++, and the kernel is responsible for interpreting and executing this code.

In below table summarizes the primary characteristics of the two types of Business Connector.

Business Connector Characteristics

As you can see, the Business Connector versions are largely similar, differentiated only by managed HTTP context integration and the programming environment for which each is intended.
The Logical Component Stack
If you divide the .NET Business Connector into its constituent parts, you will see that the following three logic components (illustrated in below image) interoperate to deliver functionality:
  • Managed classes
  • Transition layer
  • Interpreter
The logical component stack in the .NET Business Connector
Managed Classes
The managed classes component is a set of .NET Frameworkbased classes that expose functionality that can be accessed through the .NET Business Connector. It includes the following classes: Axapta, AxaptaBuffer, AxaptaContainer, AxaptaObject, and AxaptaRecord. The purpose of each of these classes is described later in this chapter. If you used the COM Business Connector in the previous version of the application, you will find that the functionality of the managed classes in Dynamics AX 4.0 is mostly equivalent.
The Transition Layer
The transition layer is where the mapping occurs between .NET Framework objects and types and their Dynamics AX equivalents, as part of both request and response processing associated with the use of the Business Connector.
The Interpreter
The interpreter consists of the kernel. Dynamics AX allows code to be executed locally in the Business Connector AX kernel or remotely in the AX kernel of the AOS. The interpreter manages local and remote code execution. It also manages connectivity to the AOS and other infrastructure, such as session management and security.
Run Time
At run time, both types of Business Connector interact with the AOS because the two-tier model is not supported in Dynamics AX 4.0. The diagram in below image depicts the run-time interaction.
The Business Connector run-time interactions
The important interactions among the Business Connector, the AOS, and the AX database are as follows:
  • The Business Connector authenticates against the AOS when the Axapta.Logon() method is called. The credentials passed to the AOS by the Business Connector must correspond to an existing Dynamics AX user, who must be enabled and have the appropriate rights, granted through security keys, to use the Business Connector.
  • The AOS completes the authentication and establishes a session for the Dynamics AX user.
  • Other Business Connector classes and methods are invoked as needed. Data in Dynamics AX can be selected, inserted, updated, and deleted by using the Business Connector through the AOS. In addition, the X++ business logic that resides in the Dynamics AX metadata store, the Application Object Directory (AOD), can be invoked and executed either on the AOS or in the Business Connector itself.
Web Interoperability
The Dynamics AX development environment includes a feature known as the Web framework. The Web framework is used to develop the Web-based functionality in X++, which is then exposed in the Dynamics AX Enterprise Portal (EP). However, Web applications generally must interact with the HTTP context data, which typically includes the request, response, view state, and so forth. The Dynamics AX EP uses the .NET Business Connector to integrate with Dynamics AX, and the .NET Business Connector can interoperate with Internet Information Services (IIS) and Microsoft ASP.NET to provide access to the HTTP context information necessary to enable Web-based functionality. Note that in earlier versions of Dynamics AX, the COM Business Connector integrated with the unmanaged HTTP context as part of the interoperability with Active Server Pages (ASP). This is no longer supported.
The diagram in below image illustrates how Web interoperability works.
.NET Business Connector Web interoperability
Managed Web applications, including the Dynamics AX EP, execute in IIS within an application domain. Upon initialization, the application domain loads and instantiates the .NET Business Connector. The managed application then uses the .NET Business Connector to invoke Dynamics AX Web framework elements, such as Web menu items, Web forms, and Web reports. The X++ code stored in the AOD that defines these elements accesses the HTTP context as needed through the following classes (located in the AOT under System Documentation\Classes):
  • IISApplicationObject
  • IISContextObject
  • IISPostedFile
  • IISReadCookie
  • IISRequest
  • IISRequestDictionary
  • IISResponse
  • IISServer
  • IISSessionObject
  • IISStringList
  • IISVariantDictionary
  • IISViewState
  • IISWriteCookie
For example, you could write an X++ class to retrieve a variable from the HTTP context, which you could then use in another X++ class. In the following code example, the method takes a parameter, which is the name of the HTTP context variable, the value of which will be obtained using IISRequest().
If you want to develop a new, custom Web-enabled application that integrates with Dynamics AX and can access managed HTTP context information, you can use both ASP.NET and the .NET Business Connector. The interoperability among IIS, ASP.NET, and the .NET Business Connector allows you to access HTTP context information from X++ code that is part of your application.
Existing applications developed with the previous version of the COM Business Connector and ASP that accessed the unmanaged HTTP context must be migrated to ASP.NET to successfully run with Dynamics AX 4.0.
A significant amount of effort has been expended on enhancing security within Dynamics AX 4.0. This section highlights the security mechanisms in place for the Business Connector.
Microsoft Windows authentication is implemented throughout Dynamics AX 4.0, and this change is reflected in both types of Business Connector. The COM interface (COM Business Connector) and the managed classes (.NET Business Connector) have been refactored to accommodate parameters that are specific to Windows authentication.
The Business Connector has an associated set of Dynamics AX security keys that control access to different parts of the Business Connector functionality. In below table describes these security keys.
Dynamics AX Security Keys
These keys can be browsed in the Data Dictionary under Security Keys. You can control the use of the Business Connector in different user groups in Dynamics AX by configuring these security keys.

Code Access Security

Code Access Security (CAS) is a new feature in Dynamics AX 4.0. CAS is a mechanism intended to help Dynamics AX developers write code that invokes protected X++ APIs in a manner that minimizes the potential for malicious exploitation of these APIs. A protected API is an X++ API method that has been secured by using CAS. It also ensures that the protected APIs are executed only on the AOS, not on the Dynamics AX client or the Business Connector. CAS therefore restricts the X++ APIs that can be executed locally in the Business Connector. If such an attempt is made, a CAS exception is returned.</img> </img> </img> </img> </img>

Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
jinx: Microsoft Dynamics AX - Der COM Business Connector wird in zukünftigen Versionen nicht mehr unterstützt Blog bot DAX auf Deutsch 0 03.03.2009 03:08
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Inside Dynamics AX 4.0: Working with the .NET Business Connector Blog bot DAX Blogs 0 04.10.2007 05:15
Inside Dynamics AX 4.0: Usage Scenarios Blog bot DAX Blogs 0 04.10.2007 05:15
Inside Dynamics AX 4.0: The Business Connector Blog bot DAX Blogs 0 02.10.2007 04:49
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Часовой пояс GMT +3, время: 17:52.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.