PHP Classes

Zend Optimizer+ Cache in PHP 5.5 and MySQL 5.6 Performance Improvements - Lately in PHP podcast episode 32

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Zend Optimizer+ Cach...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Viewers: 62

Last month viewers: 21

Categories: PHP Performance, Lately in PHP Podcast, PHP opinions

MySQL 5.6 GA version is finally available for download. One of its main features is the new NoSQL interface to access tables much faster than using SQL via a connection compatible of memcached.

MySQL 5.6 speed improvements and how it affects PHP applications was one of the main topics discussed by Manuel Lemos and Ernani Joppert on the episode 32 of the Lately in PHP podcast.

They also commented on the eventual adoption of the Zend Optimizer+ as the PHP code caching extension that may be shipping with PHP 5.5 as alternative to APC, the implications of this to the PHP community.

Other topics discussed in the podcast include the switch of OpenSuSE and Fedora Linux distributions from Oracle MySQL to MariaDB MySQL fork, the use of test driven development in the Zurmo PHP Open Source CRM, using advanced HTML5 based animations to get the attention of site users, and the launch of the JavaScript Innovation Award that just happened in the JSClasses site.

Listen to the podcast audio, or watch the podcast video, or read the podcast transcript to learn more about the details of these and other interesting topics.




Loaded Article


Contents

Listen or download the podcast, RSS feed and subscribe in iTunes

Watch the podcast video, subscribe to the podcast YouTube channel

Read the podcast transcript


Click on the Play button to listen now.


Introduction music Harbour used with explicit permission from the author Danilo Ercole, from Curitiba, Brazil

View Podcast in iTunes

RSS 2.0 feed compliant with iTunes:

http://www.phpclasses.org/blog/category/podcast/post/latest.rss

In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.

Watch the podcast video

Note that the timestamps below in the transcript may not match the same positions in the video because they were based on the audio timestamps and the audio was compacted to truncate silence periods.

See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.

Show notes

Introduction (0:21)

PHP 5.4.11, PHP 5.3.21, PHP 5.5.0 alpha 3 and 4 releases (0:53)

Zend Optimizer+ Caching Extension to be Included in PHP 5.5 (3:31)

MySQL 5.6 Performance Improvements (22:55)

Fedora and OpenSuse to switch to MySQL fork MariaDB (34:57)

Test Driven Development brings Stability to Zurmo Open Source CRM (42:17)

Getting the Users Attention using HTML5 based Advanced Animations (46:03)

Launched the JavaScript Programming Innovation Award (53:22)

Latest JavaScript Objects published in the JS Classes site (55:03)

PHP Innovation Award Winners of November 2012 (1:03:24)

Conclusion (1:09:19)

Introduction (0:20)

[Music]

Manuel Lemos: Hello, welcome to the Lately in PHP podcast. This is episode 32 and as always, finally, we have Ernani [chuckles] getting back to the Hangouts regularly. Hello, Ernani. How are you doing?

Ernani Joppert: Hello, Manuel. Glad to be here again. Hopefully, things will be smoother within the following months and hopefully I'll be available.

Manuel Lemos: Yeah.

Ernani Joppert: Lots of great things to talk about.

Manuel Lemos: Yes, exactly.

PHP 5.4.11, PHP 5.3.21, PHP 5.5.0 alpha 3 and 4 releases (0:53)

Manuel Lemos: Well, this month, several important things happened or are about to happen. We are going to talk about each of them regularly.

I'm going to screenshare the first topic that we are going to comment here, which is precisely the release of PHP 5.4.11 and PHP 5.3.21.

There is not much to say about these releases, but we can just mention them because there is always people that want to follow the latest versions. I don't know if the font is large enough. I think it's already in the limit of the size to show you.

Well, there are not many things to say about these releases because they are mostly bug fixes, which basically means that these versions are stabilizing and the bugs that are being fixed are not really crucial, at least from what I can see here.

Other than that, just to mention these new releases for those that are interested to follow the latest version and eventually upgrade.

Also, there were a couple of new alpha releases of PHP 5.5.0 and, well, I don't even know the details of what may be have been changed that may be more important but just to people know about these releases.

A couple of alpha releases were done this month, one on January 10 and another, January 24. So they are following the regular schedule of having an alpha release every two weeks.

And this is great because there are plans to reach feature freeze to start the actual Beta testing of the final version of PHP 5.5 that according to the schedule, it should happen like in February 7.

I don't know if this Hangout will be published before that. It will depend on the speed of the transcribers that will be transcribing the audio of the podcast to text so we can publish the article.

Zend Optimizer+ Caching Extension to be Included in PHP 5.5 (3:31)

Manuel Lemos: Anyway, things are coming at a good pace but there is a more important news regarding this release.

Eventually, PHP 5.5.0 will already include a new alternative for a cache engine because Zend, actually, Zeev Suraski from Zend, offered to open source the Optimizer+, which is an extension that used to be close source, they developed that extension at Zend.

Well, Zend Optimizer initially used to be just an optimization extension that would optimize the opcode generated by PHP. Then they evolved it.

I think the latest releases already include the caching engine itself that will actually speed up the execution... well, actually, not the execution but the overhead of compiling PHP into opcodes.

And they are offering this extension because, ideally, PHP should be shipping a caching extension. And APC would be the natural candidate, but according to Rasmus Lerdorf, APC is not yet in a state that can be considered stable, it has some bugs.

