You are not logged in.
I have been a Pascal coder since Turbo Pascal 5.5. Now using Delphi 6 for professional work and Berlin 10.1 starter edition for exploring...
I have over the years successfully made ERP solutions for companys / branches.
They have all been FAT clients
I know I have to get out on the internet/cloud in order to be alive in the future.
It will be REST connections in/out from the MSSQL databases of my software products to enable collaboration with other "datasources" and mobile access to ERP data.
I can't make my FAT-client software products totally web-based, at least at once, and I am satisfied with that, FAT clients have their benefits!
I have been looking at mormot now for a month, and it is ALL new to me,
ORM, JSON, Java, DDD, web protocols, servers.. its all new but I am sure this is the way in the future, and I will learn it. .
And I think that Mormot is a good choice that fulfills my needs.
So to get started I tried to make a very simple REST client, but I am stuck. And I don't think its a good id'e to show my non working code so far, too many errors.
In Finland the state have a REST service from where anyone can get company information based on the company VAT number.
It goes like this: http://avoindata.prh.fi/tr/v1/0897464-3 (try it out in the browser)
And it sends you back all the data about that company (0897464-3 is the VAT number for the Microsoft company registered by Microsoft in Finland, just an example)
Here is a description of the model schema: http://avoindata.prh.fi/tr_en.html
Please give me some hints about how to get that data asked and interpreted into Delphi memory, collection, grid or DB table.
What should be in the Data model unit? TCompany = class(TSQLRecord)... ? I cannot get it to work.
I started from the sample: "28 - Simple RESTful ORM Servers" and the client there...
Please get me started with this!
Kim
Last edited by Kixemi (2017-02-12 01:02:40)
Offline
in the RESTful server, which service is provide?
Is v1 a service'name in the link http://avoindata.prh.fi/tr/v1/0897464-3 ?
if you use TRESTClient can get json data from the link,maybe use mORMot no problem!
Offline
Look here on how to do this:
https://synopse.info/forum/viewtopic.php?id=1728
TGoogleGeoCodeJSON is your guideline
https://synopse.info/forum/viewtopic.ph … 426#p10426
Offline