Annotations are a really helpful feature in present-day development. An annotation is a special form of syntactic metadata that can be added to source code elements such as classes, methods, properties and parameters. They do not affect the program semantic directly, but can be used by tools and libraries to handle such annotated code in a certain way. Examples for such usage are marking classes or methods as accessible via web services, marking methods as unit test methods, or to define how an object should be persisted.
Annotations are mainly known from the Java programming language, and since Java 5.0 annotations are a language feature. More important, these annotations are accessible at runtime, which allow various new meta-programming approaches where the domain object stays very clean and does not have any references to the handling code, i.e. when persisting domain objects or rendering them into XML.
Today I want to take a look on the state of annotations in the PHP world. PHP itself does not offer such a feature, so we have to take a look at userland implementations. Such implementations are possible using the reflection API introduced with PHP 5. When looking at userland implementations one has to differentiate between specialised and generic implementations.
Continue reading "State of annotations in the PHP world"
Today we shipped Stubbles 0.11.0, one month later than originally planned and hurting our monthly release cycle. This is mostly due to vacation and time constraints. Unfortunately we have to delay the 0.12.0 and 1.0.0 releases as well, but this fits better into our current time schedule.
But as consolation 0.11.0 brings some really cool new features beside the usual bugfixes. One improvement is within the rss package, which now allows to annotate any entity with the newly introduced @RSSFeed annotation. This makes it much easier to create an rss feed from any object you have in your application.
The streams package experienced some improvements like the new memory stream wrapper and better checks for handles so that resources which are not of type stream will now be rejected.
Richard contributed an implementation of the FirePHP protocol which allows kind of var_dump() debugging in AJAX applications without breaking the functionality of the application itself when the value is dumped.
However the coolest new feature from my point of view is the new support for handling dates. We introduced a new net::stubbles::lang::types::stubDate class, which eases handling of dates. This would not be worth that much of enthusiasm for itself, but the coolest thing about this is that we added filters for transforming request input values into date instances, and moreover our persistance API supports date instances as return values from entities, persisting those into the database and returning them back from there into the entity. This way the developer only has to work with date instances as input and output values, and Stubbles takes care to provide the instances and to persist or serialize them.
As always, for a full list of changes see the changelog. Have fun!
Today I gave a short talk about Stubbles' website cache in our weekly team meeting. The talk explains what the website cache is good for, how it basically works, and what a developer should take into account when developing new page elements. You can find the slides of the talk in the manual for the website cache, see attachments.
« previous page
(Page 1 of 1, totaling 3 entries)
next page » Frontpage