[[toc]]
++ Description
Skeleton is an application template. You can use it to kickstart development, see ((CreatingYourFirstModule|Creating Your First Module)).
It is also an educational example, trying to keep up with the framework's most recent best practices. Comments are decidedly wordy.
++ Usage
Skeleton does not provide any end user value. It does generate a DB schema, a portal block and a preference setting, but none of it implements any particular feature.
The list shown in the only UI screen is generated from a mock array.
++ Bugs
List any tickets on http://bugs.horde.org/ that cover this issue or are relevant to it.
++ People
Ralf Lang for the H6 upgrade
Jan Schneider and Chuck Hagenbuch for the original content.
++ Resources
Include links to protocol descriptions, specifications, RFCs, external applications, presentations on http://horde.org/papers/ or elsewhere that are relevant, articles, API docs from http://dev.horde.org/ - anything that might be useful to someone working on this.
++ UPGRADING
As skeleton is not designed to be of any use, this section describes evolution of best practice as it becomes available. These MAY also be applied to other applications as time permits and is feasible.
Because skeleton is also used as a clone template, the version history should not be spammed with entries reflecting the changes.
+++ Registry Snippet
A registry snippet has been placed in doc/registry.d/ - this prevents skeleton from showing up as a button with no text when installed. The snippet is automatically picked up by the horde-installer-plugin and copied to the var/config/horde/registry.d dir unless a file already exists. This is symlinked to web/horde/config/registry.d for BC reasons.
+++ Routes/Controllers: No more list.php and index.php
The list.php UI page has been moved to the routes/controller framework. TODO link to a more detailed article on that framework feature.
The index.php is no longer needed. With a sufficiently recent version of the horde/horde-deployment (2021-11-27 and beyond), there is a rewrite rule that forwards missing directory indexes to the routes/controller framework. A default route catches all links which are not handled by other routes or files
+++ Constructor injection replaces globals
These globals are avoided:
+++ Usage of injector (DIC) in controllers
The injector is now offered by constructor injection. We pass the namespaced version, not the unnamespaced wrapper. The $injector global should not be used.
The injector SHOULD not need to be passed to controllers at all but there is too much horde code out there that gets and uses the injector as a replacement for missing factories, catalogs, service locators etc. Plans are to keep the injector in the signature but replace it with a wrapper that logs any uses of getInstance as debug messages. People need time to adopt.
+++ src/ code removes underscores for most non-publics
Traditional code uses the PEAR convention, prepending names with underscores:
These underscores have been removed unless
+++ lib/ code removed or turned into wrappers
Ongoing:
Original code in lib either is turned into mere wrappers or removed altogether. As applications are not inherited from or used like libraries, only the framework's integration points need to be kept as wrappers:
+++ Strict types applied and type hints turned to real types
The strict typing mode is used consistently everywhere in src/.
Most property, parameter and return type hints were turned into actual types. Many missing types were added.
Exceptions:
+++ Code moves to PSR-4 with unnamespaced wrappers
The code in src/ started out as a copy of the traditional, unnamespaced code in lib/ and then got namespaced. In some cases, structure and names were change. We want the class name to be useful in its most likely use cases without the namespace prepended. To avoid confusion or name clashes, factory got moved into the namespace of the driver. Horde\Skeleton\Driver\Driver and Horde\Skeleton\Driver\DriverFactory may seem like duplication but consider:
Back to the ((Project|Project List))