After all these years it has some bugs that they consider that can affect the stability of the caching engines. So the guys from Zend offered the Optimizer+. Well, for me, this seems to be great news because finally, PHP can ship a caching extension.

By the time we are recording this, this is not yet decided. There is a RFC to propose this to be included either in PHP or at least first be put in the PECL repository of extensions, to be considered by the community for now to test it and see which caching extension may be included in the later release of PHP, probably 5.6 or even 6.0. That probably will happen not this year, maybe next year.

Ernani, I don't know if you have been following these happenings. What are your thoughts about this?

Ernani Joppert: It should be a very straightforward as they mention here, it should be a straightforward situation, especially on the release of 5.5.

So hopefully, I've been reading it a bit before we would start the hanging out, so as far as I can understand, it has a more commercial appeal to APC and it requires less effort and it seems to be the right way of doing things. And it might conceive the initiative from Zend doing this. It's very nice to see that they are willing to open source Zend Optimizer.

Manuel Lemos: Right. There was a great debate. I think the debate still goes on as we are recording this podcast.

There are certain discussions precisely because some people claim that there are other caching extensions that are considered stable from other people, but some people are concerned that just because this extension is being proposed by Zend it should not get any privileges.

And, well, somebody else also claimed that whoever has developed other extensions can also submit an RFC to propose those other extensions if there is any interest.

And so far, it did not happen but in the end, what matters is the result of the votes of the RFC because, well, what can we say about this proposal is that some people like it, I think the generality of the people like the idea, but I'm not sure what will be the results of the votes.

I was trying to screenshare the actual RFC page here. And from what I understood, suggest voting options integrate Optimizer+ in PHP 5.5 and allow two months of delay for this release so it can be tested, the integration, if it's a couple of more months. So the final PHP 5.5 does not ship with bugs in this Optimizer+ extension.

The other option would be integrate Optimizer+ into PHP, but don't delay it for 5.4, 5.5. And the other option would be to not integrate Optimizer+ in PHP for now and just provide it as an optional component in PECL only.

Well, the outcome of this proposal is not yet decided. I think it will still have one week after the proposal was put there for discussion and then there will be one week for the votes. Well, the dates here that appear for the proposal is January 28, so there are still a few more days to go before the votes will be started.

In my opinion, this seems to be great because the story of APC is that there are not enough developers to go after the bugs, I mean, capable developers because it's not just a matter of fix bugs. First, we have to figure what are the reasons for the bugs to exist.

And I think this is being proposed for several years. It was supposed to be shipped with PHP 5.4 once it was decided that the original plan for PHP 6.0 was cancelled.

Ernani Joppert: I'm not sure what happened with the Turck  MMCache extension.

Manuel Lemos: Yeah. Well, that's critical to ask though. Basically, to the Turck MMCache extension, I think the original developer got an offer from Zend, Dmitry Stogov. I think he still works in Zend and probably got even involved in this Optimizer+ extension. And he's still one of the core contributors to PHP itself. Although we don't see much commenting on the lists, I understand that he's an active developer there.

Anyway, one of the arguments that was claimed about preferring Optimizer+ to APC is that there are several other developers, not only the two Zend founders, Zeev Suraski and Andi Gutmans and as well Dmitry Stogov and Stas Malyshev. Stas used to work at Zend as well, although he is working at SugarCRM right now. He also has been the Release Manager of PHP 5.4.

Ernani Joppert: Right.

Manuel Lemos: So all these people are very active and they know very well the code which is something that is very important because this specific kind of extension is not very trivial. You have to have a good in-depth knowledge about PHP and also how the actual opcode execution and caching can work.

Ernani Joppert: Yeah. And there were some benefits related with optimizers or cache, if it would mean, because it allows PHP applications to be obfuscated and then you can provide licenses.

Manuel Lemos: Yes, but I think that part was already separated. I think that was the role of the originals and optimizer extension that will also decode the PHP files encoded with the Zend encoder.

Ernani Joppert: Right.

Manuel Lemos: Well, I'm not certain but I think that was a feature of Zend Optimizer, the original extension. But then I think they moved that part to the Zend guard extension.

Ernani Joppert: Oh, I see.

Manuel Lemos: And Zend Optimizer+, I don't know if the original closed source extension would also decode, well I think I never used it. I'm not sure.

What I know is that when Facebook released their HipHop Compiler, I did some benchmarks test whether using Zend Optimizer, because the Zend Optimizer also has opcode optimization features, they try to resort to rewrite the opcodes to make the code eventually run faster if that would have any impact on the performance of PHP.

Well, in terms of the difference was minimal like not much more than 1% in terms of speed, at least when compared with the version of PHP that was available then but this I think it was in 2010 or is it 2011.

Well, there is an article in the site that I wrote about PHP compilers and it explains well. So the greatest benefit of Zend Optimizer will be certainly having a stable cache extension in PHP.

For me, the most important impact this will have is that many benchmarks that try to compare PHP with other languages, they always run PHP without the caching extension.

And that is not very fair because if you are serious with PHP in production, you use a caching extension and your PHP code will run faster. But if people are comparing benchmarks PHP with other languages, the results will be distorted, at least you compare it production environment.

Well, there is one detail that is worth mentioning. The caching extension itself will not make PHP code run faster. I mean, what will be faster is the loading of the PHP because caching extensions, they take the results...

Ernani Joppert: They optimize the I/O of the PHP interpreter, loading PHP files within the disc, right?

