Apigility 1.0.0beta1 Released!

We are pleased to announce the imme­di­ate avail­abil­ity of Apig­ility 1.0.0beta1! http://apigility.org/download This is our first beta release of Apig­ility, mark­ing its ini­tial API sta­bil­ity, and pro­vid­ing a solid pre­view of what to expect for the first sta­ble release. What is Apig­ility? Apig­ility is the world’s eas­i­est way to cre­ate and pro­vide secure, well-formed APIs.  Apig­ility pro­vides tools for describ­ing and doc­u­ment­ing your APIs, both REST­ful and RPC.  You can indi­cate the URL that pro­vides a ser­vice, what HTTP meth­ods are allowed, what rep­re­sen­ta­tions e.g., JSON, HTML, XML can be pro­vided, how many items to present per page of a col­lec­tion, and more.

via ZF Blog.

Tags: , ,
Posted in Development Zend Framework by Danny Froberg. No Comments

ORM Designer 2

I thought I’ll help plug a tool that looks to be quite use­ful and that is bas­ing their devel­op­ment on direct com­mu­nity input, I’ve made my sug­ges­tions hope you do too :)

Mar­tin Kul­havy writes; ORM Designer. It’s pri­mary tar­get is to cre­ate ORM Def­i­n­i­tions fast and eas­ily with the help of visual dia­gram instead of man­u­ally writ­ten text definitions.
Most dis­tinc­tive fea­tures allows you to:
  • Save time and work 4 times faster.
  • Repeat­edly export your def­i­n­i­tion files.
  • Import and visu­al­ize exist­ing project schemas.
  • Elim­i­nate errors and the need to look for typos.
Down­load our 14-day trial ver­sion and let us know what you think. If you write a review, we will give you 20% dis­count off the price of ORM Designer. Either way, let us know, what you think about it. If you found it help­ful, and if not, why not. Any feed­back is incred­i­bly valu­able to us, as we strive to make our prod­uct the best we pos­si­bly can.

Running ZendServerGateway on the embedded PHP 5.4 Server

Michael Andrew David­son writes; So you have dis­cov­ered Zend­Server­Gate­way and you are like, “Wow, this makes web ser­vices easy”. How­ever, you quickly dis­cover that there is a lit­tle magic behind the scenes, and that this add-on works best within the con­text of Zend Server 6. That can be a lit­tle frus­trat­ing, espe­cially if you or your orga­ni­za­tion does not use Zend Server 6. Never fear, there is a way around this “implied” require­ment. In just a moment I will walk the reader through set­ting up the embed­ded PHP 5.4 web­server to uti­lize the Zend­Server­Gate­way. All the steps should eas­ily trans­late to what­ever envi­ron­ment you use for serv­ing your PHP pages. I am going to assume a Win­dow envi­ron­ment for development.

read the rest Michael Andrew Davidson’s Blog.

My Workflow for Developing PhoneGap Applications

Andrew Trice wrote; I am asked all the time “How do I get started devel­op­ing Phone­Gap appli­ca­tions?”. My nor­mal answer is to advise peo­ple to check out the Phone­Gap Get­ting Started Guides, which pro­vide a great start­ing point for every plat­form. How­ever after fur­ther thought, I’m not sure this is always what peo­ple are ask­ing. Rather than “how do I get started?”, I think peo­ple are often look­ing for insight into the work­flow for devel­op­ing Phone­Gap appli­ca­tions. Every­thing from tools to devel­oper flow, to get­ting the app on devices. The Get­ting Started Guides are essen­tial for set­ting up the ini­tial project struc­ture, but once you get that setup, you might be won­der­ing “what do I do next?”. In this post, I’ll try to shed some light on the work­flow and tools that I use when devel­op­ing Phone­Gap applications.


Tags: ,
Posted in Android Development iOS by Danny Froberg. No Comments

What’s New in PhoneGap Android 2.3.0

Well we’ve tagged Apache Cor­dova 2.3.0 release can­di­date 2 which means that Cor­dova 2.3.0 will be out soon in source release form which will be fol­lowed quickly by the binary Phone­Gap 2.3.0 release. Shaz wrote up a post on what’s new in iOS so I fol­lowed suit to do this one for Android. So with­out fur­ther ado here’s what you should expect on Android:

