Sisäänkirjautuminen| Uusi tunnus
FrontPage| Projects| Forums| Search|
^ DaoGen Forums: › Why? › PHP5? › Using ToString() with PHP › Next DaoGen version almost ready! › Create (insert) and Save (update) PHP examples › Support for numeric object types almost ready! › DaoGen 2.1.0 released! › Compliments and minor suggestion › variables within a class › Foreign key constraint in create() › Security issue!!! › auto-generated columns and create method › Oracle BLOB › DAO for cross-table queries › Please help me.. › Please use this forum for DaoGen related stuff › Call-time Pass-By-Reference › DaoGen 2.4.0 has been released! › How can I show relationships? › DaoGen & PHP 5 › PHP4 vs PHP5 and other considerations. › singleQuery example in php › Why are save and delete not synchronized? › Why are save and delete not synchronized? › DTD for generated XML › DaoGen 2.2.2 has been released! › DaoGen 2.0.2 is available. » For a thesis ?? › Extremely good idea ?? how can I ???? › Usability suggestions for DaoGen › Performance of DaoGen with Mapping tools › Performance with List › Some usage statistics › DaoGen 2.2.1 has been released! › Programming Examples are back! › DaoGen 2.0.1 is available. › Version 2.0.0 generates buggy PHP code! New version soon available! › Examples of DaoGen customizations › Code Examples
Sisäänkirjautuminen
» Käyttäjätunnus:
» Salasana:
» Muista kirjautuminen:
Suosituimmat sivut: › DaoGen Forums › Programming Examples › DaoGen FAQ › DaoGen Manual › Call-time Pass-By-Reference › Forums › Projects › DaoGen 2.1.0 released! › singleQuery example in php › DaoGen
FrontPage » Forums » DaoGen Forums » For a thesis ??

For a thesis ??

Posted by seybaa 28.09.2004 17:34

Hello as i have mentionned i stidy computerscience at univeristy,
I am really impressed by DaoGen that I want to know if i want to try to do something like it, do you have some designs or doc that i could used as source of inspiration ? that is why I was interrested in download it, but i after I have read the FA i understood that, that is ont posible.
I very much like to understood the procees of autogenerating source from db.
you are magic man.


Re: For a thesis ??

Posted by Luigi 28.09.2004 20:26

OK, now I understand. Unfortunately I can not give you any description or design document because I have none. Let me explain the short(?) history of DaoGen and you will understand why.

For a long time I have been interested about CMS (Content Management System) for websites. Something like 4-5 years ago, I started programming an experimental CMS to test some theories and ideas that I had. I started the original programming using PHP language and I did write quite a lot of code, mostly SQL database handling code for this project.

Finally, my CMS project (later named as FastCMS) needed some re-organizing and at the same time I decided to swith from PHP to Java language. Then I realized that I would loose the years of work that I had spent on writing the SQL code using PHP and I though that I can never finish the project (FastCMS) if I will have to write all that code again.

I have always wanted to program my own solutions for problems that I face, so I decided that I will make a tool that will do the SQL programming for me. I wanted that the resulting tool would make high quality code, which I could customize to fit any purpose. So I started the DaoGen project. The first versions of DaoGen were done with PHP, so I made the same language-choice mistake again (later I had to re-implement the DaoGen with Java) but the result was good enough that I was able to generate the DAO layer for my new CMS system.

So as you can see, I had no particular design or spesification in my mind, I just started experimenting on how I could solve a spesific problem and eventually the result was good enough that I decided to publish it in the net. For the later versions I started considering other people's needs and the possibility to use the generator for the projects that I do at work, but the reason why DaoGen is like it now is, comes from the fact that originally I just needed a tool for myself.

Also I hope you will understand that because of this history, I do not have much time for developing the DaoGen further. My main project is still the FastCMS system, (which you are using right now because TitanicLinux.Net runs on that platform) and DaoGen does all what I need for that project.

For your own generator, I can explain this simplified principle that is applied in DaoGen:

The current DaoGen is programmed around the idea of meta-data. Meta-Data is a set of data, that describes something, in this case that something is a SQL table. You should first build a model, which contains all needed information about any given SQL table, and then implement some way to create this meta-data set (read from the database or from XML for example).

Once you have the meta-data, you should think about what kind of code you want to produce. Maybe you want to make the value-object class and DAO class, so you should think of what methods are needed and how they should work. Then you program a samples of these classes.

Now you have the meta-data and sample classes. All you need to do, is to make the example classes to be templates, which are filled using the data from the meta-data set. And now you have the generator.

If you proceed with your own project, I would be interested to hear more about it.

// Luigi


Re: Re: For a thesis ??

Posted by seybaa 29.09.2004 11:53

thanks a lot for you time, i compile the information I have got.
to me it is like a set of high level of framework of the idea about how to do the generator.
A abstract direction.
thanks