[flexcoders] Re: Dynamically create a Value Object...
I should also mention we're using CF9 on the back-end. So the VOs have to be defined in .CFC files as well. So if anyone can tell me how to do dynamic VOs in both CF9 and Flex, that'd be wonderful. Alternatively, if there's a way to transfer data between Flex and CF9 that doesn't involve VOs (but is still strongly structured and typed, like VOs are), then perhaps we need to do it that way? I'm extremely confused here... I've written this program from the beginning with statically-defined VOs, and now I discover that that's just not going to work. So if anyone can point me in the right direction to help me learn what my alternatives to statically-defined VOs are, I'd really appreciate it. I have found a couple of blog posts about "bindable dynamic value objects", but only how to create them in Flex -- not how to export the data in them from Flex to CF9. And the posts are pretty darn confusing, anyway... Heck, at this point I'd be willing to PAY someone to teach me how to do this, one-on-one. I really need someone who's an expert in both Flex 3.5a and ColdFusion 9. Thanks, L. --- In flexcoders@yahoogroups.com, "Laurence" wrote: > > The program that I'm working on is for a company that does registrations for > conventions and trade-shows. Different clients want different information > stored for each show. Most of the information is the same from show-to-show, > but every show has certain customizations that need to be done. > > The way they're doing it now is by going into the source code of their > program and modifying it that way. We could do the same thing with our Flex > app, but I'm trying like heck to avoid that... > > The problem I'm running into is the Flex Value Objects -- they pretty much > have to be compiled into the .SWF file, which means we're stuck modifying > source-code and re-compiling for each individual show. Not the solution we > want. > > Is there a way to dynamically create and/or modify Value Objects so they can > be changed without re-compiling the .SWF file? So that if a particular > client wants stuff tracked that a different client doesn't want tracked, we > don't have to create a generic version of our database that has all these > extra fields in it, which most clients don't need? > > As it stands right now, the Value Objects force us to make every database for > every show exactly the same -- unless we modify the Value Objects for each > individual show and re-compile a separate .SWF file for that show... If > there were a way to write, say, an .XML file that the program could read and > modify itself accordingly for each show, that would be brilliant. Is there a > way to do that? > > Thanks, > Laurence MacNeill > Mableton, Georgia, USA >
[flexcoders] Re: Dynamically create a Value Object...
We're using an SQL database with a ColdFusion "intermediary" between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks, L. --- In flexcoders@yahoogroups.com, Nick Middleweek wrote: > > Hi Laurence, > > I'm pretty new to Flex so there might be reasons to stick with Value Objects > that I'm unaware of but you can definitely read and write XML and generate > forms, layouts, etc on the fly based on the XML contents. I've used E4X to > query XML data that I've sucked in from an HTTP call, modified the XML using > E4X and pinged it back up to the HTTP server to save the XML data for later > use. > > Hope that helps... > > > Cheers, > Nick > -- > http://blog.middleweek.co.uk/ > > > > On 2 March 2010 19:19, Laurence wrote: > > > > > > > The program that I'm working on is for a company that does registrations > > for conventions and trade-shows. Different clients want different > > information stored for each show. Most of the information is the same from > > show-to-show, but every show has certain customizations that need to be > > done. > > > > The way they're doing it now is by going into the source code of their > > program and modifying it that way. We could do the same thing with our Flex > > app, but I'm trying like heck to avoid that... > > > > The problem I'm running into is the Flex Value Objects -- they pretty much > > have to be compiled into the .SWF file, which means we're stuck modifying > > source-code and re-compiling for each individual show. Not the solution we > > want. > > > > Is there a way to dynamically create and/or modify Value Objects so they > > can be changed without re-compiling the .SWF file? So that if a particular > > client wants stuff tracked that a different client doesn't want tracked, we > > don't have to create a generic version of our database that has all these > > extra fields in it, which most clients don't need? > > > > As it stands right now, the Value Objects force us to make every database > > for every show exactly the same -- unless we modify the Value Objects for > > each individual show and re-compile a separate .SWF file for that show... If > > there were a way to write, say, an .XML file that the program could read and > > modify itself accordingly for each show, that would be brilliant. Is there a > > way to do that? > > > > Thanks, > > Laurence MacNeill > > Mableton, Georgia, USA > > > > >
[flexcoders] Re: Dynamically create a Value Object...
Thanks for the suggestion... I may be able to make that work... If I understand you correctly, I'd need to return an array-within-an-array kind of thing... My normal array of VOs, with one property of each VO being an array itself... Sounds easy enough... But I've tried before to get CF to do that (for a different problem), and failed... Does anyone know how to get CF to return an array-within-an-array kind of structure? I kept getting weird errors the last time I tried something like that - it kept acting like I was trying to create a two-dimensional array, when I only wanted a 1-dimensional array nested within another 1-dimensional array... So obviously I was doing something wrong there... Any suggestions are appreciated - thanks, L. --- In flexcoders@yahoogroups.com, Jake Churchill wrote: > > You could probably try having a base VO for all the properties that you know > will be there and include a single property in the VO which would be either > a Dictionary or a generic object used as an associative array to handle all > your custom properties. Then just populate the VO like you normally would > and when it comes to extra properties, throw them in that one extra VO > property. You'd have to have some kind of parsing method on both ends but > I'd think this would work without too much trouble. > > -Jake > > On Tue, Mar 2, 2010 at 3:21 PM, Laurence wrote: > > > > > > > We're using an SQL database with a ColdFusion "intermediary" between the > > Flex app and the database... I've used XML files to configure a couple of > > the components -- give the user the option to change the layout of a > > component, for example, by modifying the contents of a config.xml file, that > > sort of thing... But I don't see us replacing our database with a bunch of > > XML files... (Or maybe I completely misunderstood your reply, which is quite > > possible...) > > > > I was hoping that there might be a way to get the program to modify its VOs > > by reading from an XML file what fields I want the VO to store... But > > honestly, I don't care where that info is stored... I just need to figure > > out how to dynamically modify a VO (and have ColdFusion realize that the VO > > has been changed by the Flex app) so I can deal with databases that have had > > fields added or changed without having to re-compile the entire program > > every time... And then, of course, how to reference these > > dynamically-modified VOs in my program. > > > > Thanks, > > L. > > > > --- In flexcoders@yahoogroups.com , Nick > > Middleweek wrote: > > > > > > Hi Laurence, > > > > > > I'm pretty new to Flex so there might be reasons to stick with Value > > Objects > > > that I'm unaware of but you can definitely read and write XML and > > generate > > > forms, layouts, etc on the fly based on the XML contents. I've used E4X > > to > > > query XML data that I've sucked in from an HTTP call, modified the XML > > using > > > E4X and pinged it back up to the HTTP server to save the XML data for > > later > > > use. > > > > > > Hope that helps... > > > > > > > > > Cheers, > > > Nick > > > -- > > > http://blog.middleweek.co.uk/ > > > > > > > > > > > > On 2 March 2010 19:19, Laurence wrote: > > > > > > > > > > > > > > > The program that I'm working on is for a company that does > > registrations > > > > for conventions and trade-shows. Different clients want different > > > > information stored for each show. Most of the information is the same > > from > > > > show-to-show, but every show has certain customizations that need to be > > > > done. > > > > > > > > The way they're doing it now is by going into the source code of their > > > > program and modifying it that way. We could do the same thing with our > > Flex > > > > app, but I'm trying like heck to avoid that... > > > > > > > > The problem I'm running into is the Flex Value Objects -- they pretty > > much > > > > have to be compiled into the .SWF file, which means we're stuck > > modifying > > > > source-code and re-compiling for each individual show. Not the solution > > we > > > > want. > > > > > > > > Is there a way to dynamically create and/or modify Value Objects so > > they > > > > can be changed without re-compiling the .SWF file? So that if a > > particular > > > > client wants stuff tracked that a different client doesn't want > > tracked, we > > > > don't have to create a generic version of our database that has all > > these > > > > extra fields in it, which most clients don't need? > > > > > > > > As it stands right now, the Value Objects force us to make every > > database > > > > for every show exactly the same -- unless we modify the Value Objects > > for > > > > each individual show and re-compile a separate .SWF file for that > > show... If > > > > there were a way to write, say, an .XML file that the program could > > read and > > > > modify itself accordingly for each show, that would be brilliant. Is > > there a > > > > way to do that? > > > > > > > >
[flexcoders] Re: Dynamically create a Value Object...
First, let me say that I have been roundly criticized for taking the approach of NOT using VOs. Second, I use .NET & FluorineFX. Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements. If one were clever, using the approach above, one could create a Flex app that requests a table structure from the DB, and builds a data entry screen on the fly. You may want a "schema" table that contains data validation type info that would be read in conjunction with the table structure to allow edits to be performed by flex. When complete, all you would need to do is modify the DB to create the table structure the customer needs, and add records to the schema table, and you have a new data entry module. By the way, my main reason for resisting the VO structure, is I thought that keeping multiple copies of the VO in sync would be a PITA. Anytime you modified a table you need to modify at least two VOs, and potentially recompile middle tier and presentation layer programs. Paul --- In flexcoders@yahoogroups.com, Jake Churchill wrote: > > You could probably try having a base VO for all the properties that you know > will be there and include a single property in the VO which would be either > a Dictionary or a generic object used as an associative array to handle all > your custom properties. Then just populate the VO like you normally would > and when it comes to extra properties, throw them in that one extra VO > property. You'd have to have some kind of parsing method on both ends but > I'd think this would work without too much trouble. > > -Jake > > On Tue, Mar 2, 2010 at 3:21 PM, Laurence wrote: > > > > > > > We're using an SQL database with a ColdFusion "intermediary" between the > > Flex app and the database... I've used XML files to configure a couple of > > the components -- give the user the option to change the layout of a > > component, for example, by modifying the contents of a config.xml file, that > > sort of thing... But I don't see us replacing our database with a bunch of > > XML files... (Or maybe I completely misunderstood your reply, which is quite > > possible...) > > > > I was hoping that there might be a way to get the program to modify its VOs > > by reading from an XML file what fields I want the VO to store... But > > honestly, I don't care where that info is stored... I just need to figure > > out how to dynamically modify a VO (and have ColdFusion realize that the VO > > has been changed by the Flex app) so I can deal with databases that have had > > fields added or changed without having to re-compile the entire program > > every time... And then, of course, how to reference these > > dynamically-modified VOs in my program. > > > > Thanks, > > L. > > > > --- In flexcoders@yahoogroups.com , Nick > > Middleweek wrote: > > > > > > Hi Laurence, > > > > > > I'm pretty new to Flex so there might be reasons to stick with Value > > Objects > > > that I'm unaware of but you can definitely read and write XML and > > generate > > > forms, layouts, etc on the fly based on the XML contents. I've used E4X > > to > > > query XML data that I've sucked in from an HTTP call, modified the XML > > using > > > E4X and pinged it back up to the HTTP server to save the XML data for > > later > > > use. > > > > > > Hope that helps... > > > > > > > > > Cheers, > > > Nick > > > -- > > > http://blog.middleweek.co.uk/ > > > > > > > > > > > > On 2 March 2010 19:19, Laurence wrote: > > > > > > > > > > > > > > > The program that I'm working on is for a company that does > > registrations > > > > for conventions and trade-shows. Different clients want different > > > > information stored for each show. Most of the information is the same > > from > > > > show-to-show, but every show has certain customizations that need to be > > > > done. > > > > > > > > The way they're doing it now is by going into the source code of their > > > > program and modifying it that way. We could do the same thing with our > > Flex > > > > app, but I'm trying like heck to avoid that... > > > > > > > > The problem I'm running into is the Flex Value Objects -- they pretty > > much > > > > have to be compiled into the .SWF file, which means we're stuck > > modifying > > > > source-code and re-compiling for each individual show. Not the solution > > we > > > > want. > > > > > > > > Is there a way to dynamically create and/or modify Value Objects so > > they > > > > can be changed without re-compiling the .SWF file? So that if a > > particular > > > > c
[flexcoders] Re: Dynamically create a Value Object...
See what I mean, I get criticized roundly. Of course I have security enabled, including passing constantly changing tokens (unique for each user for each login for each transaction) from the front end to the backend, that need to match. I suppose if there were a clever user that had lots of skills (my apps are intranet only) and their database user had the right privileges (I use DB security as well) perhaps they could wreak havoc. If I found that user, I would steal him/her away from the client where they are doing data entry and hire them to work for me. Paul --- In flexcoders@yahoogroups.com, Peeyush Tuli wrote: > > *Having said that, I created my applications in such a way that my middle > tier has a few generic methods for querying, updating, inserting data from a > DB (usually Oracle). There is also a generic middle tier routine to handle > stored procedures as well. > > My presentation layer, Flex, builds a SQL statement, and passes it to the > generic middle tier that processes it (generally just passes it to the DB), > and returns to Flex either an array collection (fully typed), if it was a > query, or the results of the non query sql statements.* > > I wouldnt recommend doing that ever from the presentation layer.. unless > your middle tier has no chance of being exposed over the web and there is no > smart and crazy user of your app who wants revenge :-) . There are tons of > things achievable through SQL queries which we cant even imagine( it could > format the hard drive). the kind of sql sanitization required over each such > call would be too much. > > On Wed, Mar 3, 2010 at 9:54 AM, aceoohay wrote: > > > > > > > First, let me say that I have been roundly criticized for taking the > > approach of NOT using VOs. > > > > Second, I use .NET & FluorineFX. > > > > Having said that, I created my applications in such a way that my middle > > tier has a few generic methods for querying, updating, inserting data from a > > DB (usually Oracle). There is also a generic middle tier routine to handle > > stored procedures as well. > > > > My presentation layer, Flex, builds a SQL statement, and passes it to the > > generic middle tier that processes it (generally just passes it to the DB), > > and returns to Flex either an array collection (fully typed), if it was a > > query, or the results of the non query sql statements. > > > > If one were clever, using the approach above, one could create a Flex app > > that requests a table structure from the DB, and builds a data entry screen > > on the fly. You may want a "schema" table that contains data validation type > > info that would be read in conjunction with the table structure to allow > > edits to be performed by flex. > > > > When complete, all you would need to do is modify the DB to create the > > table structure the customer needs, and add records to the schema table, and > > you have a new data entry module. > > > > By the way, my main reason for resisting the VO structure, is I thought > > that keeping multiple copies of the VO in sync would be a PITA. Anytime you > > modified a table you need to modify at least two VOs, and potentially > > recompile middle tier and presentation layer programs. > > > > Paul > > > > --- In flexcoders@yahoogroups.com , Jake > > Churchill wrote: > > > > > > You could probably try having a base VO for all the properties that you > > know > > > will be there and include a single property in the VO which would be > > either > > > a Dictionary or a generic object used as an associative array to handle > > all > > > your custom properties. Then just populate the VO like you normally would > > > and when it comes to extra properties, throw them in that one extra VO > > > property. You'd have to have some kind of parsing method on both ends but > > > I'd think this would work without too much trouble. > > > > > > -Jake > > > > > > On Tue, Mar 2, 2010 at 3:21 PM, Laurence wrote: > > > > > > > > > > > > > > > We're using an SQL database with a ColdFusion "intermediary" between > > the > > > > Flex app and the database... I've used XML files to configure a couple > > of > > > > the components -- give the user the option to change the layout of a > > > > component, for example, by modifying the contents of a config.xml file, > > that > > > > sort of thing... But I don't see us replacing our database with a bunch > > of > > > > XML files... (Or maybe I completely misunderstood your reply, which is > > quite > > > > possible...) > > > > > > > > I was hoping that there might be a way to get the program to modify its > > VOs > > > > by reading from an XML file what fields I want the VO to store... But > > > > honestly, I don't care where that info is stored... I just need to > > figure > > > > out how to dynamically modify a VO (and have ColdFusion realize that > > the VO > > > > has been changed by the Flex app) so I can deal with databases that > > have had > > > > fields added or changed without having to
[flexcoders] Re: Dynamically create a Value Object...
So don't change the backend. I am sure if you tried you could write a group of generic modules in CF. Here is an example of what I wrote using fluorine/asp.net. This version does not have the security I built in. You pass in an SQL statement and it sends back an array collection. I have a CF developer that works with me that says anything that I can do in .NET he can do in 1/4 the time, and 1/4 the code in CF. Public Function getSQLData(ByVal strSQL As String) As Object Dim objCommand As OracleCommand Dim objDA As OracleDataAdapter Dim objDT As DataTable Dim objConnection As OracleConnection Dim AppSec As New GMS.Security On Error GoTo getSQLDataError objConnection = AppSec.DBConnect(False) objCommand = New OracleCommand(strSQL, objConnection) objDA = New OracleDataAdapter(objCommand) objDT = New DataTable() objDA.Fill(objDT) objDA = Nothing objCommand = Nothing objConnection.Close() objConnection.Dispose() objConnection = Nothing AppSec = Nothing Return objDT --- In flexcoders@yahoogroups.com, Laurence MacNeill wrote: > > At 11:24 PM 3/2/2010, you wrote: > > > > > >First, let me say that I have been roundly criticized for taking the > >approach of NOT using VOs. > > > >Second, I use .NET & FluorineFX. > > Yes, well, unfortunately it's way too late in this project to change > our back-end. It's gonna be CF9... Period... My bosses would > *kill* me if I went to them now and said "Hey, you know all that > money we spent on CF? Well, it was a complete waste." Yeah -- that > won't go over well... Besides, they're already using CF on their > production servers, and they're quite familiar with it. It's not > going to change... .NET and Flourine are out... Sorry... > > So there has to be a way to do this with CF9. I just haven't found > it yet... I'm still hoping to get a response here with regards to that... > > > >If one were clever, using the approach above, one could create a > >Flex app that requests a table structure from the DB, and builds a > >data entry screen on the fly. You may want a "schema" table that > >contains data validation type info that would be read in conjunction > >with the table structure to allow edits to be performed by flex. > > I have no clue how to do that... I don't know what a "schema" table > is... I have heard of the term "schema," but that's pretty much as > far as my knowledge goes... How do you create a "schema" table? And > how can I get CF9 to deal with it? > > I do like the idea of building the data-entry screen on-the-fly, > though -- that's probably what we're going to have to do... I've > actually already done that with one part of the program that deals > with a variable number of fields that are all the same general > type... I guess I'll just have to migrate that to the rest of the > program, to deal with these dynamic VOs. (That is, if someone will > ever tell me exactly how to create one...) > > > >By the way, my main reason for resisting the VO structure, is I > >thought that keeping multiple copies of the VO in sync would be a > >PITA. Anytime you modified a table you need to modify at least two > >VOs, and potentially recompile middle tier and presentation layer programs. > > Well, that does seem to be exactly the problem I'm running into > here... And I've still not heard anything from anyone about creating > dynamic VOs. I've read a couple of things about creating bindable > dynamic objects, but I just can't figure out how to "change" that > into a VO that gets passed back and forth between Flex and CF9. If I > could figure that part out, then this might work... So, does anyone > know how to create such an animal? > > Alternatively, there was a suggestion earlier that I use an > associative array within my VO to grab the "changed" fields. I said > that I'd never been able to get CF to return such an array, but I got > no response on that... Can anyone tell me how to get CF9 to return > an associative array within a VO? In case there's just no other way > to do it... > > This MUST be a common problem here... Databases DO change all the > time. You can't tell me that Adobe hasn't created a secure way to > deal with this... Someone out there must know how to do what I'm > trying to do here... At this point, I'm willing to pay for the > answer. I've got to figure this out. And soon! > > Thanks, > L. >
Re: [flexcoders] Re: Dynamically create a Value Object...
You could probably try having a base VO for all the properties that you know will be there and include a single property in the VO which would be either a Dictionary or a generic object used as an associative array to handle all your custom properties. Then just populate the VO like you normally would and when it comes to extra properties, throw them in that one extra VO property. You'd have to have some kind of parsing method on both ends but I'd think this would work without too much trouble. -Jake On Tue, Mar 2, 2010 at 3:21 PM, Laurence wrote: > > > We're using an SQL database with a ColdFusion "intermediary" between the > Flex app and the database... I've used XML files to configure a couple of > the components -- give the user the option to change the layout of a > component, for example, by modifying the contents of a config.xml file, that > sort of thing... But I don't see us replacing our database with a bunch of > XML files... (Or maybe I completely misunderstood your reply, which is quite > possible...) > > I was hoping that there might be a way to get the program to modify its VOs > by reading from an XML file what fields I want the VO to store... But > honestly, I don't care where that info is stored... I just need to figure > out how to dynamically modify a VO (and have ColdFusion realize that the VO > has been changed by the Flex app) so I can deal with databases that have had > fields added or changed without having to re-compile the entire program > every time... And then, of course, how to reference these > dynamically-modified VOs in my program. > > Thanks, > L. > > --- In flexcoders@yahoogroups.com , Nick > Middleweek wrote: > > > > Hi Laurence, > > > > I'm pretty new to Flex so there might be reasons to stick with Value > Objects > > that I'm unaware of but you can definitely read and write XML and > generate > > forms, layouts, etc on the fly based on the XML contents. I've used E4X > to > > query XML data that I've sucked in from an HTTP call, modified the XML > using > > E4X and pinged it back up to the HTTP server to save the XML data for > later > > use. > > > > Hope that helps... > > > > > > Cheers, > > Nick > > -- > > http://blog.middleweek.co.uk/ > > > > > > > > On 2 March 2010 19:19, Laurence wrote: > > > > > > > > > > > The program that I'm working on is for a company that does > registrations > > > for conventions and trade-shows. Different clients want different > > > information stored for each show. Most of the information is the same > from > > > show-to-show, but every show has certain customizations that need to be > > > done. > > > > > > The way they're doing it now is by going into the source code of their > > > program and modifying it that way. We could do the same thing with our > Flex > > > app, but I'm trying like heck to avoid that... > > > > > > The problem I'm running into is the Flex Value Objects -- they pretty > much > > > have to be compiled into the .SWF file, which means we're stuck > modifying > > > source-code and re-compiling for each individual show. Not the solution > we > > > want. > > > > > > Is there a way to dynamically create and/or modify Value Objects so > they > > > can be changed without re-compiling the .SWF file? So that if a > particular > > > client wants stuff tracked that a different client doesn't want > tracked, we > > > don't have to create a generic version of our database that has all > these > > > extra fields in it, which most clients don't need? > > > > > > As it stands right now, the Value Objects force us to make every > database > > > for every show exactly the same -- unless we modify the Value Objects > for > > > each individual show and re-compile a separate .SWF file for that > show... If > > > there were a way to write, say, an .XML file that the program could > read and > > > modify itself accordingly for each show, that would be brilliant. Is > there a > > > way to do that? > > > > > > Thanks, > > > Laurence MacNeill > > > Mableton, Georgia, USA > > > > > > > > > > >
Re: [flexcoders] Re: Dynamically create a Value Object...
*Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements.* I wouldnt recommend doing that ever from the presentation layer.. unless your middle tier has no chance of being exposed over the web and there is no smart and crazy user of your app who wants revenge :-) . There are tons of things achievable through SQL queries which we cant even imagine( it could format the hard drive). the kind of sql sanitization required over each such call would be too much. On Wed, Mar 3, 2010 at 9:54 AM, aceoohay wrote: > > > First, let me say that I have been roundly criticized for taking the > approach of NOT using VOs. > > Second, I use .NET & FluorineFX. > > Having said that, I created my applications in such a way that my middle > tier has a few generic methods for querying, updating, inserting data from a > DB (usually Oracle). There is also a generic middle tier routine to handle > stored procedures as well. > > My presentation layer, Flex, builds a SQL statement, and passes it to the > generic middle tier that processes it (generally just passes it to the DB), > and returns to Flex either an array collection (fully typed), if it was a > query, or the results of the non query sql statements. > > If one were clever, using the approach above, one could create a Flex app > that requests a table structure from the DB, and builds a data entry screen > on the fly. You may want a "schema" table that contains data validation type > info that would be read in conjunction with the table structure to allow > edits to be performed by flex. > > When complete, all you would need to do is modify the DB to create the > table structure the customer needs, and add records to the schema table, and > you have a new data entry module. > > By the way, my main reason for resisting the VO structure, is I thought > that keeping multiple copies of the VO in sync would be a PITA. Anytime you > modified a table you need to modify at least two VOs, and potentially > recompile middle tier and presentation layer programs. > > Paul > > --- In flexcoders@yahoogroups.com , Jake > Churchill wrote: > > > > You could probably try having a base VO for all the properties that you > know > > will be there and include a single property in the VO which would be > either > > a Dictionary or a generic object used as an associative array to handle > all > > your custom properties. Then just populate the VO like you normally would > > and when it comes to extra properties, throw them in that one extra VO > > property. You'd have to have some kind of parsing method on both ends but > > I'd think this would work without too much trouble. > > > > -Jake > > > > On Tue, Mar 2, 2010 at 3:21 PM, Laurence wrote: > > > > > > > > > > > We're using an SQL database with a ColdFusion "intermediary" between > the > > > Flex app and the database... I've used XML files to configure a couple > of > > > the components -- give the user the option to change the layout of a > > > component, for example, by modifying the contents of a config.xml file, > that > > > sort of thing... But I don't see us replacing our database with a bunch > of > > > XML files... (Or maybe I completely misunderstood your reply, which is > quite > > > possible...) > > > > > > I was hoping that there might be a way to get the program to modify its > VOs > > > by reading from an XML file what fields I want the VO to store... But > > > honestly, I don't care where that info is stored... I just need to > figure > > > out how to dynamically modify a VO (and have ColdFusion realize that > the VO > > > has been changed by the Flex app) so I can deal with databases that > have had > > > fields added or changed without having to re-compile the entire program > > > every time... And then, of course, how to reference these > > > dynamically-modified VOs in my program. > > > > > > Thanks, > > > L. > > > > > > --- In flexcoders@yahoogroups.com > > > 40yahoogroups.com>, Nick > > > > Middleweek wrote: > > > > > > > > Hi Laurence, > > > > > > > > I'm pretty new to Flex so there might be reasons to stick with Value > > > Objects > > > > that I'm unaware of but you can definitely read and write XML and > > > generate > > > > forms, layouts, etc on the fly based on the XML contents. I've used > E4X > > > to > > > > query XML data that I've sucked in from an HTTP call, modified the > XML > > > using > > > > E4X and pinged it back up to the HTTP server to save the XML data for > > > later > > > > use. > > > > > > > > Hope that helps... > > > > > > > >