via Simon Mac Don­ald.

Tags: ,
Posted in Android Development by Danny Froberg. No Comments

How to Get the Device’s Phone Number Using PhoneGap Android

I was a bit sur­prised when three peo­ple asked me how to do this in one day. I fig­ured if there was enough inter­est in it then maybe it deserved a post of it’s own. Basi­cally you want to know the pri­mary phone num­ber of the device your app is run­ning on. In order to do that in Phone­Gap you will need to write a plu­gin to access the Tele­pho­ny­Man­ager ser­vice on Android.

As always the code for this plu­gin is is GitHub at myTele­pho­neNum­ber­Plu­gin repo. If you’d rather have a more detailed walk through please read on.
First up let’s code our JavaScript inter­face which we will use to get the tele­phone num­ber. We’ll setup a new inter­face at“cordova/plugin/telephonenumber” to avoid name col­li­sions. Then the rest is fairly boiler plate code where we declare and error object that we won’t even use and finally pro­vide a get method. When you call the get method you should pro­vide a suc­cess call­back. The suc­cess call­back will be invoked with a string that will con­tain the devices phone num­ber. If some­thing goes wrong the fail­ure call­back will be invoked.

Full source at Simon Mac Donald

Tags: , , ,
Posted in Android Development by Danny Froberg. No Comments

Module specific layouts in ZF2

Rob Allen writes; If you need dif­fer­ent lay­out scripts to be ren­dered for dif­fer­ent mod­ules in Zend Frame­work 2, then Evan Coury has made this extremely easy. His new mod­ule Edp­Mod­ule­Lay­outs is just the ticket!

Once installed, you sim­ply have to add a new array to a con­fig file in the config/autoload folder with the fol­low­ing in it:

    'module_layouts' => array(
        'Application' => 'layout/application',
        'ZfcUser' => 'layout/user',

i.e. you pro­vide a list of the mod­ule name against the lay­out script to use.

What could be easier?

via Rob Allen’s DevNotes.

Zend Framework 2.0.0 STABLE Released!

The Zend Frame­work com­mu­nity is pleased to announce the imme­di­ate avail­abil­ity of Zend Frame­work 2.0.0 STABLE! Pack­ages and instal­la­tion instruc­tions are avail­able at:http://framework.zend.com/downloads/latest

via Zend Frame­work 2.0.0 STABLE Released! — Zend Frame­work — Zend Frame­work.

Tags: ,
Posted in Development PHP Zend Framework by Danny Froberg. No Comments

PHP: Type Hinting — Manual

Found this lit­tle Gem today by  Daniel dot L dot Wood at Gmail dot Com;

Peo­ple often ask about scalar/basic type­hints.  Here is a drop in class that I use in my MVC frame­work that will enable type­hints through the use of a cus­tom error handler.

Note: You should include this code above all other code in your include head­ers and if you are the using set_error_handler() func­tion you should be aware that this uses it as well.  You may need to chain your set_error_handlers()

1) Because peo­ple are sick of using the is_* func­tions to val­i­date para­me­ters.
2) Reduc­tion of redun­dant cod­ing for defen­sive coders.
3) Functions/Methods are self defining/documenting as to required input.

Fol­low the dis­cus­sion for type­hints in PHP 6.0 on the PHP Inter­nals boards.


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()


        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;

An are some exam­ples of the class in use:


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 pic­ture..
via PHP: Type Hint­ing — Man­ual.

Tags: , ,
Posted in Development PHP by Danny Froberg. No Comments

Zend Framework 2 and a Restful Application

Gary Hockin writes; After speak­ing to a prospec­tive employer in a job inter­view, I was inter­ested to try out the Zend\Mvc\Controller\RestfulController. With Zend_Json_Server in ZF1 hav­ing, shall we say, a less than ster­ling rep­u­ta­tion, it was very inter­est­ing for me to see how the strat­egy has been imple­mented in ZF2.

The start­ing point for this is sim­ply a com­pletely fresh clone of the ZF2 Skele­ton Appli­ca­tion. The aim is to sim­ply allow the pre-created index con­troller to func­tion as a Rest­ful interface.

