News Feed
Jobs 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:
First Phing Plugin
March 25, 2013 @ 10:49:23

In the latest post to her site, Lorna Mitchell walks you through the creation of a first Phing plugin, an extension to the popular PHP-based build tool.

I'm a huge fan of Phing and use it regularly for build and deployment tasks. Often, I'll ask about a plugin that I wish existed, and get a very courteous "patches welcome" from the nice people in the #phing channel on freenode. This has happened a few times, so I thought I should probably look at how to make a new phing plugin, this article shows you how to make the simplest thing I could think of: a simple "hello world" plugin.

She points you to the location to grab the latest version of the tool (the github repository) and how to define a configuration file for your test runs. Then she includes the sample code showing how to create the "HelloTask" plugin. It takes an input value of "name" and displays a greeting when executed. She shows the syntax for defining this in the XML build file and the sample result when executed.

0 comments voice your opinion now!
phing plugin install build configuration xml helloworld task


NetTuts.com:
Pro Workflow in Laravel and Sublime Text
March 15, 2013 @ 09:48:39

NetTuts.com has a new article today for the Laravel developers out there (an up and coming PHP framework) with some handy Sublime Text tips you can use to streamline your workflow.

Not too long ago, I built a handful of generators for Laravel, which ease the process of various tasks. Today, thanks to help from Gaurav Narula, we're turning things up a notch with the release of a new Sublime Text plugin that leverages the power of Artisan and the generators from directly within your editor.

They help you get it installed and running and show (via a screencast) the steps to use it when working in your code. Their examples show the creation of resources (all MVC aspects and configurations), working with Artisan commands, migrations and other bits of code.

0 comments voice your opinion now!
laravel sublimetext editor package generator plugin


Chris Jones:
Quick Debugging of PHP Scripts in Emacs with Geben and Xdebug
January 24, 2013 @ 11:19:47

Chris Jones has a new post showing how you can use Emacs and Xdebug for debugging with the help of the geben plugin.

When you want to test a PHP code snippet quickly, it's handy to do it within your day-to-day environment. For me, this environment is Emacs. The geben package for Emacs provides an interface to the DBGp protocol, such as used by Derick Rethans's standard Xdebug extension for PHP. With the combination of geben and Xdebug, I can quickly and efficiently step through execution of local files, examining code flow and data values.

He includes a ten step process (step 11 is basically "use it") that walks you through the installation of the full stack - PHP, Xdebug and geben - and the configuration changes you'll need to make to get them all working together. Some basic usage instructions are included, but if you want more details on using geben, check out the project's site.

0 comments voice your opinion now!
emacs xdebug tutorial install debug engen plugin


Miro Svrtan:
Debugging Uploadify jQuery plugin with XDebug
August 30, 2012 @ 10:50:01

Miro Svrtan has a quick tip for those using the Uploadify plugin in their application's file uploads - how to enable XDebug debugging on each upload request.

If you ever decided to use Uploadify jQuery plug-in you might have noticed problems with debugging remote PHP code that this plugin relies on. [...] Unfortunately setting this up will not work with Uploadify Flash version since calls to remote server side is not done inside browser but inside flash plugin. [...] Few months ago I found my self blindly debugging it again and remembered that I read somewhere that xdebug parameters can be sent via GET/POST too.

He takes advantage of this fact and appends the "XDEBUG_SESSION_START" and "XDEBUG_SESSION" values in the "scriptData" handler for the Uploadify call. The XDebug session is then started when the script executes and your IDE will receive the results.

0 comments voice your opinion now!
debug uploadify jquery plugin xdebug scriptdata tutorial


MaltBlue.com:
How To Build an Extendible Zend Framework Application
August 16, 2012 @ 12:02:48

On the MaltBlue.com site today there's a new tutorial posted giving you some recommended practices on building an extendible application with the Zend Framework.

Whether you have a big or small budget are time rich or poor, there's always the pressure to build applications with the future in mind. [...] So amongst the multitude of other advice you'll receive throughout your life, building applications that are readily extensible and extendable - in a simple, clean and cost-efficient manner - is essential to keeping input as low as possible, whilst maximising output, and accompanying client satisfaction (or boss satisfaction if you're full-time employed).

He focuses on one aspect of Zend Framework that he's found that helps out the most in keeping his development flexible, resource plugins. These plugins (through use of the Strategy design pattern) can add immediate functionality to your application and be dropped in as needed. He shows how with a simple plugin that allows for simpler file handling for user uploads. The code for the various parts - interface, factory, plugin and resource - are all included.

0 comments voice your opinion now!
zendframework extendible tutorial resource plugin


Zumba Fitness Engineering:
Using Application Events to Hook in Plugins
August 09, 2012 @ 09:23:37

In this recent post on the Zubma Fitness Engineering site, Chris Saylor looks at using events in your applications to hook in plugins to easily (and dynamically) enhance functionality.

In many instances, having a plugin system (even for closed-source applications) is a convenient and safe approach to adding functionality to a product. It minimizes risk by not having to modify the core of the source. In this article, I'll be discussing how we implemented a plugin system for our cart software to allow for plugins.

Its implemented a bit like the Observer design pattern - you "register" the listening event which can then be activated by a "trigger" method with the event's name. These events are stored in a registry (static) so they can be accessed across the application.

0 comments voice your opinion now!
events plugin trigger register tutorial observer


MaltBlue.com:
Why Zend Framework Plugins Save You Time
July 05, 2012 @ 11:44:41

On the MaltBlue.com blog today there's a new post talking about Zend Framework plugins and how they can help save you time in the long run, giving you more time and flexibility to create the applications you want.

During the recent development of the new PHP cloud development casts site, which has been developed with the Zend Framework, so much development time has been saved by using one of the simplest and arguably best features of the framework: Controller Plugins. So today I want to introduce you to them and walk you through a working plugin so you can see just how effective and efficient they can make your development workflow.

He starts with a look at the events that fire in the process of plugin execution (including "routeStartup" and "preDispatch") and as well as some common uses like inserting code at the end of a request automatically or redirecting a user if they're not logged in. Included in the post is a simple code example showing the setup of a simple plugin that redirects the user to the "/index/index" path if they're not already there.

0 comments voice your opinion now!
zendframework plugin tutorial events


PHPMaster.com:
In My Language, Please! - Translating WordPress Themes and Plugins
April 23, 2012 @ 12:27:36

On PHPMaster.com there's a new tutorial showing how to use the localization support that comes with WordPress to make using different language definitions much simpler.

WordPress itself is translated to many languages and people can use it in their preferred language. But this is not the case with themes, plugins, and other front-end customizations. [...] The purpose of this article is to show you how to translate properly any theme or plugin by using internationalization and localization methods. In brief, internationalization (i18n) deals with making sure strings of text are wrapped in specific function calls.

He starts by introducing the PHP functions (and configuration) you'll need to get the localization support up and running in your plugin, including a few examples of how to translate a string. Also included into the post is an introduction to using the Poedit software to create the different translation files.

0 comments voice your opinion now!
wordpress translate poedit plugin tutorial


Anthony Ferrara's Blog:
Handling Plugins In PHP
March 09, 2012 @ 13:34:38

Anthony Ferrara has a new post today looking at plugin handling and a few of the more common design patterns that can be used to implement them in your applications.

A common problem that developers face when building applications is how to allow the application to be "plug-able" at runtime. Meaning, to allow non-core code to modify the way an application is processed at runtime. There are a lot of different ways that this can be done, and lots of examples of it in real life. Over a year ago, I wrote a StackOverflow Answer on this topic. However, I think it deserves another look. So let's look at some patterns and common implementations.

The patterns he covers are:

  • Observer
  • Mediator
  • Strategy
  • Decorator
  • Chain of Responsibility

For each there's both a bit of sample code showing it in use and links to some examples from various frameworks and other projects.

0 comments voice your opinion now!
plugin designpattern observer mediator strategy decorator chainofresponsibility


Smashing Magazine:
Writing Unit Tests For WordPress Plugins
March 09, 2012 @ 10:46:32

On the Smashing Magazine site there's a recent post looking at how to unit test WordPress plugins via the frontend using QUnit (part of the jQuery project).

My first goal for the WordPress Editorial Calendar was to make it do anything useful. I was new to JavaScript and PHP and didn't really know what I could pull off. In a few days I had a proof of concept. In a few more I had a working version and was asking friends to install it. The calendar worked...sort of. I spent three times as much time fixing bugs as I did coding. Once the plugin worked, I wrote unit tests to make sure it kept working.

He introduces the QUnit testing tool and includes some sample tests showing you how to create both a pass/fail and how to test a PHP value passed out to the page via PHP. There's also a section on getting WordPress and QUnit integrated and only executing when there's a "qunit" parameter on the URL. Actual tests for his calendar plugin are included and you can see the results of the tests here.

0 comments voice your opinion now!
wordpress plugin unittest javascript jquery qunit



Community Events











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


performance unittest podcast install hack composer hhvm example application symfony2 introduction database security framework component release language package facebook project

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