Hi David,

First this is an App I took over and am maintaining. The client brought this to 
my attention because after working in the app since the late 80’s it’s still 
not clear and easy to remember all the steps (even with documentation) it takes 
to get things to the point of usability.

As I look at it I see several 4D list that need to be created. I see list items 
that need to be inserted into existing 4D list. I see several methods that have 
to be created (using generic routines where all that changes are the parameters 
names), and several methods that have to have code inserted into case 
statements.

So most of seems to me can be automated. Probably need a UI of some sort to add 
the name, abbreviation, and study number. (Then I can generate most things on 
the fly and view ten in the UI before it’s committed.)

All of this is for setting things up so that another routine will be run that 
reprocesses all this information crafting necessary records that are used based 
upon all these new constructs. And then, finally, the study can begin and data 
captured.

BTW, I’m intentionally trying not to explain everything as it’s a long and 
winding road…

Brittle? I suppose. But if automated less chance for error I think. Less need 
to reread and restudy somewhat unintuitive notes (yes I could rewrite them so 
they are clearer).

Anyway, my main concern was with dynamic method creation and inserting lines of 
code into existing methods. If it can be done then it’s something I might 
pursue - if the client thinks it might be worth it.

Otherwise I’ll trudge through the notes and create the structure manually.

Kind of a proof in concept is what I’m after.

Thanks for your thoughts,
John…


> A method is just a block of text. The magic in the method comes from 4D's
> interpreter. I modify methods via code and also do lots of code generation
> for my standard housekeeping sort of code. You can get and set the text
> however you like.
> 
> With that said, I don't see why you would do it in this case. It sounds
> like you've got some user configurable data that you need to do lookups on
> or otherwise manipulate. (Or are they a sort of decision-tree or driving a
> logic cascade?) Right now you're keeping it in a 4D list and are proposing
> to bake it into code. I think that the problem is that you're using lists
> for data that should be in the data file. Before baking the data into code,
> try and answer the question "how would I do this using the data file?" The
> data file is a great place to keep user-specific config data and such. If
> not there, then in a disk file. Putting the data into the data file makes
> is easier to see, reuse, validate, etc.
> 
> Speaking of validation, it sounds like the setup is a bit brittle and easy
> to mess up. Another solid argument for the data file. You need a UI for the
> configuration entry which creates the configuration data. Then you can have
> a *different* piece of code that interprets and validates the configuration
> data. That's one of the absolute core features of high-quality software.
> 
> I'm not really visualizing what your system is, does, or how it works...so
> apologies if I'm totally off the mark.
> 
>> Does it work in compiled databases (although this one runs live without
> being compiled)?
> 
> No. Not in compiled mode. If you need that, FootRunner has long been the go
> but these days I guess that 4DCODE gets the nod. I haven't used either
> enough to comment more on them.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to