Jump to content
bioman

I have some questions.

Recommended Posts

Thank you for providing the MARS Library.

 

Delphi client is being built using MARS Library.

FIREDAC' CRUD (especially updated) implementation is challenging.
Can I get a sample source for how to implement updates in full or record units?
Thank you again for providing me with a good library.

Share this post


Link to post

Hi @bioman,

there are several approaches to the topic (CRUD operation against a DB). MARS doesn't dictate one specifically.

 

Would you please specify if you are building a Delphi to Delphi solution (Delphi on the client and Delphi on the server)?

You can have a dataset-oriented approach (client asks for a dataset, modifies it, changes are sent back to the server in form of delta updates) or a more general record-oriented approach (client asks for data, server sends a JSON array, client makes POST or PUT calls with modified/new data records).

It also matters if you are looking for a data-centric approach (i.e. sending whole records from DB to client and back) or more interpolated approach (client commands REST server to perform operations that results in data manipulation).

 

MARS is a lightweight library and I am trying not to dictate some aspects (more related to application than library IMO) so there are many ways to use it.

 

Thanks for the kind words!

Sincerely,

Andrea

 

 

Share this post


Link to post
Posted (edited)

Thank you for your prompt reply.

I'm making a Delphi to Delphi solution.

Based on the FireDAC Basic Semple you provided, 

Get method has been implemented.

To implement Update

Should clients send DataSet or Record JSON to the server and implement update logic directly on the server?

 

Thank you. Andrea

Edited by bioman

Share this post


Link to post

Update issues resolved and work well
We analyzed the FireDAC Basic Source you provided and solved it. 
Thank you.

Share this post


Link to post

Hi @bioman, glad you sorted out in the meantime.

The "FireDAC Basic" demo is the dataset-oriented (quite C/S+briefcase) way of handling data through MARS.

I would suggest to have a look to EKON22 demo, specifically looking for the TRecord<R>.FromDataSet and the use of TMARSFireDAC there.

 

Sincerely,

Andrea  

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×