History of PreflightConcept
Version 7 | Current version | |
---|---|---|
BackgroundThe Preflight CVS branch is based on an email sent to the dev list in 17 June, 2004. Here is an excerpt:... 1 - Preflight check of configuration, database connection, valid admin user account, valid tiki tables (eg tiki_preferences) and other checks that without TP wouldn't run properly. At the moment, you are whisked away to install/install.php where the admin account passwd is ignored and the install is a little rough, overwriting existing admin info and allowing complete initialisation of the database. 2 - Considering you still need a templating and formatting framework, I began wondering if the base class should actually not be TikiDB.php but something else (TikiSystem maybe?). TP classes are all inherited from TikiDB - meaning it needs to be working with a valid DB connection before you get anywhere. As much as it would prove useless, I believe that if our base class should do basic formatting, themeing, templating, etc - and DB connections should be secondary to this. This would allow the install to be better integrated into the kernel and in theory be more stable. ... Preflight will not be a release, seperate installer or anything like that. Preflight is basically a method to reduce our kernel to the lowest common denominator or functions and classes, to enable basic Tikipro functionality. This should, in theory, provide a more stable and streamlined kernel to be merged back into Clyde. The Preflight system will be a series of checks for the PREFLIGHT definition in HEAD. This define should be created in config_inc.php. For example, in kernel/config_inc.php: {CODE(colors=>phpcode)} define( 'PREFLIGHT', true ); {CODE} and then in kernel/setup_inc.php {CODE(colors=>phpcode)} if (!defined( 'PREFLIGHT' ) ) { // skip this bit... } {CODE} IntroductionSo, here's what I've got in my head...There is a module called preflight. Currently, we only checkout kernel/, lang/, themes/ and util/. We begin adding if !defined statements to all the code in kernel that has to do with other packages. The initial objective is to present an empty page with no database connection, no users but a selection of languages and themes via the modules. The reason for this - the first page of the install could be used to select a language (and maybe a theme), without necessarily having a db connection, preferences or users for that matter. If we can build the kernel to support these functions, without a database or users, it would be perfect for the installer and provide and even more stable kernel for Tikipro. If we can present smarty templates, in different languages, different themes, default preferences, no database, no users - we will have a rock solid foundation to build clyde upon. I have suggested we move AdoDB and Smarty to utils/, as they are 3rd party code and libraries and should be kept seperately for updating seperately. CVS CheckoutThe following will create a preflight/ directory and checkout the initial code.export CVS_RSH=ssh cvs -qz5 -d :ext:your_sfacct@cvs.sf.net:/cvsroot/tikipro co -dpreflight preflight The FutureThis is the future of Tikipro. If you have ideas for fundamental changes, this is the place to raise them, and submit if majority agrees.Visit the forum and have your say. | {{Exterminate| |date=13-November-2008 |note=Perhaps it's worth combing through this page and trying to rescue some of this information. }} This is a fluid document still in draft - please feel free to discuss on IRC should you have any suggestions. BackgroundThe Preflight CVS branch is based on an email sent to the dev list in 17 June, 2004. Here is an excerpt:... 1 - Preflight check of configuration, database connection, valid admin user account, valid tiki tables (eg tiki_preferences) and other checks that without TP wouldn't run properly. At the moment, you are whisked away to install/install.php where the admin account passwd is ignored and the install is a little rough, overwriting existing admin info and allowing complete initialisation of the database. 2 - Considering you still need a templating and formatting framework, I began wondering if the base class should actually not be TikiDB.php but something else (TikiSystem maybe?). TP classes are all inherited from TikiDB - meaning it needs to be working with a valid DB connection before you get anywhere. As much as it would prove useless, I believe that if our base class should do basic formatting, themeing, templating, etc - and DB connections should be secondary to this. This would allow the install to be better integrated into the kernel and in theory be more stable. ... Preflight will not be a release, seperate installer or anything like that. Preflight is basically a method to reduce our kernel to the lowest common denominator or functions and classes, to enable basic bitweaver functionality. This should, in theory, provide a more stable and streamlined kernel to be merged back into ReleaseOne. IntroductionSo, here's what I've got in my head...The preflight core would consist of kernel/, lang/, themes/ and util/. The initial objective is to present an empty page with no database connection, no users but a selection of languages and themes via the modules. The reason for this - the first page of the install could be used to select a language (and maybe a theme), without necessarily having a db connection, preferences or users for that matter. If we can build the kernel to support these functions, without a database or users, it would be perfect for the installer and provide and even more stable kernel for bitweaver. If we can present smarty templates, in different languages, different themes, default preferences, no database, no users - we will have a rock solid foundation to build ReleaseOne upon. I have suggested we move AdoDB and Smarty to utils/, as they are 3rd party code and libraries and should be kept seperately for updating seperately. The FutureThis is the future of bitweaver (as I see it anyway). If you have ideas for fundamental changes, this is the place to raise them, and submit if majority agrees.Visit the forum and have your say. Preflight Sequence of InitialisationPackages should be able to register check required for them to work for any of the items below. Registered checks for package version dependencies, etc should be utilised.System Requirements CheckPreflight library functionsWritable temp and storage directoriesPHP.INI settingsThe code here should ini_get settings and compare with recommended values. If they do not meet recommended values, either (to be decided) set dynamically or advise to change in the PHP.INI file.PHP LibrariesCheck to see if suitable libraries and versions are available, such as GD, ImageMagick, LDAP, MySQL, PgSQL - possible even AdoDB and Smarty (I've noticed FC2 now comes with an AdoDB rpm).Compatibility FunctionsThe PHPCompat library could be used for older versions of PHP to allow functionality with checks for function existence.AdoDB, Smarty and other required 3rd party librariesRather than hardcode includes, we should use the library path to find these libraries. This will allow system wide references to a single library install.Install checksCheck for essential packages such as kernel, users, themes, langs and util. Possibly include package version checking.Check for suitable libraries (under /util/) and versioning. Check for temp folder r/w access (templates_c, cache). Administrator UserIs an admin set? Do we need to use admin password to continue installation.Database ConnectionUsing TikiDB, check for valid database settings/URI and connection.The installer and preflight will probably have to do different types of checks - at least during the first install. Perhaps the checks on revisiting the installer can be the same, i.e. if the file config_inc.php is already present. Database TablesCheck if core database tables exists, such as users_users (for admin account), tiki_preferences (for preferences), etc.Initialisation settingsCheck if important things are set, such as storage path.Package selectionWhat packages are installed / are they working? can we check that? is it worth checking? |