RightScale Blog

Cloud Management Blog
Cloud Management Blog

Best Practices for Using PHP and the Cloud to Build Mobile Apps

Few business mobile apps today are self-contained. Most communicate with back-end services, some of which run on legacy systems, but many of which run in the cloud. During a session at RightScale Compute, Zend Senior Director of Product Management Kent Mitchell discussed how PHP can serve as a crucial building block for mobile apps and services, and how RightScale can help manage and automate mobile development and application deployment in the cloud.

According to Web Technology Surveys, 81 percent of websites use PHP. Mitchell shared the findings of a UBM TechWeb survey of 232 executives, architects, and development managers who are using or considering using PHP. Respondents cited PHP's speed of development, open source licensing, and deep developer pool as top reasons for deploying it, and 20 percent of respondents also cited ease of working with the cloud.

Among the respondents who were actively using PHP, 81 percent said PHP was easier to use with the cloud than their next most-used language, which Mitchell said was often Java or .NET. Seventy-two percent of those same shops said they were using cloud-based services, and 63 percent said they were creating applications for cloud deployment.

At the same time as they're working on cloud development, 66 percent of those surveyed expect to work on mobile apps in 2013. That doesn't mean they're just coding clients that live on handheld devices — their apps are also communicating with back-end platforms, including those running in the cloud. Mitchell pointed out that we're seeing a convergence of PHP, mobile, and the cloud, and said that organizations need to take that trend into consideration as they develop mobile apps.

Building PHP Apps for Mobile and the Cloud

What are some things you need to think about when you're building mobile apps? According to Mitchell:

  • Zend recommends using HTML5 and JavaScript as your primary mobile technology.
  • Don't get business logic and back-end services code intertwined with the HTML. To avoid that, adopt a modern API-centric architecture that uses REST- and JSON-based communications for web services. Put code for personalization and the contextual experience, as well as the business logic, on the server side. The server also should be where you aggregate data from services on the Web or in your data center.
  • In addition to the tools you choose to create your code, you also have to consider the methodology you use to create it. For mobile, you have to think about agile development. People expect mobile apps to be updated all the time. To be agile you need a scalable DevOps process to aid in the process of moving code from developers to testing to production.
  • Use dynamic languages such as PHP and Ruby to allow development teams to code faster.
  • Use continuous integration servers such as Hudson and Jenkins to automate your release process.
  • To maintain application quality, use automated tools to diagnose production problems and then roll out a new release.
  • Use cloud to cope with unforeseen spikes in demand, because if your mobile app becomes successful and you're not ready to scale, you could suffer a success disaster.
  • Make sure the development language you choose offers a strong suite of connectors, because chances are you're going to want to connect to existing systems, including Software-as-a-Service offerings and social platforms. For connecting to web services, Mitchell says PHP beats Ruby because it is scalable and it has interfaces to legacy environments and social sites such as Facebook and Twitter, all of which make it an excellent platform on which to develop mobile applications whose back ends run on the cloud and connect to web services.

Mitchell demonstrated how you can create a mobile app using Zend Studio and deploy it in the cloud with RightScale Cloud Management — check out the video.


Zend's Kent Mitchell highlights the benefits of creating mobile apps with PHP and RightScale


Zend products that support mobile application development and deployment include:

  • Zend Server, an application server that integrates with RightScale, which gives it high availability (HA) support. (Mediaspike, a company that uses the RightScale Zend HA Solution Pack, shared details of its deployment in a webinar.)
  • Zend Server Gateway, middleware that takes care of such things as authentication and field validation to help you write REST and RPC-style web services. Zend Server Gateway is based on the open source Zend Framework.
  • Zend Studio, an integrated development environment (IDE) that lets you build web services and mobile user interfaces.

To learn more about leveraging PHP to build mobile apps and using RightScale to efficiently deploy and manage them in the cloud, download our white paper on running business-critical PHP applications in the cloud.

Post a comment