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

Lorna Mitchell:
Compiling PHP Extensions
August 29, 2014 @ 09:28:42

Lorna Mitchell has posted a quick guide to compiling PECL extensions to her site today. This is for those users on unix-based systems that might need to manually compile with some custom options (or may be working on your own extension and may just need to test it).

There are lots of reasons why you might like to compile your own PHP extensions. [...] I haven't seen a really approachable guide anywhere, we tend to speak of extensions in hushed tones, and actually it isn't particularly tricky so here is my quick how-to guide.

The process is relatively simple for those familiar with the command line and the steps involved in compiling software. There's some special PHP-only steps you'll have to take before compiling the code to make sure it's ready to be a PHP extension. Then it's up to the usual configure+make_make install to ensure the .so file is correctly generated.

0 comments voice your opinion now!
compile extension tutorial phpize module

Link: http://www.lornajane.net/posts/2014/compiling-php-extensions

Master Zend Framework:
How to Use ZFTool Diagnostics To Ensure Your Modules Work
May 13, 2014 @ 10:55:19

The Master Zend Framework site has a new tutorial today showing you how to use the ZFTool diagnostics to make sure your modules are working correctly. The ZFTool is a stand-alone tool that can help with common tasks like working with application configuration and creating module and project skeletons.

Do you want to be sure that when you create Zend Framework 2 modules, that they'll work in whatever environment they're used in? At the very least, do you want a simple way for users to check, as well as something that's self-documenting? If so, you're in the right place. Last year, I gave a basic introduction to ZFTool, which is a command line tool to manage applications written in Zend Framework 2. [...] In addition to [the included diagnostic checks] we can write our own diagnostic checks, using the Success, Failure and Warning classes. So in today's tutorial, I'm going to show how to add diagnostics support to a module.

He's broken the rest of the tutorial up into four other parts, each with the code or commands you'll need:

  • Add Diagnostics Support
  • The Diagnostics Function
  • Running Module Diagnostics
  • When Checks Fail

You can find out more about the ZFTool and its usage in with diagnostics in the official manual

0 comments voice your opinion now!
zftool module diagnostic validate zendframework2

Link: http://www.masterzendframework.com/zftool-2/use-zftool-diagnostics-ensure-modules-work

Master Zend Framework:
Make Module Configs Cacheable with the ZF2 Factory Interface
March 07, 2014 @ 11:25:09

Matthew Setter has a new post today on the "Master Zend Framework" site looking at the use of caching for Zend Framework 2 module configurations.

For the longest time, I've been using closures in my Zend Framework 2 Modules Module class. I know they're not always the best approach, but they're not necessarily wrong either. But after reviewing Gary Hockin's recent talk at PHP Conference UK, I was reminded that outside of APC and OPCache, closures aren't cacheable. [...] So in today's tutorial, I'm going to show you a simple example of how to migrate from closures using [caching with Memcached, Redis and so on].

He starts with an example of the standard closure approach, returning an array from his "getServiceConfig" method with sub-array and object creation nested inside. He then refactors it to use the "FactoryInterface" to handle the configuration setup for the "delete form" handling.

0 comments voice your opinion now!
module configuration cache zendframework2

Link: http://www.masterzendframework.com/tutorial/zf2-factory-interface-closure-migration

VG Tech:
Swagger Docs in ZF2 with Examples - Part 2 Swagger UI
March 06, 2014 @ 09:52:25

On the VG Tech blog, they've posted a follow-up to their previous post about using the Zend Framework 2 to generate Swagger documentation for an API. In this new post (part 2) they focus more on Swagger UI.

This blog post on Swagger UI is a follow-up on my recent post on Swagger annotation parsing in ZF2. If you're not already set up with Swagger annotation parsing in you ZF2 app I recommend that you read part 1 first. In the last post we got ZF2 set up with annotation parsing and everything, and the only thing missing was Swagger UI for the neat presentation. I skipped that previously but today we'll add the last piece.

This second part of the series uses a custom package to create a "SwaggerUI" module. There's a few file updates that need to be made to the configuration, but the rest is handled for you. In the end, the result will look something like this, showing endpoints and allow you to interact with the API directly through forms and sample calls.

0 comments voice your opinion now!
swagger swaggerui tutorial series part2 package module

Link: http://tech.vg.no/2014/03/06/swagger-docs-in-zf2-with-examples-part-2-swagger-ui-2/

Kevin Schroeder:
Creating a module in Magento 2
December 12, 2013 @ 09:15:40

Kevin Schroeder has posted a step-by-step guide to his site today about creating a module for Magento in the first of a series of posts about Magento.

I believe that one of the best ways to learn something is to write out what it is you are learning. This forces you to think through the concepts and determine how to explain them to others. In doing so you are forced to use terms that are familiar to describe this new thing. This helps to solidify the concepts in your own mind, making it easier to remember. But still, there are three caveats: Magento 2 is not out yet, I'm learning as I write and what I share is what I see (my interpretation).

He talks about some of the differences between Magento 1 and 2 including:

  • The lack of code pools
  • Discovery XML files are in a different location
  • A different parser for these XML files

With all of this configuration and location information covered, he gets into the actual module building. He makes a simple "Hello World" module with a module.xml, event.xml and an Observer that handles sending the text back to the waiting application.

0 comments voice your opinion now!
tutorial module magento2 module event observer

Link: http://www.eschrade.com/page/creating-a-module-in-magento-2/

Migrating to ZF2:
Integrating Composer and DoctrineORMModule
November 14, 2013 @ 12:23:52

Zend Framework v2 has been out for a good while now, but there's still applications out there running on the v1 of the popular framework. Since there was such a fundamental change in structure and functionality between v1 and v2, simply upgrading isn't possible - you have to migrate. Fortunately, there's guides like this one from Chris Strosser that shows you how to get there gradually.

