Author: Manuel Lemos
Updated on: 2011-10-01
Posted on: 2011-09-30
Categories: New site features, Interviews, Lately in PHP Podcast, PHP community
Bob Ray, a book author and contributor of the MODX CMS project was interviewed in the podcast to talk about this revelation CMS and how it compares with other popular systems like Wordpress.
Also commented on this podcast was the recent launch of a feature in the PHPClasses site that allows to distinguish Top PHP Developers in the each country of the world.
Download Size: 28MB Listeners: 3542
Introduction music: Harbour by Danilo Ercole, Curitiba, Brazil
RSS 2.0 feed compliant with iTunes:
In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.
Interview with Bob Ray on MODX CMS (0:55)
PHP 5.4.0 to Not Include APC (40:16)
PHP Continuous Integration (46:54)
Top PHP Developers in Every Country (52:54)
PHP Programming Innovation Award nominees of July 2011 (1:01:20)
Manuel Lemos: Hello, welcome to the Lately in PHP Podcast. This is episode number 16. I am Manuel Lemos the regular host of the podcast, and as always I have here with me Ernani Joppert, hello Ernani, how are you doing today?
Ernani Joppert: Hello, Manuel, I'm glad to be back and I'm still struggling with some fever but keep pushing it.
Manuel Lemos: But you sound okay so I hope you can contribute and share your insights as always.
Interview with Bob Ray on MODX CMS (0:55)
Manuel Lemos: In this episode we have a special guest, Bob Ray, that has just published a nice article in the PHP Classes blog. Hello, Bob, how are you doing?
Bob Ray: Hello, Manuel, I'm glad to be here.
Manuel Lemos: Well, I invited you to come to this podcast because as I said you wrote an interesting article about a CMS system. I have to confess I did not know it, MODX, but first I would like to hear from you more about yourself like what you do, where you live and your relation with the PHP world.
Bob Ray: Yes, actually I live originally in Minnesota, but I spend much of the year traveling around in a recreational vehicle, so I generally spend the winters down in the Florida and summers out on the Northwest coast.
I have been involved with MODX for several years. I originally was a C++ programmer and did a lot of Windows application development there, but then I gradually got into web programming; someone asked me to do a website and then someone else asked me to do a web site and actually I knew I was looking for content management system.
And when I found MODX and then I looked at a number of different systems and I just almost immediately said you know this is what I've been looking for, and so I've been involved somewhat in the MODX development and the MODX forums.
And I just, of course, just finished my MODX book which I have been working kind of day and night seven days a week for about three years, and then it's finally out within the last month.
Manuel Lemos: So you wrote this book and are you saying you just released it recently.
Bob Ray: Yes, in fact, it's just now available for pre-order. The book is I believe at the printer right now as we speak so it is done and it is out, but no one has received a copy of it yet.
Manuel Lemos: Okay, that is interesting because I suppose many of the things that you describe about MODX in the article are actually also mentioned in your book, right?
Bob Ray: Yes, of course in much greater depth but, yes, the book is is I'm trying to remember, 772 pages I think. I know in Microsoft Word it was 1700 pages.
Manuel Lemos: Oh, wow, so it must cover this system in great detail.
Bob Ray: I like to think so. I guess other people will have to see what they think about that, but I hope it does.
Manuel Lemos: Well, it is actually interesting because earlier we talked via email about this system because the truth is that most people that I know did not know about MODX. Can you talk a bit about MODX? Does it have a recent history or is there in the market for a while?
Bob Ray: It actually has been around for quite a while, and I'm sorry to say I can't give you the date offhand, I want to say early 1990's but I'm not sure, I think '94 kind of comes to mind, but I'm afraid I'm not absolutely sure about that.
But it started out as Etomite which was actually I think a fairly popular system. And MODX sort of split off from Etomite and I think I would say to go in a more object oriented direction than Etomite, and I think that has continued historically.
And with the release of MODX Revolution, which is MODX 2.0 and subsequent versions, it has pretty much realized that an object oriented purist could still find fault with it in terms of information hiding and encapsulation and certain kinds of things.
But to the extent that you could do things in PHP 5 to have a real object oriented system, MODX was designed as an object oriented system from the ground up, and it's not like the objects were tacked on later where they said let's create this kind of object, they said no. How can we build an object oriented system from the ground up that will serve as a kind of management system?
So, even the menu choices are objects, every action that is committed by the manager is a method of some object, and all of the elements that you use in creating a web site are objects.
Manuel Lemos: Right.
Bob Ray: And that was really refreshing to me I think when I saw that.
Manuel Lemos: Well, I have to say I was a bit impressed not just because it was written in an object oriented fashion, but also because at least the way you described it, it was quite clear, it seemed it had a good structure, not just because it's object oriented but because it seemed to address most of the important concerns that people look for in a content management system, and it sort of reflected a great maturity of the developers that put this system in place.
Bob Ray: Yes, I agree. And I think in putting it another way I would say that the objects and their methods are extremely well chosen in MODX.
And I think one of the nice things about MODX that just has never really been much of an option I think for a lot of other systems is that when MODX went from MODX 1.0, or really at that time was .96, when it went from that to 2.0, in other words what we call MODX Evolutions the previous version, and MODX Revolution the current version, the developers decided, the core developers, said let's start over essentially, let's redesign. We'll kind of keep the same table structure generally and the same user interface, but let's build the manager from scratch, let's build the MODX core from scratch.
And I'll tell you something about that that I think is pretty hard to say in any other systems, I've been working with MODX for three or four years, I've done all kinds of different things in web sites and I've helped people through the MODX forums do even more things, I have yet to see a single case where anyone has had to touch the core code in all of that time.
Manuel Lemos: Yes, that's very good.
Bob Ray: You could do anything without... so when you want to update MODX you replace the core, you're updated, you know, and none of your content or your customs, very sophisticated customizations, those aren't touched.
And that same is true by the way of the language. The language strings are all of the different language strings are in files, but in the MODX manager you get a grid, and I didn't mention this in my article because there just wasn't room, but you get a grid that you can go through and you can change any of those language strings.
So any prompt that appears on the screen anywhere in the manager in MODX you can change the wording of that and you can change the language of that, and that will survive an upgrade because it's stored in places that only your changes are stored in the database, everything else is still in the files, but your changes will take priority and they will survive any upgrade.
Manuel Lemos: Right. That seems to reflect a very rock-solid architecture. Ernani, I don't know if you had time to look into MODX, I think you read the article, what did you think about this system?
Ernani Joppert: Yes, I read the whole article and I got astounded about the whole perspective of it because I am somewhat familiar with other platforms, so in order to mention just to give credit, WordPress as the most famous one and Joomla and Drupal as well, but as Bob stated already this plugability and the way it was designed, I've never seen something as flexible as this.
And it brings me to my future intentions to deep look into this architecture. And if time allows me to get in touch with more details of it, and I would like also to congratulate Bob here because it's quite an achievement to write such, let's put it this way, it's the official guide, you know, it's very, very nice to see someone devoting quite an amount of time to develop a guide and make this a professional, let's put it this way, kind of a professional way to learn how to implement your software ideas into a nice piece of software.
Bob Ray: Thank you very much.
Ernani Joppert: And I will be really looking deeply into this, and I'd like to congratulate you about these achievements. And it's very nice to see this kind of platform rising in a terrain which is somewhat already cluttered. You see lots of other systems there, but I guess there is room for more when you focus on the professional approach and to address particularities, specific particularities of a subject that brings lots into discussion.
And I'm not here to advocate against anybody, but it's just to see that the whole idea of the pink elephant proves it's true, because when you see something quite as specific addressing specific needs to specific developers and to specific projects, you see that there is room enough for a platform to rise and shine, and I wish all the best for you and for the MODX community.
Bob Ray: Again, thank you very much.
Ernani Joppert: You're welcome.
Manuel Lemos: It was actually great to see an option that despite it's not new, for most people that are new or were not aware about MODX, and from what you tell us it has been a while in the market, and since we don't know, it's always great to see an implementation that seems to be rock solid in terms of architecture, as I said, and it also looked sort of clean in terms of how you can extend it, how you can extend it to implement new functionality, but also as you mentioned to support different idioms.
I don't know if you know anything about the details regarding the implementation, does it use Unicode UTF-8 for all the text?
Bob Ray: It's up to the user, although that is the default, UTF-8 is the default. But people can make their own change. One of the things about MODX is that I think it's a very primary rule of MODX that it doesn't put any restrictions on the user except the ones that are absolutely necessary.
And so I mean you have to have database tables and you're advised not to change the MODX tables, but you can integrate custom tables of your own, but as far as where the files go you can move... I can move all the files, you can move the core directory, you can move the manager directory and rename any of those directories which is very nice for security purposes because you can move the entire MODX core outside of your web root, and so it's not available by URL which is a wonderful security thing.
And you can place your own files anywhere you want as long as you remember where they are, and so there really are no... there are a few conventions that make it easier for MODX developers to communicate with each other, but there are very, very few restrictions, and the character set that you use is essentially up to you.
Manuel Lemos: Right, that sounds great. Bob, can you tell us more about where people can find more information or get more support or discuss other ideas that interest, besides your book of course.
Bob Ray: Right. That's actually a pretty short answer, Modx.com.
Manuel Lemos: So you get all there?
Bob Ray: Yes, you can kind of branch out from there. I have my own site which his bobsguides.com/modx and people can go there. My site is a good kind of introduction, it's sort of a friendlier, like my article it's sort of a friendlier locator of starting out with MODX, how does it work, what do these various things mean, what's a chart, what's a snippet.
And then there's also the Modx.com of course, and there's a MODX Wiki, although I think that may be being moved somewhere so I hesitate to send people to that, and then there's also the official documentation site, and of course in the MODX code is all documented with PHP DOC and so the output of that is available. I can't remember the URL but you can find it from inside of MODX actually, in the manager there's a link to it.
Before I forget I wanted to say that honestly what I think is the most valuable feature of MODX, and this sounds kind of fishy to say but I really mean this, and that is the community. The MODX forums, and I think anyone who uses MODX will tell you this, I have had experience with other forums, not necessarily CMS', and I don't mean to pick on anybody, but you go to the forum, you ask kind of a dumb question and two or three people insult you, other people say why don't you look in the manual, stupid.
And the MODX forum the atmosphere is just so nice and the other reason that I was attracted to MODX in the first place, people come to the MODX forums, they ask whatever they want to, and it seems like within an hour or two they will get a very nice answer from somebody saying you just need to do this, and that's not true of a lot of other forums.
Manuel Lemos: Yeah.
Ernani Joppert: Oh, yeah. To me it brings a lot of approaches because it's just we are everywhere right now, developers are everywhere, and you can't judge anybody just because they live in X zone or anywhere else.
And I've been into the Open Source community, most of the weirdest projects ever, and I've seen so much situations happening, and basically what makes a platform healthy is just to improve communication and to evolve from it.
And it seems that MODX has an approach to achieve and this is something that is really valuable for me and based off of my experiences and my constraints here.
And if I could ask you one bit regarding your article that brought to my attention, you mentioned porting a site to MODX which seems to be a very simple process as you describe it. And it seems it has a templating architecture similar as Smarty templates and other kinds of templating engines, let's put it this way.
And given that let's bring an idea that if someone is trying to make a CMS out of an existing web site it doesn't seem to be a painful process. And given your overall idea here it's not a macro effort here just to understand the micro particularities of MODX elements and move them around and make sure you just understand this concept and it will go through.
Bob Ray: Yes, and I think I can describe it, there's a little page of it on my website at Bob's Guides and also a longer section in my book, but the essential process, and I have had some real nightmares trying to move sites to other CMS systems where I had to jump through all kinds of hoops just to make the homepage look like it used to, and so a system that has themes you have to find a theme where you have to modify a theme to make it look like your other page.
Ernani Joppert: Exactly.
Bob Ray: And the approach in MODX essentially what you do is you copy the HTML from a page into a typical page at your site into a MODX template, and then you just gradually replace everything in it, you move the things in it to other objects and you replace them with MODX tags.
So if you have a chunk of let's say boilerplate that's going to appear on every page, maybe a page footer or something, you would move that into a MODX chunk called footer, and then you would put a little footer tag where you want that to appear on your page.
And if you have PHP code you move that into a snippet and put a snippet tag. If you have a language string that needs to be translated you'd move it into a language file and put a language tag there. If you have a link to another page at the site instead of typing out that whole link you just put a link tag with the ID of that document, and you just keep doing that until everything is out of your template except the template things.
And one of the things that's so nice about that in the long run is you end up with a complete separation of the presentation from the content and so you can change things.
And I guess I don't want to bore you with this, but one of the things that happens in a chunk, and I used an example in one of the comments, is that chunks have placeholders in them which are placeholder tags, and one of the things that can go in placeholder tags are all of the fields of resource of a document like the title and the long title and the summary and the date and when it was created and when it was published, there are tags for all of those things.
Well, you put those placeholders for those things in your chunk, and then in your PHP code and your snippet you call MODX get chunk with an array of those placeholder keys and values and they're all automatically replaced.
And one of the beauties of that is that then all you have to do is, you know, you can modify that chunk and add more fields, you can take fields out, you can move the fields around and you can change the HTML or the CMS, and you don't have to go anywhere near your PHP code anymore, and once that code does the basic setup you don't have to maintain the code.
I see so many sites in looking at other people's sites where you have HTML mixed up with PHP code, and you literally can't wait... you pretty much can't do that in MODX, so it kind of enforces that I never have to... if I want to change how a page looks, or the content of the page, I don't ever have to go to the PHP code.
Ernani Joppert: Yeah, and this brings me to reasoning here because not even MODX is a nice architecture, it's a mature web CMS solution and you can extend it to anything your creativity allows you to, but it helps you throughout the process and an existing seasoned developer which knows developing in PHP wouldn't find any difficulties on this, and it would make it easier for the developer to transition to this architecture without causing any major let's say confusion and it's just to make the process easier to approach the developer into this kind of migration effort.
And I've never seen any other platform making this easy. It's just quite hard to make your project or your websites a contact management solution, and if you want to make your... let's put it this way, if Manuel wants somehow to put his architecture on top of MODX on the PHP Classes or JS Classes it wouldn't be a crazy hell for him, otherwise if you would like to do this with another solution existing there it would make a harder process.
Bob Ray: It happens, it's a common experience I think on the MODX forums for people who have come from other systems to say, well, how can I do this, how can I put this in my template, how can I get my CSS to... and it's sometimes hard to get through and they're happy to hear it but find it hard to believe.
Manuel Lemos: And Bob I have just one last question. Because many people went to article and posted comments making comparisons with Wordpress, probably because it is the most popular system, although some people are reluctant to call it a content management system, because it is a blog platform that ended up being extended, I think one of the most valuable assets for those that use Wordpress is the availability of plugins.
There are plugins for everything that you can imagine or not for Wordpress. So I was wondering what is the level of availability in terms of plugins to extend MODX? What do you know about that? Where can people find plugins?
Bob Ray: That's a very good question. And if you indulge me for a minute, I wanted to bring another topic that I wanted to address first, which is the article on the comparison with other Web sites, you know whenever you write an article like this, you inevitably get people, and I tried to avoid it as much as I could, you always see people saying "no my CMS is better than your CMS".
And you get in those kinds of discussions. I think all the base CMS systems have roles to play. And I think they all have strengths and weaknesses. And Wordpress, and I mentioned that in one of my comments, when you want a straight blog or even a simple e-commerce site alongside a blog or in a blog style, in the end if you can find a theme that you like for Wordpress, it's hard to beat.
Many people use it and like it for the blogs. It has a very nice smooth user interface and lots of plugins. And so, if you want to do certain kinds of things you can get with those plugins.
So my point in the article just to finish up this thought, my only point I was trying to make was not that MODX is better than every other system out there. But people who are serious about PHP programming, who are bringing PHP programming to their site, it's really worth taking time looking into MODX.
And of course when you write an article like this you get people who haven't used MODX, haven't used whatever you are talking about, and they are willing to say that their system is better than your system. It's useless talking...
I am just saying it's really worth your time taking a look at MODX, look what kinds of things it can do for you in terms of stystem settings, system events and all the hooks that are built into it, the API, all of that stuff is very much designed with you in mind. It wasn't padded later as an afterthought after the system was built, it's part of the core.
To get back to your original question about plugins, plugins have a particular meaning in MODX. I don't if that was an unfortunate choice or not, but plugins actually refers to something specific in MODX which is code that executes and responds to system events.
So the hooks that were built into the MODX core, for example a system event that is fired when an user is saved, when an user form is created, when a document saved, when the user logs in, when the user logs out. You could write code to step in at that point and do whatever you want with what is available.
And that's actually what we call plugins. So what you were referring to as plugins, in MODX we call it add-ons components would be a more common term probably extras.
Manuel Lemos: OK.
Bob Ray: To answer your question, MODX is not, I think, as mature... and I think probably in a couple of areas it really really gained a lot in the last year. And so Revolution just came out an year ago or so, and so, you know, getting everything up to speed and recreating all the extras.
I guess my experience with it has been with a few exceptions, all of the things you need are there. And they are very solid. So there is a contact form. If you want a contact form, you can plugin this contact form and it will auto-install, and you have a working contact form on your site.
There is a login snippet that includes a package that includes registration, registration confirmation, changing your password,..
Manuel Lemos: Yeah, the usual.
Bob Ray: There is a content aggregation snippet called get resources that will do like teasers and blog like things. There is a menu program that's called way finder that will produce I sware just ...
Manuel Lemos: Yes, I think you listed in the article, right?
Bob Ray: Yeah. I have yet to see a menu that you can't do. People say, "can I do a fish eye menu?", yes, "can I do one guy get a circular menu?" with the way find, and way finder when you create a new document, that document shows up in the menu because the menu is styled after the tree, the hierarchy in the manager. So, I don't have to touch the menu again once you have it looking the way you want.
So the things that you need, there is a gallery component, there is very soon, I think two weeks spots I would say, the e-commerce that is coming is very close. I think there is an e-commerce solution I think is about ready to use.
Manuel Lemos: But are you saying that is built-in or it's an add-on downloaded separately?
Bob Ray: It's an add-on. In fact everything is an add-on because it's a part of the philosophy that the core is very core like. With MODX core you get the manager, you can create resources and data, and do stuff like that. But in the user interface there is plenty enough to create a whole Web site in a very sophisticated way.
But they didn't try to built the blog function into the core, and didn't try to build the content aggregation, and I think this ended up to be a wise choice because for one of the things you don't end up with all with that bloat. You know you don't have all of those things hanging up.
You can download, there is a package management where you go, you look through all the things and download and install automatically. It's not a big job to install them but you only pick the ones you need.
And if you want something else, for example CAPTCHA, they have a CAPTCHA code that challengs when people login, that's a plugin that you download, but if you don't need it, why have it way down in your site?
Manuel Lemos: Right, so it downloads, that manager, the component manager that you mentioned, it downloads it from the main MODX site or...
Bob Ray: repository, yes, the MODX repository.
Manuel Lemos: So if a third party wants to develop an additional components, does he have to submit to the main site or could host it elsewhere?
Bob Ray: Well, let me answer that... it's hard to give a simple answer to that. One way to go is to go right to the site and just upload it. The people who manage the repository look over if it is not a virus or something.
They are not picky, they are not rejecting things because of any philosophical... you know, they say "OK you can submit this extra, we are going to check it make sure it does not have any security holes in it that could compromise MODX to make sure there is no virus in it". Then they will put it up. That happens all day.
The other way though, and I think it's trivial to think of the openness of it is, you can create your own, lets call it a transport package, that's what each of those extras is, a transport package that can be installed in MODX. And you can put it up anywhere. And anybody that downloads that to the core packages directory in the MODX site, it will install.
Manuel Lemos: I see.
Bob Ray: Very few people do that because the repository is very receptive to new things and that's the way most people go. I have seen people that attach it to a message in a forum "here's my package, take it", or "here is the transport package".
And of course the other place is GitHub. MODX itself is on GitHub. So you can see the entire history of the MODX code. And you can download the current development version, or the overnight, or whatever you like, or the stable version. But you can of course get all that from MODX site modx.com.
And given the architecture or MODX it could be a decent platform to create, let's put it this way, we see in Google marketplace the potential of having a portable system such as the laptop, the CR8 Project, and we see that it is possible that in the future we would have a computer that doesn't store anything and you can live throughout the Web.
And given such architecture as MODX does it could be that when developers could extend the engine, the core of the MODX, and create a specific let's say ecommerce platform solution, and others like forums or other solutions that could be easily deployed and easily installed into the cloud, let's put it this way, and then it could bring this kind of appification to the Web itself as well.
Bob Ray: Yes, that's a very good point, and I guess you could argue that the MODX repository of extras is in fact that, I mean those things sort of live in the cloud and all the users around have that availability.
But also I do know of some people, I haven't done this myself, but I know of some people who have modified their web sites that provide various kinds of services, so that they identify when it's a mobile, when someone's calling in from a smart phone, oh I'm sorry, visiting from a smart phone, that it completely transforms the web site and that's relatively easy to do in MODX, so that's I think a handy feature as well.
Ernani Joppert: Okay, yeah, thanks a lot.
Manuel Lemos: Great. Bob, it was great to have you here. I understand that you have other commitments that you need to go to, and just to end can you tell us exactly what the title of your book is so people can find it.
Bob Ray: Yes, my book is called MODX, The Official Guide, and if you go to modx.com I believe if you click on... there's a link at the top of the page that says Learn that has some things about learning MODX, so if you click on the Learn link I think that can get you to it. I can't give you the preorder URL off the top of my head but that would get you there.
Thank you so much for having me, I really enjoyed being on the podcast.
Manuel Lemos: You are welcome. Let's see if we have more interesting news about MODX and your work in the future. Thank you, Bob, bye.
Bob Ray: Thank you very much, goodbye.
PHP 5.4.0 to Not Include APC (40:16)
Manuel Lemos: Well, moving on with our podcast now we are going to talk a bit more about the latest happenings in the PHP world, namely about the PHP 5.4 beta that was released just a few days ago.
There is nothing specifically new about this release, nothing that it was not commented on here before. It's just that finally we are getting closer to a release, the final release.
And one thing that I noticed despite the past plans about this PHP 5.4 release is that it no longer will include APC. APC the caching extension that was planned originally to be introduced in PHP6, then PHP6 was canceled and then it was rethought to be released in PHP 5.4.
Despite there were many talks about that, it seems that PHP 5.4 efforts have gone to other things, and there are certain issues in APC that need to be fixed or improved, what I do not know exactly which are those issues, but since nobody has worked on them in APC it seems at least for PHP 5.4.0 it will not be included.
I don't know if it will be included in later minor releases of PHP 5.4, but for now that's one thing that seems to be certain because we are getting closer to the actual planned release date of PHP 5.4.0.
And I think it's a shame because APC is a caching extension that is sort of the caching extension supported by the core PHP development and this would be a great opportunity to introduce it and the main PHP distribution.
PHP gets a lot of criticism for being slow somewhat, and that slowness is not exactly due to PHP itself but rather the lack of caching extension that prevents PHP code to be recompiled on every execution.
And since PHP 5.4 is not going to include APC those criticisms against PHP I'm afraid they will continue. And it seems people in the PHP core are not very much concerned about that, so if you see those criticisms it was not due to the lack of interest of the community but certainly lack of investment in terms of efforts to bring APC.
Ernani, do you use any caching extension on your PHP production environment?
Ernani Joppert: Yes, Manuel, I used to do it, in the past I used to have APC and Turck quite some time ago, but given the current solutions and the improvements of those I haven't touched it specifically because of the architecture of the projects that I am trying, and consider those being personal projects and don't require too much optimization on that level I don't make use of it.
But it's something that brings to my attention on other projects that would make sense, because the current projects I'm involved in just uses AMF and Zend Engine with a Zend AMF extension for Flex, but yes, if I would have searched solutions as MODX and other content management deployed into the environments I have, I would certainly look into implementing such cache engines.
Manuel Lemos: Yeah, well, this is not content caching system feature that I mean, although APC also can cache content, what I mean is caching the actual PHP code.
And, well, if you control your own server, if you have a dedicated server or even a virtual private server, you can install whatever caching engine that you want. But in my case I use eAccelerator which is the follow-up of Turck MMCache, but for busy sites it's quite mandatory because the actual compilation of PHP code becomes significant and it may slow your site down a lot if you don't use a cache.
But I'm mostly concerned about those people on shared hosting and companies that provide shared hosting use the default that comes in the main PHP distribution, so if APC or anything else is not included they will not use it and it will continue to be inefficient and probably have to spend more servers to host the same number of clients than they should.
But let's see if and when APC is finally included maybe in a later release of PHP 5.4 or not, we'll see.
PHP Continuous Integration (46:54)
Manuel Lemos: Moving on to another topic, something that happened recently in the PHP world is there is a discussion about moving on PHP development and build process to implement continuous integration techniques.
From what I understood this greater concern about having things tested more continuously was due mainly to the PHP 5.3.7 that had a bug that was not detected early enough and it ended up being shipped with the final PHP 5.3.7.
And now there is this intention to have continuous integration process which is basically test PHP code, run all the tests after each commit or maybe as soon as possible after each commit that is done on the PHP source.
And hopefully this would prevent mishappenings like this one of shipping a PHP version with a serious bug that ends up affecting many sites that immediately adopted that version when it was released.
It only took a few days to release a new version with that bug fixed, but whoever has upgraded immediately had this problem of being affected by the bug.
Ernani, do you use any automatic testing in your projects to prevent shipping buggy code?
Ernani Joppert: Yes, I don't use PHP-Unit so far, given the complexity of Zend AMF projects it's basically on top of gateway and you have to set up the gateway instantiate the Zend AMF object then to make it available, and I haven't had the time to understand more of the Zend framework and the Zend AMF in order to implement a PHP unit solution in order to provide unified test cases.
But I have another approach which is similar and does test some methods that I consider to be critical, but it's one thing in mind to have PHP Unit as soon as possible.
Manuel Lemos: Yeah, PHP Unit is one solution, one thing that I do, not for all the code but at least for the core components that cannot fail because they are too critical, they are too central, and it's to use custom scripts very similar to PHP-T tests which basically capture the output of a certain component and compare it with expected response.
Of course if you use PHPUnit or a similar approach you can have a lot of that work done for you, but you still have to customize your tests, and usually since that is very boring and expensive in terms of time that it takes to implement, most developers avoid it.
But I think at least for components of your systems that deal with critical stuff like, for instance, if you have e-commerce systems, everything that deals with money cannot go wrong or else it's not just a bug, it can cause financial losses, you should have something to test that code.
At least in the ideal world, because you know that in the real world time is short and those boring things like preparing tests and make sure they run well is not something that everybody enjoys, but at least for critical components you should do that even if most other code does not have tests.
But I think people that were not aware when things go wrong it can have great losses, being financial or some other nature, they should consider having some form of testing.
If it is continuous integration it's even better because you can be testing all the changes all the time so you capture any bugs as soon as possible, and if not at least some form of testing your code before sending it to production it is also a better than nothing approach.
So it is great to see that there is some interest in the PHP core to have serious continuous integration method. From what I understood they are gathering several virtual machines to test PHP not just in a single distribution but also multiple operating systems, different distributions of UNIX, Linux and eventually Windows, so they can also capture bugs that happen in one platform and probably not in others.
So it's great to see that PHP development is going through a process of becoming even more mature than it is today.
Top PHP Developers in Every Country (52:54)
Manuel Lemos: But moving on with our podcast, we are getting close to the end, I would like to mention one minor improvement that was done recently in PHP Classes site which is basically a way to show authors that contribute packages to the site, how they are doing in terms of rankings not just globally but also inside of their own countries.
Let's say for instance Ernani submitted a component, I know you actually did, it was just one but it is good enough to illustrate what I'm talking about.
Ernani Joppert: It was a long time ago.
Manuel Lemos: Yeah, I know, when you worked more with PHP. But the site measures how many users have downloaded it and builds a ranking.
Ernani Joppert: Right.
Manuel Lemos: And then you have your own ranking among all other authors in the world. What's new now there is a separate ranking position that shows how you are doing in terms of all other authors of your own country.
So if you look now at your author page you can see that there is an all-time ranking as well a week rank...
Ernani Joppert: Oh, that's nice.
Manuel Lemos: ...which measure the number of users that have downloaded it within the last week. And what's new is that there is a new number next to that all-time and week rank that shows how you are doing among other authors of your country, in this case you are in Brazil it shows your ranking number in Brazil.
And the idea here is to provide an additional encouragement to authors that want to contribute to see how they are doing in terms of how many users they are attracting to use their own package, and it sort of establishes a goal for those authors that contribute, so that they can rise in the rankings.
But for authors that have just arrived to the site there rankings are very low, but now with this additional ranking in terms of their own country they can start with a higher rank because not everybody is included in the same ranking, just those that are from the same country.
And sometimes authors that do not rank very high in terms of the global ranking, they actually rank quite high in terms of the authors of the same country.
And I hope this constitutes sort of an additional encouragement for authors to see how they are doing and it sort of motivates them to contribute even more to actually send more updates and enhancement to their packages, and we'll see how it goes.
Other than this position that appears in the author's page, this country specific ranking also appears in a separate page that shows the authors of just a specific country. Now instead of showing in alphabetical order the names of the authors, it also shows the ranking position of those authors.
Ernani, do you think this will encourage authors to contribute more to the site, what is your opinion?
Ernani Joppert: Oh, yes, it does. And checking my score here makes me want to improve this because it's quite shameful right now.
Manuel Lemos: Yeah, I can understand that in your case you haven't been working much with PHP in the last years, but now that you are working more with PHP maybe you can submit more packages of interest to other people.
Ernani Joppert: Oh, yeah.
Manuel Lemos: As your time permits. And hopefully that will also encourage other authors to do the same.
Ernani Joppert: Oh, yeah, for sure.
And this time we will check the latest packages, objects that were submitted there. Ernani, what are your objects that you think would be worth mentioning there?
Ernani Joppert: Yes, for the JS Classes there is a particular one which is the Glint effect, I have never seen this done, although you've mentioned before there is similar components like this I've never seen this before and it brought to my attention.
It's very creative and it brings a really, really nice effect for presentation, and it's not something that would be widespread implemented anywhere, but it does really help sell some of your content and bring more and more animations and presentation effects to your we bsite.
Manuel Lemos: Yeah, that one was submitted by Arturs Sosins, a top contributor at the JS Classes site as well as the PHP Classes site, and he's from Latvia as we mentioned before we already interviewed him here, actually I interviewed him in the JS Classes podcast.
And it is interesting as you mentioned although there are other plugins to provide similar effects it's always interesting to mention these objects, actually this one is a standalone object, it's not a jQuery plugin or such, but basically what it provides is just a nice lightning effect over images or other page elements and that you can show horizontally or vertically as in an animated effect.
And on my part I would like to mention jQuery Marquee Title. This is also not a new effect but it is interesting to see also yet another animation effect, in this case it's a jQuery plugin uploaded by Daniel Carrero from Chile.
And basically what it does is show you those effects of what used to be that marquee title, marquee tag, old browser versions, in this case it provides animations of a title, but in this case it's not a part of a page, it's rather a title of the page itself.
So if you want to bring attention to your site users to the actual page title that may appear in the title of your browser window, now you can apply this effect and it shows the text scrolling to the left, I think to the right as well, and it is an interesting way to get the attention of the users to the page title and sort of a discreet way.
PHP Programming Innovation Award nominees of July 2011 (1:01:20)
Manuel Lemos: And now moving on to the next and final section of the podcast on which we comment about the latest nominees that were announced as winners of the Innovation Award on PHP Classes site.
Ernani, which of the nominees do you think are more worth mentioning?
Ernani Joppert: Yes, I comment on two, I'll pick two components for this month, I encourage users to submit more and more, and I see that there are very, very nice components for this month.
And the first one would be from AlexanderC from Germany, his component is the File cache, Memcache implementation. Basically what it does is it mimics the Memcache functionalities storing local files and provides and API compatible with the Memcache extension, and it can store and retrieve arbitrary data.
So it can help you target a Memcache solution without having the need to have a Memcache server anywhere and help you speed up development of your solution, so it's a very, very creative component here.
Manuel Lemos: Right. Actually it can solve the problem of people that want to use a Memcache API in an application but sometimes has to run that application in an environment where the Memcache extension is not available. So having this compatible API that uses files, local files, to store cache data it will be great as a workaround for not having Memcache extension available.
And what was the other one that you wanted to comment on?
Ernani Joppert: Yes, it's very nice. And the other one would be the PHP sandbox which executes external scripts in a separate process, although, oh sorry, this package is from Paul Frier from UK, and basically it uses the PHP CLI version to execute given external scripts into separate process, it falls into calling script, does not fall to, so it's kind of a security measure to perform sensitive calls and it's really a nice and innovative solution.
Manuel Lemos: Right. This is maybe great to actually test PHP scripts submitted from untrusted sources.
Ernani Joppert: Yeah.
Manuel Lemos: Like somebody sent you a script, you need to run it but you're not sure if it will do something evil that will exploit any secretive holes. So using this sandbox from what I understood it will use a chroot to prevent that script access files, sensitive files that it should not be accessing like for instance password files and send them elsewhere. With this chroot approach it can protect your environment from running scripts that are from untrusted sources.
And on my part I would like to mention the Genealogy classes provided by Pierre Fauque from France. These classes, what they do is quite obvious, they let you manage genealogy trees, for instance if you want to reconstruct the tree of your family, if you want to know who were your parents and the parents of your parents, your grandparents, and so on.
You can build a genealogy tree and these classes allow you to manage those genealogy trees and even export them to a format that can be used by other applications. And this is quite interesting because genealogy is something very interesting that many people spend time as a hobby to figure where and how is there family constituted in the past.
Ernani Joppert: Very creative.
Manuel Lemos: Yeah, and I think it somehow explains why it was voted number one this month.
Other than that, finally I would like to mention another interesting class by Brett Dutton from Australia I think, and he basically built a class that I think it will solve the problems that many people have their sites hosted somewhere on which you have to upload your site scripts via FTP, but at the same time you use Subversion to do a version control of your project files
So using Subversion you can manage the history of your files revisions, and when you are ready to deploy your project to a production server you can use this class to upload the files in the production server via FTP.
And I think this is very useful for people that work on these environments and kudos to Brett for providing this solution.
Manuel Lemos: And basically this is all, we had a great podcast, thanks also to Bob Ray for his participation on MODX.
And next month I'm sure he will continue to have even more interesting PHP news to comment about. So, on my behalf that's all for now, bye.
Ernani Joppert: Thanks a lot, bye.
You need to be a registered user or login to post a comment
Login Immediately with your account on: