FileMaker Database-Driven Web Site Performance - File Maker

Here are several tips to make your FileMaker-driven Web sites as speedy as possible:

  • Design FileMaker layouts with the Web in mind and thus as simply as possible; layouts should only contain fields that are used on the Web page. Also, use the Web color palette.
  • Use the -lay CDML tag to reduce the number of fields FileMaker needs to evaluate when processing a request sent to it. If a field in a format file isn’t on the layout specified with the -lay CDML tag, it won’t appear on the Web page returned to the user.
  • Use static Web publishing with fields containing value lists if the value list items won’t change over time. For more info, see “Dynamic vs. static database publishing” in the “Considerations before publishing a database” section of the CDML Reference.fp5 database.
  • Use the max CDML tag to reduce the number of records being returned on your search results format file.
  • If you’re publishing graphic images directly from a container field instead of as a reference to the graphic’s file path (the recommended method because it is much faster), store only JPEG and GIF images (not PICT or BMP). This stops FileMaker from converting the images to a Web-friendly format before sending them to a user over the Internet.
  • Use small graphics created with the lowest possible DPI (dots per inch). Most computer monitors display graphics at a pretty low DPI so using images with higher a DPI adds unnecessary overhead to any Web served database.
  • Generally, all fields used on Web pages should be stored fields. Try not to send unstored calculation fields to Web browsers because it slows things down quite a lot. Likewise, fields used in finds and sorts should be indexed, too.
  • Leave any Web-served database set to single-user if you don’t need to log on to it locally. Extra network (LAN/WAN) traffic to and from your database will slow Web services down.
  • You can add hidden tags to format file forms to run a “flush cache to disk” script after each data change to preserve the integrity of your data. You can also use scripts run when forms are submitted to speed Web service by doing such things as limiting the number of records returned to a browser at a time, not sorting records if the results contain too many records, filtering out wild card search characters, and so on.
  • Don’t allow anyone the privilege to delete records in the Access Privileges dialog of any Web-served database. Whether or not you’ve got any “delete” format files, a smart programmer who knows FileMaker can easily send a delete command to your database by putting the command in a URL (like FMPro?-DB=db.fp5&- Format=rslt.htm&-RecID=4&-Delete).
  • Hide or minimize databases on the Web server computer so that FileMaker doesn’t need to refresh when users send commands to it, which can add a few seconds to every request from a user taking action on the database from a Web browser.

The Web Security Database
With solutions built using Custom Web Publishing you’ll probably want to step up to using the Web Security Database that comes with FileMaker (look in FileMaker’s Web Security folder and you’ll see a folder containing these databases) to administer security across all your Web-shared databases. Go ahead and open all these Web Security databases now. Also launch the Art.fp5 database or some other solution that you’ve Web-enabled. Go to the Web Security.fp5 database and create a new record. Enter art.fp5 in the Database Name field. Enter a database password if you want to additionally add any access privilege restrictions in the database’s Access Privileges dialog. Now add users and assign them each passwords and privileges. You can also define access to specific fields, too.

Next, go into Edit > Preferences > Application to the Plug-Ins tab and configure Web Companion. Under the Security heading, select “Web Security Database”. Click OK twice.

You’ve probably realized that using the Web Security Database to administer access to your Web site should only really be used on databases where you’ll know who the users will be, i.e. internal or “your-employees’-eyes-only” type systems. There would be no need for such security, most likely, for databases served to the general public like a browse-only product catalog. For instance, why would you ask a user to enter a password to see this general info? Could be that you would only want authorized resellers to see your prices.

Remote Administration, Record-Level Security, and SSL
The Web Security Database can be remotely administered, too, using the format files also included in the Security folder inside the Web Security folder in the same folder as your FileMaker application. You would simply move these format files into the Web folder, Web-share the security databases under File > Sharing, and turn remote administration on in Web Companion’s plug-in configuration (make sure to require a password).

Miscellaneous Web Security Notes and Tips

  • Any user who has the Export Records access privilege can start serving a database to anyone using their copy of the Web Companion plug-in.
  • To not display a Web-shared database on the Instant Web Publishing default home page, end the database’s name with an underscore, as in “PurpleShirts_.fp5”.
  • Only check the “Instant Web Publishing” box in Web Companion’s plug-in configuration if you’re using Instant Web Publishing. This box doesn’t need to be checked for Custom Web Publishing to work.
  • Frequently review your Access Log log file to check for unauthorized access.
  • If you Web-share a layout containing related fields, the related database will automatically open using the same access privileges the user has to the “parent” database.
  • Don’t turn on remote security administration unless you’re going to use it. If you use it, always require a password.

Final Word on Custom Web Publishing
This merely scratches the surface of Custom Web Publishing. Unfortunately, you’re not going to pick up CDML overnight. Indeed, the author has been using it for almost five years and still doesn’t know everything there is to know about its most advanced features. Fortunately, the key to success is always starting with the templates that come with your FileMaker software and modifying them to suit your needs. As you do so, you’ll see under the hood and start to understand the way that CDML tags work and how they’re processed by FileMaker when a user sends in a request from their Web browser. However, keep at it and you’ll pick up the basics in no time. If possible, use two computers when doing Web development: Use one to test the user’s experience of your solution in a Web browser and the other to host the solution and for editing the HTML-/CDML-coded format files. Make sure to test the solution with various platforms because Web sites often look quite different depending on your operating system and/or Web browser version.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

File Maker Topics