Read Com­plete Arti­cle.

Tags: , ,
Posted in Development Zend Framework by Danny Froberg. No Comments

Introducing Sencha Architect 2

Sen­cha Archi­tect 2.0 builds on our inno­va­tion in Ext Designer. Now, you can build Touch and Ext JS apps through drag and drop. Avail­able for Mac, Win­dows, and Linux. Down­load Sen­cha Archi­tect 2

When we started work­ing on the next release of Ext Designer, we had very ambi­tious goals: we wanted to build a great visual tool to help you build web appli­ca­tions faster that didn’t get in the way. We wanted to make the devel­op­ment process more inclu­sive by low­er­ing the bar­rier to col­lab­o­rate, allow­ing UX design­ers to work effec­tively in the same envi­ron­ment that you use.

We wanted you to be able to cre­ate com­plete appli­ca­tions – not just the UI. We wanted a tool that would let you build an appli­ca­tion quickly out of stan­dard com­po­nents, but also allow you to eas­ily cus­tomize those com­po­nents with your own code, right from within the tool.

What we cre­ated is no longer just a rapid inter­face designer, but a com­plete appli­ca­tion builder, a place where the archi­tec­ture and the inter­face of an appli­ca­tion can be cre­ated and prop­erly struc­tured for development.

For this rea­son, the name “Designer” no longer accu­rately cap­tured what the prod­uct enabled: it’s now much, much more than a sim­ple UI designer. And so, it is our plea­sure to intro­duce the all-new Sen­cha Archi­tect 2.

Sen­cha Archi­tect 2: What’s Changed, What’s New

A tool that works the way you do.

Click to watch our launch video

The foun­da­tional con­cept behind Archi­tect 2 is sim­ple: a visual app build­ing tool that cre­ates code as clean and well struc­tured as the code that a Lead Archi­tect at Sen­cha would write by hand. Archi­tect 2 is visual where it makes sense, but also gets out of your way when you need to dive into code.

This phi­los­o­phy led to the cre­ation of a tool that lets you iter­ate solu­tions with very low over­head and with instant visual feed­back; all assisted by inline doc­u­men­ta­tion and quick links to the API reference.

But the best part is that it’s a tool where exper­i­men­ta­tion is safe. All code gen­er­ated by Archi­tect is guar­an­teed to work out of the box. You can’t arrange com­po­nents in a way that will break the frame­works’ con­ven­tions. There’s also a wealth of new fea­tures that makes the expe­ri­ence of cre­at­ing apps a lot more enjoy­able and immediate.

The hub of all activ­ity: the Project Inspector

Sencha Architect project inspector

The Project Inspec­tor has been greatly enhanced to show views, con­trollers, mod­els, and stores all in one place, along with infor­ma­tion about the project’s struc­ture. All com­po­nents and their rela­tion­ships are right there, where you can see and ana­lyze them.

Frame­work Sup­port & Cre­ation Tools

Archi­tect can cre­ate appli­ca­tions for Ext JS 4 and Sen­cha Touch 2. The Tool­box has been improved dra­mat­i­cally to make the rich­ness of both frame­works more acces­si­ble. Cat­e­gories now make search­ing for a com­po­nent quicker, and it’s pos­si­ble to cre­ate new groups of com­po­nents for your per­sonal workflow.

Archi­tect also includes a built-in JavaScript edi­tor, so you can work on your code with­out switch­ing back and forth between dif­fer­ent tools, although it’s still easy to switch between Archi­tect and your favorite IDE.

In-line Doc­u­men­ta­tion

Now every com­po­nent, prop­erty and con­fig­u­ra­tion comes with handy inline doc­u­men­ta­tion, and if you need more, there are quick links to go deep into the API ref­er­ence. The doc­u­men­ta­tion is avail­able as a part of the main UI, and appears as tool-tips and hov­ers as you need it.

Source Control-Friendly File Format

Archi­tect 2 projects are eas­ier to man­age and track via source con­trol. The sin­gle file archive we had in Ext Designer 1 has been replaced by a file for each view, model, and store. This deci­sion was intended to make it eas­ier to work on a project where more than a sin­gle devel­oper is involved.

Native Mobile Pack­ag­ing & iOS Simulation

You can now pack­age appli­ca­tions for iOS and Android directly from Archi­tect 2. Using tech­nol­ogy we released with Sen­cha Touch 2, Archi­tect lets you take a fin­ished appli­ca­tion and get it ready for deploy­ment on a mobile device quickly and eas­ily. And if you’re on OS X and you have Xcode 4 installed, Archi­tect starts the iOS sim­u­la­tor for you and loads your appli­ca­tion automatically.

Click to explore the user inter­face of Sen­cha Archi­tect 2

A Bet­ter UX to Make Devel­op­ment Fun

Sev­eral weeks ago, we asked for vol­un­teers to help user-test our beta ver­sion. Thanks to their help and our exten­sive set of usabil­ity stud­ies, we were able to zero in on the biggest user expe­ri­ence issues and to design bet­ter solu­tions for com­monly per­formed tasks.

Here are just a few of the user expe­ri­ence improve­ments we made. We added a high­light for new com­po­nents that are added to the Project Inspec­tor: this helps you see where the com­po­nent is added in the hier­ar­chy. We added a tog­gle to the prop­erty panel that lets you switch between com­monly used con­fig­u­ra­tions vs. the com­pre­hen­sive set. We also enhanced our com­po­nent icons to improve read­abil­ity. These were just a few of a long list of detail improvements.

Count­less hours went into mak­ing Archi­tect 2 a beau­ti­ful and easy to use appli­ca­tion. User expe­ri­ence is never com­plete but we know you will notice right away how our new process has made the tool as easy to use as it is powerful.

We couldn’t have done it with­out you…

On top of our for­mal user stud­ies, we want to say thank you to our com­mu­nity for help­ing and guid­ing us with their con­stant feed­back: first with the pri­vate beta pro­gram for Sen­cha­Con 2011 atten­dees (it rocked to meet you in per­son in Austin!) to the later open beta. Your sug­ges­tions and ques­tions helped make Archi­tect 2 what it is today.

We also want to thank you for your patience and your incred­i­bly insight­ful com­ments, and we ask you to keep it up: Archi­tect 2 will be evolv­ing over the course of 2012 and we need your con­tin­ued sup­port and feed­back to make all the things we have dreamed dur­ing the last months a reality.

Keep ask­ing for new fea­tures, keep report­ing bugs, keep show­ing us your examples.

Sen­cha Archi­tect team mem­bers; (left to right) Aaron Con­ran, Luca Can­dela, David Foel­ber, Kather­ine Chu

Get­ting Started with Sen­cha Archi­tect 2

This ver­sion of Archi­tect ships with a sig­nif­i­cant num­ber of exam­ples for Ext JS 4 and Sen­cha Touch 2 alike. We have re-created a few of the frame­works’ demos in Archi­tect 2 includ­ing Geo­Congress and the Feed Reader, and it’s all avail­able from Architect’s prod­uct page (close to the bot­tom). Just unzip it and open the .xda files to see great exam­ples of entire applications.

The online doc­u­men­ta­tion is also a sig­nif­i­cant step for­ward. All our tech­ni­cal docs are now hosted online, just like the API docs, which makes them eas­ier to search and eas­ier to keep updated. While the docs are already much bet­ter, we are com­mit­ted to improve them and expand them sig­nif­i­cantly over time. Please let us know where you find the cur­rent doc­u­men­ta­tion lack­ing or unclear, and we will con­cen­trate our efforts where it’s most useful.

We also want to let you know that, if you have an exam­ple you are par­tic­u­larly proud of, and you want to share it with the com­mu­nity, sub­mit it to the dev team for inclu­sion with the set that comes with Archi­tect 2: if we like it, we’ll add it to the down­load­able pack­age and of course give you credit in the notes. It’s your chance to shine, don’t miss out on it!

Pric­ing & Availability

Indi­vid­ual copies of Sen­cha Archi­tect 2 cost $399, with dis­counts for 5 and 20 packs. If you are upgrad­ing from an old copy of Ext Designer 1, please read the fol­low­ing carefully:

Please note that Sen­cha Com­plete includes Archi­tect 2, and remains priced at $995. So, go ahead, buy Sen­cha Archi­tect 2 from the Sen­cha Store, or down­load the trial and share your expe­ri­ences with us!

