Instantly expose a table as a REST endpoint – again.

Introduction

A while back I wrote a component for exposing FireDAC tables as REST endpoints in Delphi. I wasn’t entirely happy with the component that I’d written, however, it was really intended as a proof of concept. I was quite surprised to learn that people were actually making use of that component, rather than simply using it as an example of what could be done.

Fast-Forward a couple of years, and I found myself needing precisely that component in another project. I wasn’t going to make use of my proof-of-concept code, knowing it to have some flaws, and so I decided to have a do-over. Today, I’d like to introduce you to the deREST components: https://github.com/chapmanworld/deRest 

deREST

The deREST components are my replacement for the older component which was named JCRUD.

As with the original component, I still maintain my disclaimer: “I will not be held responsible for any damages that occur due to the use or misuse of this component.”, however, unlike the original component I do intend to maintain deREST going forwards.

In the video below, I explain more about the component set, my intentions regarding maintenance, and how to make use of it. I also give a few hints as to my intended road-map for deREST.

(Apologies for the video being a little choppy in places, just where I edit out some gafs…)

deREST is licensed MIT https://github.com/chapmanworld/deRest/blob/master/LICENSE

Conclusion

I hope these components are useful to you.
Feel free to get in touch with suggestions for improvement!

Thanks for Reading / Watching!

Print Friendly, PDF & Email
Facebooktwitterredditpinteresttumblrmail

10 Responses

  1. Dedi Supardi says:

    Dear Craig,
    I have download the latest for it at github. In 32bit Platform it can build and install well. but in 64bit Platform it could not build. the error message show statement like these

    [dcc64 Error] pkg_deREST.dpk(39): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST’
    [dcc64 Error] pkg_deREST.dpk(40): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.filterparser’
    [dcc64 Error] pkg_deREST.dpk(41): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.restfilter.standard’
    [dcc64 Error] pkg_deREST.dpk(42): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.restresponse.standard’
    [dcc64 Error] pkg_deREST.dpk(43): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.restarray.standard’
    [dcc64 Error] pkg_deREST.dpk(44): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.restobject.standard’
    [dcc64 Error] pkg_deREST.dpk(45): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.pathinfo’
    [dcc64 Error] pkg_deREST.dpk(46): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.types’
    [dcc64 Error] pkg_deREST.dpk(47): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.api’
    [dcc64 Error] pkg_deREST.dpk(48): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.producer’
    [dcc64 Error] pkg_deREST.dpk(49): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.authenticator’
    [dcc64 Error] pkg_deREST.dpk(50): E2200 Package ‘pkg_deREST’ already contains unit ‘deREST.passthrough’

  2. Dedi Supardi says:

    Dear Chapman…Is this support for Delphi 10.3 Rio?

  3. Peter Edwards says:

    Craig – as ever you take REST development forward in leaps and bounds. Im going to share this in the UK dev group. Perhaps Jason can get you along to a meeting to talk to us troops . Cheers and thanks. Pete

  4. Adelson Nunes says:

    I am running tests and realized that the result is normally presented in the browser, however, in RESTDEBUGGER and DELHI does not return error and neither brings results and some tables that I am testing, I use FIREBIRD.

    • Adelson Nunes says:

      in deREST.api alter line 1158 from Response.ContentType := ‘application\json”‘; to Response.ContentType := ‘application\json; charset=”UTF-8″‘; and line 1164 from Response.ContentType := ‘text\plain”‘; to Response.ContentType := ‘text\plain; charset=”UTF-8″‘;

  1. 2018-07-21

    […] [NEW UPDATE] I’ve replaced this component with a re-write named “deREST” – find out more here: http://chapmanworld.com/2018/07/21/instantly-expose-a-table-as-a-rest-endpoint-again/ […]

Leave a Reply