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.
%PHP_BIN% -d output_buffering=0 -d PEAR\go-pear.pharto (see PHAR Runtime Configuration):%PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.pharThis will stop the fatal error:phar...does not have a signatureas 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:#cd \program files\zend\zendserver\binand you should get something like this (I selected the system-wide install and accepted the default locations):
# go-pear.bat
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.
Matt W answers;
Take advantage of the dynamic function construction in AS3.
private function myCallbackFunction(e:Event, parameter:String):void
{
//voila, here's your parameter
}
private function addArguments(method:Function, additionalArguments:Array):Function
{
return function(event:Event):void {method.apply(null, [event].concat(additionalArguments));}
}
var parameter:String = "A sentence I want to pass along";
movieClip.addEventListener(Event.COMPLETE, addArguments(myCallbackFunction, [parameter] ) );
Nick Kwiatkowski created a few very interesting posts with video tutorials, he writes; The second I heard about Adobe giving us the ability to create our own extensions to the Flash Platform in AIR 3.0, I was smitten. It was finally a way that we could add our own features and do the things that were high priorities on our lists, but not on Adobe’s. I knew I was looking for features that were one-offs (how many people today really need access to the COM ports), but they were forcing me to do all sorts of weird workarounds like launching proxy applications to do seemingly simple tasks.
AIR 3.0 got released a few weeks ago and I’ve jumped in head first into creating some ANEs (AIR Native Extensions). For those of you who don’t know, ANEs are packaged extensions that contain operating-system specific code (DLLs for Windows, Libraries for MacOS, Java classes for Android and Objective-C for iOS), that allow you to do things that the Flash Player wasn’t able to do.
Unfortunately, Adobe assumed that if you were developing DLLs for Windows, you were going to be using Visual Studio and nothing more. This didn’t make a whole lot of sense in my mind as they’ve been leveraging Eclipse for all of their tooling, and Eclipse does offer some great C/C++ addins. Now, that being said, Visual Studio is by far the more feature-full and hands-down the best editor for enabling these kinds of workflows on Windows. It is, however, very costly and even though Microsoft offers a free versions, it takes over your computer by installing debug versions of most of Microsoft’s shared libraries making your computer slower and more crash prone.
I wanted to use Eclipse’s CDT addin with the standard GCC tooling that is available on pretty much every operating system. By using GCC, I was able to make very portable code that with minimal effort was able to compile on all three of the major OSs (Windows, Mac, Linux). Adobe’s documentation was little help in getting this going (even if you were coding in Visual Studio, there is very little guidance on how to get things setup). I do have to note that with my setup there is one distinct disadvantage — the lack of ability to debug the DLL when it is launched from AIR. You will have to write your own C/C++ harness to do testing on your code in order to test it. If you use the Visual Studio tooling, you CAN debug any DLL while it is running (this is why Microsoft replaces the shared libraries on your system to allow that debugging).
I’ve created a four part video series documenting how to get going creating ANEs. Part 1 covers setting up your environment, including installing CDT, the compiler, and getting Eclipse setup to do your programming. Part 2 covers actually coding the C/C++ code for your Windows DLL. Part 3 covers creating your ANE, and packing up all the stuff needed to make it work. And Part 4 covers how to use your new ANE in an AIR project.
Watch the Video » Part 1 « QueTwos Blog.
Oct 11
6
UPDATE: I have another Drag-and-Drop Revisited post that covers even more drag-and-drop functionality available in Flex 4.
The Flex 4 gods were kind to us developers when they made the great decision to leave the custom drag-and-drop support unchanged. We just do what we’ve always done: detect the user is trying to drag something via mouseDown or mouseMove and then add both dragEnter and dragDrop event handlers to the drop target. So there is nothing in this post that’s not basically identical to Flex 3, except the coolness of FXG (which you can easily mimic with Degrafa in Flex 3).
via Drag-and-Drop in Flex 4 « Saturnboy.
ahillman3 on Stack Overflow wrote this (and won my hero of the day award); OK, the primary focus for your solution is the preloader attribute on a mobile application. See the preloader=“CustomSplashScreen” below:
< ?xml version="1.0" encoding="utf-8"?>
firstView="views.FXGSplashHomeView"
preloader="CustomSplashScreen"
splashScreenMinimumDisplayTime="3000"
applicationDPI="160">
The CustomSplashScreen extends and overrides the spark.preloaders.SplashScreen class, and the getImageClass function.
package
{
import mx.core.DPIClassification;
import mx.core.mx_internal;
import spark.preloaders.SplashScreen;
use namespace mx_internal;
public class CustomSplashScreen extends SplashScreen
{
public function CustomSplashScreen()
{
super();
}
override mx_internal function getImageClass(dpi:Number, aspectRatio:String):Class
{
return Class(splash);
}
}
}
The splash in the return Class(splash), is a simple fxg file, like so:
< ?xml version="1.0" encoding="UTF-8"?>
xmlns:d="http://ns.adobe.com/fxg/2008/dt"
xmlns:fc="http://ns.adobe.com/flashcatalyst/2009"
version="2.0">
– Allen
via .
Sep 11
19
Daniel Freeman writes; I’ve had feedback from a few developers wanting a way to combine MadComponents with Flash Builder 4.5 for mobile. I intended MadComponents as a lighweight alternative to using the Flex framework. So while I don’t really like the idea of mixing them – it’s certainly possible to incorporate MadComponents within an MXML layout. All it takes is a few custom component wrappers.
Note: I’ve now put the code for these wrappers into the SVN code repository.

