DataSnap "CUSTOMERS" FireDAC JSON Reflection Demo Code

Posted by on in Blogs


My "RAD in Action: Build Modern Apps with Enterprise Mobility Services" webinar is happening right now. During my 50 minutes session I'm demonstrating using DataSnap framework for building multi-tier database application with FireDAC JSON Reflection framework. That's very powerful and very easy to code.



During the demo I have illustrated the following best practices:

  • InterBase „EMPLOYEE” sample database

  • FireDAC database access components

  • DataSnap server deployed to a web server

  • Secure HTTPS communication

  • Role-based Authentication and Authorization

  • DataSnap REST Client Module and Proxies

  • FireDAC In-Memory Database Tables

  • Visual LiveBindings for connecting UI to data

  • FireMonkey Mobile iOS/Android Client


During the session I have promised to make the source code of the demo available, so here it is! I have uploaded "Customers" demo source code to Code Central here: http://cc.embarcadero.com/item/29916.


About
Gold User, Rank: 9, Points: 364
Crazy about Delphi Programming!

Comments

  • Alain V3239
    Alain V3239 Sunday, 28 December 2014

    A way to resolve this error is to change the SessionLifeTime attribute of the TDSRESTWebDispatcher for TimeOut to Request.

  • Alain V3239
    Alain V3239 Wednesday, 17 December 2014

    Hi Pawel,

    Nice works, it give me taste to move further with REST/JSON technologies !

    But I’ve an issues: when the user is not using the application for a while, then, the user try to hit the refresh button again (after a while), it receive an [ HTTP/1.1 403 Session has expired ] error. Another way to reproduce this error is when the client is connected and have hit the refresh button once, stop and restart the server, then try to hit refresh again on the client and you will got the error.

    I’ve gloogled to find information and it seem not documented. It’s not related to a platform or version has I can reproduce this error with client in Win32/64, OSX, iOS and Android.

    For what I know, if the client have not invoked the server (at least once), you can stop and restart the server whitout unespected effect.

    I’ve also tried to change the lifecycle of the DataSnap Server Class to Invocation instead of session with no effect.

    Maybe it’s the logical in the client that is wrong, I do not see any place where the session with the server is created (and destroyed), In usual Datasnap, we have to establish (and liberate) connection.

    I could not see in the sample project where the connection is established. Is it automated by the TDSRESTConnection ?

    I think it will be usefull for users to have more information about REST Mechanism.

    In resume, what is your oppinion on how we can avoid the [ HTTP/1.1 403 Session has expired ] error ?

    Regards,

    Alain.

  • Paweł Głowacki
    Paweł Głowacki Friday, 12 September 2014

    Hi Godfrey,
    The replay is on youtube at https://www.youtube.com/watch?v=SzU44UwKg7I
    best regards,
    Pawel

  • GodfreyF
    GodfreyF Thursday, 11 September 2014

    Hi Pawel

    Where can I find the replay fro this webinar?

    Thanks

  • Guest
    Keith Tolbert Wednesday, 20 August 2014

    Great presentation Pawel!

    Thanks for the code.

    Keep up the good work.

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: