News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Essentials of LDAP with PHP
September 26, 2014 @ 09:07:37

On the SitePoint PHP blog today Matthew Setter has written up a tutorial sharing the essentials of PHP with LDAP. He shows how to connect PHP to this industry standard technology and effectively query, update and delete information.

Ever wanted a simple way to store address book style information and network information actually next to any kind of ordered information? If so, then there's a technology which has been around since 1993, one which despite not having the cool factor of such technologies as Node.js and Go, allows you to do exactly this. It's called LDAP!

He starts off the tutorial by explaining a bit about what LDAP is (and isn't) for those not familiar with it. He covers some of the basic terminology, pointing you other articles if you need more than just his brief overview. Then he helps you get an LDAP server installed locally (using a package manager, apt-get) and how to verify the install is working correctly. From there he shows how to populate a few records and verify they exist. Following this, he gets to the PHP part of things, showing how to use the Zend Framework v2 Zend/Ldap component to access the server, query records and update/delete them easily.

0 comments voice your opinion now!
tutorial ldap introduction query crud essentials zendframework zendldap

Link: http://www.sitepoint.com/essentials-ldap-php/

Rob Allen:
Using ZF2 Forms with Twig
September 23, 2014 @ 09:28:53

Rob Allen has a new post today showing how to integrate Zend Framework 2 forms into a Slim framework based application. He started the topic in a previous post and continues, this time using the Twig templating framework to handle the rendering.

The ZF2 view helpers, formRow and formElement now look like Twig functions, however we don't want to have to rewrite all our ZF2 view helpers into Twig. Fortunately, Twig supports the concept of a undefined function callback is called whenever Twig encounters a function that it doesn't know how to call. We can use this to proxy through to the ZendView system and get it to render the ZF2 view helpers.

He shows how to use this callback functionality and a custom view layer with the Slim-Views component to render the output. He includes a simple Slim example, setting up the custom View class as a parser extension and how to register the callback to invoke Twig.

0 comments voice your opinion now!
zendframework twig render slimframework integration tutorial view

Link: http://akrabat.com/zend-framework-2/using-zf2-forms-with-twig/

Reddit.com:
PHP library authors Have you considered to arrange security bug bounties?
August 06, 2014 @ 10:39:00

In this new post to Reddit.com Timoh suggests something that could definitely help improve the overall security of the PHP ecosystem - a bug bounty system, providing libraries and projects an easy way to security-related submissions for their code.

To encourage software security research on the open-source PHP libraries we use everyday, I have been brainstorming the possibilities for us, the code authors, to start to offer security bug bounties on the projects we maintain. It is a shame such a few PHP projects encourages security research by offering bug bounties, and I think it doesn't have to be this way.

He describes his ideas for the system including the ability to offer both monetary bounties and other kinds of recognition as well. Comments on the post are largely supportive, agreeing with him that it can definitely help things. He also makes the suggestion of getting frameworks with corporate backings (like Zend Framework and Symfony) to be some of the leaders and be an example to other projects and get them on board. What do you think? Add your own thoughts and suggestions about the project to the mix!

0 comments voice your opinion now!
bugbounty service project library zendframework symfony bounty recognition

Link: http://www.reddit.com/r/PHP/comments/2cpu6v/php_library_authors_have_you_considered_to/

Voices of the ElePHPant:
Interview with Evan Coury
July 23, 2014 @ 12:36:25

The Voices of the ElePHPant podcast is back with a new episode of its podcast. This time it's an interview with PHP community member Evan Coury.

The interview is recoded live at this year's Midwest PHP Conference. They talk about Evan's work around Zend Framework and where he sees things going with the project. He also mentions some of the work being put towards Zend Framework v3 (and if there will be many backwards compatibility breaks like there was with ZF2).

You can listen to this latest episode either through the in-page player or by downloading the mp3. If you like what you hear, consider subscribe to their feed.

0 comments voice your opinion now!
voicesoftheelephpant evancoury community interview zendframework

Link: http://voicesoftheelephpant.com/2014/07/22/interview-with-evan-coury/

Community News:
Apigility 1.0.0beta1 Released!
March 25, 2014 @ 10:41:03

Zend has officially announced the release of the 1.0.0beta1 of Apigility, their API creation platform making it simpler for developers to get started making APIs, even around existing code.

We are pleased to announce the immediate availability of Apigility 1.0.0beta1! [...] This is our first beta release of Apigility, marking its initial API stability, and providing a solid preview of what to expect for the first stable release. [...] Apigility provides tools for describing and documenting your APIs, both RESTful and RPC. You can indicate the URL that provides a service, what HTTP methods are allowed, what representations (e.g., JSON, HTML, XML) can be provided, how many items to present per page of a collection, and more.

The release goes on to talk about some of the other features of Apigility including the standard of JSON responses, custom validation for incoming data and an implementation of the Swagger UI bundled for documentation of your service. There's also a list of things (with code examples on some) about what's changed in this beta release since 0.9.1. There's also a brief look at the end of the roadmap ahead, with an emphasis on a full, stable release soon.

0 comments voice your opinion now!
apigility api zendframework beta release

Link: http://framework.zend.com/blog/apigility-1-0-0beta1-released.html

Michelangelo van Dam:
Bootstrapping ZF1 application in Apigilty
March 11, 2014 @ 10:42:27

Michelangelo van Dam has a new post sharing a method he's come up with for boostrapping Zend Framework v1 components inside of an Apigility-based application.

Apigility is a Zend Framework 2 tool that provides a REST API management interface, which is very useful if you want to build an API. Apigility can directly connect with your database and offer a full REST API for your application, but in most cases you already have an application build with Zend Framework 1.x (ZF1). Let's assume you have incorporated a lot of business logic in this application so it would be a waste not to use it building a rich REST API.

He uses the gitmodules functionality to bring his entire ZF1 application into the Apigility app's structure (or, alternatively, Subversion). He shows how to use Composer to install the actual Zend Framework v1 copy and how to pull in other third-party libraries. He includes the code you'll need to use to create a "ZF2APP_PATH" constant to get to the application path of Zend Framework v2 instance. He then gets into the main part - the actual autoloading and bootstrapping of the ZF1 classes/services. He gives a brief introduction to working with Apigility to make a new service and shows the update to the resource class.

0 comments voice your opinion now!
bootstrap application apigility zendframework2 zendframework

Link: http://www.dragonbe.com/2014/03/bootstrapping-zf1-application-in.html

Mastering Zend Framework:
Gary Hockin's Maximising Zend Framework 2 Performance Talk (Review)
February 28, 2014 @ 10:33:30

From the Master Zend Framework blog there's a new post reviewing a talk from this year's PHPUK (2014) from Gary Hockin, "Maximising Zend Framework 2 Performance".

Whether you're new to Zend Framework 2, or an old hand (can someone really say they're an old hand after such a short period of time?) the talk covered a range of tools, tips, and techniques for increasing application performance. This wasn't an academic run through; it was a talk based on practical, hands-on, experience from Gary's time as a core ZF2 contributor, and his work at Roave, Yamgo and AdSpruce.

