Version 0.9.6 released

This release contains mostly new features. The only notable change in the userland is the definition of views. Previously you created directly a view object. The view object was really bloated because it had to many responsibilities. So we split up the methods into different classes. The important class is the builder which is a helper class to create a view. In the following a short example to see how to migrate to the new builder.

Old
$view = new View();
$view->setGet($requestSchema);
// ...

return new Documentation\Simple($view);
New
$builder = new View\Builder();
$builder->setGet($requestSchema);
// ...

return new Documentation\Simple($builder->getView());

Beside this BC this release contains really great new features. In the following I will cover the points of the changelog:

  • Improved documentation

    A new "Getting started" guide was added to the manual which should help users to quickly get started with PSX.

  • Added raml generator

    A new generator was added which produces an RAML definition of the API. RAML is competing with Swagger and several other specifications to become the "standard" in describing RESTful APIs. At the moment it is not clear which standard emerges but RAML looks really promising.

  • Added table api abstract controller

    The table api abstract controller extends the schema controller but provides all needed schema informations from the given table. So essentially you can easily build a fully CRUD REST API for an sql table.

  • Improved and unified api view generators

    All generator classes are now located in the PSX\Api\View\Generator namespace. A generator is a class which generates a representation of an API view this can be i.e. an Swagger definition or an HTML documentation.

  • Added Swagger generator and improved related data models

    A new swagger generator was added and also the data models were updated to match the 1.2 specification.

  • Added resource listing class and improved the api documentation, swagger

    The resource listing class returns all available API controllers for further processing i.e. for the documentation controller.

  • Move generation of the fallback template into a seperate class

    It is now possible to exchange the fallback template with a custom implementation. The fallback template gets used if no template file was set.

    Unfortunately there is currently a small problem that the fallback generator always returns an html response. But the template engine is also used to generate application/svg+xml or text/plain content and in theses cases we dont want to display html content. This problem will be addressed in an future release.

  • Improved activitystreams test and implementation

    Some implementations from the W3C activity streams wiki were added as test case.

  • Removed location and added context class which holds parameters gathered around the controller/command

    Actually the location class was renamed to Context. The context class is a simple key value store which holds arbitrary informations such as the "route". It can be used by 3rd party classes to transport informations through the system. This is especially useful if you extend i.e. the loader system to pass other informations to the controller.