Ugochukwu Mmaduekwe 42 Posted March 23, 2020 Hi all, as the question stated, what is the possibility of having a rest/soap webapi written in Delphi 2007? What challenges are we bound to face? what components do you think will be needed? what advice can you give? lastly do you think it will be a better option to write the rest/soap webapi in C# using VS 2017 instead? Unfortunately the version of Delphi can't be upgraded. thanks. Share this post Link to post
Lars Fosdal 1792 Posted March 23, 2020 I'd go for the C# approach instead of fiddling with an ancient Delphi. 1 Share this post Link to post
Ugochukwu Mmaduekwe 42 Posted March 23, 2020 2 minutes ago, Lars Fosdal said: I'd go for the C# approach instead of fiddling with an ancient Delphi. Thanks a lot, this has been what I have always wanted to do. will wait for other responses though. Share this post Link to post
Mohammed Nasman 11 Posted March 23, 2020 (edited) If you can use the community edition, you should give Delphi MVC a try. Otherwise, I will go with @Lars Fosdal suggestion. Edited March 23, 2020 by Mohammed Nasman 2 Share this post Link to post
Ugochukwu Mmaduekwe 42 Posted March 23, 2020 8 minutes ago, Mohammed Nasman said: If you can use the community edition, you should give Delphi MVC a try. Otherwise, I will go with @Lars Fosdal suggestion. Would have loved to look into Delphi MVC but unfortunately they don't have plans to upgrade the Delphi version they currently use. However I will look into Delphi MVC for my own personal projects. Thanks a lot. 1 Share this post Link to post
Kryvich 165 Posted March 23, 2020 It's unfair to compare the ancient Delphi 2007 with the relatively new VS 2017. It is not even Unicode compliant. Share this post Link to post
Ugochukwu Mmaduekwe 42 Posted March 23, 2020 8 minutes ago, Kryvich said: It's unfair to compare the ancient Delphi 2007 with the relatively new VS 2017. It is not even Unicode compliant. @Kryvich, I am not really comparing. I am just evaluating my options. Share this post Link to post
ertank 27 Posted March 23, 2020 (edited) If you have the option to choose REST only then you might really would like to consider MARS Curiosity. Edit: Just checked GitHub and it seems no packages exists for Delphi 2007. Edited March 23, 2020 by ertank 2 Share this post Link to post
Ugochukwu Mmaduekwe 42 Posted March 23, 2020 23 minutes ago, ertank said: If you have the option to choose REST only then you might really would like to consider MARS Curiosity. Edit: Just checked GitHub and it seems no packages exists for Delphi 2007. Thanks but it seems like it doesn't support Delphi 2007 like you correctly figured out. Share this post Link to post
Angus Robertson 574 Posted March 23, 2020 The Internet Communications Suite (ICS) has a REST client component using Json and an application web server that sends whatever you give it. There is an ICS topic here. But no SOAP protocol as such, Json seems to have overtaken SOAP as much easier to use. ICS uses SuperObject for Json and reading XML, all Delphi 2007 compatible. Adding a SOAP wrapper to your XML objects should not be too hard. Angus 2 Share this post Link to post
ertank 27 Posted March 23, 2020 Even it is not just for REST, you can write your own interface based methods and use mORMot as a REST server. Learning curve might be slower compared to some other options. However, it does run from Delphi 6 to Delphi 10.3.3 and has Linux support using Lazarus+FPC. There is no SOAP support as to my knowledge. 2 Share this post Link to post
pcplayer99 11 Posted March 25, 2020 SOAP is for WebService,it is stable since Delphi 7. WebService framework is buit-in delphi since Delphi 7. 2 Share this post Link to post
David Schwartz 426 Posted March 25, 2020 I think the problem you're going to run into is in how the RTTI support changed massively in D2010. Legacy apps built before that aren't going to care. But most libraries since then have come to depend heavily on it for a variety of things, especially when it comes to offering services of many kinds. There's stuff that simply cannot be done in D7 or even D2007 that can be done with the new RTTI support in D2010 and fwd. A lot of these have to do with design-time support as well. So you can sometimes find libs that have run-time support back that far, but not much design-time support. A straightforward REST/JSON API shouldn't be terribly difficult to write, unless you want to be able to send objects over the wire and have them reconstituted at the other end. Short of that, you might find something that works for you. 1 Share this post Link to post
Ugochukwu Mmaduekwe 42 Posted March 26, 2020 (edited) 12 hours ago, David Schwartz said: I think the problem you're going to run into is in how the RTTI support changed massively in D2010. Legacy apps built before that aren't going to care. But most libraries since then have come to depend heavily on it for a variety of things, especially when it comes to offering services of many kinds. There's stuff that simply cannot be done in D7 or even D2007 that can be done with the new RTTI support in D2010 and fwd. A lot of these have to do with design-time support as well. So you can sometimes find libs that have run-time support back that far, but not much design-time support. A straightforward REST/JSON API shouldn't be terribly difficult to write, unless you want to be able to send objects over the wire and have them reconstituted at the other end. Short of that, you might find something that works for you. @David Schwartz Thanks for this answer. Also, this project will involves transmitting quite a number of binary data over the wire. I am also considering the fact that I will be working with Unicode data so that will impose issues of it's own especially considering the fact that Delphi 2007 RTL is not Unicode aware. Edited March 26, 2020 by Ugochukwu Mmaduekwe Share this post Link to post
Alexander Elagin 143 Posted March 26, 2020 There is well known RemObjects SDK which I think still supports even Delphi 7. Some interesting information regarding JSON support is here: https://talk.remobjects.com/t/how-to-call-rest-server-with-json/18771 . A standard SOAP support has been a part of Delphi RTL since forever and usually works without problems. 1 Share this post Link to post