Manuel Lemos: Actually, they will skip the compilation step but will only happen the first time a skip is executed.

Ernani Joppert: It's similar to a query if we would talk about MySQL. It's similar to the query caching as well, right? That might be...

Manuel Lemos: Well, I think you can compare it with that somehow. If you execute the same query again, it will retrieve results from cache instead of going through the actual database to get the results. I think you can compare it because what happens when you use a caching extension in PHP, it just stores the results of the output compiler.

Ernani Joppert: Yeah, because basically, most languages, they have three steps, right? Sorry, I mean three here not four.

But in my idea, my overall idea of it, they have the parse phase where parse is the syntax, then the execution itself and then the fetch phase.

And it's basically the concept from Oracle, from MySQL, from any databases as well as any scripting language. And, yeah, I guess that this optimizer is the best optimization happens when we're talking about I/O where it reads the file from the disc which is not a very fast application. Now with SSD, it should be less problematic.

Manuel Lemos: Well, in practice, when using a caching extension, it does not even access the disc because it would compile, the opcodes will be just copied in memory.

Ernani Joppert: Yeah, it will be sharing...

Manuel Lemos: In some cases I think, they do not even copy from one memory space to the other. I think they just run it from where it is in memory because I think it uses shared memory.

Ernani Joppert: Right.

Manuel Lemos: That makes it very, very fast. So when people claim that PHP is slow because it is interpreted, that's all rubbish. That's totally untrue, at least since the year 2000 when PHP 4 was introduced, the execution step is from memory, not interpreting the lines of PHP code.

Ernani Joppert: Right. And within 2000, there was a benefit from JSP compared to PHP because JSP would be compiled once and run through the whole deployment situation.

Manuel Lemos: Yes. I think you can compare it somehow because JSP is basically Java within HTML template.

Ernani Joppert: Yeah. Basically, JSP has a Jasper, which is a parser of the JSP, which then brings it into Java, so it's all Java in the end. And it will create a cache of it and the Java class and be loaded within the JVM.

So now, if you think the approach of PHP it puts into a memory or a memory space and if you don't change the file, it will be executing that specific block of memory or instructions right off the bat and it helps the performance.

And I'd say that this would be beneficial to applications similar as the WordPress or E-Commerce like Magento and other applications that they are mostly known such as SugarCRM and all these standard applications, let's put it this way.

And I believe that when we are talking about applications that require you to flush the cache, then it would make more sense like content management pieces which benefits from publish-subscribe situation where you have files. They are mostly static. Then you don't see much performance increase. But other than that, it's very beneficial.

Manuel Lemos: Right. Well, we've been using caching extensions for more than 10 years and finally seeing PHP eventually shipping with that built-in caching extension, just better late than never because I think PHP is getting heat because of the benchmarks that work around. We can see people claiming that the benchmarks are not favorable to PHP when they run it without the caching extension.

But as I was saying, the caching extension itself will not make PHP code run faster. It just skips the compilation step. There are even better ways to run PHP even faster that requires something that we already talked about here several times, which are JIT compilers like the one that Facebook is using and developing and maturing.

Having that built in PHP would be something, maybe for PHP 6, but that depends a lot on not just technology but also in politics because if we go to the discussion forums, the internal list, you can see there are all these people that object certain things and... politics.

Ernani Joppert: Yeah. And since we always talk about this in most of the episodes here, it may seem that we are touching their wound, but it's not the case here.

We are not against those rules. There are rules and they made it, so they have their own credits for it. But I think that people should start opening their minds. And the idea here is to try to benefit the whole thing.

But I know that there are a limited amount of people that are trusted and there should be an extra effort being done to accept other members that are willing to contribute.

Manuel Lemos: Right. That is a very complicated matter. We have already talked about it several times, but I am sure in the way, we'll still get back to that because it's always getting in the way - the politics.

Ernani Joppert: The idea here is just to make everybody aware that we are not trying to put a finger on their wound. By talking about it, we do.

Manuel Lemos: Not these fingers and not anything else.

Ernani Joppert: Yeah, exactly.

But the idea is just to make sure that we as people that work with it would love to see more and more technically skilled people assisting the PHP core in order to make this improvement within the -- and not being just arguing and mocking people and, et cetera.

Manuel Lemos: Right. Because this...

Ernani Joppert: In my opinion, it just shows up immaturity.

Manuel Lemos: Right. And that's something that we do not do. Maybe sometimes we express opinions that are different from other people, but we certainly take it very seriously because we know many thousands of people are watching this podcast that we record and anything that we could speak that would be not very serious would not be good for us.

Well, anyway, we talk a lot about this topic. This is very important but we need to move on to other topics.

MySQL 5.6 Performance Improvements (22:55)

Manuel Lemos: Another thing that did not yet happen, at least at the time they're recording but is expected to happen soon is the release of MySQL 5.6, at least the generally available release also known as GA.

Oracle posted a blog article, that I'm going to screenshare here, on which they summarized what is new in MySQL 5.6. And this is very interesting because when MySQL was sold to Oracle, people doubted that Oracle will take MySQL forward because in practice, is a competitor of the Oracle database engine and people always doubted that Oracle would allow MySQL to cannibalize their main database product.

So it is interesting to know that they are finally going for the regular schedule on which they'd be publishing the new version of MySQL with several interesting features.

I'm trying to increase the font to see if it can read better here. Well, anyway, there are some improvements. Some of the improvements are on the security level other than the performance, but I think the most noticeable difference is having NoSQL access to the InnoDB tables by the means of an API that is compatible with memcached.

