Database Changes for XE2

From RAD Studio XE2
Jump to: navigation, search

Go Up to What's New in Delphi and C++Builder XE2

The new features and improvements for database and DataSnap are listed below in their separate categories.

dbExpress Changes

Important: In order to run, debug, or deploy a cross-platform database application (such as dbExpress), first you need to deploy the appropriate drivers to the target platform using the Deployment Manager - Add Featured Files dialog box. This requirement applies to Mac OS X applications and to remote Windows 64-bit applications alike, and is in addition to the requirement for using the Platform Assistant and a remote profile for Mac OS X and remote Windows 64-bit applications. For more information, see Cross-Platform Database Applications.

DataSnap Changes

  • New DataSnap Azure API (Data.Cloud.AzureAPI.pas); the preexisting DataSnap Azure unit (DSAzure.pas) is now being deprecated.
  • New units supporting Cloud computing:
    • Data.Cloud.AmazonAPI.pas
    • Data.Cloud.AzureAPI.pas
    • Data.Cloud.CloudAPI.pas
  • New Deployment Manager
  • New DataSnap Connectors for Mobile Devices:
  • DataSnap now supports RTTI when designing C++Builder Applications.
  • DataSnap supports cross-platform application development:
    • DataSnap clients are supported on both the Windows 64-bit and the Mac OS X platforms.
    • DataSnap servers are supported on the Windows 64-bit platform, but not on Mac OS X.
  • DataSnap REST servers support multiple callback tunnels. Previously, if a REST client created multiple client channels using the same session ID, only the last one would be in a correct state on the server. This became a problem when trying to close a channel, for instance, and was also prone to memory leaks. Now a session can contain any number of channels.
  • DataSnap supports session events for the TCP/IP protocol. You can now be notified when a TCP/IP connection creates or closes a session.
  • Support for HTTPS in DataSnap Server Wizard and DataSnap WebBroker Application Wizard. This is great because:
    • Now the server does not have to be running in IIS to have HTTPS support (as it was before).
    • You can avoid the complexity and the overhead of IIS.
  • Two new filters are now available in the New DataSnap Wizards (DataSnap Server Wizard, DataSnap WebBroker Application Wizard, DataSnap REST Application Wizard):
    • Compression filter
    • Encryption filter
  • DataSnap Server Wizard now has a JavaScript files option that will add the REST JavaScript framework files to your project and will also add components required for JavaScript proxy generation.
  • Improvements have been brought to the JavaScript sessions. These improvements include:
    • Better session management. Read more in the JavaScript client Sessions topic.
    • Now there are two REST JavaScript files, a regular one and a small one. The small version contains no comments, and the internal variable names are shortened. This allows for a much smaller file size, and faster downloading of the files to clients.
  • Now a DataSnap server has the ability to terminate a socket connection. This means that:
    • You can collect a list of TCP/IP connections and choose at any time to disconnect one of them. This provides a level of connection management that was not previously supported. If someone is abusing the system, or if they have lost the connection and KeepAlive is disabled, a server administrator can easily manage the connections, freeing resources on the server, preventing any abusive uses, or both.
    • You can combine this feature with the Authentication Manager to prevent thrashing the server. With the Authentication Manager, you can keep track of how many requests one is making at a given time interval, and, if they are sending too many, you can choose to disconnect them.
  • DataSnap offers KeepAlive support for TCP/IP transport component. This way you are allowed to know when a client abruptly loses connection, which allows to write Applications that better monitor and manage client connections. See Monitoring and Controlling DataSnap TCP/IP Connections for more information.
  • DataSnap supports communication timeout for the HTTP protocol. This is done through a property that can be set to specify the maximum amount of time allowed for an HTTP request, before it times out and returns an error to the user.
  • DataSnap now supports heavyweight callback broadcasting to specific callbacks. In this way, each callback on the client side can listen to a different server channel, which would make it easier to implement portlets, for instance.
  • Now there is support for callback channel events for both server and clients. This means that:
    • You can register a listener on the server to be notified when callback channels are registered/closed and when callbacks are added or removed. This allows for easy programming of server applications, which are aware of heavyweight callbacks registered with them.
    • You can combine this feature with other features to manage connected users and their callbacks.
  • Now a TDSRoleItem has an Exclude list. This makes it easier to:
    • Include all methods of a server method class, except for one or a few.
    • Manage role collections when adding or removing server methods.
  • DataSnap allows changing of JSON result format in REST calls. This means that:
    • You can now modify the JSON that is returned to clients to be in any JSON format, like jQuery, for instance.
    • You can now integrate with jQuery and other frameworks that make use of JSON.
  • DataSnap allows query parameters in REST calls and the ability to store them. This means that:
    • You can integrate with jQuery.
    • You can pass any query parameter (part of a URL, after a "?" character) to server methods.
    • You require the jqGrid plugin for jQuery.