Writ­ten by Luca Candela

via Intro­duc­ing Sen­cha Archi­tect 2: A Mas­sive Upgrade of Ext Designer | Blog | Sen­cha.

Posted in Development Useful Tools by Danny Froberg. No Comments

JavaScript, CSS, HTML Frameworks and Tools

Greg posted a very use­ful list of resources; One of the chal­lenges in the world of HTML/JavaScript/CSS app devel­op­ment is cob­bling together your kitchen sink of frame­works, tools and other tech­nolo­gies. When you start look­ing around, it feels like there is an end­less list of options, which is good and bad!  Recently, I’ve been gath­er­ing a list of what’s pop­u­lar these days and thought it might be use­ful for oth­ers to share. If you see any­thing obvi­ous miss­ing, please let me know.  Thanks to the fol­low­ing for help­ing me put together this list: Ray Cam­den, Andy Trice, Philip Wil­son, Christophe Coen­raets, Piotr Wal­czyszyn, and James Brown.

In no par­tic­u­lar order:

via Gregs Ram­blings.

Installing PHPUnit for PHP 5.3 on ZendServer

Zend­Server installs PHP CLI as part of the instal­la­tion, and, as is cus­tom­ary for PHP 4.3+, includes a PEAR installer. It’s a good idea to install PEAR before installing PHPUnit as per the rec­om­men­da­tion here.

  1. Open Zend\ZendServer\bin\go-pear.bat and change the line:
    %PHP_BIN% -d output_buffering=0 -d PEAR\go-pear.phar

    to (see PHAR Run­time Con­fig­u­ra­tion):

    %PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.phar

    This will stop the fatal error:

    phar...does not have a signature

    as by default PHP will not process a PHAR archive with­out a signature.

  2. Run go-pear.bat

    For Win­dows 7, make sure you open the con­sole as an admin­is­tra­tor, or the installer won’t be able to cre­ate some fold­ers in the default install loca­tions. At the com­mand prompt enter:

    #cd \program files\zend\zendserver\bin<br style="padding: 0px; margin: 0px;" /># go-pear.bat

    and you should get some­thing like this (I selected the system-wide install and accepted the default locations):

via Installing PHPUnit for PHP 5.3 on Zend­Server | katsande.com.

ClamAV as a Validation Filter in Zend Framework

Matthew Set­ter writes a very inter­est­ing arti­cle; Ok, so you’re pretty com­fort­able with using the Zend Frame­work, specif­i­cally the use of Forms. Along with that, you have a good work­ing knowl­edge of how to com­bine a host of stan­dard val­ida­tors such as Cred­it­CardEmailAd­dressDb_RecordExists, and Hex, and stan­dard fil­terssuch as Compress/DecompressBase­NameEncrypt, and Real­Path. But what do you do when a sit­u­a­tion arises that’s out­side the scope of the pre-packaged val­ida­tors and filters?

Let’s say you want to guard against users upload­ing files that con­tain viruses, for exam­ple. You would have to write a cus­tom val­ida­tor that checks the uploads aren’t infected. Today I’ll show you how to do just that – how to write a new file val­i­da­tion fil­ter for Zend Frame­work that uses Cla­mAVto ensure uploaded files are virus-free.

Adding Cla­mAV Sup­port to PHP

First you’ll need to install Cla­mAV sup­port. I’m bas­ing this instal­la­tion pro­ce­dure around Linux, specif­i­cally Ubuntu. If you’re using another dis­tri­b­u­tion, you may need to adjust the com­mands accord­ingly. Unfor­tu­nately, if you’re using Win­dows how­ever, you’ll need to use a Linux-based Vir­tual Appli­ance or setup a vir­tual machine run­ning Linux to fol­low along since the php-clamav exten­sion doesn’t sup­port Win­dows as yet.

Full Story with Source » php­mas­ter.

Hackix #JS #sopastrike #SOPAblackout #sopa

HackIX joins #sopas­trike#SOPAblack­out #sopa and blacks out site on the 18th.

For more info  http://sopastrike.com/

Posted in Uncategorized by Danny Froberg. No Comments
Get Adobe Flash player