So those that are not familiar with memcached, memcached is a server that stores key-value pairs. I mean, you can assign a value to a certain key and you can stored there. The memcached stores it in memory for faster access. This makes it ideal for storing, for instance, PHP session data in a cluster of servers.

When you have a site that is served by several servers, you could use memcached to share the common data and make it available for different Web servers that run PHP. The memcached, which is nothing specific of PHP, which is a product that makes this key-value pair storage available.

And what this has to do with MySQL 5.6 is that they are making it available as an API compatible with memcached to access data in the tables. I was trying to see an example how could you use NoSQL access but I'm not sure if I can find it in this article.

Well, basically, you use a table with a primary key that will be your key to access the data in the values that are stored in the NoSQL access to this table. 

There are some graphs here and they show some performance graphics that demonstrate that using this memcached API to access these key-value pairs will be faster than using SQL because it will skip the step of compiling the SQL into a query plan that will retrieve the data from the database.

Ernani, I don't know if you have checked these new features of MySQL 5.6. What are your thoughts?

Ernani Joppert: I've had a brief read on it yesterday, since I do love MySQL and it makes me interesting to see Oracle's approach on it. And one of the two features that I like to see going on is the difference, the better performance with SSD, which is the future and we know about it. It should be used for most servers.

And they have an approach here. They explain the differences between spinning discs and as far as tape drives. And they have a support for smaller 4k and 8k page sizes so they fit the standard storage algorithm of the disc.

And they have very good explanation here between the differences of the discs. And another one is the portable .ibd which is the data file that will allow hot tables to be moved between SSDs in separate table spaces for the InnoDB log that can be then moved and the read-intensive I/O patterns as well. So that's nice to see here. It should be, really, that should be a boost comparison on performance.

And another thing that I will highlight the text here on my... and it's actually what we were talking about of the Zend Optimizer+. I think that MySQL has a better query execution time based off on the improved optimizer that they have.

So they re-factored their whole optimization that will benefit both query execution times as well as subqueries. And we all know that SQL is very nice on its own but subqueries are mostly required in complex systems. And having this being improved as well will allow it to get even better performance on this.

So I'd say that I'm looking forward for this release and I like to see the traditional thing. When talking about the memcached part, it's also nice to see that they are focusing as well on the, let's put it this way, the new fashion of concepting architecture. And it's nice to see that they are also doing the NoSQL folks because it's nice to see the better of two worlds.

And it seems that they changed also thread concurrency rules which may benefit concurrent threads also focusing on the core optimization. Lets put it this way, if you have multiple cores, you can benefit from this, so it's nice to see that they are also analyzing those things.

And, yeah, I would say that if we have working systems today based off on MySQL and then checking these big new improvements, it should benefit a lot the current applications as well as the future applications.

Manuel Lemos: Right. Well, I was trying to figure what will be exactly the planned release date but I could not find it anywhere.

Anyway, still talking about performance, there's an article here, I like to show it, by Ulf Wendel who is a PHP developer, and he was commenting on the claims that the queries could be 1.5 to 9 times faster with PHP and MySQL 5.6. So this guy questions these claims.

Well, from what I understood, I think the comparison is only valid for the cases on which they are querying key-value pairs. So when they say it's NoSQL, it's not exactly the same as MongoDB, it's just memcached interface for querying key-value pairs and that's what you get. You'll not get whole documents or objects like you get with MongoDB and others.

Ernani Joppert: I'd say memcached was the initial NoSQL engine and such as CouchDB, MongoDB, Redis, right?

Manuel Lemos: Right. But they...

Ernani Joppert: Those are second-generation NoSQL applications as far as I can...

Manuel Lemos: Right. But the NoSQL access that MySQL is offering has nothing to do with that. It's just querying key-value pairs.

Ernani Joppert: Right.

Manuel Lemos: Because that's a very common use case like I mentioned, use of key-value pairs storage for storing PHP session data. And that is very important to use case because it's very common.

But there are differences. I don't think MySQL can be actually faster than memcached because MySQL implies some storage and at least in memcached it does not store any data in files.

There is another similar package that is sending... being used for storing key-value pairs called Redis that actually stores that data in persistent stores. So if the server goes down on this mission and dumped for some reason, when it gets back up the storage stays there and do not lose keys.

Well, this article may be interesting because Ulf shows several benchmarks here, so if you want to take a deeper look at it, you may find it interesting. It talks about some PHP extensions that allow monitoring the calls to the MySQL...

Ernani Joppert: And it seems that they did a pretty good job on the memcached layer to go directly to the InnoDB storage. Then basically, you can...

Manuel Lemos: Right. Basically a wrapper.

Ernani Joppert: Yeah. You can have direct access to the InnoDB storage by using the memcached API and instead of going the SQL way.

Manuel Lemos: Well, but in the end, it's not the same because as I mentioned, the data will be stored persistently unless you are using HEAP tables of MySQL to store the actual data for the key-value pairs that you are using, but this is another option.

Well, anyway, there'll be a lot more to say about this but we need to move on.

Fedora and OpenSuse to switch to MySQL fork MariaDB (34:57)

Manuel Lemos: And the next topic that I wanted to comment still related to MySQL is that now that Oracle is releasing MySQL 5.6, Fedora and openSUSE announced that will replace MySQL with MariaDB. MariaDB is a fork of MySQL done by, actually, one of the original creators of MySQL, Monty.

