Hi,
I'm fairly new to PureBasic so I wanted to ask all experts how you usually do when you code a database layer in your applications.
I've coded a little bit of Java/Hibernate(http://www.hibernate.org/) and also Python/SQLObject (http://www.sqlobject.org/) so I'm spoilt with having ORMs (object relational mapper) that helped me to map between RDBMS <to/from> Structures/Objects.
Now I know that ORMs rely heavily on some language features like reflection/introspection (language abilities to inspect and browse internal program structures at runtime), but what I wonder is if someone has built some designtime functionality that does a similar job?
What I'm looking for is something with this workflow for PureBasic:
1.) Design the database.
2.) Run a program that:
a) Attaches to the DB.
b) Checks all tables and Fields
c) Generates PureBasic sources (.pb) with a structure for each table + 4 CRUD procedures (Create, Read, Update, Delete) for each table that can be fed with a filter (basically the "where-clause" for select, update, delete), and a pointer to a Structure of the correct type.
3.) Include all the auto-generated .pb-files and start using the database in a record-mapped manner, in a new application.
4.) When DB-changes happen, it should be possible to regenerate the sources at any time.
If any of you have done something similar or you have another smooth solution for Database-intensive applications that works great in PureBasic, please reply in this thread and give me good advice.
best regards,
MaHan