News

RFC #0169: New package unittest.web

at 2008-08-14 in RFCsUnittests by friebe

Scope of Change
A new package unittest.web will be created. It will contain the base class WebTestCase with which web tests can be written.

Rationale
Integration testing.

Read the full RFC here



PHP 5.3 and typesafe enumerations

at 2008-08-12 in PHP5 by friebe

Within RFC #0132, typesafe enumerations were added to the XP framework. Because PHP does not support them language-wise, we need a bit of workaround syntax to make them work.

With PHP 5.3 and its so-called "late static binding features", enum declarations can now be written much more compact for the simplest use-case. Example:

<?php 
class TransactionType extends Enum {
public
static $NOT_SUPPORTED, $REQUIRED, $SUPPORTS, $NEVER;
}
?>


(more)

PHP 5.3

at 2008-08-08 in PHP5 by friebe

I've started playing around with the first alpha release of PHP 5.3 (should be released around September or October this year), see also the PHP 5.3 alpha1 announcement from August 1st.

Some first observations:


(more)

RFC #0171: Rename util.DateInterval class

at 2008-08-08 in RFCs by friebe

Scope of Change
The util.DateInterval class will be renamed.

Rationale
PHP 5.3 has a class called DateInterval built-in. Thus, non-namespaced versions of the XP framework won't run on PHP 5.3.

Read the full RFC here



5.6.8-RELEASE: HTTP, FTP, features and bugfixes

at 2008-08-05 in ReleasesAnnouncements by friebe

This release features quite a bit of revamp in the peer.http API's backings - though nothing should change from the outside except for the new proxy feature, numerous fixes to the FTP support, and a couple of nice-to-have features.

To use 5.6.8:

  1. Open a shell window
  2. Type wget http://xp-framework.net/downloads/releases/5.6.8/setup -O - | php
  3. Add the path shown at the end to your PATH environment setting


(more)

Casting an object array to a string array

at 2008-07-19 in Further reading by friebe

While testing the new EASC server and client implementations we're currently working on, we asked ourselves how to cast an object array to, for example, a string array.

The following is an array of objects consisting solely of strings:

  Object[] strings= new Object[] { "Hello", "World" };

The first thing we tried was to cast it via (String[])strings. This is legal sourcecode but will raise a java.lang.ClassCastException in Java, and a System.InvalidCastException in C#, both at runtime.


(more)

RFC #0164: Exceptions for XPClass::get*()

at 2008-07-14 in RFCs by friebe

Scope of Change
The following methods in lang.XPClass will throw exceptions instead of returning NULL for the case the respective element is not found:

  • getConstructor()
  • getMethod(string name)
  • getField(string name)

Rationale
Allow for chaining, be consistent with other APIs (if a hasX method exists, the getX method will throw an exception) and the getAnnotation() method.

Read the full RFC here



Search function online

at 2008-06-28 in Announcements by friebe

On a short note: Finally had time to set up this site's search functionality on its production server. In the top right corner, you can find the search box which will search the site for words you enter (currently, only the news section is indexed). Happy searching:-)



Exceptions in Java

at 2008-06-25 in Further reading by friebe

Found this nice article on exceptions in Java - from a historic overview of Oak, on checked and unchecked exceptions, and asynchronous exceptions it explains nicely (and with code examples) what the Java exception mechanism is about. What I like most are the best practices section, which applies not only to Java:

  • Don't Write Own Exceptions
  • Write Useful Exceptions
  • Throw exceptions early
  • Catch exceptions late
  • Document exceptions
  • Unit Test Exceptions

http://www.javaspecialists.eu/archive/Issue162.html



5.6.7-RELEASE

at 2008-06-09 in ReleasesAnnouncements by friebe

Today, the XP group released XP 5.6.7. This release is the first official one to be released with the new setup infrastructure. Besides that, it contains respect for ANSI SQL in the rdbms package, a patch to the scriptlet API to produce nicer URLs, the new memory-saving XAR file format, some minor bugfixes and a couple of new features.

To use 5.6.7:


(more)

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