He was not happy with the fact that after he sold MySQL to Sun, Sun was sold to Oracle which would be one of the main rivals of MySQL. So he was a bit upset and created MariaDB which should be a fork. And he tries and actually managed to achieve the full compatibility, at least as far as possible to be running the same applications without compatibility issues.

And since Linux distributions are probably the most popular being used on Web servers, this move is interesting. Well, actually, I wonder if this MariaDB is already compatible with MySQL 5.6 features, namely, this NoSQL...

I did not have time to verify that, but there is an article here that talks about the move of openSUSE and Fedora to move it and this is interesting. Well, from what I can read here, at least MariaDB will be compatible with MySQL 5.5.

They even have similar numbering as I see here. Actually, there is an article here talking about MariaDB 10 and MySQL 5.6. So we can see here. I was not aware of this plan, but it seems that... OK. Well, this is interesting that this news is happening. Well, we'll have to see what happens in the next version of MariaDB because this competition seems to me it's very interesting.

Ernani, did you ever tried MariaDB?

Ernani Joppert: No. Actually, I haven't even heard of it before. I've heard of another clone that I've been digging two years ago. But I haven't seen any changes so I gave it up and I've been using MySQL most of the time.

It's weird that there are some weird ad here that plays audio so, I'm not sure if you got it there, but I've had it the same...

Manuel Lemos: Yes. I was opening a tab that had a page with an ad that was advertising something. I had to shut it down.

Ernani Joppert: Yes, it's the same with me. Funny.

Manuel Lemos: That's because you probably are opening the same pages.

Ernani Joppert: You got it. Exactly.

Manuel Lemos: Well, anyway...

Ernani Joppert: Well, yeah. I am curious about this change on Fedora and... OK, I guess that it's worth the shot to have a different fork of MySQL, but in order to make this change, it requires a maturity. I'd say that it requires to have some subset of maturity and hopefully, they've reached it with MariaDB.

Manuel Lemos: Yes. Well, given it is from the original creator of MySQL, I'm sure it is very mature and probably, we don't even know if it's even more advanced. I mean, I'm sure there are differences but since it's all open source, I'm sure they keep watching each other and they will try to borrow parts of the code because it is all... the license is GPL.

And even to make it compatible, they probably are required to borrow parts of the code from each other. At least from MySQL to MariaDB, probably they have to do that.

Ernani Joppert: Yeah. Those kinds of thing are where they fall into those huge fights about open source. And fighting with Oracle can be somewhat problematic.

So that's why I think people don't face the odds here but it's nice to see that there are people willing to do this and to actually...

Manuel Lemos: Well, in reality it's not people fighting Oracle, it's people keeping up with the advancements of each other. They are not legally fighting. They are not bumping against each other.

Ernani Joppert: Right.

Manuel Lemos: But trying to make something compatible.

Ernani Joppert: Yeah. Right now they are not fighting, but until you will see something like Android which was then allegedly use Java and we see some technology allegedly using MariaDB and then Oracle says, "Oh, but it uses then the property of Oracle," and then you see the kind of things stinking out of it. Hopefully, this won't happen.

Manuel Lemos: Right. I don't think that will happen because it's really open source. In the case of Android, that was not really open source.

And from what I understood, the law suite that Oracle imposed to Google, was about the use of concepts, not the use of code, concepts that were allegedly patented. And still in the courts it failed to pass the validity of those patents, I think.

Well, I'm not an expert on the subject to interpret this probably in the most accurate way, but that's the way I see it. Well, anyway, this is an interesting topic. There are probably much more to say about it, but we need to move on.

This time I'm going to move on talk about an article just briefly, it was published on the PHP Classes blog.

Ernani Joppert: So I'm clear on it, all patent discussions should be avoided here and there. It doesn't bring any future to anyone other than the fact the order and the lawsuit winner.

Manuel Lemos: Right [Chuckles]. We don't want to get sued for talking about that.

Ernani Joppert: Yeah, exactly.

Manuel Lemos: So erase that part [Laughter].

Test Driven Development brings Stability to Zurmo Open Source CRM (42:17)

Manuel Lemos: Well, anyway, as I was saying, there was an article from Zurmo developer named Ray Stoeckicht. I'm not sure if I'm pronouncing his name right in spite he's American, his surname is probably difficult for me to pronounce it correctly.

But, anyway, he wrote an article about Zurmo which is an open source CRM system written in PHP on which he used test-driven development. And this means several things not only test-based developments but also use continuous integration to keep testing things as they evolve.

And he published an interesting article here. We are just going to mention it briefly. And other than that, I like to take this chance to remind everybody that if you have an open source project that you would like to talk about, the PHP Classes site blog is open for you to publish it.

This is not, how would I say it, it's not a sponsored article despite Zurmo is a commercial company, this is an open source product that they wanted to talk about. They talk about their methods, they talk about the framework they used, they use, the Yii framework, and also the RedBeanPHP ORM. They explain why they used it.

And they also talk a bit about the CRM system itself. It is sort of an opportunity for them to talk about their product. They do not sell the product, they sell consultancy from what I understood. And this opportunity to talk about your open source projects is open to anybody not just these people.

If you, for some reason, you would like to talk about the commercial product, that will be a different story. That is also possible, but that would be subject to a sponsorship. And also articles having a disclaimer that when they are sponsored because they want to be transparent about it.

