My Experience as a PHP Coder

My Experience as a PHP Coder


Humble beginnings

It must have been around 1993 when I first hooked up my Atari ST with my 2400 baud modem to one of the first Dutch free access providers and checked out something called the Internet. I was curious about those mystical possibilities of browsing gopher networks, searching them with Veronica, playing in MUDs and doing other fancy things no-one ever heard about. I was surprised by the immense amount of information I could find, and was instantly hooked! I connected to several systems, and even hacked my way into the forbidden books section of the Vatican library (yes, they do collect the books they forbid…), amazed to find all sorts of fancy content connected into one huge information hideaway (or was that highway?), open to all people patient enough to wait half an hour to download one single image from somewhere across the planet.

But hey, then came our salvation. The w3c consortium created a markup language that made it possible to mix text and images into a visually attractive page so that people could showcase what they wanted. Funny enough, they forgot to include database content in their markup, so that now the Vatican first needed to create a (non-searchable) text based list to display their libraries’ content (in the process “forgetting” to include their forbidden books section there).

Thank you for the music

While trying to cope with the disappointment of this new World Wide Web, I attended the Electronic Music classes at the Royal Conservatory in The Hague and wrote code in obscure languages like CSound, an equivalent to C++ designed to create computer audio, and the AC Toolbox, yet another programming language but this time geared towards outputting musical scores generated with random numbers. Although all of these generated the squeaky-bleepy type music the avant-gard school of thought was hoping I would make, the whole thing didn’t satisfy me yet.

It was during this period I accidentally ran into a piece of software called MAX. This software was revolutionary at the time, because it had draggable audio and midi modeling objects that could be connected by drawing lines on a screen. The screenshot below shows a simple set of objects that create a sound, push it through a set of audio convertors and then output it to the speaker.

I have been playing with MAX ever since, and love it. It had fun drag and drop features, and made incredible squeaky noises when you did something wrong. And instead of writing code, I was finally able to concentrate on the output, the process of creating what I wanted to achieve as a developer of music.

“Yidaki” composed by me in 1998: MAX is driving all effects and electronics
behind this live performance by Cesar Villavicencio on Contrabass Recorder


PHP, the recursive acronym

But musical experimentation was not where I wanted to spend the rest of my life, so I got back into the website business. 8 years after my first online experience, the Net had grown and the first broadband features came along. By this time, a new programming language had been introduced: PHP started off as a procedural, instead of object oriented language, and some people still refer to it as such. I mainly used it to include pieces of content fetched from a database into generated content-rich websites with a (at the time) new feature called a Content Management System, something that totally freaked people out as they thought the future of the web had been defined while we were just at the beginning of our journey.

When I produced my first shopping cart, things started to get a bit out of hand, however. PHP 5 was object oriented but in no way mature and making changes was total hell. Changing the data model to incorporate new business needs meant debugging the whole website, and as PHP does not reference classes properly nor did it have any fancy debugging tools, it immediately presented itself as a language for smaller projects, being the obvious choice for bigger websites.
The community created template engines, libraries and open source scripts and that is where PHP comes in strong. It is easy to learn, has a huge scripting community, and since we all know that 80% of writing code is copying other peoples’ stuff, it follows that a huge community comes in handy. If I look at PHP I still think of it as the language of choice for standard stuff (like smaller websites that do not need regular changes) and for people that do not like coding but rather try to find standard scripts to create their solutions around them. The main difference between .net programmers and PHP geeks is that the first group loves the code, while the latter loves the solution. On the other hand, the first group values proper coding (and beware if you do it sloppy in .net!), while the latter tries to finish things, often neglecting some of the most basic coding rules. PHP is perfect for that, sloppiness is sort of promoted and, since you can do things in so many ways, the journey becomes less important: it is the goal you want to achieve that really matters. So starting off with an open source CMS and delivering a full-fledged content rich blog with shopping cart and searchable database, including SEO to Google’s latest protocols, is possible in a week or two… but please make sure you don’t look under the hood.

When it comes to building business logic in your code, however, PHP becomes fuzzy: the procedural approach of the first versions rears its ugly head at every turn. What most people are looking for in a programming language is not the syntax, but an environment for development and PHP has never grown into a programming environment. Some frameworks have been developed, but most of these are open source and become much too infected by negligence or badly coded extensions. I have yet to see an environment that could become a standard framework, and I truly believe the anarchistic approach of most of the community will have me waiting for a long time. Although PHP is now a proper OOS type of language, most of the people will still do some in-between procedural stuff, because the language makes it so easy to do so, and it still gives you the same results. So why bother doing the fancy stuff?

The lack of framework also makes it difficult to debug the code. And the combination of Debug difficulty and anarchistic coding made me crack when I was working with an offshore team of coders. I asked them to build an extension to a system I was dealing with: The Technical description was extensive, and I have to say they did a damn good job and had it built nearly faultless in some weeks. The only problem was that it did not work. After a week of debugging, we figured out that a small bug in the original system would have never allowed the extension to work. After fixing the original bug I turned to the remote team who promptly replied “you asked us to work on the extension, not on the original system…”

MAXing Web Development?

Several years later I started working for Zest Application Professionals and was introduced to OutSystems technology. When I started to work with the Agile Platform, a couple of things came to mind:

  • Wow, this looks and feels a lot like MAX, which I used 15 years ago: why haven’t people done this before…

  • OMG, I can focus on other things than typing in code, making mistakes, and spending ages debugging

  • Better yet I can change things, and it will change its relations, or at least show the impact of the change.

  • Heck, I have to start either working reaaaaly slow or triple my hourly rate!

And, of course, I believed the only thing I could build would be toy apps and monkey sites, as a tool like this could not produce something mature. Still, I decided to put it to the challenge and build something BIG…..

Having an extensive knowledge of programming logic, I easily dug into the platform, and started searching for its limitations. I have found a few by now, but compared to PHP they are quite few. Formatted Microsoft Office docs for example are hell to create, and need lots of coding in extensions to make sure they look good enough. Creating a base template is also more complicated than would be ideal, because of all the fancy features in Intelliwarp that make it hard to create a personal layout. I could probably mention a few more if I thought long and hard about it, however none of these things are impossible, and they become increasingly easier once you grasp the whole flow of the platform.

One Major relief is the way the Agile Platform deals with publishing. While PHP has no publishing mechanism, nor any framework to support that, the Agile Platform comes with an out-of-the-box mechanism that allows you to publish your code to development and production environments without the hassle of ftp’ing code and changing config files. The Lifetime component in particular brings in an amazing extra set of features, which allow Dev and Ops to communicate, even if they sometimes refuse to speak the same language.

A MAX patch: Does this remind you of anything?
If I look back on my experiences with PHP and OutSystems, I think my world has changed a lot. What I always hoped for as a web developer was a mechanism that allowed me to turn business logic into software. There are some PHP code generators available these days, but none cover code generation in a simple way as the Agile Platform does. I personally dislike coding, as (to me) it is the necessary yet nasty part of the development process. OutSystems takes you away from that, simplifying the development process, but still allowing you to extend the system with features like Web Services and tools like Integration Studio. Going back to PHP now would be a major step back in that process: the only reason for that would be if something was not possible in the Agile Platform which, in the current demand of web applications, is usually not springing up.

If you had an IP-enabled kitchen equipment, I bet you could use the Agile Platform to build an application to schedule the making of your coffee and freshly baked croissants in the morning…

… however, it still won’t allow me to make sweet music the way MAX did, all those years ago.