What makes this approach great is that it is simple to implement:
- Create a DataSnap Server
- Create a VCL Form application
- Add the 3 DataSnap Server components
- Connect the Server components
- Add a ServerModule (this is where the developer exposes business logic and data from the backend storage)
- Connect the ServerModule to the Server components for the wire protocol and transfer of information
- Create a client (generic client)
- Create a VCL form application, Web application, ASP.NET (Prism) application
- Drop a TSQLConnection component
- Set the connection properties (3 in all)
- Right-mouse click on the TSQLConnection and generate Client Proxy
- Use Proxy to connect to the remote server and call logic at will
- Expose information on client
This is a nine minute demo with explanations, 5 without… at best and IMO, it is the fastest multi-tier approach out there compared to JEE, CORBA, RMI, COM/DCOM, or plain old RPC.
This approach isolates the database layer to the middle tier; there is no reason for the client to know that you are even connecting to a backend database. The exposure of business logic is as simple as writing public functions and the building of the actual server is a form and three (3) components. There are no 7 helper files like with Java’s EJB, or 3 helper files with CORBA, or IDL/RIDL with COM/DCOM, and you surely don’t have to define each side of the communication like with RPC.
So there must be a downside to the technology… there always is… isn’t there? As far as I can see today, there are no advert downsides. There is no royalty to use it, it is simple to understand, it helps to reduce database connections, it very fast, it scales well, and it uses open protocols. What is not to like?
Now could there be more features added or could it even become simpler to use in future releases of the feature/functionality? Sure, but then again, if you are a diehard Delphi/C++Builder developer you already know that we don’t rest on the past implementation we are always trying to push the technology to the next level.
This leads to the next item; I’m going to be publishing the roadmap for RAD Studio very soon and also an audio recording of the presentation. There will be more details about where the technology of DataSnap is going in the future and should give every Delphi/C++Builder/Prism developer some great piece of mind to see the investment being put into our beloved product with Embarcadero!