Well, that's practically all I have to say about it that is not something important. Ernani, I don't know if you want to comment anything about this Zurmo CRM system or you did not have much time to take a look at it?

Ernani Joppert: I didn't. I love those systems. I like working with it, but I haven't had the opportunity to do so. And it's nice to know that it's there and I should be doing my investigation in the future. And hopefully on the next episode, we can talk about it if we have the time to do so.

Manuel Lemos: Yeah. Well, it is not really important because it's not... it's just generally related to PHP. It's nothing about anything new.

Ernani Joppert: Right. But it's nice to see technology based off on PHP. And it's nice to standard the whereabouts of them as well. And it's nice to know that PHP can realize those things as well. And eventually, we may have an episode where we call some CRM providers to discuss the benefits of using PHP in such applications instead of other technology.

Manuel Lemos: Right. That's a possibility. We don't know yet if there will be an interest from those developers, but we can think of what it is there is interest.

Getting the Users Attention using HTML5 based Advanced Animations (46:03)

Manuel Lemos: Well, anyway, we need to move on. We're reaching almost the end of the podcast but there is still time to talk about a few things related with the next section on which we comment the latest classes, objects published in the JS Classes site which is the PHP Classes site brother site.

Since this is a relatively new site, we always take this chance to promote it a bit because it's so interesting the JavaScript components that are published there.

But before we get to the actual mentions of the interesting JavaScript components, I would like to comment a bit about an article that in spite it is there in JS Classes site, it is related with the feature that also was implemented on the PHP Classes site which is the systems of levels and missions that were implemented in late November.

This article talks about a component that was used to implement the animations that were used in all the pages of the systems of missions and levels also that were implemented.

And basically, this article talks a bit about using animations to get the attention of the users because sometimes you need to present any information that sometimes is a lot of information and it gets cluttered in the user interface and that the user doesn't know exactly what would be the most important information to talk about.

You can use some styles, use larger fonts, use different colors, but sometimes that is not enough. And this article talks about some animations that were implemented with the JavaScript component that is also in the JS Classes site. And it was used to implement some animations that are not only nice to see, but they are very effective to call to the attention of the user.

Let me try to show them here. For instance, in the user status page, I'm going to load it here so you might be seeing hopefully. You saw that several page elements appear in the page. You could see that there was this progress bar that you have seen it was animated also in this component.

Actually, there are two components involved but the main animation component was this one that I was talking about. You saw the progress bar advancing. Let me reload so you can take a look at it with greater attention.

You see the progress bar increases up to the current level and it shows 66% I have done so far in this level that I am on, and I have one mission to go, all these in a large font to get the attention of the user.

Then bellow, it appears a message that says, well, 11 users have completed this level so far. So I also need to move on and complete this missing mission to get to the next level. And the next mission, which is the one that is remaining, it's easier, next mission: publish innovative classes.

And it has drawn a circle, actually, an ellipse here that gets the user the attention of the actual mission that you need to do next. And I can click here, it expands the area a bit, and again, it draws a circle to the next message that I need to pay attention, which is to go to the mission briefing page.

And I'll go to the mission briefing page and it's the same thing. There are some messages here that appear.

Ernani Joppert: Yeah. That brings me to one question. Haven't you being involved into any innovative packages yourself?

Manuel Lemos: Well, that's a different story. The matter is that due to policy reasons, I do not nominate myself.

Ernani Joppert: Oh, I see.

Manuel Lemos: So it doesn't matter. I may have published some innovative packages, I certainly did, but I do not nominate myself because it would be conflict of interests. I could imagine some users complaining if I did do that because they could feel that there I use...

Ernani Joppert: Unfair.

Manuel Lemos: ...subjective criteria. Well, anyway, I think you already got the idea these animations used here. I don't know if you noticed when it showed this message "13 other people have completed this mission," it does not start in 13. It starts in zero and goes 13 incrementally. Let me reload the page so you can see it again.

Ernani Joppert: Yeah, it seems to be counting up.

Manuel Lemos: Yeah. Well, it's sort to make it look like a video game on which it shows the score increasing gradually.

Ernani Joppert: Right. Does it use pure JavaScript or CSS as well?

Manuel Lemos: Well, it uses JavaScript. As I mentioned here in the article, it uses already some HTML 5 elements like Canvas. For instance, these circles here, I don't even know how you can animate them with anything else besides Canvas. You could use images but we would have to have many images to render a circle here. I'm going to reload again just... well, OK.

Ernani Joppert: You should also benefit from GIF files, but then it looks nice.

Manuel Lemos: Yeah, it wouldn't work. You could use GIF animations, but that would have to be generated on the server side and it will be very difficult for the reason...

Ernani Joppert: It will be 1999, for sure.

Manuel Lemos: Well, GIF animations still have their uses. Some people use them to upload pictures that are actually animations to certain sites, but says it would not do, for instance, this circle here, the size is adjusted to the container message.

Ernani Joppert: I'd say animated GIFs are for 9GAG web sites and others.

Manuel Lemos: Yeah. Well, that's what I'm thinking.

Ernani Joppert: And pages under construction other than that.

Manuel Lemos: [Laughter] It's more or less like that. But as I was saying just to complete this part, GIF animations will not do because the size of this circle adapts to the size of this message.

Ernani Joppert: Oh, yeah.

Manuel Lemos: And it depends on the size of the font on the browser and it is not exactly the same on every browser. Well, it wouldn't work. And that's not just that. There are other effects that are available using this package. And this package is on JS Classes site for animations. Well, if you are interested in usable user interfaces, you can take a look at this.

