Jump to content
Juan C.Cilleruelo

New OpenSource Project :TActiveRecord descentants generator for Delphi MVC Framework.

Recommended Posts

Tired of creating the descendants of TActiveRecord by hand?
 

GitHub MVC_AR_EntityGenerator is an OpenSource project developed in Delphi XE 12 that takes the metadata of your Database and creates one class ActiveRecord of each Table in the Database.

You can generate the AR of one table or one AR class for each table in the Database. You can indicate in which folder the AR file should be deployed, and the program will remember it. 
Each AR is generated in an independent .pas file. 
1639536283_Screenshot2023-12-19174011.thumb.png.0cab6aac8faf2369011d6637706992d1.png

And this is only the Beta version. 
 

You save all the information used to generate the AR; when you need to develop it again, you only need to use it. 
2089869106_Screenshot2023-12-19174112.thumb.png.179f16eb0262f938a90fccfe388277d4.png

In the next version, we plan to implement more types of AR, like, for example, AR with a Master-Detail Relationship. 
 

In the current version, you can change the name of the Class generated. This is useful when you want, for example, the AR class representing one member of the entity Customers, instead of being named TCustomers, to be named TCustomer; that is more accurate.
 

I want to implement, too, a connection with the AI (probably Chat-GPT) to ask directly for the translation of the plural table names to singular class names. In this target, I want the AI to modify the table name to respect the Camel Style of Pascal Class names. For example, a table named Items_Owned_by_user is currently created as TItemsownedbyuser. The AI can easily convert this to TItemsOwnedByUser, which is more accurate to the style of  Pascal code. 

And many more things can be made with an open-source project. Do you don't think it!!
 

Try it, and let us know what you think!
 

Thanks 

 

PD: The project is also an excellent example of using SQLite as a memory store for the data and treating this data as a standalone project, in contrast to the concept of a Database on Disk, which is more current in Delphi.


 

  • Like 1

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

×