CodeRage 9 Q&A log: ClientDataSets and FDMemTables Compared (Cary Jensen)
Posted by jpluimers on 2014/10/30
ClientDataSets and FDMemTables Compared
ClientDataSets are in-memory tables that have been in RAD Studio since Delphi 3, but there’s a new kid in town, the FireDAC FDMemTable. This presentation, by ClientDataSet expert Cary Jensen, compares and contrasts these in-memory table classes, providing you with guidance on which to use and when.
Cary Jensen – Jensen Data Systems, Inc.
The Q&A log:
Welcome to CodeRage 9!
- Q: Thanks for organizing this. Hi from The Netherlands
- A: Hello and thanks for joining us!
- Q: yes a great thing, greetings from Germany too!
- A: You are welcome. Thanks for being here.
- Q: Ill agreewith Neterhlands and Germany its 3 tuff days for you but very useful for us developers of all levels , hello and thanks from Swesen
- A: Thanks and you are welcome!
- Q: Good morning, David
- A: You get Jim today. David is in the C++ track.
- Q: Hello, I missed Allen Bauer’s session yesterday. Any links for demos and contact details for him, if possible?
- A: Replays will be available for CodeRage sessions that you may have missed within 1-2 weeks of the conference conclusion on the CodeRage website.
- Q: From Spain. Thanks you very much. Hello, smart thinks !
- A: :-D You are welcome! Thanks for being here.
- Q: Hi, Jim
- A: Hi Cary!
- Q: Ready with bells on. :)
- A: Nice.
- Q: Morning Chaps :)
- A: Good morning!
- Q: Thx for reviving the XE7 trial key
- A: Certainly.
- Q: Good morning. I’m from Indonesia.
- A: Morning!
More information on the special offers http://www.embarcadero.com/radoffer
The virtual exhibit hall http://www.embarcadero.com/coderage/coderage-9-exhibit-hall
Use the 10% off discount code “THINGS”
- Q: Can one inmemory object contain updates to several tables in one, or do I need to update one table at a time.
- A: Use nested datasets to include more than one table. CDS and FDMemTable differ. I discuss this later
- Q: Are the CDS andf FD XML file formats compatible?
- A: Not really
- Q: If I want to use either in different threads, do I need to implement my own locking/protection, or are there any features that make this same and easy?
- A: You need to implement your own synchronization. If the threads are created after the dataset is created, and the dataset is treated read-only, there may be no problems
- Q: Better wording -> If I want to use either dataset in different threads, do I need to implement my own locking/protection, or are there any features that make this safe and easy?
- A: Same answer as above. We can talk about this in Q&A
- Q: Do you have a link for Cary’s CodeRage 8 talk regarding FDMemTables?
- A: http://www.youtube.com/watch?v=0ifH4dU5qoM
- Q: did the CDS developers ever fix the performance problem encountered when adding lots of rows?
- A: I don’t think so
- Q: Are there plans to add support for TDatasetProviders to FDMemTable? It means otherwise a complete re-write of the existing DataSnap stack…
- A: No. FDMemTables will likley support different mechanisms. FireDACJSONReflect is one of those
- Q: You know what would be cool? A book dedicated to FDMemTables.
- A: Yes. I wonder who might write that :)
- Q: Thanks. My main use of CDS at the moment is as self-contained data containers inside a mobile app (ios and Android) which can take data via Datasnap and store locally to a file when offline. Biggest dataset is say 5000 records which includes some memo fields. Do you think there would be noticeable performance improvements using FDMemTables? (Sorry, tough question I know). Some filtering currently takes 2-3 seconds for example.
- A: FDMemTables are often demonstratable faster than ClientDataSets, so there might be a performance enhancement
- Q: If updating a tclientdataset based app to FDMemtable based, can I during update have both datasets involved on server or client?
- A: Yes
- Q: I cannot understand what Jensen is saying! :(
- A: :-( It is difficult.
- Q: Your new book does it contain information on FDMemTable or is it just on ClientDataSets?
- A: It is exclusively ClientDataSet, and will be the last edition of that book since FDMemTable is gaining more of the features from ClientDataSet. It brings it up to XE7.
- Q: The previous book was not electronically available. Will the new version be available in ebook format ex. through Amazon Kindle?
- A: It will be Kindle
- Q: I have very large applications using DataSnap and ClientDataSets in a Multi-Tier structure. Is It viable to change this structure to use FDMemTable?
- A: It is, but wait for FDMemTable to expand.
- Q: FDS binary output file size is 2x times larger than CDS binary output file size
- A: thx
- Q: I think you said you currently can’t move data from a CDS into a FDMem, is that right?
- A: Not via the XML data property, or the XML file. You would need to read and pump the individual records. Maybe use the FD Batch move. They are different internally.
- Q: The link for the new book should be: http://www.jensendatasystems.com/cdsbook2/
- A: thx
- Q: How it’s working refrshing data on client side when using FDMemTable ? You show geting all DataSet and Aplying Updates but what with refreshing ? I need to get all DataSet again ?
- A: You should be able to refresh the current record. Not sure. There are a lot of similarities between the two.
- Q: Can we get discount on the new book .. if we bought the previous version :)
- A: That isn’t possible through Amazon. The book will be reasonable priced.
- Q: Link for new book is http://www.jensendatasystems.com/cdsbook2/
- A: thx
- Q: Really liked the first edition and refer to it a lot so looking forward to buying print and electronic copies of 2nd
- A: :-D
- Q: When making the video from this speech, is it possible to remaster the Q&A part by reanswering the questions so it is possible to understand what is said? (If Cary understand what he said)
- A: We will
- Q: DDD is great!
- A: Thanks!
- Q: I’ve been looking for a good solution to store complex configuration data specific to the working of the application. I’ve looked at XML files, JSON files, Client Datasets , IB2Go and would also now consider the FDMem tables. Can you suggest anyone over the others?
- A: Using ClientDataSet or FDMemTable with nested datasets is a nice solution. FDMemTable supports JSON, which is more concise than XML