Launched the JavaScript Programming Innovation Award (53:22)

Manuel Lemos: And now, we need to move on to the, actually, mentioning the Innovation Award that is finally getting started in JS Classes site. It was actually started this month of January and there was even an article about it. There is not much to say about this article, but it was published here just to tell a bit about the prizes and the sponsors and so on.

Some of the sponsors are basically the same as the ones that already sponsored PHP Classes Innovation Award, except these are restricted to those that provide prizes that are more interesting to JavaScript developers.

And there is here Packt Publishing that is giving away a book of choice from them. And there is also WebDev Publishing, which is the company of Michael Kimsal, the co-host of the JS Classes podcast. And he is the owner of the company that publishes JSMag. They are giving away a subscription of JSMag.

And then there is also O'Reilly that has been very supportive since the beginning. They organized many interesting events besides the books, they also publish it. So they will be giving away a ebook of choice from their extensive library.

So the invitation for everybody to come and participate also in the JavaScript Innovation Award is done.

Latest JavaScript Objects published in the JS Classes site (55:03)

Manuel Lemos: And now, we need to actually move on to an actually mention, some classes published in the JS Classes site.

This month, there are like 11 classes published there. Things are fluctuating a bit in terms of number of contributions, but it's a reasonable quantity for a site that is not as old as PHP Classes. And this month, we have a problem which is that I always avoid to comment on packages that are nominated to the Innovation Award.

You can see some of these packages already nominated. We need to avoid to talk about them at least this month. We can talk about them next month. The reason is just we do not want to influence the users that will vote on the award.

Well, given that, Ernani, which package do you think will be more interesting to comment this month?

Ernani Joppert: Right. I have already made my pick and the winner is, I mean, in my vote here, is the Form generator component. It's from Stephen Chapman.

Manuel Lemos: Well, see if you can increase your font a bit to be nicer.

Ernani Joppert: Let's see. That's it.

Manuel Lemos: That's right.

Ernani Joppert: OK. So, yeah, form generator. This object can generate and lay out HTML forms dynamically. Very useful for complex applications that require steps between forms to fill out and let you imagine in a progress situation as well as your example on the mission, ideas that this component can help you do whatever you want with the form in a simpler way using JavaScript.

And the author is Stephen Chapman. He's from Australia. And it's very nice to see such component here.

Manuel Lemos: Right.

Ernani Joppert: That deals with the DOM itself, right? It's nice to see DOM manipulation on the fly. I like to see those kinds of components.

Manuel Lemos: Yes, this is not exactly innovative component that's why it was not nominated, but it's always useful because you are always in need of components that can do things dynamically on the browser side, in this case, is to generate forms.

So, great that Stephen also contributed this and other components that he also sent. And other than that, what other components do you like to mention?

Ernani Joppert: Right. The next component if you guys are using YouTube's high quality or full HD resolution, you already realize by my Chrome's top bar here.

Manuel Lemos: Yeah, it's a bit fuzzy. I don't think people will be able to read it very well. 

Ernani Joppert: Maybe it's in 1080p, they would be.

Manuel Lemos: Well, the problem is that Google Hangouts limits the recording to 360.

Ernani Joppert: Oh, I see.

Manuel Lemos: We cannot do miracles, except for recording it outside of Google Hangouts.

Ernani Joppert: Oh, I see. Yeah, my next component is stpl. I guess it's an abbreviation of standard template and it basically implements a template engine based on replacing tags which is widely used in Express and jQuery, you have modules that those were use. But it's nice to see something new and something different.

It's from Jonathan Gotti, he's from France. Actually, it's nice to see people from France. I haven't seen much users on this site. So it not just...

Manuel Lemos: Well, there are a few, but there are countries that have more people from those countries. Well, it depends, some months more than others you have more contributors for certain countries, that's why.

Ernani Joppert: Right. Congratulations, very nice. I like what I see.

Manuel Lemos: Right. Well, on my part, I also would like to mention a couple of components. Let me screenshare here. One of them is Wunderground Weather API from Tom Schaefer from Germany.

He's a regular contributor of both PHP Classes and JS Classes site. He has sent quite a lot of components to the PHP Classes site and he continues to do so, so good to have him as contributor.

And he already sent other packages that maybe we can talk about in the future, but this month, we will just talk about this one.

This is an object that can retrieve information from the Wunderground API about weather of certain places, certain regions, or weather forecast, weather conditions and stuff. And he used JSONP protocol and it means that the requests are sent directly from the browser to the Wunderground API Web server.

And I suppose he used JSONP using a script tag that is added to the page precisely because I think AJAX, regular AJAX requests are limited to calls to the same domain, I think, if I'm not mistaken and the same domain of the page.

And it is interesting that with this component, you can retrieve weather information without going through your own server.

So as long as there is a connection between the browser machine and the Wunderground API servers, it will retrieve that information. So kudos to Tom for his contribution. 

And the other component also I want to mention is, again, by Stephen Chapman from Australia, another one that it does the sort of those marquee elements, except that instead of scrolling horizontally, it scrolls vertically.

It's a slight variety of the same effect, but you may imagine this has its interests and many sites are using. You can do the same as in many other sites. You can drag the mouse over the elements that are being scrolled and it stops scrolling.

Ernani Joppert: But, please, don't make weird pop-ups with this component. You can use it.

[Laughter]

