问题
I'm migrating a large family of applications having hardwired FIB+ connectivity inside to Fire-Dac components and I'm looking for some least painfull way, how to do it.
First, I've decoupled and migrated the backend to get connectivity neutral and connectivity dependend parts and refactored existing applications manually. I've written FireDac parts as well.
To migrate Delphi code it seems to be no problem...
But big pain in the ass seems to be a migration of components placed on forms and data modules in design time: I installed GExpert and tried its command Replace Components with defined rules how to map some properties, but it lost mutual reference between components, probably due type incompatibility in step-by-step replacing process.
My current approach is hand job: to add a suffix to the name of old FIB+ component, copy&paste original name to new corresponding Fire-Dac component. This step I repeat for all components, then set properties properly and drop FIB+ components. It allows me to inspect old setting again and again during this process.
Does anybody has some proven/recommended way how to do it better?
Thanks, pf
回答1:
Several aspects:
- If you are using properties for different SQL operations, then you can derive TMyQuery from FireDAC TADQuery. TMyQuery will create TADUpdateSQL and publish it XxxxSQL properties in TMyQuery interface. Also, you can introduce in TMyQuery other FIBPlus properties and methods, missed in FireDAC TADQuery.
- The similar approach you can use for other FIBPlus components to achieve high compatibility level between FireDAC and FIBPlus.
- You can use FireDAC addon tool - ADDFMChanger, to automate PAS / DFM migration from FIBPlus to FireDAC. The setup and migration then will be similar to BDE -> FireDAC migration. FireDAC / AnyDAC addons you can download from da-soft.com.
- The major migration issue may be difference in FireDAC / FIBPlus behaviours. I cannot comment here, because I have no experience with FIBPlus.
来源:https://stackoverflow.com/questions/16620795/proven-recommended-way-to-migrate-application-from-fib-to-fire-dac-components