News

Support for PHP 5.3.12 / 5.4.2

at 2012-05-04 in 5.8-SERIES5.9-SERIESPHP5 by friebe

PHP 5With the release of PHP 5.3.12 and PHP 5.4.2, the current 5.8-SERIES's supported PHP versions now include all of PHP 5.2.10 through PHP 5.4.2.

The 5.9-SERIES supports all PHP versions between PHP 5.3.0 and PHP 5.4.2.



New util.UUID class

at 2012-04-23 in 5.9-SERIES by friebe

In the course of implementing RFC #0229, the UUID class from the old org.ietf package was moved to the XP Framework. At the same time, its API was changed and now not only implements time-based UUIDs (v1), but also name-based (v3, md5 and v5, sha1) as well as random (v4) UUIDs. For details on the new API, see here.

Heads up: If you have previously used the old UUID class, please be aware that you will need to change your code!



5.8.5RC2: REST

at 2012-04-17 in 5.8-SERIESAnnouncementsReleases by friebe

The second release candidate for 5.8.5 contains improvements to the REST server API's type and error handling, new handler finalization specializations (reloaded, cancel, success), extension method fixes for lang.Throwable instances and the ability to use SSL versions in conjuction with CURL transports.

Go get it!

  $ cd ~/xp
$ wget http://releases.xp-framework.net/setup/5.8.5RC2 -O - | php -- -d ~/bin/



RFC #0210 prerequisites

at 2012-04-15 in RFCs5.9-SERIES by friebe

A while ago we blogged about the cleanup work in xp.contrib. This was now structured in three different pull requests:

Renaming
This is handled in pull request #12 and includes renaming of the ecma, xmlrpc, img, google, microsoft and cyrus packages.

Removing
This is handled in pull request #13 and includes removal of the ajp, tar and gettext packages.

IETF package split
RFC #0229 consists of two parts:

  1. Creating a new util.UUID class in the framework (see here
  2. Renaming the "ieft" package to "punycode" and removing UUID from there (see here)



Split xp.contrib's "ietf"

at 2012-04-15 in 5.9-SERIESRFCs by friebe

Scope of Change
The UUID class will be merged into XP Framework core (as util.UUID) and the ietf package will be renamed to punycode.

Rationale
The "ietf" module contains both PunyCode and UUID implementations, which are completely unrelated.

Read the full RFC here



RFC #0235: CsvMapReader / CsvMapWriter

at 2012-04-15 in RFCs by friebe

Scope of Change
Instead of working with integers describing the cell offsets in CSV files, we will add a class CsvMapReader to read data into a map, and a class CsvMapWriter to write data from a map to CSV files.

Rationale
Enable writing code to flexibly deal with changing field order.

Read the full RFC here



Closures and "this"

at 2012-04-08 in PHP5Language by friebe

What does the following (plain PHP) do?

  class Lambda {
protected
$greeting= 'Hello';

protected
function greeter() {
return
function($who) { return $this->greeting.' '.$who; };
}

public
static function main($args) {
$l= new self();
$greeter= $l->greeter();
echo
$greeter($args[0] ?: 'World'), PHP_EOL;
}
}

Lambda::main
(array_slice($argv, 1));

Well, we'd say it should print Hello World. And that, indeed, is what it does when invoked with PHP 5.4.

Unfortunately, with PHP 5.3, this does not work (support for $this was first removed and then re-added again after a lengthy discussion on the php-internals mailing list). To make things , in other languages and platforms, things work even more differently. This is why we've started an RFC on this topic. Its goal is to define consistent behaviour over all platforms XP language runs on. For details, see here.



New method peer.URL::getCanonicalURL()

at 2012-04-06 in Announcements by friebe

The peer.URL class now features a new method getCanonicalURL. URL canonicalization, or normalization, consist of:

  • Converting the scheme and host to lower case.
  • Capitalizing letters in escape sequences
  • Decoding percent-encoded octets of unreserved characters.
  • Adding trailing /
  • Removing the default port.
  • Removing dot-segments.

For more details, see pull request 143.



XP on NodeJS: Class constants, annotations, stacktraces

at 2012-03-21 in LanguageExperiments by friebe

More work has been put into the XP on NodeJS experiment: The compiler now knows how to correctly emit class constants and annotations, and a couple of minor bugs have been fixed. The bigger efforts have gone into stabilizing the XP "Microkernel" (which is what I've decied to call the miniature XP Framework implementation written in JavaScript and adopted to NodeJS as well as Windows Scripting Host):

  • We're finally getting inheritance right (or are we ? - :-))?
  • Class path is now assembled via class.pth files
  • Classes can reside freely inside any of the class path elements
  • Stack traces are now shown, including method names and arguments
  • Parent class reflection now works
  • The entry point scripts (tools/node.js and tools/cscript.js) are now generated from a common base
  • When these are invoked without arguments, they show version and classpath info
Here's something for you visually oriented people:

Screenshot

Finally, now, also the emitter dictates the file extension instead of it being hardcoded, so compiling is now completely hassle-free, no more moving the generated .class.php files around.

To get started, visit https://github.com/thekid/xp-js !



XP on NodeJS: Flow control, exceptions, loops

at 2012-03-11 in ExperimentsLanguage by friebe

The XP on NodeJS experiment continues to grow, with the following now implemented:

  • Flow control, via if / else
  • Exceptions, try, catch, throw and finally
  • Loops - foreach, for, do and while
  • ARM blocks

A full list of changes can be seen in the compare view.



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES
Unicode
Language
5.9-SERIES