|PHP Classes blog||PHP 5.3.8 Upgrade, PH...||Post a comment||See comments (0)||Trackbacks (0)|
|<< Previous: Better Package Browsing||>> Next: MODX: A CMS Framework...|
Download Size: 25MB Listeners: 2998
Introduction music: Harbour by Danilo Ercole, Curitiba, Brazil
RSS 2.0 feed compliant with iTunes:
In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.
Manuel Lemos: Hello, welcome to the Lately in PHP podcast. I'm Manuel Lemos, the host of the podcast and as always I have as co-host Ernani Joppert, hello Ernani, how are you doing?
Ernani Joppert: Hello everyone, hello Manuel, greetings everyone, I'm glad to be back and I have lots of nice things to talk about and I'm really enthusiastic about it.
Manuel Lemos: This is episode 15, and this month we have several interesting PHP related topics to talk about.
I think we could start with the latest PHP releases, specifically of PHP 5.3.7 which was released with a short life because it was discovered that it has a serious bug that was introduced with this release, and I think about five days after PHP 5.3.8 was released mainly to fix this just introduced bug. Ernani, did you upgrade any of your systems to these releases?
Ernani Joppert: No, I didn't. Eventually I was planning to, but you know sometimes it's better to wait a little and I'm glad I didn't.
Manuel Lemos: Right.
Ernani Joppert: So, hopefully it will be more stable, and I'm trying to practice a little more control about upgrading things because sometimes it can take at least some time to have everything mature. And this is also regarding operating systems and everything else.
Manuel Lemos: Right. Well, usually when a new release is out I take a look at the change log, which is usually a news file, just to learn about what was changed, mainly to figure if there are any important bugs that were fixed that eventually affect my sites, sites on which I use the previous version of PHP.
And in the case of 5.3.7 I did not notice any bugs or important features that were introducing with that release. So I actually skipped it or at least did not consider to operate because it is not worth it to upgrade, as you said, to every version that is just released because it may add bugs that may affect your code and you don't have any benefit and you kind of can run into problems like this.
So I think this is also a good opportunity to call for the attention of everybody that sometimes is eager to upgrade to the latest and greatest version that is released and just take care, do not upgrade to just the latest version just because it's the latest.
You have to first realize if it is any worth, the changes that were made, and if possible avoid to upgrade if you are not going to benefit anything, because if you upgrade even knowing that there is nothing to benefit from the new release you're going to incur the possibility of facing new bugs that were introduced in this latest version.
So, if you are not sure about the good criteria that you should follow on whether you should upgrade or not, my advice is to first check the change log to see if there any bug fixes that may affect your code. If there are no bug fixes that you could benefit from just do not upgrade.
And even if you decide to upgrade it may be wise to wait a few days, a week, sometimes a month before you decide to upgrade. And even if you are sure that it would be beneficial to your version it is good to test your sites, your code, as much as possible before performing the actual upgrade, and also be ready to downgrade immediately in case you detect a problem in the new version that was just introduced so it does not cause any harm to your sites.
Manuel Lemos: But moving on and talking about also new releases, just a brief note that a new PHP 5.4 beta version is about to be released on September 1st if all goes well, at least that is the schedule that is being planned for this new PHP 5.4 version.
And if you have been looking forward to benefit from the PHP 5.4 version enhancements take a look and, again, as I mentioned before, take care, follow these upgrade criteria that I have just mentioned to decide whether or not you should upgrade or wait at least for some time more before you do it.
Manuel Lemos: But again moving on with another topic that I think it would interesting to discuss in this PHP podcast, it's about an article that I wrote earlier in this month of August about several wrong ideas that people have about PHP.
Just to give first some introduction to the actual reason why I decided to write this article, which I did not enter in too much detail in the article itself. There is a site named Quora, not just this site but this was one site that motivated me to write this article, on which once in a while we see questions of people asking about things like "Is PHP better than some other language?" or some other question that somehow challenges the capabilities of PHP for certain purposes.
And the idea that I was getting from some of those questions, is that at least some of them seem to be put there on purpose to somehow campaign against PHP, probably by people that prefer other languages.
And often they were disseminating ideas that I realized that were wrong, and I think it is bad for the PHP community as a whole to disseminate these bad ideas. So I decided to write an article I called "The Top Ten Wrong Ideas About PHP That You Should Get Right," but I could actually come up with even more wrong ideas about PHP that are being spread.
And these ideas are just misconceptions that are spread, sometimes not just by developers that prefer other languages but also by PHP developers themselves that have a wrong perception about what PHP can or cannot do.
Ernani, did you follow this article repercussion? What was your view about the article itself and how people reacted to it?
Ernani Joppert: Yes, I've been checking the Web lately, especially throughout the past year and this year, and I've seen that some languages gathered some gain in the community and the other languages gained let's say some bad reputation.
And I've seen also some specific performance comparisons, graphs and everything else, and it's all in all taking nobody nowhere.
Manuel Lemos: Right.
Ernani Joppert: And given the post that you wrote, the article, I could follow-up that most of the people, even myself in the past when I used to focus on multi-architecture because I was involved let's say in a deeper way with multiple architectural applications, and I had to move away from PHP due to the Java adoption by the company I worked for and the other projects I was involved with.
And I couldn't see the benefits from PHP between that time and this time, and PHP has evolved a lot, and by using Gearman you can pretty much accomplish tasks that you can't accomplish with Java by having multi-tiered applications talking to each other by having a Gearman doing the communication between one server and another you can reach much of that architecture by using it.
It's just that there are no standards, there are no specifications, there isn't let's say a community process between the community PHP, the PHP.net web sites and Zend and other companies supporting PHP itself.
So, it's just the lack of specifications, let's say feature releases and everything else, makes PHP look different than other languages. But a programming language or a scripting language can be mis-concepted.
Nobody would imagine in two or three years you could boot up a Linux redistribution into your browser by using an ISO image of a DVD. And eventually a guy from I guess Russia, if I am sure about it, otherwise I could be just not remembering the country the guy was from, but he wrote an application that you could boot up a Linux box into your browser.
So that goes far from my understanding, but you see that any kind of languages can do a lot and it's just that there are standards most of the PHP adoption is doing web applications, but I've seen other projects using GTK.
And, yes, sometimes I feel a little bit sad about the misconceptions about programmers itself because all the languages can do what you want if you know it enough, and you can benefit here and there sometimes being an easy language to adopt or following a specific framework or anything else, but there are a lot of things from my personal experience that PHP can do a lot and fast and reliable, it's just that you have to dig into the language documentation and also the engine itself in order to understand and to accomplish what you want.
And one of those examples is the HipHop compiler which strips back the "tval", let's say a general type value for a specific variable, and it fixes those values so you are pretty much not using any dynamic values when you compile your PHP application into HipHop.
And if I'm saying anything wrong just let me know, but I guess it's just trying to gather benefit from what you already have instead of learning a new language and losing focus sometimes.
Manuel Lemos: Right. There are some misconceptions that I mentioned in the article that are very frequent and old, I mean they were being spread since many years ago, and they just reflect the ignorance about aspects that are probably not very well known about what you can or cannot do about PHP.
Ernani Joppert: Yes, and most of those are immature comments like the nephew big example is that when the Web came around most of their nephews were coding and they wanted to bypass a professional service by just asking their nephews and sons and everyone else to write an application for them, and this can happen in any language.
Manuel Lemos: Right.
Ernani Joppert: It's just PHP has reached a very large widespread of applications and those projects although they can accomplish a lot of things, they took a lot of effort of developers to get into that specific stage.
By example is WordPress and others like Joomla and Drupal and OScommerce, those are very extensive projects if you look into their code, but most of the adopters are people who aren't into programming itself so it makes it easy for them.
And I would like to see other projects, other languages, like Java, Rails or any others, or Python itself to provide such kinds of tools, but I guess PHP has proven it's reliable, it's trustable if the administrator is knowing what he's doing to sustain the market, and I don't see any other languages taking that bite on the market because PHP performs very well and it's focused on the community, so it tries to give back to the community what they need.
Manuel Lemos: Basically PHP was built by many people, and most of them with a great sense of pragmatism, I mean they have implemented into PHP the features they need, not necessarily the features that academic people would implement just for the sake of making PHP a perfect language in the academic sense.
And this sometimes clashes with the way people that just came out of college think that language should be. They think languages should be just like the languages that they learned in college, and often in college PHP is not a language that is being part of their curriculum.
And so they end up sort of preferring other languages that are closer to what they have learned in college. But this just reflects that PHP being a language built for pragmatic people ends up being more popular, at least for the Web, because it solves real world problems, and in many cases it was the first to be used for solving such problems.
For instance, WordPress is a very popular PHP application that solved the problem of blogging. It was not exactly the first to solve that problem but it was one of the most widespread solutions for that problem, and being totally open sourced it got very wide adoption.
Ernani Joppert: Yes, and Movable Type which was another system of that stage was based off of Perl, and by having Perl you could write an application in PURL in lots of different ways, and it makes it difficult to standardize.
And PHP has an easy approach, at least for me, others may think it's different, but I see that PHP has benefitted because of the ease of use, and the documentation and the effort of the community, because most of PHP.net instructions there are user based, so it's also that major point here.
Manuel Lemos: Yes, and the fact that PHP was built from contributions of many developers, sometimes you notice certain inconsistencies that make other people eventually hate PHP for those inconsistencies.
But for the others it doesn't matter because you get used to those inconsistencies, and sometimes those are inconsistencies in naming, sort of dealing with different generations of thought, of people that implemented different features recently or many years ago.
But in the end for those that use PHP it doesn't matter because PHP can solve their problems and they are happy with it, but there are always those other people that for some reason would prefer some other language because they realize PHP has those inconsistencies and those other languages do not have those inconsistencies, but since those other languages are not so popular they seem to be campaigning against PHP in sites like Quora, as I mentioned, and others, in the hope that their languages get more attention, but I think that's not the way to go.
And in the end it also does not matter, a language should be taken as a tool, a tool to solve problems, and sometimes your final solution is not made just of PHP, it could be PHP and other languages, and you do not have to be radical, you can mix different tools in your solution, you can use different languages in your solution, it depends on the purpose.
Sometimes the resources that other languages provide are better than PHP for certain purposes and it's okay to mix, at least you have freedom to choose your solutions and nobody will be upset with that.
And that was mainly the message that I wanted to pass, first to clarify those misconceptions, but also pass the idea that you do not have to use just PHP to solve your problem, or just another language to solve your problem, you can mix both, I mean PHP and some other language that you may prefer, and everything will be alright, it's up to you to decide, you have the choice and you do not have to be radical of those that are in favor or against PHP, and I hope I have passed that message well, and I'm sure there are other misconceptions I did not mention.
Just a brief comment on something that you said, it's true that PHP does not have exactly a process like in Java world, like JCP, Java Community Process, which is a process that is used to decide where the language should go.
But nowadays PHP has something similar which has somehow evolved a lot this year which is the possibility to propose features, you just go on the Wiki that is under PHP.net, you can propose a feature and it will be eventually voted on for the next release.
It's not exactly like the JCP that exists for Java, but it's somehow a step given in that direction. I'm sure there are other details to make it more efficient, but at least the PHP development process is evolving somehow.
Manuel Lemos: Okay, but moving on to another topic of this podcast, I'd like to mention just a feature that was introduced recently in the PHP Classes site, mainly to provide better navigation of the contents of each package.
As you may be aware, recently it was introduced the possibility to import packages from version control repositories. Currently CVS and Subversion are supported. Eventually Git and probably Mercurial will be supported later, probably very soon.
Bbut the new feature that I'm talking about is not exactly this but rather a consequence of adding support to importing packages, files from version control repositories, which now makes it a lot easier for developers to submit very large packages with many files.
And the way that the package files were presented was not very user friendly, especially in the case of larger packages. So one enhancement that was introduced just recently was the possibility to present the packages, the file packages, with a tab based user interface on which the directories and subdirectories within each package appear as links, so when you click on a link a new tab appears with the contents of those directories and subdirectories.
And you can go as deep as necessary, and this hopefully will provide a more user friendly way to let the user see what's inside of a package. Ernani, did you try this new way of browsing package files?
Ernani Joppert: Yes, I was checking one and I saw that there are some fade effects and it's pretty much better than it was before and it has a lot of other sites that use different approaches, but it's nice to see that those features are improved, and the one that I really like is the integration with Subversion and future ones with Git and others.
Manuel Lemos: Right. This user interface improvement was really necessary even before having introduced version control import support in the site, because before you already had the possibility to submit packages with directories and subdirectories, but now with the support of version control import features it became mandatory to improve the user interface.
It is not quite fully done, I still would like to make the browsing of file contents also accessible from the same page, I mean once you enter in a tab that has files, if you click on a link to see the file the actual contents of the file will appear without full page reloading, I mean using an AJAX based interface retrieve what the contents of the file are and show it to the user, so the navigation becomes even faster than it is now. That will require me some time so it is not yet done, but it will be as soon as possible.
But talking about this improvement that was done on PHP Classes, and as well in the JS Classes site because both sites share the same code base, if you go there to JS Classes site you can see the same feature for browsing package files in this more user friendly way.
Manuel Lemos: And talking about JS Classes site, I would like to bring up the fact that JS Classes just made one year of age, its birthday was on the 25th of August, and just a brief comment on what has been this first year of the JS Classes site.
We had many packages being published, if I'm not mistaken it was about 82 packages were contributed during this year, this first year of the JS Classes site, and it had about 39 contributors that sent these packages that were submitted to the site
Actually there were more packages being submitted to the site, but for some reason they were not approved, they did not fully fill the requirements, but those that were approved were 82.
And just as a side comment, from those users that have been contributing packages I would like to add also that those are part of the over 6,000 users that have registered to the site. A great part of them are also PHP Classes users, and once they come to the JS Classes site they do not have to create a new account, they just share the same login system, and this was meant to facilitate the participation of users in both sites.
And one of the reasons that I would like to encourage greater participation in the JS Classes site is because despite the PHP Classes site and JS Classes site share the same code base, and there are certain features that were not yet enabled in the JS Classes site.
One of those features is the Innovation Award that was started in the PHP Classes site in 2004, and then in the JS Classes site it was not yet started because if it was started with not as many contributions that it is getting, probably all packages would be innovative, so it would be hard to distinguish authors for being innovative.
So once JS Classes gets up to a contribution rate closer to the level of PHP Classes site, I'm very much looking forward to starting the Innovation Award with sponsors that will provide nice prizes to the developers that submit their packages, and so they can benefit also from those prizes as well from recognition that initiatives like the Innovation Award provide.
Ernani Joppert: Oh, yes, I've seen two of the major ones that I think are worth mentioning here, at least to my ideas of using such libraries. The first one is the Easy Chart, it's from Arturs Sosins I guess, yes, from Latvia, and it provides basically Canvas rendering of images like pie charts, bar and pie charts and scattering charts, and given that it benefits from the Canvas it's innovative, and we would like to see ideas like that, it's very, very promising.
Manuel Lemos: Right.
Ernani Joppert: And the other one is from Tomas Corral from Spain, he has provided an object here which is named Hydra, depends on where you live, and this package I couldn't look at it further in detail, but I see that it has modular event action handling.
And I guess that there is adoption by applications already here as I can see on the description of the class, so Byveo.com social network and Softonic which is a software distribution web page also uses this on their implementation.
Manuel Lemos: Right. Well, I also noticed a couple of other interesting packages that I would like to mention. One of them is the Canvas text by Pere Monfort from Spain as well, and what this object does basically is a helper to render text strings on a Canvas object, and it supports a few tags very similar to HTML it can help to define some attributes.
It also supports the concept of styles, classes, that can help to reduce the effort of defining styles to be applied to different text that is rendered in different positions of the Canvas. And basically all this is meant to help the process of rendering a text which can have HTML-like markup to define certain styles to be applied in that text.
And this is actually a jQuery plugin that lets you define properties to be applied to certain elements of the page that should appear rotating, so not only can it define specific rotation angles, but it can define increments that will provide animation effect so elements of the page that will be rotating will seem to be animated.
And this plugin, jQuery plugin, somehow offers an abstraction so it can be supported in different browsers that provide different details for setting up rotation attributes.
Manuel Lemos: And talking again about PHP and now moving on to another regular section on which we comment about the latest classes published in the PHP Classes site that were nominated for the Innovation Award of June, they were published in June, and then they were nominated at the end of that month, and during the month of July they were under a vote process, and in August the winners were announced of that month's award. Ernani, which classes would you like to highlight for this month?
Ernani Joppert: Yes, I have specifically separated two of them, the first one is from a person from France, his name is Jonathan Gotti, sorry if I'm pronouncing it wrong. It's a package tied to JSON, and JSON RPC protocol for web services.
And although it does JSON parsing as most of the libraries, there are native libraries in PHP that do this, but this one makes a simple implementation of the JSON RPC protocol, so it's basically easier, let's put it this way, to be used as a library if you want to reach an up-to-speed implementation of the protocol, and brings some innovation in my point of view.
And it's being used by the SimpleMVC framework which also makes it a solid contribution, so this one is my first vote.
And the other one which is from Arturs Sosins as well, he's also a contributor of PHP Classes from Latvia, and it does a very innovative solution here because it can extract Proper nouns to refer to people or other entities in documents all over the Web.
And it can be used widely in lots of applications, even for media tracking and for news discovery, So I couldn't see the whole source and investigate it further, but it seems to be very powerful and it could be somehow improved to gather other kinds of usage, so it's a very raw implementation and very innovative, not raw in simplicity but raw in the potential that you can benefit from this because you can have several ideas based on such components.
Manuel Lemos: Right. This is actually a very interesting and innovative, as you said, component that can be used for instance if you have an arbitrary text and you have for instance if you want to quickly figure about whom the text is talking about, and if that is about people usually people are referred by their proper nouns, and with some heuristics this class is able to figure those nouns.
Sometimes the nouns can be spelled starting with capital letters, but that's just one of several possible rules that this class uses to identify and extracts possible proper nouns in a given text, and you quickly can have a solution for a problem of determining who that text is talking about.
And now I would also like to mention a couple of other classes, one of them is Curse Filter by James Wilson of the United States. There have been many sorts of filters, classes that filter text to detect profane words and somehow sensor them, but what this class does is I think a step further which is to provide acceptable alternatives to some profane words.
Let's say that somebody has submitted a text to a site that has some profane words, and you would not like to reject it but would like it to avoid those profane words to not offend your users, and what this text provides is a solution that can detect those profane words and replace them by acceptable alternatives that are taken from a database.
So since this is all dependant on looking up on a database it can provide an interesting flexibility to the solution which allow it to expand to other words, other profane words that you want your application to consider eventually in other languages, not just English, and provides interesting alternative words that would be more acceptable to the users or just replace them by some censorship like symbols like asterisks or other symbols. And this is one of the classes that I want to comment about.
Another interesting class that I would like to mention is the geozonedb class by Virgilio Lino from Italy. What this class does it's quite simple but can be very useful, basically it can retrieve information about regions of the world, about their geography, names of cities and locations and other places in the world, and can store in a local MySQL database, so your applications can use it very quickly, at least when compared to the usual web services based solutions.
So in the end it can provide a much faster solution than relying on those web services, and I hope this can be useful to other people. So regarding the latest innovative classes this is all.
Manuel Lemos: I would just like to add a final comment which is the fact that I suppose probably because most people at least in the North hemisphere have been on vacation during July and August, now I have noticed a surge in the number of packages being submitted to the site, and many of them are very innovative and they will eventually be nominated to the Innovation Award.
And what I have been noticing is that if I publish them all now I'll have to also nominate them this month to the Innovation Award, and that will lead to a very large number of innovative packages.
And although all these innovative packages are quite desirable, if I nominate them now I will have to distribute a number of prizes among a larger number of nominees, and due to this concentration of candidates to those prizes I am postponing the approval of those classes.
So if you have submitted a package to the PHP Classes site that is eventually innovative and it was not yet approved, don't worry, it will be approved very early next month, so don't worry about the delay, this probably means a good thing to your package.
Other than that, innovative packages are always welcome in the site, so keep them coming and I'm sure they will be well appreciated, and we always try to mention them as much as possible, and you'll get plenty of exposure and eventual feedback and recognition from the site users.
Manuel Lemos: So basically this is all about this episode, Ernani, your final remarks?
Ernani Joppert: Yes, thanks a lot, guys, for being here with us, there were lots of items here discussed basically covering from the current PHP releases, the JS Classes anniversary, congratulations to this achievement, Manuel, and checking everyone here to contribute and to promote themselves as well as giving the ability to promote the same contest that are done in the PHP Classes.
And also we've talked about misconceptions about PHP, so it was a very nice article from you, and it brings to the table those decisions when being immature or trying to do what you have to do with the language that you are most focused on without trying to hassle anyone, and although we've seen some other discussion improvements on the PHP Classes and JS Classes, we've seen several contributions along the episodes and we encourage the users to send more and to wait for the other integrations with other version control systems, and I'm all for that.
I'm really glad to be here and I wish all you guys a great month, and we'll see you all later on the next episode, thank you guys.
Manuel Lemos: Okay, that's all for now. Bye.
No comments were submitted yet.
|<< Previous: Better Package Browsing||>> Next: MODX: A CMS Framework...|
|PHP Classes blog||PHP 5.3.8 Upgrade, PH...||Post a comment||See comments (0)||Trackbacks (0)|