Editorial

Bind server sockets to any free port

at 2010-02-01 in UnittestsEditorialAnnouncements by friebe

At the company I work for, we let the XP Framework's unittest run on various different machines, including Windows 2008 server and 32- as well as 64-bit Debian Linux boxes, with PHP versions ranging from 5.2.0 - 5.3.1 (lots of permutation, yes).

Hudson

On some of the newer machines we have configured Hudson to start multiple test runners at the same time. This lead to problems with the integration tests (for the FTP API, for example) where we actually fork off a standalone server in the background: The port in use was hardcoded. While this is perfectly OK normally, with mutiples suites executing simultaneously and trying to bind the same port, we were running into problems.


(more)

Deprecation

at 2009-09-06 in Editorial by friebe

Every now and then, we find out our decisions from the past weren't the most elegant ones, limit us in unnecessary ways, or don't fit into the bigger picture anymore. This is a natural thing, as we move on and gather experience, we see our solutions in a different light - and we see how a problem could have been solved in other ways. In reflective moments we start thinking "If I had to do this again today, ...". This happens in personal life but also - for programmers - with code we have written.


(more)

Unified runners in the web

at 2009-08-11 in ExamplesEditorialAnnouncements by kiesel

The XP framework had offered developers the power of an easy class loading setup via the new XP runners that are delivered with every release since several releases now. These runners have proven themselves very useful in day-to-day business, so we're working on porting them to the web!

With the so-called web-runners these new cool and useful features will become available for you:


  • Easier classpath setup
    Classpaths will be constructed from .pth files, in the same manner as xpcli does it.

  • No boilerplate "index.php"s any more
    you won't need the same index.php over and over in every project again; even more: you don't need any entrypoint .php any more even for SOAP- or JSON-endpoints.

  • Multiple etc/ configuration directories
    you can switch between multipe etc/, eg. one for the test server and one for production, by changing a single file

  • Overwrite arbitrary settings for special servers
    you can overwrite settings, eg. debugging settings, based on where your application runs - eg. on the development machine, you can have debugging enabled, while on production it's disabled. You don't need to have different files for them - no more mistakenly committed debug settings.

This article shows you how you can make use of the web runners in a XP application. Read on for more information!


(more)

PHP-Arrays: Maps and lists

at 2009-04-05 in EditorialFurther readingRFCs by friebe

In the PHP world, arrays are maps are lists:

<?php 
$a= array(1, 2, 3); // #1: A list
$b= array('key' => 'value', ...); // #2: A map
$c= array(1, 2, 'a' => 'b'); // #3: Mix of both
?>

Now this is (almost) perfect as long as you stay inside the PHP world; the only thing you have to know is when to be able to use array functions operating on "associative arrays" (like asort) instead of "numeric arrays" (sort), which is usually achieved by a bit of discipline. This is where a slight problem even inside the PHP world (and that's why it's only almost perfect) starts showing: There is no easy way to keep the both apart.


(more)

KISS: Keep it simply surveilled

at 2007-05-24 in Editorial by kiesel

In the enterprise world, not everything is a website - there are a lot more types of applications you have to deploy to actually have a running enterprise website / application.

Often one of these "hidden" applications are cron jobs which take care of cleaning out not completed order jobs, doing lengthy cache pre-calculations, perform data mining or many other things.

Crons - or in general - backend applications are therefore an important part of your whole application. Running regularily they do their duty.

Of course, such a critical task should be surveilled. Read on to see how you can do effective, but simple surveillance with the XP framework's tools in combination with the open source surveillance system Nagios:


(more)

Making use of PHP5 features

at 2007-01-29 in Editorial by friebe

Today at work we had a presentation called "PHP5 features", where Alex and me presented what we consider the most appealing new possibilities.

Here's a wrap-up:


(more)

Why to prefer scriptlets over "standard" web scripts

at 2006-10-24 in Editorial by friebe

If you've written web applications with the XP framework, you've probably made use of the scriptlet.xml.workflow API. It provides templating via XSL files and in general a very comfortable way of creating dynamic web pages. Feel tempted to use "standard" web scripting (see below for example) for simpler tasks like CSV export, dynamic image creation or RSS feeds?

Here's why you shouldn't...


(more)

Shipping an application with XP archives

at 2006-10-15 in Editorial by kiesel

Ever since, distributing XP applications to the "end user" could be quite a pain: you would've to tell people to install subversion on their servers, show them how to check out a copy of the XP framework with all it's millions of directories, let them put all required directories into their include_path - mostly there's more than one directory which needs to be included.
Then, whenever they want to upgrade the application, they need to update their checkout, exposing them to the danger of conflicts or incompatibilities in the classes API each time.

Now, with the arrival of XP class archives (which actually already exist for quite some time), this is a lot easier! Read on to see how shipping XP applications could be like in the future.


(more)

Using packages in XP

at 2006-10-14 in Editorial by admin

Since RFC #0074 the XP framework has the built-in power to load classes from an class archive.

Now, imagine you want to install an XP application like dialog, and you have downloaded an tar file containg the application from the project's homepage. What do you do with it?


(more)

Creating packages for XP

at 2006-10-14 in Editorial by kiesel

Today RFC #0074 has been accepted and merged into the public XP repository.

RFC #0074 describes some changes that bring the ability to the framework, to load classes from an archive rather than directly from a directory in the classpath. That does not seem to be so special, but it brings you some very cool things in the day-to-day work with XP.

So, let's take a look on how to create a new archive (.xar was chosen as extension for the time being, though this could still be changed).


(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
5.8-SERIES