The post talks some about the tools Gary used to benchmark his improvements and some common metrics to be aware of in your own results. Xdebug and Xhprof were also recommended for more introspection into what the application is doing and where the bottlenecks lie.

0 comments voice your opinion now!
phpuk14 zendframework performance tools talk session

Link: http://www.masterzendframework.com/reviews/maximising-zend-framework-2-performance-phpuk14

VG Tech:
Swagger Docs in ZF2 with Examples - Part 1 Setup and Annotations
February 25, 2014 @ 10:33:48

The VG Tech blog has posted the first part of a series they're doing about Zend Framework 2 and Swagger, the auto-generating documentation project for APIs. In this first part of the series, they go through some setup and show the use of annotations to define the Swagger output.

So everyone is building APIs now - parsing and outputting JSON is not that hard. Some people even build truly RESTful APIs, or something not to far from that. Before, when building APIs was about SOAP with XML schemas and WSDL specifications, people spent so much time building their APIs that they had the time to think. Now, building an API is so easy and fast that the documentation is often suffering. [...] Swagger is a popular project providing auto generated API docs based on a service specification. This spec is based on annotation comments in the controllers and models, giving the developer a fairly easy, and close to the code way of keeping the API docs up to date.

He walks you through the process to clone and setup the Zend Framework 2 project first, then pull in the "outeredge/swagger-module" with Composer. This package provides the tools to generate Swagger output from annotations in the PHP code. He also shows you how to set up the Swagger UI project (wordnik/swagger-ui). Finally, he gets into the code examples, showing how to annotate models and use partials.

0 comments voice your opinion now!
swagger api zendframework setup annotation tutorial series part1

Link: http://tech.vg.no/2014/02/24/swagger-docs-in-zf2-with-examples-part-1-setup-and-annotations/

Suresh Ariya:
Integrate Zend Framework into CakePHP application
February 13, 2014 @ 13:04:22

Suresh Ariya has a new post today showing you how to integrate Zend Framework (v1) with CakePHP so you can use any Zend Framework class/component you might need via autoloading.

Today, we are going to see how we can integrate Zend Framework version (1.12) into CakePHP Application. In order to achieve this, i created an autoloader script which will load the Zend Framework class at the time of accessing the class (creating object). I used spl_autoload_register() function which will register a function as the __autoload() function.

He creates a basic "ZFLoader" class that handles the registration of the autoloader and the parsing of the class name to resolve the path to the file. Another basic loader script is included in the post with some setup and configuration the Zend Framework will need to operate. Finally, he shows how to get the CakePHP application to pull in the Zend Framework loader in the controller and make use of the Zend_Feed component.

0 comments voice your opinion now!
integration zendframework cakephp application tutorial

Link: http://sureshdotariya.blogspot.in/2014/02/integrate-zend-framework-into-cakephp.html

MaltBlue.com:
Do We Use Magic Methods or Not?
December 13, 2013 @ 10:39:20

In the latest post to his MaltBlue.com site Matthew Setter takes a look at magic methods. He tries to answer a few basic questions about them - are they worth using and can you truly test effectively when they're in use.

As a freelance Zend Framework developer, I'm always looking to improve the quality of the applications I produce. So over the last 6 - 12 months, I've been learning as much as possible about testing. During this time, I've found the way I code's dramatically changing (and improving). [...] In a recent development session, I attempted to test some of my ZendDb based classes, specifically the code which used the magic methods for dynamically building where clauses. [...] I can't speak for what it's like using PHPUnit's mock objects, as I always use Mockery instead. But after attempting to do so in Mockery, I hit a stumbling block when trying to test the chained call.

His example is a call to "lessThanOrEqualTo" to create his where clause that makes use of the "__get" magic method to get and return "Where" object. After some research (and conversations on IRC) he started wondering if the magic methods were worth the trouble they may cause during testing. He references this post and lists several of the comments made about their use, most of them not in favor.

0 comments voice your opinion now!
magic method zendframework sql builder query unittest testing

Link: http://www.maltblue.com/php/php-magic-methods-or-not


Community Events





Don't see your event here?
Let us know!


package library framework install voicesoftheelephpant release laravel list bugfix opinion series podcast tips language deployment interview community introduction symfony api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework