General

Happy 9th birthday

at 2011-02-21 in General by friebe

Birthday hatThe XP Framework's initial checkin was nine years ago:

 $ svn log -r5 devel/xp.public/trunk/
------------------------------------------------------------------------
r5 | friebe | 2002-02-21 12:58:17 +0100 (Thu, 21 Feb 2002) | 2 lines

Initial revision
(revisions 1 through 4 were used creating and configuring the repository itself).

Happy birthday:-)



How to find the PHP binary's filename

at 2008-01-07 in General by friebe

In some situations, it can be necessary to find out the filename of the PHP interpreter running the current script from inside this script. Although PHP provides a getmypid() function, it doesn't provide a possibility to query the executable name directly. Continue reading to find out how to get this done for multiple environments.


(more)

XP on Windows Vista

at 2007-04-11 in General by friebe

XP on Vista

Wow


(more)

XP going mobile

at 2007-01-15 in General by kiesel

Mobile computing has become a major topic in the last years, especially for programming languages and their applications.

XP taken the initial step on Jens' Nokia 770:

XP on Nokia



Fix for the fix - bug #1 revisited

at 2006-05-24 in GeneralHomepage by friebe

While searching for the origins of an SQLException which was occuring in our corporate Intranet, we discovered it had been caused by the numval() method introduced into the rdbms.StatementFormatter class a couple of weeks ago.

The problem was that numval() was being passed an empty string and was producing an empty string in return, causing "select ... from news where parent_id= %d" to be formatted to "select ... from news where parent_id= ", resulting in the afforementioned exception with the message "Incorrect syntax near ...".

The problem was that sscanf() returns -1 for empty input values and has been fixed now (see http://bugs.xp-framework.net/show_bug.cgi?id=1#c7 for details).



Numeric arrays revisited

at 2005-06-12 in General by kiesel

In Numeric arrays Timm has compared various array access methods in regard to their speed for quite a common task.

While that was really interesting and certainly will have affect on the different connectors we have to other languages (SOAP, xmlrpc, ...), I missed one special method: the fastest :)


(more)

Numeric arrays

at 2005-05-29 in General by friebe

PHP's handling of arrays is superb: It's easy to create them. It's easy to manipulate them (there's about a gazillion functions over here). It's easy to access them. Their hashing algorithm is fast as a lightning. Aah: Hashing. Hashes and arrays are indistinguishable in PHP. And that's where the problem lies when communicating with languages where this is not the case. Hrm, you may think: $a= array(1, 2, 3); is numeric and $a= array("key" => "val"); is a hash, for sure. But how do we find out programmatically?


(more)

strtok() considered evil

at 2005-01-18 in General by kiesel

While experimenting with tokenizing of strings today, Christian Lang and me came to one point where code using strtok() silently failed: reason to this was the nested use of strtok() in different places on different strings.


(more)

Getters and setters evil?

at 2004-12-15 in General by friebe

Via "PHP is not Python is not Java":

They are a waste of CPU time, but more important, they are a waste of programmer time. Not just for the people writing the code and tests, but for the people who have to read and understand them as well.


I tend to disagree:
  • It is fairly easy to understand getters and setters: They follow the naming rule of getSomething, setSomething (and maybe isSomething, hasSomething and addSomething) for accessing the property something.
  • It is easy to write getters and setters: In the .nedit-configuration file we have in our CVS here, for instance, we have a shortcut that generates them from member variables
  • On: They waste CPU time: Agreed - function (and method) calls are expensive in PHP - but CPU time is not the only factor to be considered when developing an application: Readability (which the verbosity adds) and maintainability (the behaviour of a setter can be changed easily without breaking the API) are the non-plus-ultra in importance when it comes to keeping an application running. And getters and setters are readable
  • Design by contract: Getters and setters can be part of an interface whereas members cannot.



XP framework news site

at 2004-11-21 in General by alexkiesel

The XP framework's site network has grown: this is the opening for the XP framework news site. This site will offer recent updated and annoucements around the XP framework, on topic is almost anything that has to do with the framework:

  • conclusions of discussions of our mailing list(s)
  • information about recent development
  • essays from the developers about the framework, cool programming techniques or other cool frameworks
  • headsup-notices for developers (before bc-breaking changes)
  • announcements of site-updates or changes
  • release information
  • and much more :)

To say it in short words: read this to keep up-to-date with the XP framework.
I wish you much fun reading this.


(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
Unicode
Language
5.9-SERIES