📜 ⬆️ ⬇️

Microsoft Exchange Server Development Basics

Every day at the TechNet Microsoft forum there are new questions concerning the development for Exchange \ Exchange Online. Actual today are two methods of development: using web services (EWS Exchange and others) and without using them. In this article we will consider both options and denote their pros and cons.



I give the word to the author.
')
Microsoft Exchange Server is a server software product for messaging and collaboration. Exchange provides not just a very powerful e-mail messaging system, but a qualitatively more extensive range of functionality. In addition to the mail server function, Exchange can be used to exchange documents, create shared calendars, exchange voice messages and much more. More information about Exchange Server can be found on the website .

The product history is described in more detail by reference .

In today's dynamically changing world, it is very important to be afloat. Requirements for the product that the company will use may not be supported by the manufacturer. Security service often puts unsolvable problems.

The main objectives for the development of the following:

  1. Fulfillment of requirements-restrictions
  2. Providing new functionality, often at the junction of several products (for example, automatic assignment or redirection of requests to ServiceDesk via mail)
  3. Providing another interface (e.g. mobile app)

Exchange development methods have been from the very first version of the product. They changed, refined, changed and died out.



To date, the main development methods are conducted using the EWS Exchange, REST API and other web and non-web services.

You can read about migration from old development methods to newer ones here .

In the meantime, let's talk a little more about each of them.

EWS Development


EWS Exchange and other web services allow you to access mailbox data in Exchange Online or in the local version of Exchange, starting with Exchange Server 2007. Provide the ability to create custom or server applications with direct access to user data.

There are several such technologies at the moment:


EWS is a comprehensive service that applications can use to access virtually all data stored in the mailbox of the on-premises version of Exchange or Exchange Online in Office 365. To provide access to the Exchange Server, EWS uses standard web protocols. Libraries such as the EWS Managed API allow you to convert EWS operations to provide an object-oriented interface.

EWS operations can be invoked from any operating system and using any language, because EAP uses the SOAP protocol when processing requests and responses. An important component of the code is the XML code that is used to create EWS requests and return XML responses from the server.

The Managed API EWS is now available as an open source project on GitHub .

With the open source library you can:


The Microsoft website has a set of 101 sample code so that you can understand how the service and programming capabilities work.

The Autodiscover service provides configuration information that an application uses to create a connection to an Exchange server. You can use the Autodiscover SOAP service to send messages between the client application and the Exchange server to determine the parameters that the application will use to connect to Exchange. The Autodiscover SOAP service (as opposed to Autodiscover POX) provides batch Autodiscover setup requests and more detailed control over which parameters are returned in response. Autodiscover SOAP is a more modern version and it is recommended to use it.

REST APIs (mail, calendars, and contacts APIs) simplify Exchange programming by providing familiar open-source syntax (for example, support for open standards JSON, OAUTH, ODATA) and flexibility (for example, granular access to user data). These APIs allow developers to connect from any platform, be it a website, PC or mobile client. SDKs exist for .NET, iOS, Android, NodeJS, Ruby, Python, Cordova, and CORS for use in single-page JavaScript web applications.

This provides the following benefits:


For more information on development using web services, please refer here .

Develop Without Exchange Web Services


Development without using web services or with minimal use can be divided into several areas:


You implement transport agents that are registered for events and then actions are taken when this event is triggered. Each of the three types of agents (SmtpReceiveAgent, RoutingAgent, DeliveryAgent) can be registered for a different set of events.

The following figure shows where in the transport pipeline transport agents can register for events.



When a message enters the transport pipeline, the transport agent received from the SmtpReceiveAgent class can affect the message during any of the SMTP events for which the agent is registered. An agent derived from the RoutingAgent class can act on any of the four classifier events for which it has registered. An agent derived from the DeliveryAgent class can affect the message during any of the delivery events for which it has registered.

The Exchange Management Shell provides a rich set of commands on Windows PowerShell to manage Exchange Online or the local version of Exchange, starting with Exchange 2013. You can use the Exchange Management Shell to create two kinds of tools: command line scripts that work in Windows PowerShell and tools that use the Exchange Management Shell cmdlets through a managed interface. You can use managed applications to create a standard Windows user interface or a web interface for administering the Exchange server.

As an example of such an application, you can see the GUI interface for migrating data to the cloud by reference .

Exchange ActiveSync is designed to directly synchronize mobile devices with Exchange, including lightweight clients such as Windows 8 Mail and Calendar, which can be used in mobile scenarios. Exchange ActiveSync is optimized for low-bandwidth applications, such as messaging applications that run on mobile devices. The enhancements to the Exchange ActiveSync protocol primarily support stability and reliability for mobile device scenarios. ActiveSync open protocol, more information about it can be viewed at the link .

If you go to google play and type Exchange activesync in the search, you will get more than 100 results of applications written for Exchange using activesync.
Despite the fact that almost every phone has AS support built in, most customers want to extend its functionality with things like two-factor authentication, containers, etc.

For large firms, it is important to have high data availability, process organization and the ability to plan accurately. In this regard, the software market has a huge number of applications that provide similar functionality. For directions, for example, more than a hundred mail archiving utilities, you can view information on the largest companies on the Magic Quadrant for Enterprise Information Archiving page.

In addition, for each software, its own programming languages ​​and implementation methods are selected. Companies can use many of the opportunities provided to build the architecture and application principles. For example, for backup and restore utilities, there is a section on MSDN that describes in detail all the processes by reference .

Also, for many services and processes, there are additional APIs for writing programs in C / C ++ for more focused queries and programs. For example, for ESE can be viewed by reference .

It is up to each company to program or not to program, but it is worth recognizing that Exchange has tremendous possibilities for expanding the functionality and provides all the means for this.

about the author


Mikhail Sartaev is a systems architect in the IT Group. Is the current MVP in the direction of Office Servers and Services. Engaged in the implementation of solutions for unified communications. You can also read Michael’s articles on a wordpress blog .

Source: https://habr.com/ru/post/353550/


All Articles