The following release is a demo project built with Limb 2.4-alpha1. Alpha status implies that it's not stable yet, API is not stabilized and is subject to change in the future, it's not recommended to use this release in production. This release also breaks BC with 2.3.x.
Here's the list of the most noticeable changes:
Limb doesn't require any more that projects built with it be installed in the root web directory. There's also no annoying starting /root part for every url.
All requests are handled with index.php script(root.php is gone). All requests are PathInfo based(which is a part of CGI standard) and generally look like: index.php/path/to/some/object?foo=1&bar=2.
In theory PathInfo support allows to use Limb with other web servers, not only Apache. Unfortunately we didn't manage to enable PathInfo support in IIS(and it's known to support it), thus we can't be 100% sure.
One of the most popular ways to make urls look more readable is to use Apache mod_rewrite. The demo project contains the .htaccess file with mod_rewrite rules enabled. Limb must be informed about mod_rewrite usage explicitly via ENABLE_MOD_REWRITE constant in setup.php(setup.override.php):
... define('ENABLE_MOD_REWRITE', true); ...
Limb defines automatically the following set of constants:
HTTP_BASE_PATH - http location of the Limb based project, e.g. http://dot.com/limb
HTTP_GATEWAY_PATH - http location of Limb requests gateway, e.g. http://dot.com/limb/index.php. In case of mod_rewrite HTTP_GATEWAY_PATH == HTTP_BASE_PATH
HTTP_SHARED_PATH - http location of the Limb shared directory
Please keep in mind that all these constants have trailing slash «/»
These constants are globally available in templates: {#HTTP_BASE_PATH}, {#HTTP_GATEWAY_PATH}, {#HTTP_SHARED_PATH}.
New <Limb:HTTP_BASE> tag was added which is responsible for:
fetcher sets new http_path attribute for each fetched object, you can use this attribute templates
Current admin GUI was tested in Mozilla FireFox only, better support for other major browser is planned for next releases.
Previous frame based design raised some usability issues. The new design is not frame based anymore. The new design also introduces renewed styles, icons, color schemes, etc.
Some new tags were added in order to unify admin templates.
Admin forms:
<admin:form> <admin:form:header> <admin:form:title>...</admin:form:title> <admin:form:icon>...</admin:form:icon> </admin:form:header> <admin:form:hint>...</admin:form:hint> <admin:form:tabs> <admin:form:tab_item id='tab1'> <admin:form:tab_label>...</admin:form:tab_label> <admin:form:tab_content></admin:form:tab_content> </admin:form:tab_item> ... </admin:form:tabs> <admin:form:buttons> <admin:form:buttons:cancel> ... </admin:form:buttons> </admin:form>
Admin tables:
<admin:list> <admin:list:title>...</admin:list:title> <admin:list:item> <admin:list:cell>...</admin:list:cell> <admin:list:cell>...</admin:list:cell> </admin:list:item> <admin:list:buttons>...</admin:list:buttons> </admin:list>
We're gradually porting existing <table> based markup to <div> based one and moving all formatting rules to CSS stylesheets in order to make html more W3C standards compliant. It's planned to move to XHTML in the nearest future.
JavaScript layer was substantially refactored and now follows JSAN library namespace conventions. All Limb related code is under Limb namespace which allows to avoid name clashes when used with external JavaScript products.
Node select GUI is AJAX based now. We're planning to improve other parts of GUI using AJAX which in theory should decrease the server load.
Some new tools were added for multibyte(UTF8) strings processing. All non ASCII content was converted to UTF8.
The following multibyte aware global functions were added(analogous to PHP built ones):
_substr($str, $start, $length=null) _explode($sep, $str) _str_replace($s, $r, $str) _ltrim($str, $charlist='') _rtrim($str, $charlist='') _trim($str, $charlist='') _strtolower($string) _strtoupper($string) _strpos($haystack, $needle, $offset=null)
These functions delegate all strings processing to the currently selected strings driver. There're several drivers, the most appropriate one is used according to PHP installed extensions, e.g. if mbstring extension is available then the most optimized driver will be used, if not - a slower pure PHP emulation will be used then.
By default, however, singlebyte driver is loaded. UTF8 is ASCII compatible(i.e. English only content) and it makes sense to use the multibyte driver only if really neccessary. You can enable the multibyte driver by declaring the ENABLE_UTF8 constant in setup.php(setup.override.php):
... define('ENABLE_UTF8', true); ...
You should clearly understand when it makes sense to use multibyte aware functions instead of PHP built ones. There's a very good tutorial on UTF8 peculiarites by Harry Fuecks.
We're gradually increasing the quality of code for 2.x series.
This version of Limb inroduces some transparent for the client levels of caching which speed up notably the overall execution time.
The new caching_tree decorator wraps materialized_path_tree and caches all requests to the file system cache. This cache persists between requests and is flushed completely if tree gets changed somehow. It allow to keep the cached tree in sync with the actual tree stored in database.
This functionality has beta quality and is switched off be default(on in demo project though), it can be enabled by placing the following code in project setup.php(setup.override.php):
define('ENABLE_TREE_CACHE', true);
The new db_caching_driver decorator was added which caches all identical DB request results during the request session.
This functionality has beta quality and is switched off be default(on in demo project though), it can be enabled by placing the following code in project setup.php(setup.override.php):
define('ENABLE_DB_CACHE', true);