Archive for the ‘WWW’ Category
Lessons learned from a frame-based PHP/SQL/JavaScript web application
- Get the data structures right immediately, and forget about it. (Especially SQL tables, since adding columns can make you have to rewrite all of your queries later on.)
- Start with an empty database so that the displays for initial conditions (i.e., telling users to enter data) are met at the start.
- Then move on to the most complex conditions.
- For frames:
- Put all of the data in one place, at the top level of the window.
- Load data from the database in a hidden frame, which you will be able to refresh.
- Place draw functions at the highest level, so that frames can be refreshed from anywhere.
HTML Tidy
Trying out HTML Tidy.
tidy --help
Nice way to clean up HTML:
tidy --add-xml-decl yes --output-xml yes --doctype auto mtoc.htm > mtoc.xml
Note that two dashes introduce each parameter name, and that the input filename must come after the parameter values.
What a great program. Not too easy to write code that understands errors, I bet, either.