Performance: starting the application and closing down the application I do find is slower than normal, however, once the application has opened I find that because forms are already initialised as objects they pop up on the screen extrememly fast.<br><br>I also open all my tables at the start of the app and keep them open, thus eliminating having to wait for foxpro to open the tables everytime I want to perform an operation on them.<br><br>ok - this is how my application is layed out, people may think what a daft method but it works for me and is easy and quick to create once you have the initial templates set up.<br><br>1. entity objects, i.e. customer, supplier, invoices, orders, etc.<br>2. data access objects<br> ¦<br> -----record object<br> ¦<br> -----field object<br>3. interface objects(forms saved as classes)<br><br>I create a customer object say, which can contain data access objects for as many tables as it uses.<br><br>Data access objects are passed a table name, opens the table and creates a record object, and field objects for each of the fields in the table (the record object is essentially just a skeleton to hold the fields in place).<br><br>So, if i had just one customer table(for this example), I would do the following command:<br><br>this.addObject('recordObject','customerRecordObject_o')<br><br>Once this is done, I can reference the data in the table indirectly, i.e. if i wanted to get the customer reference I would do this:<br><br>ref = this.customerRecordObject_o.custRef.value<br>(custref is a field object which is a property of the record object).<br><br>I can save and restore using the following method:<br>this.customerRecordObject_o.pop() && gets data to mem<br>this.customerRecordObject_o.push() && commits data to disk<br><br>one field would be:<br>this.customerRecordObject_o.custRef.pop()<br>this.customerRecordObject_o.custRef.push()<br><br>I also have record locking methods also.<br><br>In the main entity object I also have lots of search and find code to remove me from the table-level operations and thus prevent (easy to make) mistakes such as moving a record passed EOF, typing GOOT instead of GOTO, etc - I never actually issue this command anymore.<br><br>To add form classes to the entity object(in this case customer) I do something similar to this:<br><br>this.addObject('mainCust_frm','mainCustForm_o')<br><br>Therefore text boxes, etc on the form objects can be assigned to my data objects, i.e.:<br><br>thisform.custRef_txt.controlSource = ;<br> thisform.parent.customerRecordObject_o.custref.value<br><br>I think that I will get kicked off if I take too much more space in this thread soon

<br><br>All my entity objects are also members of the main application object(thisapp), therefore every single object can be accessed down a hierarchy making sharing data and methods easy - but it can get messy if it is not managed properly, methods should still be assigned to the correct objects, I try not to have any code apart from validation on my forms, and have all the main processing code in the entity objects, I find that this makes forms much faster and smaller.<br><br>The downside, is of course, that all my code is stored in one class library, so if this goes wrong - no, I won't think about that, that's what backups are for

<br><br>If you are interested an want to know more about how I do things then let me know.