My system is not your traditional Cake App...My dynamic tables are populated by a backoffice application, and not by user input on a web GUI...the user just accesses the data for consultation on the web GUI (this consultation produces either graphical plots or fixed field tables).
I don't know what you use yor forms for, but I think it's possible that you base the form creation on the descriptor tables. The XML option seems valid to me, but you would have to find a means of running the XML config file in a parser BEFORE accessing Cake to generate the models/controllers/views code dynamically. That is if I'm understanding correctly what you want... On Feb 13, 12:09 pm, "Hawk|" <[EMAIL PROTECTED]> wrote: > Hi Mindcharger, > > your System sounds like the Problem i have. > How do u create your forms? Hardcoded in cakePhp or dynamicly? > > I have an additional component to solve. > - I need dynamic tables and associations. Like i mentioned above > - the next step is to create views/forms dynamicly out of xml > definitions > > So u can have a full flexible application, with dynamic tables and > forms. > The easiest way would be, if the user is able to create one XML-File. > Depending on that XML-File the system creates a tables, associations > and forms to gather the data. > > I am just gathering informations, if it is possible to solve this kind > of requirements with cakePHP. > Or i have to write the application in Java. :-/ > > So i think it would be possible to solve that issue with cakePHP. > I allready definded the "descriptor-table" based on the normal hasone/ > hasmany/habtm... associations from cake. > Now i need to define a kind of autoform, depending on the xml > definition. So i only need to create one model/controller>/view for > all > tables. > > Thx for your input! > > On Feb 10, 2:36 pm, "mindcharger" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > This system is a mobile network monitoring tool. > > The system receives data from the different network nodes, processes > > that data (calculates a value using a user-defined formula) and stores > > the data back on a DB. > > Then you have a web-based user interface where you can pick which > > mesaures you want to see and that shows you plots of the measures in a > > given time-period. > > > Since you want to define different measures to different network nodes > > and networks, you cannot have the measures "hard-coded" on the php > > code or even have a fixed DB table strucutre. So you have to employ > > the technique I described in my post (well, this was actually the form > > I found to deal with the issue, I'm sure there are many other ways, > > and possibly more clever than mine... ;-) ). > > > This procedure allows you to change the calculating formulas and > > define new measures if you need. At first it was difficult to overcome > > this problem, but the solution is very robust and works nice. In fact, > > we are already making an expanded version of the application which > > will be deployed on a major telecommunications equipmente manufacurer > > branch office next April. > > > I don't know if I was clear in my exlaination. If threre's anything > > else you want to know feel free to ask. > > > Cheers! > > > On Feb 9, 2:15 pm, "Max" <[EMAIL PROTECTED]> wrote: > > > > Hi Mindchanger, > > > > I will be interested in knowing more about the main requirements > > > behind this... It looks interesting. > > > > On Feb 9, 1:50 am, "mindcharger" <[EMAIL PROTECTED]> wrote: > > > > > Hi Hawk, > > > > > I'm currently developing a system that shares that "dynamic table > > > > creation" requirement with yours. > > > > As far as I understand the problem, it's more a DB issue than a CAKE > > > > issue. > > > > > I don't know if it will help you, but I will try to explain how I did > > > > it. > > > > > 1) I have a table on the DB that "describes" the other tables I > > > > create. To this table I call a "descriptor". Assume it has several > > > > columns, but one of them is called "table_name". > > > > 2) Creating a new table encompasses two steps: > > > > i) Add a record to the "descriptor" table > > > > ii) Create the proper table > > > > 3) To access the table you must do 2 DB accesses: > > > > i) Get all the descriptor records into a HTML select-box or something > > > > (Ex.: "SELECT table_name FROM descriptors;") > > > > ii) Get the chosen table into a var and then acessing the desired > > > > table > > > > (Ex.: > > > > $table_name = <your-favorite-VIEW-data-retrieval-method>; > > > > $query = "SELECT * FROM $table_name;"; > > > > $data = $this->{MODEL-NAME}->query($query); > > > > ) > > > > > The "$data = $this->{MODEL-NAME}->query($query);" allows you to force > > > > the Model to execute your query. > > > > > As for the model, I found that when I want to use this "dynamic table > > > > device" I have no use for the associated table, so I define: > > > > > $useTable=false; > > > > > ...on the model. > > > > > I hope it helps you. If the explanation was not clear or if you have > > > > any other doubt feel free to ask me. > > > > > Good luck! > > > > > On Feb 8, 9:53 am, "Hawk|" <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > i wonder if it would be possible to store the associations in a table > > > > > instead of storing them in the models/model.php file. So it would be > > > > > more flexible. I need to create tables dynamic and associate them on > > > > > the fly with others and i want to do this without touching the model > > > > > file itself. > > > > > Someone allready is using a similar method? > > > > > or someone has an idea how to do this?. > > > > > It would be a great help for me to get some response to this issue. > > > > > > Thx a lot Hawk. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---