
General Design Question- Advice sought.
I would appreciate a general opinion of this
newsgroup regarding design and
implementation of an application.
1. When multiple users are logged on and only
viewing records (not
editing or adding) does performance slow down, and
if so should it be a
valid consideration to take into account at
development.
Opening a database in "shared" mode results in
less performance than opening a database in
"exclusive" mode.
Once in multiuser mode, the only time you should
experience any degradation in performance is when
page locking has to take place. Everything comes
down to reducing the occurence of page locking
when it is not necessary.
2. My current application is solely driven by
code. I do not use any
bound forms. All forms are populated with data
via generic functions.
This was done simply because I could validate,
filter and find a lot easier.
Other than the obvious, yes more time required in
development as I'm not
using bound forms & controls are there any
drawbacks to this approach.
Overhead, ie, the size of the overall program. Not
a whole lot though, but it is still increased.
Queries that are stored (saved querydefs) run
faster than queries that are dynamically
contructed and executed or run. For large
recordset operations this can be significant.
Revisions, updates, and ongoing maintenance to the
application will require reading, tracing
branches, and understanding the code. This may
require more time than usual for implementing what
otherwise would have been a simple change. For
example, adding field to a table. The existing
rst.Update will not pick up the new control's
value and update the new field. You will need to
always need to add the line rst![NewFieldName] =
me![NewControl] with the section of code that does
the record updating.
3. My current application requires that if a
user is satisfied with an
editing session then the user must click the
'Save' button. At this point,
after validation of course, the record is saved
(via code within a
transaction). Does this approach alleviate any
problems that may occur
within a multi-user environment. (I have
incorporated error handlers for
record locking)
If implemented correctly it reduces the amount of
time that the records within the page(s) will be
locked. This will generally provide for a
friendlier multi-user environment.
This creates a pseudo-optimistic page locking
scheme. In effect, pessimistic locking can be
utilized more effectively by pushing the locking
back to when the record actually needs to be
updated.
The validation rules can also take place in more
user efficient manner. Instead of waiting until
the record is being added or updated like the
table based validation rule property does, the
validation rule can be applied right then and
there. To me there is nothing more annoying than
getting to the end of a large record and being
pushed back to a field 20 tab stops prior becuase
something is incorrect. If the rule is not
dependent on information alsewhere on the form it
should be validated OnExit. It should always be
validated
as soon as possible and then backed up by the
yable level validation rule.
Making the user confirm there actions "update,
save, add ..." is a good idea, avoids the
situation of inadvertently tabbing through a
record, and makes the user more accountable for
what they are doing. You can also use an unbound
control that is the last tab stop, validated with
"Y" or "N" and defaulted to "N" to control the
updating of the records.
Bill McKnight
PCS