Dynamic list of properties versus explicit properties

With messaging APIs, you can retrieve a list of properties dynamicly or by specific property name.  For example with WebDAV, ALLPROPS will return a set of properties on a item.  There are issues with trying to get a full list of properties.  First of all, ALLPROPS does not equate to all properties.  In fact, you will only get a set of properties back and its not going to be nearly all of them.  Whats going on?  Well, lets break this down...  Actually, lets cover more important things before explaining why. 

Why do people usually want a list of all properties on an item?  Well, its often to see what is set.  That is, they are exploring what is set on an item.  They do this to see what is avialable to work with or to check-out what an item is.  This is a needed thing for doing just these things.   You can get a good list (most everything you would wnat to work with) with an API like webdav is you write the XML for the propfind carefully, however a true list of all properties being provided dynamicly is just not going to happen. 

Now, in a production applicaiton you should avoid trying to generate a list of all properties dynamicly.  Why? 

First of all, for some APIs such as WebDAV and Exoledb (which is used in event sinks), your applicaiton will break if there are issues with the Exchange Schema.  Some third party applicaitons do modify the schema for thier own use.  If the shema gets damaged, you may not get back the properties your applications expect if you are getting a dynamic list of properties - thats because these dynamic lists go off the Exchange Schema.  If you want to avoid this from happening, then you need to specify each property you are going going to work with.

Second, dynamic lists of properties can be very expensive as far as resource usage and time.  Getting back a full list can be quite taxing on an Exchange Server.  Asking for the properties you need explicitly will be far more efficient.

Exchange Web Services (EWS) and MAPI won't run into issues if there are problems with the Exchange Web Store Schema.   Even a tool as powerful as MFCMAPI specifies the properties it wants back explictly.  EWS only returns a list of basic properties if you ask for all properties - thats because a full list will result in a significant hit on the Exchange server, not to mention the aspect of martialing all that data back.

Again: Unless you are writting some sort of property exploration tool, you should not be trying to get a a large dynamcily generated list of properties back.

If your interested in seeing the code for MFCMAPI, please check it out at: http://codeplex.com/mfcmapi


Comments (2)

  1. Actually – MFCMAPI asks the server for the list of props to fetch (GetPropList or GetProps with a NULL parameter).

  2. Webdav101 says:

    OK, I stand corrected – Mr Griffin is a master of all things MAPI and the author of MFC MAPI.


Skip to main content