Delphi serverside framework for managing sessions and respond with JSON to ajax requests?

后端 未结 6 1626
梦谈多话
梦谈多话 2020-12-28 09:33

Without reinventing the wheel, what I can use to manage user sessions in a web application and being able to respond with JSON to ajax requests?

Is there some framew

相关标签:
6条回答
  • 2020-12-28 09:39

    DelphiMVCFramework does this

    Some notable features:

    • RESTful (RMM Level 3) compliant
    • Can be used in load balanced environment using Redis (http://Redis.io) [dev]
    • Fancy URL with parameter mappings
    • Specialied renders to generate text, html, JSON
    • Powerful mapper to map json to objects and datasets to objects
    • Can be packaged as stand alone server, apache module (XE6, XE7, XE8) and ISAPI dll
    • Integrated RESTClient Works with XE3, XE4, XE5, XE6, XE7 and XE8 Completely unit tested
    • There is a sample for each functionlities
    • There is a complete set of trainings about it, but the samples are included in the project Experimental support for IOCP [dev]
    • Server side generated pages using eLua (Embedded Lua) [removed soon]
    • Specific trainings are available (ask me for a date and a place)
    • Messaging extension using STOMP (beta)
    • Community driven (Facebook group https://www.facebook.com/groups/delphimvcframework)
    • Simple and documented
    • There are books that talk about the framework

    Project web site: https://github.com/danieleteti/delphimvcframework

    N.B. I'm the main developer

    0 讨论(0)
  • 2020-12-28 09:49

    Daraja HTTP Framework, which uses Indy internally and adds a high level API for "web application contexts" and request mappings, loosely inspired by the Servlet API.

    If you already have experience with TIdHTTPServer, you can directly access and adjust the server component according to your needs.

    For JSON, you may use the built-in JSON support in newer Delphi versions or a third-party library (e.g. JsonDataObjects).

    Disclaimer: I am the developer of the framework

    0 讨论(0)
  • 2020-12-28 09:54

    Maybe this can help you:

    REST Servers in Delphi XE Using DataSnap Whitepaper

    Learn how to build REST servers using features available in Delphi XE, how to extend them with extra Delphi support code and how to take advantage of the jQuery library.

    Marco Cantù

    http://app.en25.com/e/er.aspx?s=608&lid=4414&elq=d428643420d2494581299418d9753feb

    0 讨论(0)
  • 2020-12-28 09:54

    I would suggest Delphi on Rails, it is an open source REST/MVC/StateLess web framework.

    http://code.google.com/p/delphionrails/

    It use:

    • superobject JSON parser
    • UIB/Firebird JSON driver
    • Cairo for SVG, PDF, PNG rendering
    • LUA for scripting/template ...

    It is able to serialize automatically Delphi data structures to JSON using the new RTTI introduced in Delphi 2010 & XE.

    0 讨论(0)
  • 2020-12-28 09:55

    You can take a look at our Synopse SQLite3 Framework, which was just updated to version 1.11.

    It serves the data in pure JSON, ready to be used in any AJAX application.

    You can also easily create Services, more precisely Client-Server JSON RESTful Services. In this case, you can even not use SQLite3 for your data storage.

    This framework is pure Open Source, compiles/run/is tested for Delphi 6 up to XE, is Unicode ready for all versions of Delphi (it uses UTF-8 internally).

    By using this framework, you could be able to create easily also Delphi clients, using JSON data from the same server.

    There is no internal User session handling yet. Because there are several way of implementing them, and, since our framework is RESTful, it's therefore stateless: no session is needed.

    If you need it, I could easily add HTTP sessions using Cookies. What about the User authentication you are expecting?

    0 讨论(0)
  • 2020-12-28 10:00

    I would recommend Super Object Toolkit.

    http://www.progdigy.com

    Example Code:

    procedure Share(ARequestInfo: TIdHTTPRequestInfo)
    var
    ReturnObject: ISuperObject;
    begin
      ReturnObject := SO();
      ReturnObject.B['success'] := false;
    
      AResponseInfo.ContentType := 'application/json';
      AResponseInfo.ContentText := ReturnObject.AsJSon();
    end;
    
    0 讨论(0)
提交回复
热议问题