In a new post to the Apigility forums today Matthew Weier O’Phinney has announced the release of an authentication/authorization component for the recently announced project from Zend. Apigility is a Zend Framework-based tool for easily constructing and managing an API.
We’ve been working hard on Apigility since ZendCon, and have released
some more code into the wild. zf-mvc-auth exists to provide both authentication and authorization for your APIs; in fact, it’s a bit of a general-purpose library for ZF2 MVC apps! Right now, we support HTTP basic and digest authentication out of the box, and will be working next on OAuth support. Authorization is done by default via ZendPermissionsAcl, as we discovered a problem with using RBAC: RBAC is deny-by-default, which does not work when you want an open-by-default schema. You may opt-in to deny-by-default, as well as mark individual services as requiring permission by default. Finally, you have the option of denying/allowing per HTTP method of a service as well.
You can find out more details about this functionality in this quick screencast. The zf-apgility module depends on this new zf-mvc-auth module, so it will be included and available by default in your APIs. In that same post Matthew also talks about the listing of the Apigility packages on Packagist service and a note for those wanting to use the built-in HTTP server to run the tool (a PHP version dependency).
On Reddit.com today timoh has posted a “brief look back” at PHP’s evolution to be “enterprise ready” and looks towards the future with some speculations as to what the coming years will bring to the language and its community.
I’m trying to evoke some disqussion about how we have come to the current point of life we have now going on in the PHP field, as an architectural decisions, design and best practices we use to build PHP based software today. [...] Of course PHP language itself has put some walls to design the software the way one would have liked, but still there are alot that could have been done better even “back in the days”. At least “better” in a sense what it means today.
He points out that in recent years there’s been a push in the community as a whole for things like SOLID/DRY principles, decoupled code and testing. He speculates about the future of things like the Symfony and Zend Frameworks (and the radical changes they both made from their version one to version two). Have your own thoughts about the evolution of PHP and where it might be headed? Share them here!
Few weeks ago I was asked to review Zend Framework 2.0 by example – beginner’s guide from Packt. While I’m not a beginner anymore – and haven’t been one for a while – I do hold from time to time training sessions on the various technologies used in web development so I can easily put myself into a beginner’s shoes and asses how useful a resource is.
While it has “beginner’s guide” written on the cover, the book is not for the absolute beginner. It assumes the reader has basic knowledge about PHP, classes, objects and (a bit) design patterns. I would say it’s for students in uni who want to start a career in PHP development or young professionals. Can be interesting for a more seasoned professional who wants to get a quick start with ZF2, but sometimes all those beginner level explanations can get boring.
Like with all Packt releases, the book is available in multiple formats, from paperback to pdf, kindle and so on. This makes it easier to read it in the format of choice. Personally I prefer books in paper format – although the electronic versions are cheaper.
The book is divided in 10 chapters and one appendix and buyers can register on Packtpub.com and download the source code for all the examples in the book. It describes some common scenarios and provides solutions to day to day problems people encounter when using 3rd party APIs.
Long story short, the book delivers what it says, nothing more, nothing less.
- simple, concise language – somewhat of an exception, because writing code differs greatly from writing a book and usually books written by developers aren’t the most enjoyable reads
- uses Ubuntu and CLI tools for all the examples – I’m sick of PHP developers using Windows and not knowing anything about Linux although most of the web runs on it
- gives example using popular APIs and 3rd party integrations: Paypal, Google data APIs, phpCloud, phoneGap and so on – this is very good for a beginner, because it shows how to solve real life problems rather than abstract artificially created problems
As always, there are some minuses:
- inconsistent naming in the SQL tables – some tables use the singular form “user” while others use the plural “uploads”. I see this as a bad practice which decreases code readability and should be strongly discouraged. Also, some of the foreign keys are signed and they reference unsigned columns (id in user table vs user_id in uploads)
- missing licence information for the source code. Some beginners might be tempted to use code from the repository in their own applications and I haven’t found any information on whether that’s possible. Also, the phpdoc comments in the code are missing virtually everywhere
- sometimes it gets too verbose although that might be considered a plus for beginners
Value for money
As I said in the second paragraph, I see the book as being targeted for students / young professionals so I’ll use terms that they’re familiar with: the eBook with access to the code is priced at £16.14 (€19.04) which buys you 4 pints of ale (3 if you’re in London) or 2 steins Paulaner if you’re in Munich at Oktoberfest (lucky bastard ) and while this might sound like something your granpa’ would say, those money are far better invested in your education.
I do recommend the book!
It’s a persistent statement: controllers should have as little code as possible because they’re difficult, nay impossible, to test. Developers should force most of their code into the models instead, where business, validation and other logic can take place. This way, the models are reusable and the code is easily tested in isolation. After all, […]
Kevin Schroeder has a new post to his site looking at the cost of logging in web applications. It’s not so much about the theory behind what to log and when to log as it is the actual performance hit various kinds of logging take on your app.
So, I was having a discussion with a person I respect about logging and they noted that often logging poses a prohibitive cost from a performance perspective. This seemed a little odd to me and so I decided to run a quick series of benchmarks on my own system.
His tests ran through the types of logging available to PHP developers (like “debug”, “notice” or “info”) and wrote out the same message to a file ten thousand times each. He just did a simple microtime-based benchmark and graphed out the overall time it took. The differences between the tops of the bars is the time it took for that specific level of logging. He dropped it down to a more realistic level and notes that it only took “1/1000ths of a second per request.”
On the Lingohub site there’s a new post showing how internationalization (i18n) is handled in 5 major PHP frameworks – CodeIgniter, CakePHP, Zend Framework Symfony and Yii.
As discussed in the previous articles on PHP internationalization, PHP provides native support for string translation using gettext and PHP arrays. These can be used in any PHP project. Additionally, some popular PHP frameworks offer their own way of string translation. In this article, I want to provide a brief summary of the internationalization process with five of the most popular PHP frameworks currently out there. In this How-To you will read about using CodeIgniter, CakePHP, Zend, Yii and Symphony.
There’s only a bit of sample code here, so it’s not a complete tutorial for all of them. Mostly its links to more information about how each framework does things – modules used, formats and configurations.
On the NuoDB site there’s a recent post showing how to use this cloud-based database solution from inside Zend Framework applications.
The Zend Framework is an object oriented PHP framework that can be used to construct interactive web applications. NuoDB supports both Zend Framework version 1 and version 2 . In this TechBlog article, I will show you how to use NuoDB with both Zend Framework v1 and v2. I will use the example applications that are provided in the Zend Framework documentation and show you how to make them work with NuoDB.
They briefly walk you through the install and configuration of Apache and NuoDB you’ll need to get things up and running. Sample code is included showing you how to install the NuoDB PDO driver, pull down their github repo with the needed files (for both ZF1 and ZF2) and implementing in each version’s quickstart application.
In this new post to the ZFort blog Elena Bizina compares Symfony and Zend Framework from her perspective, looking at things like functionality, general understanding and community.
Zend and Symfony are the two frameworks that are often compared. Which one is more functional? Which one is more preferable in terms of productivity? Which one is better for general understanding? Which of these two has a larger community? I’ve asked Zfort Group experts to help me with these questions, and here’s what we have come to.
She first gives a high-level overview of each framework, pointing out a few of the features and tools they have built-in. She then goes on to answer the questions above, noting that she sees Symfony as coming out in the lead. Some of the questions are a little vague, so it’s not entirely clear why one is different than the other. What do you think? Leave a comment here with your opinions.
Starting FireStorage Plus! v1.2 a new feature is introduced: copy paste.
This copy paste functionality is however smart adaptive powered by a strong AI. It adapts to your needs.
If you need to copy the key, value and storage type to a string of text it is sufficient to right click on a storage, select copy from [...]
What is the Firefox Add-on “FireStorage Plus!” all about?
First It is about you!
Secondly it is about HTML5 Web Storage mechanisms.
Where can I find it?
First you need the Firebug addon: https://addons.mozilla.org/en-US/firefox/addon/firebug/
Then you need the FireStorage Plus! addon: https://addons.mozilla.org/en-US/firefox/addon/firestorage-plus/
The FireStorage Plus! addon is an extension to the wonderful tool Firebug.
Why would I need it?
You cannot imagine [...]