DataSnap "Simple Calculator" REST demo
It was so much fun to create one of the "Developer Skills Sprint" sessions last week.
During the live Q'n'A session I have promised to make the source code of my DataSnap "Simple Calculator" REST server and client projects available.
Here it is! It is now available from the Code Central at http://cc.embarcadero.com/item/29915
A few years ago, back in the Delphi XE time frame, I have created a series of DataSnap "Delphi Labs". The source code of these Delphi Labs has been updated to Delphi XE3. But the technology does not stand still. I do not think anymore that it makes sense to make just the cosmetic adjustments to these examples. In fact these demos need a major upgrade to use the latest technologies and best practices.
- Server architecture. For performance reasons it is best to implement DataSnap servers as web applications and deploy to a web server. Instead of "DataSnap Server" wizard, use "DataSnap REST Application" or "DataSnap WebBroker Application".
- Communication Protocol. In the world of highly disconnected apps the best communication protocol is standard HTTP or HTTPS.
- Security. On top of HTTPS transport security, make sure to use encryption filters and role-based authentication and authorisation.
- Client Connectivity. Instead of using "DBX" use "REST". There are two wizards for creating client-side proxy classes: "DataSnap Client Module" and "DataSnap REST Client Module". The first one is based on the DBExpress technology and uses "TSQLConnection" component for connectivity. Don't use it. Use the second, REST-based wizard, that generates REST-style client proxies and uses "TDSRESTConnection" component for connectivity.
The "Simple Calculator REST" demo is the new generation version of my first "Delphi Lab" and covers the basics of creating DataSnap server and client projects.
The second historical demo in the "Delphi Labs" session was about creating multi-tier database applications with DataSnap. The new generation version of this demo is in the works and will be presented this Wednesday, August 20th, during my global "Build Modern Apps with Enterprise Mobility Services" webinar. I'm going to move away from deprecated IAppServer interface and use FireDAC JSON Reflection framework for creating new generation multi-tier database applications.
See you online! In the meantime make sure to register for the webinar!
Tags: DataSnap DataSnap DBX Delphi Delphi Delphi Labs Delphi Labs Delphi Programming Delphi XE6 Enterprise Events InterBase iOS iPhone News Object Pascal RAD Studio RAD Studio XE6 REST skill-sprints source-code XE6 XE6
Please login first in order for you to submit comments
- Page :
Thanks for the excellent Delphi DataSnap / REST tutorials!