2

Could you give me a tip on how can implement a rest webserver using just webbroker?

I know newer versions of delphi has this REST/JSON/DATASNAP features, but i´m stuck with BDS2006.

Basically i need to interact with other application and the guys are asking me to make this webserver application and provide just five methods over the internet/vpn. Don´t need to be running inside IIS or Apache.

I´ve googled a lot but the answers always point to 2010 and up versions. All that readings lead me to use the webappdebug template make some actions and respond to GET/POST/PUT/DELETE with some JSON objects.

The problem is ... I´m not well versed with webbroker, how can i achive this?

THANKS IN ADVANCE, ANY HELP WILL BE WELLCOME.

José Eduardo
  • 323
  • 1
  • 5
  • 16

1 Answers1

3

Our full RESTful Client-Server framework is availble, including an ORM (and much more), named mORMot.

It is an Open Source project, running from Delphi 6 up to XE2 - so it will work with Delphi 2006 (I've tested it with Delphi 7 and 2007 so I do not see any reason why BDS 2006 would fail).

It is able to serve Objects and Services (just like DataSnap) using JSON, in a secured (using per URL authentication) RESTful protocol.

It is able to use any Database engine back-end, with a SQLite3 kernel. You can even use without any database layer at all (that is without SQLite3), if you need only the RESTful services and in-memory objects feature (you can persist the objects with JSON or in binary format, but you won't be able to use advanced features like cross-table search).

More than 700 pages of documentation available.

For HTTP/1.1 communication, it is not based on WebBroker (nor IIS, nor Apache), but it will use directly the high-speed http.sys kernel-mode service.

Arnaud Bouchez
  • 42,305
  • 3
  • 71
  • 159
  • While the products you mention are open source and not commercial, it might be nice to mention your involvement? I know it is in your profile, but I feel it would be good to mention your "bias" when you recommend these products in an answer as well? ( http://meta.stackexchange.com/questions/10174/using-so-sf-su-to-promote-your-products ) – Marjan Venema Nov 10 '11 at 20:22
  • 1
    @MarjanVenema It would be unfair if it is the reason why it may be down-voted. – Arnaud Bouchez Nov 11 '11 at 06:17
  • I agree (and fortunately it hasn't yet...) – Marjan Venema Nov 11 '11 at 06:56
  • I'll probably implement soon a full interface-based service implementation, in addition to the current published method-based feature documented above. – Arnaud Bouchez Nov 11 '11 at 08:09
  • @Arnaud I don´t want to go for a full framework with all the bells and whistles. I will read the docs and check if it fits, if i dont get any "simple ways to do this" answers, i will accept yours. THANKS. – José Eduardo Nov 11 '11 at 11:08
  • 1
    @JoséEduardo You can use just SynCommons, SynCrtSock and SQLite3Commons units to implement a RESTful service. You do not need the SQLite3 dependency or to use the ORM. See [this sample code folder](http://synopse.info/fossil/dir?ci=5674fa99036c1fd7&name=SQLite3/Samples/06+-+Remote+JSON+REST+Service) for a custom implementation. You'll find out it has no bells and whistles - just a few lines of code to implement a RESTful CLient-Server Service. It sounds like a "simple way to do this". And consider that authentication is even better here than with DataSnap. – Arnaud Bouchez Nov 12 '11 at 10:07
  • @MarjanVenema Arnaud specifically started the note with "Our..". Do you think that addresses his involvement? I don't see a problem unless I'm missing something. Thanks – LMSingh Feb 20 '14 at 17:40
  • @LMSingh: Perhaps, but not in a very obvious way. Why are you bothered enough to ask more than two years after the answer was posted and even Arnaud wasn't fussed about it? – Marjan Venema Feb 20 '14 at 18:28
  • @MarjanVenema I was making an observation while asking if I missed something. So I'm not sure where you're picking up that "I'm bothered" or that there's any type of "fuss"?? Can you clarify? – LMSingh Feb 26 '14 at 06:20