Andrew Trice wrote; I am asked all the time “How do I get started developing PhoneGap applications?”. My normal answer is to advise people to check out the PhoneGap Getting Started Guides, which provide a great starting point for every platform. However after further thought, I’m not sure this is always what people are asking. Rather than “how do I get started?”, I think people are often looking for insight into the workflow for developing PhoneGap applications. Everything from tools to developer flow, to getting the app on devices. The Getting Started Guides are essential for setting up the initial project structure, but once you get that setup, you might be wondering “what do I do next?”. In this post, I’ll try to shed some light on the workflow and tools that I use when developing PhoneGap applications.
via ANDREW TRICE.
Dec 12
20
Well we’ve tagged Apache Cordova 2.3.0 release candidate 2 which means that Cordova 2.3.0 will be out soon in source release form which will be followed quickly by the binary PhoneGap 2.3.0 release. Shaz wrote up a post on what’s new in iOS so I followed suit to do this one for Android. So without further ado here’s what you should expect on Android:
via Simon Mac Donald.
I was a bit surprised when three people asked me how to do this in one day. I figured if there was enough interest in it then maybe it deserved a post of it’s own. Basically you want to know the primary phone number of the device your app is running on. In order to do that in PhoneGap you will need to write a plugin to access the TelephonyManager service on Android.
As always the code for this plugin is is GitHub at myTelephoneNumberPlugin repo. If you’d rather have a more detailed walk through please read on.
First up let’s code our JavaScript interface which we will use to get the telephone number. We’ll setup a new interface at“cordova/plugin/telephonenumber” to avoid name collisions. Then the rest is fairly boiler plate code where we declare and error object that we won’t even use and finally provide a get method. When you call the get method you should provide a success callback. The success callback will be invoked with a string that will contain the devices phone number. If something goes wrong the failure callback will be invoked.
Full source at Simon Mac Donald
Sep 12
20
Rob Allen writes; If you need different layout scripts to be rendered for different modules in Zend Framework 2, then Evan Coury has made this extremely easy. His new module EdpModuleLayouts is just the ticket!
Once installed, you simply have to add a new array to a config file in the config/autoload folder with the following in it:
1 2 3 4 5 6 | array( 'module_layouts' => array( 'Application' => 'layout/application', 'ZfcUser' => 'layout/user', ), ); |
i.e. you provide a list of the module name against the layout script to use.
What could be easier?
via Rob Allen’s DevNotes.
The Zend Framework community is pleased to announce the immediate availability of Zend Framework 2.0.0 STABLE! Packages and installation instructions are available at:http://framework.zend.com/downloads/latest
via Zend Framework 2.0.0 STABLE Released! — Zend Framework — Zend Framework.
Jul 12
4
Found this little Gem today by Daniel dot L dot Wood at Gmail dot Com;
People often ask about scalar/basic typehints. Here is a drop in class that I use in my MVC framework that will enable typehints through the use of a custom error handler.
Note: You should include this code above all other code in your include headers and if you are the using set_error_handler() function you should be aware that this uses it as well. You may need to chain your set_error_handlers()
Why?
1) Because people are sick of using the is_* functions to validate parameters.
2) Reduction of redundant coding for defensive coders.
3) Functions/Methods are self defining/documenting as to required input.
Also..
Follow the discussion for typehints in PHP 6.0 on the PHP Internals boards.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | <?php define('TYPEHINT_PCRE' ,'/^Argument (\d)+ passed to (?:(\w+)::)?(\w+)\(\) must be an instance of (\w+), (\w+) given/'); class Typehint { private static $Typehints = array( 'boolean' => 'is_bool', 'integer' => 'is_int', 'float' => 'is_float', 'string' => 'is_string', 'resrouce' => 'is_resource' ); private function __Constrct() {} public static function initializeHandler() { set_error_handler('Typehint::handleTypehint'); return TRUE; } private static function getTypehintedArgument($ThBackTrace, $ThFunction, $ThArgIndex, &$ThArgValue) { foreach ($ThBackTrace as $ThTrace) { // Match the function; Note we could do more defensive error checking. if (isset($ThTrace['function']) && $ThTrace['function'] == $ThFunction) { $ThArgValue = $ThTrace['args'][$ThArgIndex - 1]; return TRUE; } } return FALSE; } public static function handleTypehint($ErrLevel, $ErrMessage) { if ($ErrLevel == E_RECOVERABLE_ERROR) { if (preg_match(TYPEHINT_PCRE, $ErrMessage, $ErrMatches)) { list($ErrMatch, $ThArgIndex, $ThClass, $ThFunction, $ThHint, $ThType) = $ErrMatches; if (isset(self::$Typehints[$ThHint])) { $ThBacktrace = debug_backtrace(); $ThArgValue = NULL; if (self::getTypehintedArgument($ThBacktrace, $ThFunction, $ThArgIndex, $ThArgValue)) { if (call_user_func(self::$Typehints[$ThHint], $ThArgValue)) { return TRUE; } } } } } return FALSE; } } Typehint::initializeHandler(); ?> |
An are some examples of the class in use:
1 2 3 4 5 6 7 8 9 | <?php function teststring(string $string) { echo $string; } function testinteger(integer $integer) { echo $integer; } function testfloat(float $float) { echo $float; } // This will work for class methods as well. ?> |
You get the picture..
via PHP: Type Hinting — Manual.
Gary Hockin writes; After speaking to a prospective employer in a job interview, I was interested to try out the Zend\Mvc\Controller\RestfulController. With Zend_Json_Server in ZF1 having, shall we say, a less than sterling reputation, it was very interesting for me to see how the strategy has been implemented in ZF2.
The starting point for this is simply a completely fresh clone of the ZF2 Skeleton Application. The aim is to simply allow the pre-created index controller to function as a Restful interface.
Apr 12
18

When we started working on the next release of Ext Designer, we had very ambitious goals: we wanted to build a great visual tool to help you build web applications faster that didn’t get in the way. We wanted to make the development process more inclusive by lowering the barrier to collaborate, allowing UX designers to work effectively in the same environment that you use.
We wanted you to be able to create complete applications – not just the UI. We wanted a tool that would let you build an application quickly out of standard components, but also allow you to easily customize those components with your own code, right from within the tool.
What we created is no longer just a rapid interface designer, but a complete application builder, a place where the architecture and the interface of an application can be created and properly structured for development.
For this reason, the name “Designer” no longer accurately captured what the product enabled: it’s now much, much more than a simple UI designer. And so, it is our pleasure to introduce the all-new Sencha Architect 2.
The foundational concept behind Architect 2 is simple: a visual app building tool that creates code as clean and well structured as the code that a Lead Architect at Sencha would write by hand. Architect 2 is visual where it makes sense, but also gets out of your way when you need to dive into code.
This philosophy led to the creation of a tool that lets you iterate solutions with very low overhead and with instant visual feedback; all assisted by inline documentation and quick links to the API reference.
But the best part is that it’s a tool where experimentation is safe. All code generated by Architect is guaranteed to work out of the box. You can’t arrange components in a way that will break the frameworks’ conventions. There’s also a wealth of new features that makes the experience of creating apps a lot more enjoyable and immediate.

The Project Inspector has been greatly enhanced to show views, controllers, models, and stores all in one place, along with information about the project’s structure. All components and their relationships are right there, where you can see and analyze them.
Architect can create applications for Ext JS 4 and Sencha Touch 2. The Toolbox has been improved dramatically to make the richness of both frameworks more accessible. Categories now make searching for a component quicker, and it’s possible to create new groups of components for your personal workflow.
Architect also includes a built-in JavaScript editor, so you can work on your code without switching back and forth between different tools, although it’s still easy to switch between Architect and your favorite IDE.
Now every component, property and configuration comes with handy inline documentation, and if you need more, there are quick links to go deep into the API reference. The documentation is available as a part of the main UI, and appears as tool-tips and hovers as you need it.
Architect 2 projects are easier to manage and track via source control. The single file archive we had in Ext Designer 1 has been replaced by a file for each view, model, and store. This decision was intended to make it easier to work on a project where more than a single developer is involved.
You can now package applications for iOS and Android directly from Architect 2. Using technology we released with Sencha Touch 2, Architect lets you take a finished application and get it ready for deployment on a mobile device quickly and easily. And if you’re on OS X and you have Xcode 4 installed, Architect starts the iOS simulator for you and loads your application automatically.

Several weeks ago, we asked for volunteers to help user-test our beta version. Thanks to their help and our extensive set of usability studies, we were able to zero in on the biggest user experience issues and to design better solutions for commonly performed tasks.
Here are just a few of the user experience improvements we made. We added a highlight for new components that are added to the Project Inspector: this helps you see where the component is added in the hierarchy. We added a toggle to the property panel that lets you switch between commonly used configurations vs. the comprehensive set. We also enhanced our component icons to improve readability. These were just a few of a long list of detail improvements.
Countless hours went into making Architect 2 a beautiful and easy to use application. User experience is never complete but we know you will notice right away how our new process has made the tool as easy to use as it is powerful.
On top of our formal user studies, we want to say thank you to our community for helping and guiding us with their constant feedback: first with the private beta program for SenchaCon 2011 attendees (it rocked to meet you in person in Austin!) to the later open beta. Your suggestions and questions helped make Architect 2 what it is today.
We also want to thank you for your patience and your incredibly insightful comments, and we ask you to keep it up: Architect 2 will be evolving over the course of 2012 and we need your continued support and feedback to make all the things we have dreamed during the last months a reality.
Keep asking for new features, keep reporting bugs, keep showing us your examples.

This version of Architect ships with a significant number of examples for Ext JS 4 and Sencha Touch 2 alike. We have re-created a few of the frameworks’ demos in Architect 2 including GeoCongress and the Feed Reader, and it’s all available from Architect’s product page (close to the bottom). Just unzip it and open the .xda files to see great examples of entire applications.
The online documentation is also a significant step forward. All our technical docs are now hosted online, just like the API docs, which makes them easier to search and easier to keep updated. While the docs are already much better, we are committed to improve them and expand them significantly over time. Please let us know where you find the current documentation lacking or unclear, and we will concentrate our efforts where it’s most useful.
We also want to let you know that, if you have an example you are particularly proud of, and you want to share it with the community, submit it to the dev team for inclusion with the set that comes with Architect 2: if we like it, we’ll add it to the downloadable package and of course give you credit in the notes. It’s your chance to shine, don’t miss out on it!
Individual copies of Sencha Architect 2 cost $399, with discounts for 5 and 20 packs. If you are upgrading from an old copy of Ext Designer 1, please read the following carefully:
Please note that Sencha Complete includes Architect 2, and remains priced at $995. So, go ahead, buy Sencha Architect 2 from the Sencha Store, or download the trial and share your experiences with us!
via Introducing Sencha Architect 2: A Massive Upgrade of Ext Designer | Blog | Sencha.
Greg posted a very useful list of resources; One of the challenges in the world of HTML/JavaScript/CSS app development is cobbling together your kitchen sink of frameworks, tools and other technologies. When you start looking around, it feels like there is an endless list of options, which is good and bad! Recently, I’ve been gathering a list of what’s popular these days and thought it might be useful for others to share. If you see anything obvious missing, please let me know. Thanks to the following for helping me put together this list: Ray Camden, Andy Trice, Philip Wilson, Christophe Coenraets, Piotr Walczyszyn, and James Brown.
via Gregs Ramblings.
ZendServer installs PHP CLI as part of the installation, and, as is customary for PHP 4.3+, includes a PEAR installer. It’s a good idea to install PEAR before installing PHPUnit as per the recommendation here.
1 | %PHP_BIN% -d output_buffering=0 -d PEAR\go-pear.phar |
to (see PHAR Runtime Configuration):
1 | %PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.phar |
This will stop the fatal error:
1 | phar...does not have a signature |
as by default PHP will not process a PHAR archive without a signature.
For Windows 7, make sure you open the console as an administrator, or the installer won’t be able to create some folders in the default install locations. At the command prompt enter:
1 | #cd \program files\zend\zendserver\bin<br style="padding: 0px; margin: 0px;" /># go-pear.bat |
and you should get something like this (I selected the system-wide install and accepted the default locations):
via Installing PHPUnit for PHP 5.3 on ZendServer | katsande.com.
Matthew Setter writes a very interesting article; Ok, so you’re pretty comfortable with using the Zend Framework, specifically the use of Forms. Along with that, you have a good working knowledge of how to combine a host of standard validators such as CreditCard, EmailAddress, Db_RecordExists, and Hex, and standard filterssuch as Compress/Decompress, BaseName, Encrypt, and RealPath. But what do you do when a situation arises that’s outside the scope of the pre-packaged validators and filters?
Let’s say you want to guard against users uploading files that contain viruses, for example. You would have to write a custom validator that checks the uploads aren’t infected. Today I’ll show you how to do just that – how to write a new file validation filter for Zend Framework that uses ClamAVto ensure uploaded files are virus-free.
First you’ll need to install ClamAV support. I’m basing this installation procedure around Linux, specifically Ubuntu. If you’re using another distribution, you may need to adjust the commands accordingly. Unfortunately, if you’re using Windows however, you’ll need to use a Linux-based Virtual Appliance or setup a virtual machine running Linux to follow along since the php-clamav extension doesn’t support Windows as yet.
Full Story with Source » phpmaster.
HackIX joins #sopastrike#SOPAblackout #sopa and blacks out site on the 18th.
For more info http://sopastrike.com/
Jan 12
6
Kevin Schroeder writes; Zend Server 5.6 is out. I’m actually pretty stoked about this release. Here’s a few reasons why.
via ESchrade — Pure PHP Goodness.
Dec 11
15
If you are seeing something interesting on the iPad screen that you would want to capture. Screenshot is quite useful, especially if you have an error on your device and you want to capture an image so that later you could show it to a support tech and they could assist you in fixing the issue.
Heres how:
1. While you are looking at the screen press Sleep/Wake + Home button and quickly let go of the buttons.
You will see the screen quickly flashes indicating that it has taken the screenshoot. Your capture should now be placed in the Camera Roll album. To view the image go into the album and open it up.
Once you have the image you could email it.
PHPCloud.com is the landing page for our new cloud offering. Using the Zend Application Fabric you can build your applications in the same environment as you will be deploying your apps to. The application is built on my.phpcloud.com and you can then deploy it onto any platform where the Fabric is supported.
But how do you get started? Phpcloud.com has been built in a way where you can connect with any IDE. With Zend Studio 9 that connectivity has been built directly in to the IDE.
Getting started is actually quite easy.
via Read here for the full details.