Due to the vast nuances of Zend Framework 2, migrating an application from Zend Framework 1 can be very tedious. To make this process a little less painful, there is a way to slowly implement modules from ZF2 without making the application unusable. The methodology illustrated, which implements DoctrineModule and DoctrineORMModule into a Zend Framework 1 project, can be applied to a variety of ZF2 modules, making it an invaluable technique in the migration process.

Using these two ZF1 modules, they show how to integrate them into a typical ZF2 structure. There's a few steps in the process:

  • Add init_autoloader.php to application root directory
  • Update ZF1′s index.php for Composer compatibility
  • Setup ZF2 configuration files
  • Setup ZF2 "Application" module
  • Relocate existing entities and repositories to ZF2
  • Make ZendMvcApplication available in ZF1

It's not an overly complex process, it just requires the right configuration settings and component placement to get the ZF1 module to cooperate in the world of ZF2.

0 comments voice your opinion now!
zendframework1 zendframework2 module migrate gradual composer

Link: http://webjawns.com/2013/11/migrating-to-zf2-integrating-composer-and-doctrineormmodule/

PHPMaster.com:
PhalconPHP Yet Another PHP Framework?
July 30, 2013 @ 09:31:46

On PHPMaster.com there's a new tutorial talking about Phalcon, yet another PHP framework to add to the now long list. There's something different about this one, though. Phalcon sets itself apart by having its base code be inside an installable PHP module.

There's a wide offering of PHP frameworks, from full-stack frameworks containing ORMs, validation components, and loads of HTML helpers, to micro frameworks which go little beyond offering routing functionality. They all claim to be special, either with beautiful syntax, high speed, or good documentation. One of those frameworks is Phalcon. But Phalcon really is quite different compared to the other frameworks; it isn't just another package that you download, rather it's a PHP module written in C. In this article we'll take a brief look at what Phalcon looks like and what makes it so special.

They introduce the framework a bit and include some basic benchmarks (requests per second and time per request) showing the major advantage being a native module has for Phalcon. He then gets into the usage of it - setting up mod_rewrite, creating the project structure and creating the MVC scripts. There's also a brief mention of the Phalcon query language that can be used to interact with the database.

0 comments voice your opinion now!
phalcon framework module compile benchmark performance

Link: http://phpmaster.com/phalconphp-yet-another-php-framework

Erika Heidi:
A beginners guide to Vagrant and Puppet, part 3 - facts, conditionals and modules
July 12, 2013 @ 12:14:06

Erika Heidi has posted the third part of her beginners guide to working with Puppet/Vagrant for development environments. In this latest post, she focuses on facts, conditionals and modules.

Finishing this guide to Vagrant and Puppet, I would like to show some advanced puppet resources. As I said before, Puppet is really powerful and extensive - I'm covering just the main concepts so you can have a good start point for creating your vagrant boxes.

She talks about the concepts behind facts first, pointing out that they're similar to variables, except that they're pre-defined. Conditionals let you do some basic logic and modules make it simpler to split up the functional pieces of the Puppet configuration into reusable chunks. She includes some code examples for these and how to set up your directory structure so you can create and use modules.

0 comments voice your opinion now!
vagrant puppet introduction facts conditional module series

Link: http://www.erikaheidi.com/2013/07/10/a-beginners-guide-to-vagrant-and-puppet-part-3-facts-conditionals-modules-and-templates

MaltBlue.com:
Using ZFTool for Basic Project Management
June 17, 2013 @ 11:18:42

Matthew Setter has posted a new tutorial about using the ZFTool functionality of Zend Framework v2 for managing your project's settings and configuration.

Welcome to another tutorial. Today, I will be giving you a walk through of zftool, which provides basic tooling support in Zend Framework 2. If you're new to Zend Framework, or have been reading the introductory series here, it can come in quite handy. But unlike other frameworks, such as Yii (through yiic) and Symfony (via the Command Line tool), the tooling support in Zend Framework 2 is rather light on. These respective tools provide rather robust support for automatically generating models from database connections, checking logs and a host of other much required functionality.

He shows you how to do a few things with the ZFTool - create a new project, make some modules inside it, build an autoloader classmap and check the installation with some basic diagnostics. Command examples and configuration samples are included in the post to help you along.

0 comments voice your opinion now!
zftool zendframework2 tutorial introduction project module diagnostic

Link: http://www.maltblue.com/tutorial/zftool-for-basic-project-management

PHPMaster.com:
Openbiz Cubi A Robust PHP Application Framework, Part 2
May 22, 2013 @ 10:27:16

PHPMaster.com has posted the second part of their look at the Openbiz Cubi framework (part one here), this time focusing on the code - mostly XML - that you'll need to create your own custom module.

In the first part of this series we talked about the development challenges we face and how Openbiz Cubi can help by providing a solid, ready-to-use web application framework. In this part we'll see how to build our own module and dive a bit deeper into the core architecture of the framework.

They include the SQL you'll need to run to create a new table for the "Customer" module they're going to help you build. With that in place, they walk you through the command to execute to make the module skeleton, the locations of the XML files to work with and the contents of each. Included in the module are things like a data object, a module description file and the form object. He finishes up the post with a look at the overall flow of the Cubi execution so you know where each piece falls.

0 comments voice your opinion now!
openbiz cubi tutorial series part2 application framework module custom

Link: http://phpmaster.com/openbiz-cubi-a-robust-php-application-framework-2


Community Events





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


developer tips podcast conference laravel library community zendserver framework deployment introduction api release symfony bugfix series interview list voicesoftheelephpant language

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