Welcome Guest, Not a member yet? Register   Sign In
Best practices for app initialization?
#1

[eluser]Doug Lerner[/eluser]
In general, I like to make sure things are properly initialized when my apps run. For example:

* Make sure the database tables are up-to-date with any changes to a schema.
* Make sure certain files exist, etc.

In my current development environment, I run "initialization functions" that automatically run themselves one time when the server starts up.

In a PHP-based app, the server itself is running all the time and the app only runs when one of it's URLs get called. I wouldn't want the overhead of running all the initialization scripts each time somebody calls one of the app's URLs.

What do people usually do to handle this situation?

Perhaps run an initialization script on every page, but have it immediately return if it checks some "last updated timestamp" and sees that no updates to the tables, etc. is required?

doug


Messages In This Thread
Best practices for app initialization? - by El Forum - 07-10-2008, 07:37 PM
Best practices for app initialization? - by El Forum - 07-10-2008, 07:50 PM
Best practices for app initialization? - by El Forum - 07-10-2008, 07:55 PM
Best practices for app initialization? - by El Forum - 07-10-2008, 09:12 PM
Best practices for app initialization? - by El Forum - 07-10-2008, 09:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB