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

Alejandro Celaya:
Working with sub-namespaced modules in Zend Framework 2 the right way
Aug 20, 2015 @ 15:56:26

Alejandro Celaya has a post showing how he recommends working with sub-namespaced modules in a Zend Framework 2 application. It's based on a previous series of articles on the same topic but improves the methods for handling.

The solution provided in those articles was functional, but it introduced some new problems to deal with. It happens that after some time working with sub-namespaced modules I have found the best way to solve those new problems, and I wanted to write this new article explaining it.

He starts with the two main problems with the use of sub-namespaced modules: the autoloading of the module's files and how it resolves the locations of view scripts. Fortunately, the solution to both issues turns out to be "really easy". Composer's autoloading means that just changing the directory structure helps there and and update to the controller_map value helps with locating view files.

tagged: subnamespaced modules zendframework2 autoload view script location

Link: http://blog.alejandrocelaya.com/2015/08/14/working-with-sub-namespaced-modules-in-zend-framework-2-the-right-way/

MaltBlue.com:
Use Zend Framework Modules and Save Development Time
Dec 23, 2013 @ 18:09:26

On his MaltBlue blog Matthew Setter has a new post looking at using Zend Framework modules to save time and make for more reusable, flexible code.

One of the standout concepts in Zend Framework 2 is that it's based on modules. Just about everything is one, and by designing it that way, it's overcome one of the key failings of Zend Framework 1. In version 1, if you're familiar with it, to reuse code across multiple projects wasn't easy - it wasn't easy at all. There was the inevitable problem of running into code duplication and too high a level of coupling. In version 2 - that's history!

In a previous article he looked at how these modules work, but in this latest one he digs in and gets into an actual example you can poke around in. He shows you how to install his sample Google Analytics module and get it set up in your ZF-based project. It drops in the Google Analytics Javascript tracking code at the bottom of the site, using the ID you provided during configuration.

tagged: zendframework2 modules googleanalytics

Link: http://www.maltblue.com/tutorial/intermediate/use-zend-framework-modules-save-development-time

PHPMaster.com:
Openbiz Cubi: A Robust PHP Application Framework, Part 1
May 17, 2013 @ 15:36:20

On PHPMaster.com today they've posted the first part of a series spotlighting Openbiz Cubi, a PHP "framework" with a business focus.

Openbiz Cubi is a robust PHP application framework giving developers the ability to create business applications with minimal effort. In this two-part series I’ll explain the concepts and steps necessary to create your own business web applications with Cubi. We’ll look first at the challenges web developers face and how Openbiz Cubi can help, and then how to install Cubi. In part 2 we’ll see how to create our own modules.

They start off by describing the tool and some of the features that come with it (including user management and the XML data object structure). Complete installation instructions are included and a screenshot is included of the end result. They include a "quick tour" of Cubi's features and some of the modules that come with it like the System, Menu and User modules. In part two of the series, they'll show you how to create a custom module.

tagged: openbiz cubi framework application modules user role

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

PHPMaster.com:
Getting Started with Fuel CMS, Part 2
Dec 20, 2012 @ 17:07:08

PHPMaster.com has published the second article in their working with Fuel CMS series (part one here). This time he focuses on working with modules and creating self-contained blocks of reusable functionality.

In the previous article you learned about the basics of Fuel CMS: how to create views and simple pages. Most websites these days are not that simple though, they have a blog, a gallery, etc. In this part, I’ll explain how Fuel CMS modules work and create a basic guestbook module to demonstrate.

He starts off by introducing the concept of a "module" and what kind of functionality that represents in the Fuel CMS ecosystem. Then he gets into the actual code, showing you how to create a model that connects to a "guestbook_comments" table and a controller to handle a request to "view" and "add" (save) them.

tagged: fuelcms tutorial introduction series contentmanagement cms modules

Link:

Matthew Weier O'Phinney:
ZF2 Modules Quickstart (Screencast)
Sep 20, 2012 @ 14:44:03

Matthew Weier O'Phinney has put together a screencast showing you how to get up and running (a quickstart) with the latest release of Zend Framework 2.

One of the exciting features of the newly released Zend Framework 2 is the new module system. While ZF1 had modules, they were difficult to manage. [...] In Zend Framework 2, we've architected the MVC from the ground up to make modular applications as easy as possible. [...] To give you an example, in this tutorial, I'll show you how to install the Zend Framework 2 skeleton application, and we'll then install a module and see how easy it is to add it to the application and then configure it.

