16

I'm toying around with Delphi. Most of my desktop development is done in .Net, and embedded systems with C. I've done some web development in RoR & Python (Django, CherryPy) I am interested in taking a crack at a project that would be a web service (REST or SOAP) with a native client and a web client.

Because I've recently been re-inspired to learn Delphi, I'm curious what the options are to build the web service and web client with Delphi. Most of the Delphi documentation is a little dated but so far I've found these choices:

  • DataSnap
  • WebSnap
  • WebBroker
  • IntraWeb
  • Data Abstract and RemObjects SDK from RemObjects

I get the impression that WebSnap is dead, but the other technologies are still being developed. Is there any guidance about which technology to investigate?

p.s. I realize that Delphi isn't a wildly popular choice for web development, but I'm curious to try since I've been having fun learning the VCL.

gbc
  • 8,455
  • 6
  • 35
  • 30
  • DataSnap and Data Abstract are data access frameworks rather than web development frameworks. You could use them inside an Intraweb, WebBroker or WebSnap application but they don't give you web specific features as such. – LachlanG Dec 04 '10 at 22:03
  • Am I correct in thinking that DataSnap and/or DataAbstract would be capable of building a web service though? It appeared that DataSnap was advertised as a framework for building REST services, but perhaps I misunderstood. If so, it seems like those would fill the service side of my project. – gbc Dec 04 '10 at 22:10
  • similar question: http://stackoverflow.com/questions/3793112/what-web-application-framework-for-delphi-is-recommended – mjn Dec 04 '10 at 22:16
  • @mjustin: yes, I read that question first, but it didn't directly address DataSnap, WebBroker, WebSnap (though Intraweb was discussed). It seemed to focus around classic web frameworks rather than web service with multiple clients. – gbc Dec 04 '10 at 22:23
  • 1
    DataSnap and RemObjects SDK both offer remoting. Data Abstract includes the RemObjects SDK as part of it so yes, it does web services too. – LachlanG Dec 05 '10 at 07:46
  • If you want to use the same desktop visual programming aprouch, you could check UniGUI. It's the best RIA framework for Delphi, by far! – NaN Dec 09 '15 at 15:28

9 Answers9

7

You could perhaps add our Synopse SQLite3 Framework to your list.

