Different programming languages excel at different things. I employ a number of different programming languages, and make my choice based on the task at hand. My presentations tend to be powered by Perl. My weblog is powered by Python. But my private applications tend to be written in PHP.
The developerWorks PHP Resources site will cover PHP from a perspective that may be new to some PHP users, covering such topics as Access an enterprise application from a PHP script
The developerWorks PHP Blog, however, will often touch on topics that may be new to enterprise (typically Java) programmers.
My first post on this site will cover an application I wrote in about an hour to cover a specific need. It breaks a number of "rules" that guide the development of scalable enterprise applications - in particular it does not separate presentation from content. Consequently, this application does not contain any reusable components that will ultimately find their way into a Customer Relationship Management system. I'm entirely OK with that.
Still, the application is centrally managed, requires zero deployment, is accessible everywhere and portable across a wide range of client operating systems and browsers. All good traits to have.
The application is a vocabulary test. My daughter weekly gets a list of words and their definitions to study. At the end of the week, there is a test where she needs to match the words with the definitions. At first, I helped her study using flash cards, but this seemed like an obvious candidate for automation.
The UI for this application was obvious... I precisely mimicked the layout of the test.
Nothing in this application couldn't have been done with JSP. However, to do so would have required additional effort, effort that does not result in a more functional end result.
And it wouldn't have been as much fun.
Not everybody may have the diverse set of skills required to pull together such an application in one sitting. However, a quite larger set of people can copy such an application and successfully make meaningful changes to it.
In my experience, that's how people tend to learn languages such as PHP. Some refer to this as Progressive Disclosure.
Sam Ruby[Read More]
I've just made the first code drop to support calling eBay Web services using the Service Component Architecture. Anyone who's tried calling the eBay soap APIs will know there are quite a few hoops to jump through to get it working. eBay makes use of headers for security information (eBay auth token, app id, etc...) and also requires each call to pass URL query string parameters to help them route the request (based on information like API version, operation being called, and so on).
The SCA eBay soap support hides this complexity by allowing you to specify the information as configuration parameters and then it makes sure the right things are placed in the header or the URL. Below is an example showing how to call the GetSearchResults method.
The ini configuration file referred to in the getService() call is quite simple, requiring the following information:
That's it! (clearly you'll need to replace XXX for your eBay security credentials; I thought it best not to include mine here :-) ).
A side effect of this work was a few changes in SCA that make it much easier to add support for new protocols or APIs. If you're interested in doing this you could drop a note to the phpsoa google group and I'm sure folks will be happy to help.
A few months ago, I talked to one of the leading CMS industry analysts and he mentioned how surprised he was to find the dominance of PHP in this market.
The available CMSs are anything from open-source freeware to proprietry to supported open-source.
Some familiar names (in no particular order) are Drupal, mambo, eZ and of course, the popular PHP-Nuke.
If I'd go through the whole list of great CMS systems I know in PHP, this post would start getting boring.
As I am asked very often what CMS I recommend, and with all the excellent packages out there it's hard to do so, I decided to post a link to The CMS Matrix which is a nice site that provides some initial matrix comparisons between the various CMS. Of course, at the end of the day you'll have to install some of them and actually try them to see if they suit your needs.
Andi Gutmans[Read More]
phpblog 110000AD5E 2,226 Views
The first worldwide PHP TestFest will be held in May 2008. The idea of the TestFest is simply to write more tests for the PHP language - this helps the PHP maintainers to test fixes and implementation of new features. So it's a good thing.
One of the little known facts about writing tests for PHP is that if you can write PHP you can write test cases. You don't need to be able to write C (although being able to read it does help). For PHP developers this is a great way to get involved in one of the most the successful open source projects of all time!
Many local PHP user groups are taking part in the TestFest, check the PHP Wiki for details and subscribe to the PHP QA list to hear about plans for other events. In most cases the user groups are running events aimed at helping people to learn how to write tests.
When new tests are written as part of the TestFest they will be reviewed by PHP test mentors. If the tests are good they'll become part of the PHP code base.
I did hear a rumour that there might be a limited edition T-shirt going to people who have five new tests accepted....there was also a whisper about ElePHPants....
This week I attended the International PHP Conference in Frankfurt, Germany. I had the chance to meet members of the PHP community, both users and internals folks. I was there talking about Project Zero. It was great to be able to discuss Zero with PHP developers. The ability to mix Java and PHP in the same application/process whilst maintaining clean interfaces appealed to several people I spoke with.
I particularly enjoyed Zoe Slattery's short talk on testing the PHP engine using PHPT tests. Zoe showed some of the engine coverage data and explained how incomplete the test suite for the engine remains even after a thousand new testcases were added in 2007. It seems that we need tens of thousands of new tests. I've recently started contributing tests myself. The tests themselves are easy to write but getting them committed really requires a CVS id. After the talk, a few of us kicked around some ideas for increasing the number of testcases contributed by the wider community (non internals folks). We noticed that people are very willing to contribute doc comments but not testcases. The consensus was that we need to make the act of contributing a testcase much easier and socially rewarding; We need to give people some visible feedback and kudos for contributing a testcase so we can hook into the "Wikipedia effect".
The slides from my talk on PHP in project Zero are here.
phpblog 110000AD5E 2,527 Views
After 20 years at IBM I have just started what IBM's HR department refers to as an Unpaid Life Event (or ULE), most of us would call this a sabbatical year. I'll be studying at Southampton University (http://www.ecs.soton.ac.uk/index.php
In some ways this isn't going to change what I do for PHP. Like most people in IBM who contribute to open source projects the fact that IBM was paying me to do it was just lucky for me - the fact that they aren't right now doesn't change my commitment to open source development and to testing the PHP implementation. So, I hope to continue to write PHP tests and fit in 40 hours course work and a few exams around it - how hard can it be?
It's also pretty nice that I can see what the team that used to fund my PHP work are up to - here's a link to Jerry Cuomo's blog which explains how he sees PHP fitting in with Project Zero.
phpblog 110000AD5E 1,818 Views
I like the idea of Mashups - the problem is that most of the ones that I've seen tend to be demonstrations of how to use Wibble (s/Wibble/the_flavour_of _they_day_technology) - so the technology is usually quite interesting but the Mashup is never anything to write home about.
It was an even greater pleasure than usual to go the regular PHP London User Group meeting and see a Mashup application that I wanted to go home and use - straight away.
Andrew Betts' OnOneMap takes feeds from companies that sell or rent houses, he plots the property location on a map together with information about schools, stations etc. You can even find out if there is a mobile phone mast close by and until recently you could have seen the flood risk data, unfortunately, they have had to withdraw this very useful information. I am sure that this is completely unrelated to the fact that we have just had the wettest June on record in the UK.
If this site had existed last time we moved house it would have saved me countless hours of getting property locations from several different companies - all in different formats and then trying to plot them on a map. As it is I've just been using it to work out how much houses in our town are being sold for and whether I can afford to sell up and move somewhere less wet.
Oh, the technology? It's PHP of course
phpblog 110000AD5E 4,836 Views
I recently spent some time trying to build PHP on Windows, I succeeded in the end but it took rather longer than I'd have liked. I normally use the Windows PHP binaries available from snaps.php.net, but in this case I was trying to test whether a proposed patch would fix a Windows specific defect - so I really had to be able to build PHP. I particularly wanted to use a "free" development environment and, as a Windows novice (and life-time *nix user) I hit a lot of simple issues which took a while to solve. I decided to document the steps that I went through in building PHP in the hope that they might be useful to anyone else that would like to build PHP on a Windows system.
These instructions are intended to cover everything that you need to do to be able to build PHP on a Windows XP system. They may work on other Windows systems, I haven't checked. No prior knowledge is assumed, except how to perform basic operations using the windows command line (eg mkdir, copy) and how to use an editor (eg edit) and no software (other than Windows) is assumed to be installed.
The instructions have been tested with PHP6 and PHP5, the only difference being that any references to ICU can be ignored if you are building PHP5.
Before starting to build anything you will need to download a set of tools from Microsoft. This can take some time, for example it took me 45 minutes to install the build tools whilst in the office working with a high speed ethernet connection. Working at home with my own broadband connection it took me 4.5 hours to do the same thing. I don't recommend a dial up connection if you can possibly avoid it. The build tools will use approximately 500MB of disk space.
Note: There is a more recent version of the SDK that I didn't find until after I'd used the one linked above. The newer version can be found here. I haven't tried it yet so can't say whether it works with these instructions.
There are a number of these - I used this and it worked fine. I just downloaded it and followed the installation instructions
First decide what directory structure you want for your build environment, I use e:\zoe\BUILDS so everywhere I refer to that directory you will need to replace it with whatever you have decided to call your build directory.
I found that the easiest way to extract .zip files on Windows was to open them with Explorer and select "extract all files".
At the end of this section the sub-directory structure should look like this:
Before we can build anything, a little customisation is required to make Visual Studio Express work nicely with the SDK and to tell the build tools where to find the libraries that PHP needs to build. For reference, flex and bison are part of win32build directory and ICU is in the ICU directory. If you are building PHP5 you won't need ICU of course.
These changes won't take effect in any windows that you currently have open - you will need to close them and re-open.
Assuming the the build is successful you can close the GUI - you should find a sub-directory in bindlib called Release. Copy the file resolv.lib from there to e:\zoe\BUILDS\win32build\lib, overwriting the one that's already there.
Guillaume Rossolini has translated this into French - see here: here
Guillaume has also tried the newer version of the Microsoft Platform SDK and has confirmed that it works too. The only difference is that the installation folder is: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2.
Merci beaucoup Guillaume!!