What are the best practices for database development with Delphi?

前端 未结 6 1127
陌清茗
陌清茗 2021-02-02 00:56
  1. How can I use the RAD way productively (reusing code). Any samples, existing libraries, basic crud generators?
  2. How can I design the OOP way? Which design patt
6条回答
  •  旧时难觅i
    2021-02-02 01:57

    Well, I strongly suggest you to use Actions (TActionList) when designing your user interface. There are many predefined actions including Next/Prev/Insert/Delete/Edit/Update operations that can be performed on datasets, so it is a good practice to use these actions and link them to buttons/menus on your forms. This prevents repeated code for UI logic.

    There is no need for a CRUD generator for Delphi!! Add TDataSource, TDBGrid and TActionList to a form, add predefined data source actions to the action list, link those actions to buttons or menus, and you are done!

提交回复
热议问题