There is some interresting features:

  • ORM approach to manage your data (i.e. define and access your data as regular Delphi classes), on both Server and Client Side - similar to ActiveRecord in RoR ;) ;
  • Multi-tier architectured;
  • no database or dll to deploy (uses embedded SQLite, without any external dll) - you can even not use SQLite, but a simple and fast in-memory database written in pure Delphi (I've begun a fork of Zeos, to be database independent);
  • Very optimized HTTP/1.1 multi-threaded Server (but you can communicate via other protocols, or even purely locally within the same process, without any Client/Server);
  • Data transmission uses standard JSON, so you can receive the same data in either a Delphi client, either an AJAX client;
  • Client/Server is RESTful and written in very optimized Delphi code (some part were even written in asm after profiling, for speed and low memory use);
  • Can also be used to define DataSnap-like Client-Server JSON RESTful Services, if the RESTful approach is not enough for you;
  • Full Open Source, compiles and work from Delphi 6 up to XE (with full Unicode support for all versions, because it's based on UTF-8 from the engine core).
Arnaud Bouchez
  • 42,305
  • 3
  • 71
  • 159
  • I will definitely look at this. Thanks for pointing it out, it's another framework that I hadn't heard of. – gbc Dec 06 '10 at 13:02
  • 1
    Update: a lot of work since this time. You can define services via interfaces. And you can use any DB layers (MS SQL, Oracle, OleDB). See http://mormot.net - it has changed its name to mORMot, since it it is not limited to SQLite3 now. – Arnaud Bouchez Jun 18 '12 at 06:50
6

Web Service Toolkit is a web services package for FPC, Lazarus and Delphi; “Web Service Toolkit” is meant to ease web services consumption and creation by FPC, Lazarus and Delphi users. Better check out from svn as the 0.5 release is actualy outdated.

mjn
  • 36,362
  • 28
  • 176
  • 378
5

DelphiMVCFramework is a powerful RESTful framework used also for website development https://github.com/danieleteti/delphimvcframework

DMVCFramework features

  • RESTful (RMM Level 3) compliant
  • Fancy URL with parameter mappings
  • Server side generated pages using Mustache templates
  • Messaging extension using STOMP and Apache ActiveMQ or Apache Apollo (beta)
  • Can be used in load balanced environment using Redis or MySQL as state server
  • Integrated RESTClient
  • Works with DelphiXE3 or better
  • Integrated Logging System
  • It is really simple to use. You can be productive in minutes!

Here's the DMVCFramework Developers Guide https://danieleteti.gitbooks.io/delphimvcframework/content/

If you need support, there is the official facebook group with more than 600 users https://www.facebook.com/groups/delphimvcframework/

I'm the main developer but there are more than 6 active contributors.

Daniele Teti
  • 1,764
  • 14
  • 20
5

RESTful server side method calls hosted as an ISAPI dll or just use the Indy HTTP Server component. It's really a quite simple and powerful approach and lets you get started quickly without a big learning curve.

bluish
  • 26,356
  • 27
  • 122
  • 180
Darian Miller
  • 7,808
  • 3
  • 43
  • 62
  • I also like this approach. It is simple, yet flexible and does not have a lot of abstraction layers. In many cases it is just enough. – Runner Dec 06 '10 at 06:23
  • I meant the ISAPI approach. You can that event use Indy HTTP to host the ISAPI or just use Apache or IIS. – Runner Dec 06 '10 at 06:23
  • 2
    ... but you'll have to code all RESTful mechanism by hand, i.e. making all XML/JSON generation/parsing, because Indy HTTP server goal is to serves HTTP pages. It sounds better to me to rely on a higher level framework, based on Indy if you want. – Arnaud Bouchez Dec 06 '10 at 09:13
  • This a great tip, even if I leverage a higher level framework eventually I think this is a great way to understand and get comfortable with the mechanics. Kind of like learning to use Java servlets before getting into a big framework. – gbc Dec 06 '10 at 16:19
  • I was holding back from posting a link to http://xxm.sf.net/ because the question specifically refers to WebServices and a framework, but if RESTful is an option, check out xxm because it has a good auto-compile in InternetExplorer, and a good auto-update in IIS. (And the same output library can be run with Apache or CGI or 'plain HTTP') – Stijn Sanders Dec 06 '10 at 19:16
  • You can store your objects as XML or as a custom binary stream and then return that stream as results with a content-type set to your object type (and version)... it's pretty cool. – Darian Miller Dec 07 '10 at 03:31
  • @Stijin: Sorry about that, I meant web services in a generic sense (REST or SOAP). Thanks for the link, I think your comment would be worth it's own answer. – gbc Dec 07 '10 at 14:54
3

WebHub is another well established, though lesser known third party Delphi web framework.

LachlanG
  • 4,047
  • 1
  • 23
  • 35
3

Couple other choices that can be used to build a webservices server, somewhat simlar to datasnap or remobjects/dataabstract, are below. I did some work years ago with kbmMW and it's a solid library. I think both kbmMW and RealThinCLient have free and/or open source versions:

RealThinClient

kbmMW

Herbert Sitz
  • 21,858
  • 9
  • 50
  • 54
2

We have a web front end for our Delphi server app written in Delphi Prism/ASP.NET. It works great and allows us to leverage our Delphi language skills in a .NET environment.

norgepaul
  • 6,013
  • 4
  • 43
  • 76
  • Thanks for the suggestion. Is your Delphi server app written in native Win32 Delphi with a just an ASP.Net frontend or is the whole thing a Prism project? – gbc Dec 04 '10 at 21:44
  • 1
    We use DataAbstract from RemObjects (http://www.dataabstract.com/). It allows us to write the server in native Delphi code and connect to it using virtually any method we choose. Their framework automatically generates all the interface classes for your server and you simply call the methods it exposes. – norgepaul Dec 04 '10 at 21:54
  • Ah, excellent. I didn't know about DataAbstract. I will check that out! – gbc Dec 04 '10 at 21:58
1

This one is very old,but a lot of things have changed,I myself had left Intraweb and gone to UNIGUI,since its based on EXTJS and produces single page applications.

1

Well Its been two years since I left my last message on this posts, although uniGUI is still the only solution already made for creating SPA in Delphi,it seems that IW17 will be a real cutting edge,an waters divisor in the history of Delphi.Client side rendering without needing server communication,Wordpress integration,no need to write a single line in javascript like other frameworks,websockets,fibers,our "Delphi React".