Difference between revisions of "ARK2"

From ARK
Jump to: navigation, search
(Supported Platforms)
(Framework)
Line 12: Line 12:
 
== Framework ==
 
== Framework ==
  
It is proposed to implement a new Request/Response framework using a Route/Controller model, based on external components adhering to the PHP-FIG standards:
+
It is proposed to implement a new Request/Response framework using a Route/Controller model, based on external components adhering to the [http://www.php-fig.org/psr/ PHP-FIG] standards:
  
* Composer will be used to install external vendor libraries, including the components
+
* [https://getcomposer.org/ Composer] will be used to install external vendor libraries, including the components
* Symphony components will be used to build the framework (alternative Slim?)
+
* [http://symfony.com/ Symphony] components will be used to build the framework (alternative [http://www.slimframework.com/ Slim]?)
 +
 
 +
Read the following for further info:
 +
* http://www.sitepoint.com/build-php-framework-symfony-components/
 +
* http://symfony.com/doc/current/create_framework/index.html
  
 
== Configuration ==
 
== Configuration ==

Revision as of 20:26, 6 February 2016

This page details the progress on development of ARK 2.0

Supported Platforms

  • PHP: A minimum of v5.5 will be required (or maybe 5.6?), v7 will be supported.
  • MySQL or MariaDB (other databases, especially SQLite, may be considered later)

Code Repository

Development of ARK 2.0 is occurring in the open on GitHub https://github.com/lparchaeology/ark2

Framework

It is proposed to implement a new Request/Response framework using a Route/Controller model, based on external components adhering to the PHP-FIG standards:

  • Composer will be used to install external vendor libraries, including the components
  • Symphony components will be used to build the framework (alternative Slim?)

Read the following for further info:

Configuration

Significant changes to the configuration of ARK are being made to move from PHP file based configuration to database based configuration. This section will document these changes.

  • The config/ folder will contain all user-editable php files required, all other config will be in the database
  • The env_settings.php file is replaced by server.php and paths.php
  • server.php contains the settings for the database connection and root server path and should be the only file requiring editing for a default ARK install
  • paths.php contains the settings for the server file paths and should not need editing
  • To set-up an ARK, copy the config folder from php/arkdb/config to teh root folder and edit as required
  • preflight_checks.php now defaults to off, so needs to be enabled before running, and then deleted form config afterwards
  • settings.php has moved from config/ to php/settings/ and no longer requires user editing, all settings are now held in the database and should be configured per the instructions

Database

  • Configuration has been moved to the database
  • A new ADO class has been created to wrap all access to PDO

Changes

Other significant changes are documented here.


  • A number of config global variables have been renamed for consistency
    • Any var ending in _dir is an absolute filesystem directory path
    • Any var ending in _path is a URL path relative to the hostname and always starts with a '/'
    • Neither var ever ends in a separator
    • $ark_server_path -> $ark_root_dir
    • $ark_dir -> $ark_root_path and no longer ends in a /
    • $registered_files_host -> $registered_files_path
    • $phMagickDir -> $phmagick_file
    • ark_web_maptemp_dir -> ark_maptemp_path
    • $ark_lib_dir and $ark_lib_path point to the library folder
    • $skins_dir and $skins_path point to the skins folder
    • $skin_dir and $skin_path point to the current skin folder


  • A number of config global variables have been renamed for clarity
    • $mode -> $search_mode
    • $ftx_mode -> $search_ftx_mode


  • A number of config global variables have been deleted as they are not used:
    • $default_year
    • $conf_non_search_words
    • $conf_langs
    • $loaded_map_modules
    • $default_output_mode


  • The logging globals have been changed
    • $log, $conf_log_add, $conf_log_edt, $conf_log_del are deleted
    • $log_ins, $log_upd and $log_del are used instead


  • The $fs_path_sep and $fs_slash have been removed, use PATH_SEPARATOR and DIRECTORY_SEPARATOR constants instead.