Author: Manuel Lemos
Updated on: 2015-01-18
Posted on: 2014-11-18
Categories: Lately in PHP Podcast, PHP opinions
They also discussed the proposals to provide better Unicode support in PHP 7, as well the plans to remove deprecated features and the proposal to remove the function keywords from class declarations.
They also commented on a new article about accessing OAuth based APIs without user interaction.
Now listen to the podcast, or watch the hangout video, or read the transcript text to learn more details about these interesting PHP topics.
PHP 5.4.34 and 5.5.18, PHP 5.6.2 releases (1:06)
Removing class function keyword in PHP 7 (4:47)
Removing Deprecated Features in PHP 7 (8:19)
PHP 7 Timeline (13:10)
Better Unicode Support in PHP 7 (17:09)
4 Ways to Access an OAuth API Without User Interaction (28:11)
PHP Innovation Award Winners of August 2014 (1:07:45)
PHP Innovation Award Rankings of 2014 (1:12:00)
Download Size: 64MB Listeners: 1439
Introduction music Harbour used with explicit permission from the author Danilo Ercole, from Curitiba, Brazil
In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.
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.
- Proposal: Removing class function keyword in PHP 7
- RFC: PHP 7 Timeline
- Proposal: Better Unicode Support in PHP 7
- RFC: UString
Manuel Lemos: Hello. Welcome to the Lately in PHP podcast. This is episode 53. I'm Manuel Lemos.
Once again, Google refuses to put my lower third label at the bottom of my video, so I have to introduce myself because nobody knows me. Fortunately, I have here with me, Arturs Sosins, from Latvia once again.
Arturs Sosins: Hello. And fortunately, I don't have to introduce myself because you introduced me.
Manuel Lemos: But you don't have a lower third either.
Arturs Sosins: Yeah. It's so there. I can put it when I want to.
Manuel Lemos: Yeah, just because you can, and I can't.
PHP 5.4.34 and 5.5.18, PHP 5.6.2 releases (1:06)
Manuel Lemos: Well, anyway, today as usual, we are going to talk about very interesting PHP topics because the PHP scene is getting hotter and hotter. I don't know, nobody stops PHP, not Ruby on Rails, not Python, not anything. Maybe mobile.
There was an article that said that PHP was declining because of iOS and Android, and HTML 5... and what?
Arturs Sosins: What?
Manuel Lemos: Yeah, the person just checked some ranking about the skills required to developers, and it seem PHP was dropping because all of those technologies are on the rise. Actually, what they meant is that mobile development was on the rise, but you still have to have a server side, which often is PHP.
That's why PHP is getting hotter and hotter and I want to start this Hangout as usual, commenting on the latest PHP versions that have been released in the last month.
Let me see if I can increase the font. I think it's OK now.
The first versions that we comment is as usual the oldest, which is 5.4.34. It was followed the same day by 5.5.18, and then again, 5.6.2. I don't know, I'm not sure why all these versions were released the same day but I suspect that because there were some security issues...
Arturs Sosins: And they were same security issues probably.
Manuel Lemos: Exactly, the same CVE, although there were some other bugs being fixed at least in the older versions. But as we may see in the 5.6.2, there is only one that did not have a CVE. Well, there's not really much...
Arturs Sosins: What does CVE mean?
Manuel Lemos: Good question. CVE means I think it's some Common Vulnerabilities database that hosts these reports of known vulnerabilities, and they refer to the same report because they affect all these versions, and probably past versions, but since they were no longer maintained, they are not mentioned here.
So that's basically it. If you are using these versions and probably older versions, you should upgrade because it's about time. You should avoid being caught by these security problems. So this is the usual that we say about these versions. There were some other bugs being fixed but usually they are minor and so these just are maintenance releases.
Removing class function keyword in PHP 7 (4:47)
Manuel Lemos: Moving on the next topic, we are going to start talking about a lot of the plans for PHP 7 and I'm going to start with one topic that's not really yet an official proposal. I don't know if it will get there, but there was a proposal here in the PHP internals list talking about the removal of the 'function' keyword for class methods. Some people prefer to call class functions as class methods.
I'm not sure why it is so important to drop the 'function' keyword, but probably this is to make it consistent to make it the idea that was implemented in the past that the 'var' keyword, which became deprecated, was equivalent to have the public qualifier.
So if you have public and the just the name of the variable, it's the same as when you add the 'var' keyword there. And so, the idea here is if you have the 'function' keyword removed, you just have public or private or protected there to qualify the function, and that should be sufficient.
Well, it never bothered me to have the 'function' or 'var' there but for consistency, some people think it is important to have it removed. So this is a proposal, I did not see an RFC for this. I don't know if there will be one.
Manuel Lemos: Yeah.
Arturs Sosins: In this case, it's only so developers could write less. So I don't know how really...
Manuel Lemos: Because they are very tired.
Arturs Sosins: It might be very confusing in the end.
Manuel Lemos: Well, I don't know. All this is yet another backwards incompatible change, because if you want to remove the 'function' keyword, your code will not work in old versions.
And if you want to address old versions, I mean develop classes to be shared with users of old versions and new versions, the old version users will not be able to use it, because without the function 'keyword' it would give a syntax error.
So I don't know, if this is going to pass but it is best if it will be yet another thing that will be broken for future code, of course. There are plans to make it deprecated or make it not required. I don't know, either way, it will upset some people.
Removing Deprecated Features in PHP 7 (8:19)
Manuel Lemos: So moving on, we are going to talk about yet another thing related with deprecation in PHP 7. In fact, there is this proposal by Nikita Popov, which is to remove functionality that is already deprecated by the more recent versions.
Things like ereg and MySQL extensions would be removed, and there are several others that probably are not very important, but they were deprecated, so they want to remove them.
Well, I don't know, but from all of these, I think the one that will cause the most trauma will be the removal of mysql extension because there is legacy code, millions of lines of code, that use that extension, that will stop working if you upgrade to PHP 7, if this proposal of removing the deprecated functionality passes.
What do you think Arturs?
Arturs Sosins: It would definitely break many, many, web sites, even probably many of what I made. My first database wrapper actually wrap MySQL extension. But in the same time, I can only change the contents of that wrapper and make the web site work again. So it should not be such a harmful] update.
Manuel Lemos: Well, I'm not sure if it's just switch mysql by mysqli will be enough but...
Arturs Sosins: It's also deprecated?
Manuel Lemos: Yeah, but, well, in worst case, people won't upgrade which happened already with PHP 5. There's a lot of problems. Actually, some people were upset because I mentioned that. The fact that people didn't upgrade to PHP 5, it was not definitely totally not my fault because I was not the one that broke PHP compatibility.
Just because I mentioned that, some people would not upgrade to PHP 5 because when you add some backward incompatible changes, it would issue warnings. It was already bad enough because it didn't want issue warnings, but in this case, removing features means stop working totally, not just having warnings.
But OK, I guess, the mankind would have to live with the fact that there will be future versions without past features and some people will upgrade, others don't, and ultimately will be their problem.
So if you are not sure, I think this proposal will pass. That proposal to remove deprecated functionality will pass.
Arturs Sosins: Most probably, because from the perspective, for the core developers...
Manuel Lemos: Well, because that was the intention, right?
Arturs Sosins: But they also would not need to drag the old code to the new versions, and it would make core developers' life easier, probably.
Manuel Lemos: And I'm sure this is only part of the backwards incompatible changes. There are more serious deprecations and changes that probably will require you to update your code.
And, as usual, the problem of having to maintain code that was working just for the sake of upgrading to a newer PHP versions is that it costs money and time. Even if you spend time and money, your code may still have bugs because it change things that were working before.
OK, there will be a cost, so now people are warned.
Arturs Sosins: Well, it's still at least a year till then, probably more.
Manuel Lemos: Yeah, but in worst case it will happen like in PHP 5 that took like four years to get serious adoption. That's not a big, big deal, I think.
Arturs Sosins: That won't stop PHP, right?
Manuel Lemos: No, PHP is unstoppable. PHP is at the top of the world. If Ruby on Rails did not stop PHP, it won't be these backward incompatible changes.
PHP 7 Timeline (13:10)
Manuel Lemos: So moving on with other interesting topics but still related with PHP 7, now finally an important announcement, there is a plan for a PHP 7 timeline which means there are some dates being set on the calendar for possible releases or possible milestones.
So, as you may see here, there is a milestone for Line up any remaining RFCs that target PHP 7.0, until March 15. March 15th of 2015, I think that's what they mean, right?
Arturs Sosins: No. It's probably not March 15, as the 15th day, but 15th year, simply it's somewhere into March.
Manuel Lemos: Yeah, that's what I thought but then I saw the second milestone and it says March 16.
Arturs Sosins: Oh, Ok.
Manuel Lemos: Unless there is a catch here.
Manuel Lemos: I'll get back to that catch.
Well, the second milestone, Finalize implementation and testing of new features. Release Candidates Cycle (RC Cycle) starting June. And then, in mid-October... Oh, here they mentioned the year, 2015, mid-October.
Arturs Sosins: So I wasn't so... that it is about a year.
Manuel Lemos: Yeah. Well, I mean...
Arturs Sosins: It's an optimistic program.
Manuel Lemos: They should have removed this 2015 and leave it without a year, because if it's delayed one year, it's still right.
Arturs Sosins: True.
Manuel Lemos: And the reason why I say this, why I mentioned that there may be a catch is that there are some ambitious plans for PHP 7 that until now, they were not really explicit. They have to do with the things that I'm going to comment ahead.
But first, what do you think, Arturs? Do you think this is a feasible milestone? Or you have no idea? Because there are things that are still being implemented and only the developers know how long it will take.
Arturs Sosins: Yeah, exactly, and we saw lots of new features as we were commenting in the previous podcast, I don't know if it would be enough for three months to finalize implementations, unless, of course, most of them are already implemented. I don't know in which stage they are. So maybe yes, maybe not.
Manuel Lemos: Yes, that's my concern, because if you think about all these things, since you don't know how much development effort is still remaining, you can only guess and your guess probably is totally wrong, whether it will be enough or not.
But at least, for people that know about this, in the case of this proposal, it was from Zeev Suraski from Zend, so he probably knows very well if this is a feasible timeline. So I think it's probably realistic.
Now, anyway, this is just a proposal, the votes did not start yet, so we have to wait and see. But OK, let's assume that in about one year, PHP 7 will be released. This is in Mid-October, so we are in November, it's about one year.
Better Unicode Support in PHP 7 (17:09)
Manuel Lemos: This is fine. But then, there are new proposals that were not yet brought up. This proposal is for October 14th, and there started appear new proposals for implementing the so-called transparent Unicode support for PHP 7.
And this is what I think will be the greatest challenge because this is not a trivial thing. As we know, there were plans for PHP 6 that aimed to bring at least to some extent transparent Unicode support, but then things started taking too long. The PHP 6 plans were cancelled because they realized they were too ambitious, and probably the implementation would not perform very well.
But there are now, not one, but two proposals to add some built-in support to Unicode, I mean, not using the mb extension but using something more integrated in PHP, not as an extension.
The first proposal was showing it by Aleksey Tulinov. He said he had already a library that is not too complicated. He could share it for using PHP 7 to implement Unicode, and he mentioned that it would not take too much memory. I think too much memory was the problem of using UTF-16 for presenting text, which means that for each character, it would take two bytes.
But this is very complex, this is probably underestimating the whole problem. It's not just a matter of taking more space. There are many cases we need to distinguish between text and binary, so binary does not get processed as if it is text and vice-versa.
Anyway, there is another proposal, and in this case, by Joe Watkins call UString. I confess I did not take a look at this whole proposal in great detail because it probably would take me more time if I had start looking at this.
Arturs, did you take a look at these proposals? What do you think?
Arturs Sosins: Yes. The interesting that this proposes a new class to handle UString, so Unicode strings won't going to be like strings in PHP perspective because string is not an object, and this one would be. It provides a different APIs to manipulate them.
I don't know, it does not mention much on the...
Manuel Lemos: The implementation.
Arturs Sosins: ...implementation or performance or what positive things it would provide, how it would most of the work. Again, that is something that will break the code of using the multi-byte extension as we all use it.
Manuel Lemos: Yeah.
Arturs Sosins: Whatever you prefer. Mostly, if there would be a change in handling in Unicode in PHP, that it would be underlying change leading the abstract API that have similar or the same as mb. That would be the best scenario but probably won't happen.
Manuel Lemos: Well, from what I understood, this Unicode support being implemented as a class, I supposed it is meant if each Unicode string will be an object. There are people that's requesting that strings be object since ever.
The main difference, when compared to mbstring, if I got this right, it's that not only they tend to be faster using UString, but from I read in the discussions of these topics, they are planning to use overloading, which means that you can represent, for instance, in an expression that manipulate strings, you can combine, for instance, real string with UString objects.
Arturs Sosins: Concatenate them?
Manuel Lemos: For instance, exactly. For instance, they have overloaded the arbitrary precision math using GMP extensions, so there are GMP resources or objects or whatever, and you can combine with real numbers.
So, in the end, you get an object that is a number and you can use it wherever it takes numbers. In this case, if they implement the overloading, they can have combined strings. And then, you would be able to use them in regular functions that take strings. I'm not sure if this is going to be that transparent.
Anyway, this is just a proposal. From what I've seen, many people are already supporting it, so they have great chances for this to pass.
It will not be just like totally transparent use of strings because there are cases in which you have to distinguish between binary data and strings. And sometimes, you have to tell that data is a UTF Unicode string, Unicode could be UTF-8, UTF-16 or whatever, and it's not the same way to represent text.
At a certain point, you have to have some explicit syntax to tell what is the type of Unicode that you are dealing with, so it will not be so transparent as in language like Java that you have strings. And strings are not Unicode objects or regular strings like you have in PHP.
So this is an important step to final layer have some more, I would say, integrated native built-in support Unicode, but at least it is a progress and I'm sure some people like it.
I don't know if it is much different to use in some classes that already exist, that they resulted from the previous effort to bring Unicode support to PHP 6 like Intl and other classes. But I think this being called official Unicode support will probably settle people that had been complaining about the lack of Unicode support in PHP for years. That's my expectation.
So this is yet another thing being planned for PHP 7. I understand that there is some work already in progress, so this is not something that is just being proposed. I don't know if this is going to delay much the PHP development because this has to be integrated everywhere some strings are being planned, being used in PHP, so let's wait and see. For now, this is something very new, people are still discussing it, so let's wait and see what comes after from here.
Anyway, Arturs, what do you think this is? Is this something that you were hoping of expecting? Or maybe for your own purposes while you use PHP already or using something else and it was solving your problem?
Arturs Sosins: Well, I usually didn't have so much problems with Unicode, but with the proposal, the one thing that I was afraid of was that it would cause the confusions between string and Unicode objects. But if it would overflow as you describe and you can concatenate them seamlessly and...
Manuel Lemos: Overload, I think you mean.
Arturs Sosins: Oh yeah, overload, sorry. And you would use them in the functions passing strings, then it should not be a problem. Maybe this step could be taken further and make a string an object.
Manuel Lemos: Yeah, we have to wait and see. So far, I understood that people that were commenting about the proposals, at least some of them that I checked, they were supporting it. So there are a great chances that it's going to be the way it is being proposed.
Ok, so great plans for PHP 7.
4 Ways to Access an OAuth API Without User Interaction (28:11)
Manuel Lemos: So now, we're going to move on this time to another topic. Actually, it's just mentioning an article that I published here, if I can share the screen.
Here, it's an article. Actually, I wrote it, and it's related with a package, PHP OAuth API and I wrote this article because I've been getting many request from users of this class to have special ways to access APIs other than the traditional way, which is user authorizes the access to an API, giving certain permissions, and then you get a token and access the API.
In this case are just different ways to access an API without user interaction. Actually, the first one is in traditional way, so let me comment just briefly what this article is about. Four ways to access OAuth API without user interaction.
So the first way is just the regular way, which is basically to get a token, the user authorizes to access to the API, and the class retrieves the token and you can use it without the user presence.
The only detail here is that by default, the class uses sessions to store token, the tokens that are retrieved. So since sessions only exist when the user is accessing a Web page and the session is valid, once the user is not present, the token needs to be retrieved from somewhere else.
It could be a database, but in that case, the token had to be previously stored somewhere. It could be a database.
The package here provides subclasses that implement alternative storage for the tokens like there is a generic subclass for database access. Then, there is another subclass that implements the database access of using MySQL, the MySQLi extensions, so you can use a MySQL database to store your tokens. And this is the default way to access an API without user interaction.
Another way is related with the fact that some tokens expire. For instance, Google APIs tend to expire tokens after awhile, so the tokens need to be refreshed. Fortunately, this class provides a way to refresh tokens automatically as long as the API supplied also were refreshed tokens.
So this is all transparent when you call an API, and it checks that the token already expired, and the class transparently will refresh the token, retrieve a newer token that will expire later.
So you can continue to access API without user interaction. You just need to get a new token, restart because all tokens is no longer valid, so next time you access the API, the new token needs to be used.
Now, there are a couple of more ways that are not very trivial, one is that some APIs... I'm trying to remember which one, I think it's Salesforce, but probably, I'm not sure... No, it's not PayPal, but I think there is another one that allows you to instead of require the user to authorize, you can add your username and password for that API to be used as credentials.
So, you pass the username and password and it returns the tokens. As long as your script has your username and password, it doesn't need to have the user present.
Just a reminder, all these requires OAuth 2, because there is also OAuth 1.0.a that works with a different flow, and I don't think this supports these username and password authorization.
Finally, there is another way of accessing an API on behalf of your applications, so there will be no users involved, no usernames and passwords involved, which is to use just the client_credentials, the client_id and client_secret.
When this type of grant is used, called client_credentials, it can access the OAuth server to retrieve a token to access the API on behalf of your application, not on behalf of the user who can perform certain API calls that are not bound to a specific user.
So these are the four ways, and several people had been asking for these because certain APIs require this, and not every OAuth company available out there supports all these modes. So I thought I should write an article because every time somebody asks, oh, now I can refer you to this article and that's it.
So this class supports all these modes and tries to make it as transparent as possible, so the users do not need to know so much about the OAuth protocol. Even more because this class abstract both OAuth 1 and OAuth 2 in the same package. It's just a single class that abstracts everything.
It's not easy to understand everything that goes on inside the class, because OAuth protocol is not trivial but you don't need to understand it. You just need to follow the documentation and that's it.
Arturs, have you been using APIs, accessing APIs, using OAuth?
Arturs Sosins: I think many of us are. When you're authenticating for Facebook for example or Twitter apps, they're all using it, so yeah. Have I been using this as a developer? Then yeah, there also been instances and every time I want to dive in and check more about it, I always seem to find a great library that implements it, so I almost never need to like dive deep into how it's used.
Manuel Lemos: Good for you.
Arturs Sosins: Yeah. So I understand that's your class, right?
Manuel Lemos: In this case, it's my class. And I was mentioning, some of these features of types of grants without users and passwords or whatever, it was something that I needed. It was requested. I implemented it because users asked it. I studied the protocol. It was not a painless job, but now it is done.
Although I did not do it for my own purposes, because the APIs that are accessed did not require all these methods, all these types of grants, at least I'm sure I will stumble into an application on which I will need this types of authentication.
There is also an additional complication. It's that each API has a slightly different way to deal with details, URLs. You need to dig deeply in the documentation. So this class comes with a separate configuration file that comes with values for each server that you want to access.
So you don't have to go through the pain of guessing URLs because it's granted that I have to go through that pain, if you would try to do it all by yourself without a component that does that for you.
Arturs Sosins: I see, so it's like an example, Amazon, BitBucket, great.
Manuel Lemos: There's lots of...
Arturs Sosins: I have a few questions though.
Manuel Lemos: Yeah.
Arturs Sosins: So when I'm authenticating Facebook through another web site, so this class handles this web site job to authenticate with Facebook. But is there a class that handles the API inside of Facebook as authentic then gives you the tokens? Can this class handle both situations or only like a client situation?
Manuel Lemos: I'm not sure what you mean.
Arturs Sosins: There are always one user who wants to a authenticate using OAuth and this class helps him to do it, right?
Manuel Lemos: Right.
Arturs Sosins: But the server already needs to implement OAuth responses and in turn will proceed with all the protocols, so this class does both jobs. I can also host an OAuth server and use it for other users to authenticate through me, right?
Manuel Lemos: No, this is just an OAuth client class. An OAuth server class would be a separate thing.
Arturs Sosins: Can you make one?
Manuel Lemos: OK, OK. Just because you asked. There are several other OAuth server classes out there. I did not do one, because I did not need one yet. But I'm sure, everybody that needs to implement their own API needs to have OAuth server. So it's the other side of the complication. I'm sure I will do it sooner or later, but it will be yet another round of great fun.
Arturs Sosins: That's great, because it seems I will soon need one. That's awesome.
Manuel Lemos: OK, let me take notes. I'm noting here, "OAuth server for Arturs". Actually, I already have a user that said, "Oh, that's nice. What about OAuth server?"
Arturs Sosins: I'm not the only one. OK, great.
Manuel Lemos: Yeah. Do you have a preference, OAuth 1 or 2?
Arturs Sosins: Better handle both just in case.
Manuel Lemos: Yeah, it's lots of fun. It's already a pain to deal with them, with the OAuth 1. Dealing with signatures, it's a pain, because you need to know what parameters needs to be signed or not, but OK.
Arturs Sosins: In the integration, I see that lots of APIs are still using OAuth 1, first version, right?
Manuel Lemos: Yeah, because it's different. It's not exactly that OAuth 2 is better than OAuth 1. It's that just OAuth 1 requires that exchanged parameters be signed. So they were hoping that people could use it without SSL. But nowadays, you shouldn't implement APIs without SSL.
Arturs Sosins: So which one would you suggest to use?
Manuel Lemos: Well, OAuth 2 is way, way simpler and implements I think more types of authorization flow.
Arturs Sosins: And so it is as secure as the first the one, right?
Manuel Lemos: The security layer is SSL. Actually, SSL is dead. Now I remember, it's TLS, no longer SSL. Now, they realize the SSL 3 also is vulnerable, so it's no longer SSL; it's TLS.
Well, OK, this is just to mention this article.
Manuel Lemos: Now, finally, we are going to move to one regular section. Let's talk about the Innovation Award. As usual this month, we have many packages to talk about, but first, I would like to announce an important feature, actually, comment because it was already announced like a week ago.
Let me share the screen here, sharing the screen. For some reason, it doesn't want to stay in front. Now, OK, here it is.
So this article is about a package recommendation system that I have been developing for the latest months. And it is very interesting for several reasons. Actually I had the idea a few years ago, but finally I decided to implement it. But early this year...
Arturs Sosins: You had finished the OAuth class. You have the time now.
Manuel Lemos: Yeah, finally, it will be like the OAuth server class that we will implement after a few years.
Manuel Lemos: Probably not. Anyway, this feature, I have the idea for several years but early this year, I started working on the redesign of the package pages on PHP Classes and JS Classes, as you may remember.
During the process, I interviewed several people and several users. Particularly, one of them told me that sometimes he did not find the class. Actually, yeah, he was dropped into the page of the certain class, but then he realize it was not quite what he wanted. Then, he go back to the search page.
And then, on one search page he used to search for classes, many classes appear or sometimes no class appears, and then he wouldn't know what would be the most recommended package for that purpose. So the idea here, instead of people trying to figure what is the right package for their purposes from many of them that exist in the site, is to have a system that can recommend the packages.
So the article here is the system, how the system works. There is a preview here. I'm not going to play it now. Whoever wants to watch can it watch it later because it takes like five minutes or so. So I better show it, how it works in practice.
Usually, you go to the Search page. That's a typical way that you use the site. Let's say search for XML parsers. It's the same. Then, the search page appears and you look at it, there are many packages, "Oh, which ones of these ones are easy."
That's when the site notices that you were looking at the search list and you are not sure which package you want, and it prompts you with this message, "Do you want an advice to choose a package?" If you click yes, it takes you to the package recommendation page.
So you need to fill this form to tell me a bit more about your needs or purpose or the details of your problems, and then you submit the proposal.
Then, you go to a page where the proposal is listed. Actually, I'm listing here all the proposals that are up so far. Let's go to take a look to one that... For instance, this one, What is the best PHP QR code generation class? I need PHP code to generate QR code offline." Offline, then the guy explains it, "Generate QR code without using Web services or otherwise without Internet connection, so I can add an image to PDF documents." Sounds fair.
Then, there are several... Users can propose packages. In this case, there are like three proposals. There is some discussion because when you propose a package, you can comment. You can add your comments or you can vote up or down if you like the proposal.
Here, for instance, this proposal by Karl Holz, there is this label here that says he is the package author which means that he is proposing a package that he developed. He explains the functionality that is being requested is actually integrated in this package; it was imported from another package.
There is some discussion, different users, and then the author can look at these proposals, look at the comments, can look at the ratings of the authors, I mean, the reputation here, there's this number here next to this star.
Then, he knows there are some more recommended package that he can try instead of getting lost and wasting time around many other packages.
In this case, there were three proposals. There are not as many proposals usually, as this were not proposals that were more debated because when a user submits a recommendation request, a notification go to authors that are subscribed to the keywords that were used here, so they may get notifications so they are prompted to maybe suggest one of their own packages.
Arturs Sosins: Yeah, I got one just for the QR code generation because I had a class that generates it, but unfortunately using Web services it. I didn't recommend it but I got a notification.
Manuel Lemos: Yeah, exactly, as an author, you were prompted. Because I believe that, as authors that develop packages, that already have their classes tied with certain keywords because those packages are related with those keywords, they're probably developers that know well the topics related with those problems.
So the idea was to prompt eventual experts, which are authors of classes related with keywords. In this case, the keyword is QR code generate, so you got that notification. Maybe you don't have a recommendation but you can recommend some package.
And this is great because there will be eventually, for instance, recommendation request for each. There is not yet a class that does that. And that's the part that I can introduce another interesting feature which is the Featured Requests.
When I see there is no package about a certain topic, I, the moderator of the site, flag it as Featured. And then, there is a second notification that goes to all authors that are subscribed to get those feature request notifications, to tell them that there is a potential idea here for an innovative package, because there is no such package for that purpose. And so, there are certain packages that can be suggested.
Just a reminder, I flagged this particular question for the PHP QR code generation class as featured because I didn't find a class that could actually generate code natively without a Web service, but there was one.
So it was my fault. But anyway, there was actually another author, in this case, Maik Greubel, that right away liked the idea and he implemented his own version of the class that implements a QR code.
He also did that for another package, in this case a package to manage MySQL user accounts. And this is interesting because there was really not a package for this purpose. There are several people that debated about this, but Maik Greubel, again, he developed a package for this purpose. Very quick, in just a few days, there is a package for this.
This is the part that ties to the Innovation Award. Having a recommendation system is great because it can be used to have suggestions for Innovation Award nominations. This is great because the user that wants to have a package for a purpose that does not exist, he'll get new packages developed by authors that right away developed these packages.
And this author will eventually be nominated because the package is innovative, so he will eventually earn prizes and recognition for this innovative submission.
The whole site and its community will gain a lot because the more and more innovative packages will be submitted, as they are asking precisely real-world needs, because there are certain packages, they are innovative but there are not in such a great demand for them. So I think this is great.
Arturs, what do you think about the whole system?
Arturs Sosins: Yeah, basically, as you mentioned, it's great both for users and authors. for users, they can find better packages from lots of existing or if you flag it as a Featured Request, you get a new packages from authors that have solved this problem that haven't been published before.
And, for authors, it is a really great way to discover ideas for new packages, not just a simple packages that will most probably be nominated as a innovative package. So it works perfectly.
Manuel Lemos: Yeah, everybody wins and more and more innovative packages will be published, and that's the idea.
I still have plans to make some certain things better, too. Sometimes, for instance, certain keywords are very specific and no author gets notified to suggest their own package because the keywords were very specific. Maybe I will try to make matching word by word rather than groups of words.
So this eventually will bring more authors to suggest their own packages or contribute more innovative package. But that's just one of many in essence that I'm planning.
So given this, personally, I'm very happy because this took quite a great effort to be developed, although there was not much time to develop because I had reused lots of existing components of the site, but it was like two months of development and development still goes on with new features. It was great because it is getting many, many people, as you may see, just in a few weeks because this was made available before it was officially announced.
Let me share the screen here again. I think there are 30 requests or something. Some packages still are opened. From now on, we are going to comment about at least the Featured Requests because it's interesting.
So let's take a look about the existing Featured Requests. There is somebody asking for a class to use Redis to store OpenCart information. I think it's cart items using Redis rather than a regular database.
There is also a request for Restful Web service for registration and login again. There are classes for this but I'm not sure if they are provided in Restful Web service interface.
Arturs Sosins: Anyone already requesting a package for OAuth server?
Manuel Lemos: Not yet, but maybe somebody will show up sooner or later. Now that you mentioned it, this number in front is the number of recommendations for this package. So these ones that have zero means no suggestions for this package yet, so chances are that whoever developed the package for this purpose first will be eventually nominated for the Innovation Award.
So if you are looking for ideas for innovative packages, this became easier because they have plenty of suggestions here.
The next one, Recommendation for a PHP class to compare excel docx pdf files. This is quite tricky, but whoever implements this, it will be great. I think the author to makes a sort of a diff between two Excel or to docx or to PDF files. That's why nobody suggested anything yet.
Then, there is a recommendation for PHP Class to sync database. There are plenty of classes to sync database which are all MySQL, but the requester here asked for something with SQLite and MySQL. That's tricky.
And then, there is that one about the PHP QR code generation class, which we already talked about. There are several suggestions including one that was new. And then, there is the other one, to manage MySQL user accounts. As I also mentioned, there is already a proposal sent right away.
There is one, also a difficult one, which is to implement the face-matching system. Several people suggested classes that can recognize faces in pictures, but what the requester wanted was not really that. He wants...
Arturs Sosins: To identify the person by something.
Manuel Lemos: Yeah. Just like, for instance, when you go to Facebook, you can add suggestions of the names of people that are in certain pictures. So not only it recognizes the names, there are some faces there, but it also recognizes the faces in the database. It's not a trivial application, so whoever develop this would be very, very cool. So the suggestions for the featured requests are here.
And we also have that in the JSClasses, but so far, since JSClasses is not so popular, we only have one recommendation, so far. Oh, it's from Arturs Sosins. Arturs Sosins is looking for responsive content slider. And since there is no package that does exactly what Arturs is requesting, it became featured.
Arturs Sosins: Oh, great. I have really, really specific request that I...
Manuel Lemos: Yeah, you entered many, many requirements so it's going to be hard to implement all of these, but whoever does this first, certainly would be nominated to the Innovation Award.
Manuel Lemos: Now, it's time to actually talk about the nominees for the Innovation Award of JSClasses.
Arturs Sosins: Or PHP. Which one first?
Manuel Lemos: First, we'll talk always of JSClasses because we just want to open more space for JSClasses to be promoted, since it is a much less popular site than PHPClasses.
So, Arturs, which ones would you like to comment from August? There are, wow, eight nominees, many nominees.
Arturs Sosins: Let me try to share the screen, if Google allows it.
Manuel Lemos: Yeah, we have to beg. Please Google, please Mr. Google, let me share the screen.
Arturs Sosins: Something like that. So, I don't know, do you see anything?
OK, the first one I wanted to mention is... It has an interesting name.
Manuel Lemos: If you can zoom...
Arturs Sosins: OK, let me try to zoom it. Better? More?
Manuel Lemos: No, it's fine.
Arturs Sosins: So, it's an interesting name. It's a jQuery FSM Animate PageOn using Finite State Machines. Actually, not so complicated as it sounds because, usually, when you have an animations like define a movie quick probably or some timeline of the images and there are different animations like running, jumping.
And so, you are just looping in one animation and jump to another, and this one implements it in an easier way to, probably there should be an example, define states and from which states, animation can travel to the next state.
So, yeah, it's an interesting solution. What it does, it implements the things that's mostly jQuery animations, like fading and slide-down and stuff like that.
This class was developed by Emmanuel Podvin from France. He chose one book of choice by Packt for it. It is also a winner, great.
So, that's one of the ones I like. The other one that you would call probably somehow in PHP podcast, it was a bad thing, right?
Manuel Lemos: Yeah.
Arturs Sosins: Node.js or something.
Manuel Lemos: It's not the podcast. It is scope.
Arturs Sosins: OK. So yeah, this class implements Node.js Background Jobs, that allows running background jobs using Node.js modules. It was developed by Thomas Bjork by Sweden. I don't know if he got something from... No, he did not request any prize.
Basically, what it does is that it generates a process on Node.js server, and you can connect to it through UDP or TCP and execute and retrieve information from them. So, it's like a parallel process to start as it hurdles your server.
So now, on my behalf, I would like to also talk about a few classes. Let's start from this one.
The first one that I wanted to comment is also from Thomas Bjork, a great contributor. He has been sending some very nice objects. I don't know if we can... I think we can't call them classes yet, only ECMAScript 6. So for now, this is an object that happens to be a jQuery plugin that can load an image and use it as a favorite icon for a page.
This is interesting because you can do many interesting things. I don't know if it is this page. No, it's not this object, but I'm not sure where I see it now. Actually, it's this object. It can load multiple images to create Favicon animations.
So it can create a nice effect. You can see on your... Well, I cannot see it here because there is no example. I mean, no demo. Actually, no demo and no example. But it would be interesting to show the animation happening in the bar.
So another package that I wanted to comment is one that is complimentary to the other one that you mentioned from David Castillo. So he sent two packages. You mentioned one, I'll mention the other. It uses the Google Maps API to get the distance matrix to many locations, because I think, yes, that's right, there is a limit of 25 locations that you can request for API call. He implemented a workaround that lets you get the distance matrix from many more locations.
This is great because you can compute routes that involve much more locations than this limit. So kudos to David Castillo for his package.
Manuel Lemos: Now, regarding the Innovation Award ranking of 2014, so far we have Thomas Bjork that we mentioned. He's ahead with 4 packages and 15 points, then followed by David Castillo. We just talked about him, too, with 2 packages and 13 points, Pierre Fauque with 2 packages and 10 points.
Then, Andoitz Marmolejo is tied with also 2 packages and 10 points, then Emmanuel Podvin with 1 package and 8 points, Jimmy Bo with 3 packages and 7 points, and then several authors with 1 package and 5 points.
Now, by country, you can see that France is ahead. Thanks, not only to contributions by Pierre Fauque, but there are others like Emmanuel Podvin that are contributing 4 packages and 19 points, and so far be ahead. It is followed by Sweden with 4 packages and 15 points, all of them from Thomas Bjork.
Then Mexico with 2 packages and 13 points from David Castillo, and then, Spain with 3 packages and 12 points of several authors, then Italy with 3 packages and 8 points, Canada with 3 packages and 7 points, India, 2 packages and 6 points, and then several other countries with only 1 package and less points.
PHP Innovation Award August 2014 (1:07:45)
Manuel Lemos: So now, we are going back to the Innovation Award of the PHP Classes. Arturs, which packages would you like to comment?
Arturs Sosins: Let me share the screen again.
So, the first package I would like to comment is quite an interesting one, which converts MySQL database to Mongo collections, Mongo database. It's an interesting class because it's not so easy to do Java in the...
Manuel Lemos: Can you show us the package, please?
Arturs Sosins: Yeah, yeah, sure. Let me find where it was.
It's a package called PHP MySQL to Mongo and it was developed by Orazio Principe.
Arturs Sosins: Sorry, I'm bad at reading other names. He's from Italy.
As I said, it's really not maybe so trivial. I don't know how well he does it, but this underlying scheme is usually quite different, and not only converge the database, but also recreates the records that you inserted and indexes.
So it's quite great for the web sites that want to transfer from SQL to NoSQL database due to maybe, I don't know, too much load on the server and for faster read and write.
Manuel Lemos: Yeah.
Arturs Sosins: This one is great. He got PhpStorm IDE license and was the winner of the Innovation Award. Kudos to him.
And the next one I wanted to comment is also not really a class. It's a PHP Zip Merge by Asbjorn Grandt from Denmark. And what the class does, it takes two packages, two zip archives together and without archiving them, merges them. It can be quite a complex task and as you see from the code, he made it as simple as appendZip and append sequence . So kudos to him.
He got one of the Zend Studio for that package.
And I think that's it.
Manuel Lemos: Well, on my behalf, I also would like to comment on a few packages. Starting from this one, PHP Altcoin Bitcoin Explorer, which is basically a class that can access Bitcoin server, I'm not sure if this is the accurate name, what you call it, or maybe a peer, Bitcoin peer, to perform several operations to manipulate Bitcoin currency.
So this is an interesting package. It's called PHP Altcoin Bitcoin Explorer, and this is by Lukas Mestan by the Slovak Republic. For that, he did not yet picked a prize, but it's never ever too late.
The next one that I wanted to comment is PHP File Array from tobytobs from Nigeria. This basically is a class that implements the ArrayAccess interface, so you can access elements in this array except that the actual values are stored in files. So this is an interesting solution to implement virtual arrays that are stored in files.
PHP Innovation Award Rankings of 2014 (1:12:00)
Manuel Lemos: Now, let's comment finally about the Innovation Award winners of 2014, first by author, individually. So Chi Hoang now representing France is ahead with 7 packages and 38 points. He's in pretty good shape to win the Innovation Award until the end of the year, but there are still chances for the others to win.
He's followed by Orazio Principe with 3 packages and 24 points, Andoitz Jordan Marmalejo from Spain with 3 packages and 16 points, Rochak Chauhan from India with 2 packages and 14 points, then Asbjorn Grandt with 2 packages and 12 points, and then several other authors with just 1 package.
Now, by country, we can see now that United States is in front with 6 packages and 46 points, but it is tied with Italy. So, by country, the competition is very tight. Italy has 7 packages and 46 points. And then, it is followed by Iran with 5 packages and 43 points, France with 9 packages and 41 points, Brazil with 6 packages and 29 points, Spain with 27 points and 6 packages, Russia with 3 packages and 23 points, India with 3 packages and 16 points, United Kingdom with 2 packages and 14 points, Denmark with 2 packages and 12 points.
The competition by country is still to be decided. And this is very, very interesting to see many authors, not just one like in some cases, but many authors are participating to win by country.
Arturs, have you been following this? What do you think about this very tight competition, at least by author?
Arturs Sosins: Well, I think... At least by author? No, I want to comment on countries.
Manuel Lemos: I mean, by countries, exactly.
Arturs Sosins: As you see from the table, if for example, Iran now submits one package that earns them more than three points, they would lead and that earns them with three points, that would be tie between three countries. But I think the amount of packages also count, right? So with the same amount of country, with the same amount of packages, how would it be?
Manuel Lemos: Yeah, I guess a tie is a tie, by points.
Arturs Sosins: OK, then that answers my question.
Manuel Lemos: I hope there is not a tie because we all have to send many, many elePHants as prize, too. Well, in most case, they have to wait for the next batch of elePHants to be produced.
Arturs Sosins: I think there could be maximum of four tie teams, but let's see what happens.
Manuel Lemos: Yeah, well, chances are in the end somebody prevails because...
Arturs Sosins: That is one...
Manuel Lemos: There are four countries with more than 40 points. Chances are that things will get a bit unbalanced to one country or the other because they are countries that have been sending many more packages after that.
Well, if you look at the current nominees, for instance, from October, and we still have November and December, we still have three months to count, we have one from Iran, another from Germany, another from Argentina, from Ukraine, Serbia, Italy, France, another from Germany, another from France.
Well, France and Germany have great chances to stand up because they have more competitors this month, but there is also a competitor from Italy. This is going to be a very tight competition.
All this is great because many, many innovative packages are being sent to the site and everybody is winning, participating. Not only is the value of the interest of the innovative package, but developers are having fun, I think. What do you think? Are they having fun or not?
Arturs Sosins: Yeah, it seems so. And they have more and more packages to comment each month.
Manuel Lemos: Yeah, yeah. We'll have more trouble, effort to comment on them, but personally I don't mind; it just takes more time. And I hope we did not lose people watching to this Hangout.
Manuel Lemos: So basically, with this, we have particularly ended this podcast for this month, it was quite long, but I think it was worth it, many interesting topics that we comment.
So, on my behalf, it is all for now. Bye.
Arturs Sosins: Bye.
You need to be a registered user or login to post a comment
1,481,831 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
No comments were submitted yet.