Ernani Joppert: Don't make those blinking ads with it.

Manuel Lemos: Well, many sites are already blocking the pop-ups. I mean, many browsers are already blocking the pop-ups, but you might look around to use those floating page elements too, in relation to pop-ups.

Ernani Joppert: I don't know how, but I've been into web sites where not even the pop-up blockers work.

Manuel Lemos: Yes. What they're saying, there are sites that use floating elements that are not really pop-ups. They are in the same page, but they are on top of...

Ernani Joppert: No, but they know how to open a different page. I don't know how they do it, but they do it. And I've been into Googling some questions on technical situation when I opened just spawn three or four windows away, normally, web sites that have links for sharing the website.

Manuel Lemos: They probably emulate clicks on links that have the target window to make it open a new window. And I think in that case, the pop-up blockers will not work because they are not so sure if it is the user or some script.

Ernani Joppert: Oh, I see.

Manuel Lemos: That's a guess. I'm not sure if that's the case.

Ernani Joppert: Yeah, it makes sense.

Manuel Lemos: Yeah. Well, anyway, next month we will hopefully start talking about the actual nominees of this month that we don't want to comment but they are up to four votes.

PHP Innovation Award Winners of November 2012 (1:03:24)

Manuel Lemos: And now, it's time to move on to the actual PHP Innovation Award now that we are reaching the end of this podcast, but we still have time to mention briefly some of the nominees. We don't have time to mention all, but I think we can mention a few.

Ernani, which nominees would you like to mention?

Ernani Joppert: Yes. Previously, I picked my favorite components for this episode. The first one is Lua Sandbox. It's nice to see a sandbox engine that can be run within PHP and integrated with PHP. I think some...

Manuel Lemos: It's not in PHP. I think it uses the Lua extension of PHP, but it does some things that are specific to sandbox the accesses.

Ernani Joppert: Yeah, exactly. So the thing is, joining both languages is a nice milestone at least by having just a Lua extension is not enough and having a sandbox environment where you can safely execute Lua script, then it's something else. And it represents security and the rules that can be specified so you can control your environment.

And I've seen lots of applications using Lua since Angry Birds because Lua is very oriented to callbacks as well as the action script. They are similar in syntax with slightly differences, but it's nice to see that there are the possibilities of Sandbox in your Lua environment working in PHP.

And my next vote goes... oh, sorry. Just to mention it's Christiaan Baartse from Netherlands and it's nice to see your effort here.

My next component which I picked for this episode is from Mikhail. I don't know his full name. He's from United States. He has provided already three packages. And this component was the winner, so congratulations to the winner. And it helps searching jobs on different job sites.

So if you are willing to extract information from several web sites, using this component. Please feel free. So just make sure that the license is shareware and despite that, if you need the functionality or if you're willing to use it, it's nice to see that you can do that with this component.

Manuel Lemos: Right. Let me double check here but from what I understood that that component is able to retrieve the feeds of jobs from different sites like Craigslist and Indeed and Monster. And I think this is specific to the United States. Right, it's right here.

I think maybe it can be adapted to work on other countries just to switch the feeds, probably.

Ernani Joppert: Right.

Manuel Lemos: Well, on my part, I also like to comment a couple of components. One of them is Inline Testing. This one is from Alexander from Moldova. And before you say it, it's true that there are not many authors from Moldova...

[Laughter]

Manuel Lemos: ...sending their packages, but actually, Alexander sent a quite advanced component in the sense that it even uses something that is relatively recent which is traits to implement testing features.

Basically, it is able to define the tests that a class is expected to perform by defining them in docblocks, in lines, comments and that's why it's called inline testing. And this is interesting.

Then you can use special... that are provided with the package throughout in the actual testing of the conditions of the tests and so on. So kudos to Alexander for his great contribution.

This kind of advanced components kind of raise the bar of the quality of the components sent to this site. I hope he continues to send more components of this level.

And the other component that I want to mention is Print Form PDF by Alexander Selifonov. This is a regular contributor from Russia. He's been sending many great components. So you'll get an idea, he has already sent 10 innovative components and he has been the winner twice.

And I think according to the system of missions and levels that I mentioned ever been implemented just recently, he's probably one of the authors that is more advanced because not many authors have been implementing so many innovative packages and even winning the award for two times.

Talking back to the actual component, this is a component that can create PDF documents, but using PDF templates. And it uses some code to parse the templates and insert some parameters, defined in XML package.

And this is a very interesting approach to the generation of PDF, so kudos to Alexander for his contribution.

Ernani Joppert: Congratulations.

Conclusion (1:09:19)

Manuel Lemos: Well, with this package we practically ended our podcast. It was a great podcast. We talked about very interesting and important subjects for PHP and also MySQL.

Let's see what happens after this and we can continue to comment on those issues because they are still open. Let's see what happens with the Zend Optimizer+ adoption or not. Let's see also how MySQL from Oracle is being accepted versus MariaDB and if it will, in fact, will be faster.

So on my part, that is all for now. I don't know, Ernani, if you have any final remarks.

Ernani Joppert: No, I just wish to thank you everybody and if you have any comments please comment on. We are accepting suggestions. And thanks everyone for being here.

Manuel Lemos: Well, on my part, that is all for now. Bye.

Ernani Joppert: Thank you. Bye-bye.

[Music]




You need to be a registered user or login to post a comment

1,616,430 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:



Comments:

No comments were submitted yet.




  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Zend Optimizer+ Cach...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)