Hello all,

For desktop environments, there are mature projects on data persistance. Press Objects, TiOPF... desktop developers can be proud of the tools they have.

What about CGI environments? Is there something already developed? Yes, we can use SQLDB. It's really a very good component. However, we need to write lots of SQL. The dream would be something like:

user := TUser.create;
user.name := 'Luciano';
user.age := 36;
user.insert;


I can hide all the SQL statements behind a custom TUser class. I can implement it. However, before writing this clear code, I will have to type a set of SQL statements. In other words, to simplify, it would be necessary to create a mother clas whose properties and methods would be use for my custom TUser class.

Of course, it is only a possible approach. I believe this pattern is called ActiveRecord. I confess I know little about persistance patterns. There is also the DAO pattern. Well, there are certainly several patterns.

My questions concerns exactly to it:

1. What are the alternatives for a CGI environment using a productive data persistance? What are your suggestions in terms of units, class or either strategies, including the model, the view and the controller? 2. If CGI with Frepascal is still starting and consequently, there aren't powerful tools and, therefore, code needs to be implemented, which pattern do you recommend? ActiveRecord? DAO? Another?

Well, before starting something, the first step is to listen and I am sure, here there is people with a significant higher background than me!

Luciano
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to