News Robot

ZendCon 2010 Wrap up

Last week Santa Clara was buzzing PHP at ZendCon 2010, the PHP conference of the year where vendors and developers unite to talk about, learn and see new innovations and best practices in the world of PHP.

I was invited by Zend to present 3 talks: “Unit Testing after Zend Framework 1.8” (http://joind.in/2243), “Why Zend Framework powers the enterprise” (http://joind.in/2264) and “Improving QA on PHP development projects” (http://joind.in/2279).
From the reactions I received on joind.in, I’m glad I faced the audience and shared my knowledge. My goal was reached as I merely got the audience interested in the subjects I presented.

At the end of the conference I was also invited by Cal Evans to sit in the closing keynote panel to discuss “The ROI of community involvement” (http://joind.in/2288) alongside community icons like Ben Ramsey, Keith Casey, Matthew Weier O’Phinney and Josh Holmes.
As it’s hard for me to stop talking about community involvement, I do think this panel discussion was a good initiative to start a dialogue with business owners to think about contributing and participating in open-source projects and how they can benefit from having their developers use company time to work on these open-source projects.

I also took charge of this year’s ZendUncon and it turned out to be a huge success. We had uncon speakers that discussed a variety of topics, but I did see a lot of database and unit testing topics. We even had joind.in founder Chris Cornutt participating through Skype the round table discussion “What is joind.in and why does it matter“.
Zend offered the uncon speaker with the most votes on joind.in a prize, being a lifetime Zend Studio license. This prize was given to Bulat Shakirzyanov (@avalanche123) with his talk on Unit Testing who had the most votes at the end of ZendCon 2010.

In general, it was a great conference. A bit cloudy for most people (as reported on Topnews, ComputerWorld and DataMation), but the atmosphere was awesome. I met a lot of new friends and got rejoined with as I call my PHP family. Zend has done a great job releasing new versions of their products (Zend Studio, Zend Server, Zend Framework) and their new website. We got a good discussion on Zend Framework 2.0 and where the framework is heading towards. And I learned a lot speaking to people in the hallway.

For me, it was exhausting but it was all worth the effort. Who knows, we might see some of the unknown uncon speakers appearing at an international conference somewhere in the world. I had a blast!!!

I would like to say thank you to Zend, the sponsors, the venue staff and to all ZendCon attendees who have participated in the ZendUncon sessions and have rated the talks they attended on joind.in (http://joind.in/event/ZendCon2010 and http://joind.in/event/ZendUncon2010). If you were there but didn’t rate any talks yet, do so now. Speakers and conference organizers want your feedback to do a better job the next time. So, help them to help you better!

See you all at a PHP conference near you!

Author:

by News Robot on November 9, 2010 in News, No Comments »
tags: , ,

Free slides for user group meetings

Author:
Source: eschrade

by News Robot on November 9, 2010 in News, No Comments »
tags: , , , ,

Validating dates

I discovered recently that Zend Framework 1′s Zend_Date has two operating modes when it comes to format specifiers: iso and php, where iso is the default.

When using Zend_Validate_Date in forms, I like to use the php format specifiers as they are what I’m used to and so can easily know what they mean when reviewing code that I wrote months ago.

My code looks something like this:

$subForm->addElement('text''start_date', array(
            'filters' => array('StringTrim''StripTags'),
            'required' => true,
            'label' => 'Start date',
            'validators' => array(
                array('Date'true, array('format'=>'j F Y')),
            ),
        ));

As you can see, I want the text field to be filled in with a date like “8 November 2010″.

This is easy to achieve using this code in your Bootstrap.php like this:

function _initDateFormat()
{
    Zend_Date::setOptions(array('format_type' => 'php'));
}

Note that this is a static method call and so it affects all instances of Zend_Date.

I also discovered that when you are in php formatting mode, then all the Zend_Date formatting constants like Zend_Date::MONTH do not work. This was a problem as I have other code in the project that uses them.

There are a number of choices.

One option is to change the formatting mode when you need to. As it is a static, you need to keep track of what you’re doing, so the code looks like this:

$currentOptions Zend_Date::setOptions();
$currentFormatType $currentOptions['format_type'];
Zend_Date::setOptions(array('format_type' => 'iso'));

// You can now use Zend_Date::MONTH, ZEND_DATE::ISO etc

// After use, reset the format type back to what it was originally set to
Zend_Date::setOptions(array('format_type' => $currentFormatType));

Similarly, we can override Zend_Validate_Date with the same logic:

class App_Validate_Date extends Zend_Validate_Date
{
    public function isValid ($value)
    {
        $currentOptions Zend_Date::setOptions();
        $currentFormatType $currentOptions['format_type'];
        Zend_Date::setOptions(array('format_type' => 'php'));

        $valid parent::isValid($value);

        Zend_Date::setOptions(array('format_type' => $currentFormatType));
     }
}

I also have two other requirements for date validation in this project:

  1. An empty $value fails validation.
  2. Regardless of the format that’s been set, it would be helpful to always allow a valid Y-m-d formatted date.

Whilst talking on IRC about date validation issues that I was having, I also found out that a $value of 1-1-1TEST passes validation! This is noted in issue ZF-7583.

Allowing an empty $value is easy to add to my App_Validate_Date. Similarly, allowing a Y-m-d format is also fairly easy by resetting the formatting and then calling parent::isValid() again.

However, I really don’t want ’1111′ or ’1-1-1TEST’ or to be considered a valid date! I couldn’t see an easy way to fix this, so I went for the easy way out and wrote my own validator:

class App_Validate_Date extends Zend_Validate_Date
{
    public function isValid ($value)
    {
        $this->_setValue($value);
        
        if (empty($value)) {
            return true;
        }

        $valid $this->_testDateAgainstFormat($value$this->getFormat());
        if (!$valid) {
            // re-test for Y-m-d as this format is always a valid option
            $valid $this->_ testDateAgainstFormat($value'Y-m-d');
        }

        if ($valid) {
            return true;
        }
        $this->_error(self::INVALID_DATE);
        return false;
    }

    protected function _testDateAgainstFormat($value$format)
    {
        $ts strtotime($value);
        if ($ts !== false) {
            $testValue date($format$ts);
            if ($testValue == $value) {
                return true;
            }
        }
        return false;
    }
}

Obviously this code is highly unlikely to work if you need to validate localised dates! However, it solves my needs and it’s useful to document here for when I forget how I solved these issues!

Author: Rob…

by News Robot on November 8, 2010 in News, No Comments »
tags: ,

Zend Takes Enterprise PHP to the Cloud

With Zend, Businesses Benefit from Cloud Economics While Enjoying Out-of-the-box Scalable and Manageable PHP with Freedom to Leverage Cloud Infrastructure and Services of Choice

ZENDCON 2010, SANTA CLARA, CA, November 2, 2010 — Zend Technologies, the PHP Company, today announced a new cloud application platform to accelerate enterprise PHP adoption in the cloud. The Zend PHP Cloud Application Platform provides access to cloud application services and management while delivering elasticity and high availability. The Zend Cloud Application Platform sets the standard for PHP cloud application development and deployment, providing an enterprise-grade Web application infrastructure while maintaining the freedom to choose cloud infrastructures and services.

 

“PHP powers one-third of the world’s websites, and already accounts for a substantial portion of all cloud application deployments,” said Andi Gutmans, CEO and co-founder of Zend. “The Zend PHP Cloud Application Platform helps organizations achieve their application performance, availability and productivity goals. With this solution, Zend enables developers to quickly build portable cloud applications, provides IT operations teams with a reliable and manageable high-performance PHP environment, and offers a ‘pay-per-use’ pricing model that best fits cloud application deployments.”

 

The Zend PHP Cloud Application Platform integrates technologies from new Zend product releases as well as cloud services offered through Zend partners. Additional innovative capabilities will be incorporated into the platform by Zend at a later stage.

 

Zend PHP Cloud Application Platform Overview:

·         Native and portable cloud services – rapid development of cloud or native cloud applications using Zend Framework components

·         Cloud-ready development environmentIDE support for cloud application development and debugging

·         Enterprise PHP stack – high-performance, supported application stack including PHP, Zend Framework, necessary extensions and drivers

·         Deployment and management – PHP configuration management for easy scale up and error prevention

·         Monitoring and diagnostics – application monitoring and diagnostics across multiple server instances for identification and triage of application- and service-level issues

·         High Availability – cloud-ready PHP session management and graceful shutdown for fault tolerance and streamlined maintenance

 

Develop, Test and Deploy Zend PHP in the Cloud with RightScale

Through a partnership between Zend and RightScale, the leader in cloud computing management, PHP professionals can easily provision and manage enterprise-ready PHP environments in the cloud.

During application development, IT organizations can use the RightScale Development and Test Solution Pack, which includes Zend Server, to reduce the time, hassle and risk associated with managing multiple development and test environments. The same virtual environment, based on Zend Server, can be used in production through the RightScale Cloud Management Platform to gain the flexibility, control, and portability required by enterprises for their business-critical applications running in the cloud.

“We are excited to be partnering with Zend to deliver a fully integrated, elastic and reliable enterprise PHP in the cloud,” said Michael Crandell, RightScale CEO and Founder. “PHP is one of the most popular development languages for building web applications, and we believe the new solution will drive many more businesses to develop, test and deploy their PHP applications on the cloud.”

 

Zend Server on Amazon Elastic Compute Cloud (EC2)

Zend also announced the availability of a Zend Server Amazon Machine Image (AMI). By running Zend Server on Amazon EC2, PHP professionals can leverage Amazon’s proven cloud computing environment, obtain a pre-configured, enterprise-grade PHP runtime environment with minimal friction, and pay only for capacity actually used.

 

About Zend Technologies
Zend Technologies, Inc., the PHP Company, is the leading provider of products and services for developing, deploying and managing business-critical PHP applications on-premise and in the cloud. Deployed at more than 30,000 companies worldwide, the Zend family of products delivers a comprehensive solution for supporting the entire lifecycle of PHP applications. Zend is headquartered in Cupertino, California. Learn more at http://www.zend.com.

# # #

Author:

by News Robot on November 4, 2010 in News, No Comments »
tags: , , ,

New Version of Zend Framework Drives Cloud Portability and Mobile Application Development

World’s Leading PHP Application Framework Includes Simple Cloud API, Provides Support for Mobile Application Development

ZENDCON 2010, SANTA CLARA, CA, November 2, 2010 — Zend Technologies, the PHP Company, today announced general availability of Zend Framework 1.11, the new release of its market-leading PHP application framework. Zend Framework 1.11 now includes the Simple Cloud API and adds support for mobile application development. Zend Framework is the world’s leading PHP application framework, with more than 15 million downloads and over 500 contributors, including Amazon, Google, IBM, Microsoft and Adobe. This release exemplifies the leadership role of Zend Framework in accelerating the adoption of PHP and open source software by mainstream corporate IT.

Zend Framework Drives Cloud Portability

Zend Framework now includes the Simple Cloud API, allowing PHP developers to build portable cloud applications. The Simple Cloud API open source initiative was begun in 2009 by co-founding partners Zend, IBM, Microsoft, Nirvanix, RackSpace and Go-Grid to facilitate the development of cloud applications that can access services on all major cloud platforms. With Zend Framework 1.11, developers have access to the first deliverables for the Simple Cloud API project.

  • Document Service integration allows developers toutilize a variety of NoSQL cloud storage solutions including Amazon SimpleDB and Microsoft Windows Azure Table storage.
  • Queue Service integration allows developers to perform asynchronous operations in order to offload heavy-lifting, pre-cache pages, and more. Queue Service integrations include Amazon Simple Queue System (SQS), Microsoft Windows Azure Queue service, and all adapters supported by the Zend Framework Zend_Queue component.
  • Storage Service integration allows developers to push static resources such as images and archives to the cloud. Currently supported services include: Amazon Simple Storage Service (S3), Microsoft Windows Azure Blog storage, and Nirvanix.

According to Matthew Weier O’Phinney, Zend Framework Project Lead, “Vendor lock-in is a concern to many companies thinking about running their applications in the cloud. With Zend Framework 1.11, developers can start writing cloud applications that support multiple cloud providers, thus mitigating the risk of lock-in.”

“IBM is pleased to continue its work with Zend and other contributors to this project and to see growing adoption of cloud computing platforms by the PHP community,” said Dr. Angel Luis Diaz, IBM Vice President for Software Standards and Cloud Computing. “Together, we’re enabling developers to invoke cloud services in a common way across cloud providers, and significantly reduce application development costs while providing customer choice.”

“The Simple Cloud API is an important catalyst for open and interoperable cloud computing,” said Jean Paoli, General Manager of Interoperability Strategy at Microsoft Corp. “Microsoft has an ongoing investment in the Simple Cloud API project, together with Zend and other contributors. We are gratified to see the role this project is playing in driving acceptance among PHP developers for cloud computing platforms and hope that many of these developers are encouraged to use Windows Azure.”

Zend Framework Leads Mobile Application Development

Addressing the rapidly increasing demand for mobile applications, Zend Framework 1.11 enables developers to quickly and easily build highly engaging PHP applications targeted to mobile devices, including iPhone and Android phones.

The new mobile device support in Zend Framework 1.11 provides functionality for detecting mobile device types and their capabilities. Developers may choose from the publically-available WURFL database, TeraWurfl, or DeviceAtlas in order to retrieve device capabilities, or write their own classes to leverage additional device databases.

Additional Zend Framework 1.11 mobile support includes the Dojo Toolkit 1.5 update. Dojo 1.5 includes the dojox.mobile subproject, which delivers a flexible lightweight mobile application framework, including CSS3 and JavaScript widgets optimized for use on mobile devices and for mobile-specific contexts.

“We are excited about contributing the mobile application development component to Zend Framework,” said Raphaël Carles, CTO at Interakting, a leading European interactive agency. “Using Zend Framework, we were able to provide a highly standardized process for building web and mobile applications for our enterprise customers. The new release of Zend Framework makes development of multi-channel and multi-platform web applications easier, and enables us to implement complex PHP projects faster.” 

Learn more about the Zend Framework open source project at http://framework.zend.com.
Download Zend Framework 1.11 from http://framework.zend.com/download/latest.
Learn more about the Simple Cloud API at http://simplecloud.org.

About Zend Technologies

Zend Technologies, Inc., the PHP Company, is the leading provider of products and services for developing, deploying and managing business-critical PHP applications on-premise and in the cloud. PHP runs 35 percent of the world’s Web sites and has quickly become the most popular language for building dynamic Web applications. Deployed at more than 30,000 companies worldwide, the Zend family of products delivers a comprehensive solution for supporting the entire lifecycle of PHP applications. Zend is headquartered in Cupertino, California. Learn more at http://www.zend.com.

# # #
Author: