Some time ago a friend of mine tipped me about this article series called “What every programmer should know about memory” written by Ulrich Drepper (lead contributor and maintainer of glib). I just recently came around to start reading it. This is a 100 page long text which covers computer memory in detail, with focus on how software interacts with memory. From RAM to CPU caches the text moves on to tips on how we as programmers can improve our code when it comes to memory management and performance. A really good read which I suggest every programmer should check out.

[tags]Hardware, Memory, Unix/Linux[/tags]

Aug 262008


After receiving quite some feedback on my post “Why Delphi for PHP should have used Prado instead of VCL” I decided to do a follow up to that post. Some of the feedback was quite interesting, hence this post was born.

First and foremost I’d like to address the feedback I got regarding the class name prefixing in VCL/PHP. I argued that the lack of class prefixes could create problems in the future, and used Prado’s T notation as as sample of something that would at least be a bit better. Let’s take a look at two VCL/PHP classes named Collection and Object. These two names are often reserved in programming langues (atleast object oriented ones). If PHP decides to introduce these two classes the VCL/PHP guys would be pretty screwed. It would involve refactoring the framework as well as applications which uses those classes. Prado on the other hand has a prefix (TCollection etc. minor, but it’s a world of difference). I assume that the VCL/PHP authors will introduce namespace support with PHP 5.3, so this issue will hopefully be a thing of the past when 5.3 ships. That said, I’m a bit curious to see how the migration / backwards compability would turn out if VCL/PHP adopt namespaces.

What I miss in the feedback I got from my previous post was people acually using VCL/PHP for enterprise applications and how that is working. From what I can tell the usage of Exceptions is still limited to the 3rd party libs such as Zend Framework which are included with VCL/PHP. That’s a bit interesting.

I’d like to touch on the comment made by Pieter Viljoen for my original post. I agree that Codegear pushed quite a toolset for the PHP community in a short time, but the underlying code is not enterprise quality. One can argue that PHP is ugly and flawed (not sure I agree on that part), but that does not mean that one should not strive for good architecture and methodology when developing frameworks on top of PHP. I see the point that VCL/PJP offers features that are interesting for starting PHP developers, but for large scale applications I just don’t see it. I’d be pretty cautious pulling in a framework without exception support if I was to create an application.

Again, I’m really interested in some feedback from someone that actually has built applications with VCL/PHP.

I’ve also noticed that there is not much activity in the VCL/PHP SVN repository. Anyone know what’s going on there?

[tags]PHP, Prado, VCL4PHP[/tags]  

If some of you recently got email saying you just made a comment here, it’s most likely due to that I moved some comments over from my old blog (http://eirikhoem.wordpress.com/). I’ll get around to answering any questions later today. Thanks for commenting!