The screencast (also viewable over on Vimeo) talks you through all the steps in the process, but the code is also provided in the post along with screenshots of how the application should look at various steps.

tagged: screencast tutorial zendframework2 modules quickstart introduction

Link:

Robert Basic:
Unit testing Zend Framework 2 modules
Sep 17, 2012 @ 16:22:33

Robert Basic has a new post showing you how to create unit tests for modules in your Zend Framework 2 applications. His example includes how to set up PHPUnit and how to write a few sample tests.

Porting this blog to Zend Framework 2, I decided to write some unit tests as well, while I'm at it. Not that the current code base doesn't have unit tests, just it doesn't have much of it... Anyway, I'd like to show how to get unit tests for modules up and running, as well how to throw in Mockery in the mix, as it can help us greatly with mocking out objects.

He includes the sample "phpunit.xml" configuration file contents, a "bootstrap.php" file to correctly initialize all the resources you'll need (including Mockery) and two kinds of tests - one on the service layer and another on the database layer.

tagged: zendframework2 modules unittest phpunit tutorial

Link:

Matthew Weier O'Phinney's Blog:
Why Modules?
May 01, 2012 @ 13:04:20

Matthew Weier O'Phinnney has a new post to his blog filling in some additional details behind a series he's been doing on modules in the Zend Framework v2 releases. In this new post he answers the question "why modules?"

I've blogged about getting started with ZF2 modules, as well as about ZF2 modules you can already use. But after fielding some questions recently, I realized I should talk about why modules are important for the ZF2 ecosystem.

He covers some of the history of the idea, starting with the MVC rework/refactor of the framework and the desire from several people to have self-contained components that could be native to a ZF app. ZFv1 made it work (kinda) with Zend_Application, but it was difficult so solving this became a main focus of ZFv2. He illustrates with a "building block" metaphor based on his current blog site (currently being refactored too).

This kind of building-block development makes your job easier as a developer - and allows you to focus on the bits and pieces that make your site unique. As such, I truly feel that modules are the most important new feature of ZF2.
tagged: zendframework2 modules building block focus

Link:

Smashing Magazine:
Drupal Developer’s Toolbox
Sep 25, 2008 @ 14:33:26

Smashing Magazine has put together a new post that provides a "Drupal Developers Toolbox" with links to resources all over the web.

After publishing the recent WordPress Developer's Toolbox, there were several Drupal developers calling out for equal coverage. In this post you will find a thorough collection of all kinds of resources that will aid designers and developers working with Drupal-powered websites. This collection is intended to simplify your tasks and save you time when working with Drupal.

They've broken it out into some of the basic components you might need, modules, a few sites offering some design inspiration, themes, tutorials and more.

tagged: drupal developer toolbox modules components themes

Link:

php|architect:
March 2007 Issue Released
Mar 26, 2007 @ 21:17:00

The latest issue of php|architect magazine has been released today - the March 2007 edition. Articles in this month's issue include:

  • A look at Pluggable Authentication Modules by Mikael Johansson
  • Jonathan Stark's review of FileMaker for PHP Developers: Part 2
  • a look at the Active Record pattern in PHP from Dirk Merkel
  • and the two usual columns from Ilia Alshanetsky (Security Corner) and Jeff Moore (Test Pattern).
Check out the details on these and the rest of the great articles in the issue here where you can also buy either just a copy of this issue or subscribe and get a full year of PHP goodness from php|architect.

tagged: phparchitect magazine release pluggable authentication modules filemaker phparchitect magazine release pluggable authentication modules filemaker

Link:

php|architect:
March 2007 Issue Released
Mar 26, 2007 @ 21:17:00

The latest issue of php|architect magazine has been released today - the March 2007 edition. Articles in this month's issue include:

  • A look at Pluggable Authentication Modules by Mikael Johansson
  • Jonathan Stark's review of FileMaker for PHP Developers: Part 2
  • a look at the Active Record pattern in PHP from Dirk Merkel
  • and the two usual columns from Ilia Alshanetsky (Security Corner) and Jeff Moore (Test Pattern).
Check out the details on these and the rest of the great articles in the issue here where you can also buy either just a copy of this issue or subscribe and get a full year of PHP goodness from php|architect.

tagged: phparchitect magazine release pluggable authentication modules filemaker phparchitect magazine release pluggable authentication modules filemaker

Link:


Trending Topics: