 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Stuart Herbert's Blog: PHPUnit Plugin For Sublime Text 2
by Chris Cornutt February 06, 2012 @ 10:05:11
Stuart Herbert has officially released a plugin for the popular text editor Sublime Text 2 to integrate PHPUnit support directly into the editing environment.
Sublime Text 2 is a new cross-platform text editor that I've recently switched to. It's still in public beta, but already offers better performance (and battery life!) and a better look (fonts that render properly!) than Java-based IDEs such as Netbeans. One thing it didn't have was support for PHPUnit, so I've made a plugin. It's available to install via Package Control.
The plugin allows you to directly create tests for a class using a context menu's "Test This Class" option. You can also run the tests directly from the editor and use either the menu or direct text commands to control it. He's also gathering some other well-used PHP snippets into another related plugin, the Additional PHP Snippets plugin.
voice your opinion now!
sublimetext2 editor phpunit plugin additional snippets
Sankuru Blog: A pluggable compiler and virtual machine in PHP
by Chris Cornutt January 10, 2012 @ 11:53:15
On the Sankuru blog today the next post in the series about creating a compiler in PHP has been posted. In this latest tutorial he shows how to set up a plugin architecture for the compiler that allows you to quickly and easily extend it beyond its base functionality.
A plugin architecture allows multiple developers to work on the same application and let yet another person assemble their work later on. It allows the plugin developer to understand just his plugin API without having to understand all the details of the entire application.
He describes a few platforms that already have the concept of plugins including Joomla, Mediawiki and SugarCRM. He explains what a plugin architecture should be and what it shouldn't be. All of this is his first steps towards building a plugin-enabled compiler and virtual machine in PHP.
voice your opinion now!
compiler virtualmachine plugin architecture tutorial
Richard McIntyre's Blog: Using OAuth in Lithium
by Chris Cornutt December 30, 2011 @ 13:11:34
Richard McIntyre has a new post to his blog showing how he set up OAuth support in a Lithium-based application with the help of a handy plugin (li3_oath).
The OAuth protocol is a fantastic way to login to remote services and websites. Unfortunately the spec is different in OAuth 1.0 and the yet un-solidified 2.0, the implementation is also different across different services. At the moment this is a bit of a goose chase, but libraries like li3_oauth can help! [...] I like to be in control and calling the shots! I also want to have users have the option to login to other services under the same umbrella. Working directly with OAuth is what I wanted to do. Of course I was doing this in Lithium because it is clearly the best PHP Framework!
His process is broken up into four steps:
- Grab the latest version of the li3_oauth plugin
- Fork and refactor the plugin
- Create the Tweet and Facebook controllers
- Refactor a bit more to turn it into a service
The code changes are pretty minimal and are included in the post.
voice your opinion now!
lithium framework oauth tutorial refactor plugin
Karsten Deubert's Blog: Zend_MVC, Controller Plugins and Annotations
by Chris Cornutt November 28, 2011 @ 12:02:50
Karsten Deubert has a recent post to his blog looking at annotations in Zend Framework applications to enhance functionality already in the framework.
Recently I had the idea to influence Controller Actions with annotations but discarded it with thoughts like "In PHP I will have to use reflection and some black magic to get this working which will have insane performance hits for my applications"... until I set everything up to see that it costs just 1-2ms in average per request without any form of caching.
He includes a few bits of code to show a simple annotation example (setting a layout) and the controller plugin that performs the translation. In his case, it's hard-coded to look for the "@layout" annotation in the docblock comment, but it'd be relatively trivial to extend it to a more full-featured version.
voice your opinion now!
zendframework mvc controller annotations docblock comment plugin
Learncomputer.com: PHP Profilers Compared (PHP Quick Profiler & XDebug)
by Chris Cornutt November 14, 2011 @ 11:53:31
In a recent post from Learncomputer.com, there's a comparison of two PHP profilers - the PHP Quick Profiler and the one included in Xdebug.
Whether you are an experienced developer or just getting started it is important to know how to measure the performance of your scripts and applications so that you can learn to make improvements and optimizations to your code. [...] This article compares two of the most popular [profiling] solutions under free license that you can begin using today to profile your PHP applications.
They describe each of the tools - the Quick PHP Profiler acting more like a plugin (running on each page load) and Xdebug working more behind the scenes and providing cachegrind files. These files can be viewed in cachegrind tools to drill in to the badly performing aspects of your applications and find the issues.
If you need a free tool it can be difficult to find a PHP profiling tool that has all of the features you may want and the interface that you like all rolled into one. Identifying what kind of data you are looking for and what information you need from a profiling tool will allow you to choose the best solution for your needs.
voice your opinion now!
phpquickprofiler xdebug profile performance cachegrind plugin
Johannes Schlüter's Blog: MySQL Query Analyzer and PHP
by Chris Cornutt September 30, 2011 @ 12:56:54
Johannes Schlüter has a new post to his blog today mentioning the beta release of the mysqlnd_ms plugin (previously mentioned by Ulf Wendel and a new feature that can be plugged into the MySQL Enterprise Monitor to make the Query Analyzer directly use PHP instead.
When running a PHP-based application with MySQL it is often quite interesting to see what actually happens on the database sever. Besides monitoring of the system load etc. it is often interesting to see what queries are actually executed and which of them are expensive. A part of MySQL Enterprise Monitor is the MySQL Query Analyzer which helps answering these questions.
This was handled via a proxy that sat between the database and app server and ran through the queries looking for improvements. This new plugin keeps it closer to PHP itself without having to hit against the proxy. You can see the result in these two screenshots from inside the Manager application. You also have the side benefit of getting a stack trace of it running through the app to help you identify the spots most needing improvement in the code too.
voice your opinion now!
mysql query analyze mysqlndms plugin enterprise monitor
Johannes Schluter's Blog: mysqlnd plugins and json
by Chris Cornutt September 14, 2011 @ 11:04:48
Johannes Schluter has shared a handy mysqlnd plugin that he's written up that does two common things at once when you're pulling data from your database and pushing it into JSON - a mysqlnd_query_to_json function.
In my spare time I'm currently writing a shiny Web 2.0 application where I'm heavily using AJAX-like things, so what I do quite often in this application is, basically this: Check some pre-conditions (permissions etc.) then select some data from the database, do a fetch_all to get the complete result set as an array and run it through json_encode; Of course that example is simplified as I'm using the Symfony 2 framework for this project. [...] So I wrote a mysqlnd plugin.
His plugin (that he admits is "a hack") gives you the mysqlnd_query_to_json function that automagically transforms the results from the passed in query into JSON output. He notes some things lacking - like Unicode encoding and no MySQL bitfield support.
voice your opinion now!
mysqlnd json plugin convert result
Tutorialzine.com: AJAX-enabled Sticky Notes With PHP & jQuery
by Chris Cornutt August 31, 2011 @ 10:16:35
On the Tutorialzine.com site there's an interesting (though a bit older) tutorial showing you how to combine jQuery, PHP and some CSS+HTML to make a simple sticky note application complete with multiple note support and drag-and-drop abilities.
Today we are making an AJAX-enabled Sticky Note management system. It will give visitors the ability to create notes with a live preview, and move them around on the screen. Every movement is going to be sent to the back-end via AJAX and saved in the database.
They use the fancybox plugin for jQuery to make creating the notes a lot simpler. Included in the tutorial is all of the HTML, CSS, javascript and PHP you'll need to create the application (as well as plenty of description along the way). You can see a demo of it in action here or just download the source and dive right in.
voice your opinion now!
tutorial ajax sticky note jquery fancybox plugin
|
Community Events
Don't see your event here? Let us know!
|