Note: I’ve now put the code for these wrappers into the SVN code repository.
via MobileAppDev.
Daniel Freeman writes; In this final MadComponents tutorial we’re going to look at the third and final Flash Builder 4.5 tutorial (from here), and do it the MadComponents way. Adobe’s Flex Test Drive for Mobile: Build a mobile application in an hour, takes you through building an AMF web service, and then building a mobile client application that connects to that service. We’re going to build the same application using MadComponents.
AMF is a binary format used to serialise ActionScript objects. A binary AMF packet is usually significantly smaller than REST XML or SOAP packet. Hence AMF services are typically much faster.
This tutorial assumes that you have some expertise in building web services, using PHP, Coldfusion, or Java. But if you’d rather do a tutorial where the web service already exists, then have a go at building a twitter client.
We recommend that you first take a look at the first six parts of this tutorial series, which will bring you up-to-speed with using MadComponents.
Read the entire tutorial at MadComponents AMF Service Test Drive for Mobile « MobileAppDev.
dkozar evolved a working method to Authenticate and Authorize a Flex based app datas service call using Zend AMF, he writes;
I’ve been struggling with it, and figured it all out — so, perhaps it could help others.
The authentication is called on the server only if credentials supplied from the client (via the remote procedure call headers). This snippet illustrates the setup of custom auth (these are the last 6 lines of gateway.php script):
// Handle request
$auth = new My_Amf_Auth(); // authentication
$server->setAuth($auth);
$acl = new Zend_Acl(); // authorization
$server->setAcl($acl);
echo $server->handle();
Now, your custom auth should extend Zend_Amf_Auth_Abstract. Since I want to authenticate users from a database, I bring the Zend_Auth_Adapter_DbTable to play. But since I cannot extend both Zend_Amf_Auth_Abstract and Zend_Auth_Adapter_DbTable, I use a composition:
< ?php
require_once ('Zend/Amf/Auth/Abstract.php');
/**
* AMF auth class by Danko Kozar, dankokozar.com
* @author dkozar
*
*/
class My_Amf_Auth extends Zend_Amf_Auth_Abstract {
function __construct() {
}
public function authenticate() {
$adapter = My_Db_Adapter::getInstance();
$adapter->setIdentity($this->_username);
$adapter->setCredential($this->_password);
// the adapter call
// you can wrap it into try.. catch and process DB connection errors
$result = Zend_Auth::getInstance()->authenticate($adapter);
return $result;
}
}
Here’s the adapter class:
< ?php
/**
* DB table adapter auth class for AMF by Danko Kozar, dankokozar.com
* @author dkozar
* Singleton
*/
class My_Db_Adapter extends Zend_Auth_Adapter_DbTable {
protected static $_instance = null;
/**
* private!
* @param My_Db_Adapter $adapter
*/
public function __construct(Zend_Db_Adapter_Abstract $adapter = null) {
if (!$adapter)
$adapter = new Zend_Db_Adapter_Mysqli(
array(
‘dbname’ => ‘test’,
‘username’ => ‘root’,
‘password’ => ”)
);
parent::__construct($adapter);
$this
->setTableName(‘users’)
->setIdentityColumn(‘username’)
->setCredentialColumn(‘password’)
;
// just for testing
// $this
// ->setIdentity(‘username’)
// ->setCredential(‘password’)
// ;
}
/**
* @return My_Db_Adapter
*/
public static function getInstance()
{
if (null === self::$_instance) {
self::$_instance = new self();
}
return self::$_instance;
}
public function authenticate() {
$_authResult = parent::authenticate();
// NOTE: The point is that $result->_identity is an OBJECT (of type stdClass), NOT string
// with Zend_Auth_Adapter_DbTable it is internally accomplished by calling its getResultRowObject() method
// It constructs the stdClass with properties named after table attributes
// $user = new stdClass();
// $user->role = “administrator”;
// $user->username = $_authResult->getIdentity();
$identity = $this->getResultRowObject();
$result = new Zend_Auth_Result($_authResult->getCode(), $identity);
return $result;
}
}
MyService.php class. Here it is:
< ?php
/**
* PHP service class with authorization
* by Danko Kozar, dankokozar.com
* @author dkozar
*
*/
class MyService
{
/**
* from zend docs:
* If the ACL object is set, and the class being called defines initAcl() method,
* this method will be called with the ACL object as an argument.
* This method can create additional ACL rules and return TRUE,
* or return FALSE if no access control is required for this class.
*
* @param Zend_Acl $acl
* @return boolean
*/
public function initAcl($acl)
{
$acl->addRole(new Zend_Acl_Role("administrator"));
$acl->addRole(new Zend_Acl_Role("user"));
//acl “allow” method takes 3 parameters (role, resource — class name, privileges — it’s function name in this class)
// administrator
$acl->allow(‘administrator’, ‘MyService’, ‘helloWorld’);
$acl->allow(‘administrator’, ‘MyService’, ‘getData’);
// user
$acl->allow(‘user’, ‘MyService’, ‘helloWorld’);
$acl->deny(‘user’, ‘MyService’, ‘getData’);
//returning true to signal that we want to check privileges before accessing methods of this class
//in my tests if we don’t return anything it will treat it like we will return false so better return true or false
//your intentions will be clear
return true;
}
/**
* Hello world method
*/
public function helloWorld(){
return “Hello world from MyService service”;
}
/**
*
* Returns data
* @return [int]
*/
function getData()
{
$arr = array(1, 2, 3);
return $arr;
}
}
?>
Note that the authorization is being built dynamically inside the initAcl method.
On the Flex side I have an auto-generated class (MyService) which extends another auto-generated class (_Super_MyService).
The point is that the outer one is auto-generated only once (initially), and you can modify it, without worrying to be overwritten on service regeneration.
There’s a protected property _serviceControl (which is of type RemoteObject) which could be tweaked if needed.
I’m tweaking it by of setting the endpoint (with string read from a client side config in preInitializeService() method). Plus, I’m adding 2 more methods, which expose setCredentials and setRemoteCredentials methods of _serviceControl, so I can acces it from my code.
package services.myservice
{
public class MyService extends _Super_MyService
{
/**
* Override super.init() to provide any initialization customization if needed.
*/
protected override function preInitializeService():void
{
super.preInitializeService();
// Initialization customization goes here
_serviceControl.endpoint = “http://localhost/myapp/gateway.php”;
}
public function setCredentials(username:String, password:String, charset:String=null):void
{
_serviceControl.setCredentials(username, password, charset);
}
public function setRemoteCredentials(username:String, password:String, charset:String=null):void
{
_serviceControl.setRemoteCredentials(username, password, charset);
}
}
}
So, before calling MyService methods, I’m setting the credentials with setCredentials() method and this runs the authentication on the PHP side:
private var service:MyService;
....
service = new MyService(); // ServiceLocator.getInstance().getHTTPService("presetLoader");
service.setCredentials("user1", "pass1");
var token:AsyncToken = service.getData();
The authentication via Zend_Amf_Server is, by the way, OPTIONAL! Meaning, with no credentials supplied, Zend_Amf_Server will NOT RUN IT. Thus you should rely on Zend_Acl (e.g. roles) to so your permissions and security!
Finally, here’s the MySQL DB table I’ve been using for authentication:
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(32) DEFAULT NULL,
`role` varchar(45) DEFAULT NULL,
`firstname` varchar(50) DEFAULT NULL,
`lastname` varchar(50) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
–
– Dumping data for table ‘users‘
–
INSERT INTO ‘users‘ (‘id‘, ‘username‘, ‘password‘, ‘role‘, ‘firstname‘, ‘lastname‘, ‘email‘) VALUES
(1, ‘user1’, ‘pass1’, ‘administrator’, ‘Danko’, ‘Kozar’, NULL);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cheers!
Danko