Archive for May, 2012

Announcing Titanium Studio 2.0.2

Thursday, May 31st, 2012

We’re proud and excited to announce the newest version of Titanium Studio. Version 2.0.2 is a significant bug fix release with over 140 items addressed.

Studio 2.0.2 highlights

  • The find bar in editor now supports multi-line search.
  • You can file bugs and feature requests from inside Titanium Studio.
  • JavaScript has additional formatting options for placement of spaces around parentheses.
  • Significant speed improvement in CSS parsing.

Other Useful Functionality

  • The JavaScript and PHP outlines display functions inside conditionals.
  • CSS and HTML text hovers have been improved with additional information.
  • Scope selectors in Rubles can use grouping, intersection and union operators.

Additional Changes

  • Studio now uses the new platform -clean option where available.
  • Local variables inside functions are back again in content assist.
  • Studio on Windows has been upgraded to use Python 2.7.

 

Read the Release Notes for additional details on all improvements available in this release.

Updating Titanium Studio

You should be automatically prompted to update your Titanium Studio software. If you do not see the prompt, you can select “Check for Updates” from the “Help” menu from within Titanium Studio.

Once you’ve updated Titanium Studio, you’ll then get an update for the Titanium Mobile SDK.

Titanium Mobile SDK 2.0.2 Now Available

Thursday, May 31st, 2012

We’re excited to announce that Titanium Mobile SDK 2.0.2 is now available. Last month, we released Titanium Mobile 2.0. The release featured many new features and enhancements, including the new layout engine and significant improvements in parity between the platforms. Overall response to Release 2.0 has been very positive.

Titanium Mobile SDK 2.0.2 is our first service pack for the Titanium Mobile 2.0 release;  it builds on the strengths of Release 2.0, and addresses around 50 high-priority issues.

Read the Release Notes for details on all of the improvements available in Release 2.0.2.

Download and Installation

Updating the Mobile SDK

You should be prompted to automatically upgrade your Titanium Mobile SDK from within Titanium Studio. If you do not see the prompt below, you can manually check for updates by selecting “Check for Titanium SDK Updates” from the “Help” menu within Titanium Studio.

For More Information

For more information, see the Titanium Documentation Site.

Mobilize Your MongoDB! (Part Two)

Thursday, May 31st, 2012

Editor’s Note: Reposted with permission from the OpenShift developer blog, and author Grant Shipley.

Summary:

This is the second part of a blog series that details how to develop a mobile application that is backed by MongoDB and a PaaS. MongoDB makes a great companion to this mobile application given its ability to shard and the nature of being able to store JSON documents with little data manipulation required.  In this blog post, part two of the series, we will go over the required components and software in order to develop cross platform mobile applications for the iPhone and Android operating systems.  We will also install and configure the backend systems, including mongodb, which makes a perfect data store for the BeerShift mobile application.

We will be using the following applications and software stack components:

  • Titanium Studio by Appcelerator
    • Titanium Studio is an all-inclusive powerful Eclipse-based IDE that simplifies the mobile development process. Use Titanium Studio to rapidly build, test, package and publish mobile, desktop and web applications. Take advantage of new functionality like advanced code assisting, ACS integration, module management, Git integration, an enhanced publishing workflow and a full-featured editor. Manage Titanium projects, test your mobile apps in the simulator or on device, automate app packaging deploy to a public or private App Store and much more. *
  • Xcode by Apple
    • Even though we will be using Titanium Studio for our development, we will still need to have Xcode installed and configured so that we have access to several important tools.  Not only will we be using the simulator to test out our iPhone application, we will also need the Xcode IDE in order to bundle and submit our application to the Apple App Store.
  • Android SDK
    • Since we are targeting both iOS and Android based devices, we will also need to install and configure the Android SDK for emulating the Android hardware for testing.
  • OpenShift Client Tools
    • OpenShift is Red Hat's free, auto-scaling Platform as a Service (PaaS) for applications. As an application platform in the cloud, OpenShift manages the stack so you can focus on your code.  We will be using this for our backend services and our cloud hosted MongoDB.

While not required for this blog post series, I would suggest that a user also install a quality image editing application for sizing of icons and splash screens for your application.  I prefer to use an open source software application called Gimp that will provide the user with most of the image editing capabilities they need.

Step 1: Installing Xcode

Note: If you are planning on targeting iOS platforms, you will typically need an iOS developer account.  This will allow you to publish your application to the Apple App Store and receive product updates and announcements about new iOS platforms.  This program typically costs 99.00USD per year.

There are generally two ways to install Xcode on Mac OS.  You can either install via the app store or you can download it directly from the Apple Developer Center.  During this blog post, I will assume that you have access to the Apple App Store and will be detailing that route in order to install the IDE.

Once you start the App Store application, search for Xcode and you should be directed to the following page:

Once on this page, click the free button under the short description in order to install the IDE on your local operating system.  Once the installation starts, be patient!  Xcode is 1.5 gigs and can take up to a significant amount of time to install even on the fastest of connections.  To check the status of the installation, you can go back to the App Store application and click on the Purchases tab at the top of the screen.  This will display your current download position and how much time is remaining.

Step 2: Installing OpenShift Client Tools

Note:  If you would rather watch a screencast of this step, check out this video where I demo how to install the client tools on OSX.

The OpenShift client tools are written in a very popular programming language called Ruby.  With OSX 10.6 and later, ruby is installed by default so installing the client tools is a snap.  Simply issue the following command on your terminal application:

$ sudo gem install rhc


If you don’t already have an OpenShift account, head on over to http://openshift.redhat.com and signup.  It is completely free and Red Hat gives every user three free applications running in the cloud.  At the time of this writing, the combined resources allocated for each user is 1.5gb of memory and 3gb of disk space.

Now that we have the client tools installed, we also need to install the GIT source code repository tools.  In order to do this, download the package from the GIT website by clicking on the Download for Mac button on the right hand side of the screen.

Once the download of is .dmg file is complete, mount the image by clicking on it and open up Finder.  Once Finder is open, click on the .pkg file to install GIT to your local system.

Follow the installation instructions and close the dialog box once the installation has finished.  Open up a new terminal window to ensure that your environment variables, including your path, have been updated to reflect the new git installation.

At this point, we can create the backend server for our BeerShift application including the mongo database.  For this blog post, we will be using a PHP backend but I have also written a backend for Ruby, Python and Java. 

$ rhc app create  -a beershift –t php-5.3

The above command will provision some space for us on the Red Hat Cloud.  It will also create a templated website for us to verify that the application creation was successful.  Once the command has finished, verify that the application and server space was created by pointing your browser to the URL provided by the RHC tools.

Now that we have an application created, lets create a mongodb data store to house our application data.  This can be done by performing the following command.

$ rhc-ctl-app -a beershift -e add-mongodb-2.0

This will return the database hostname, port, root user and root password for you to access the database.  Don’t worry, we will go into more detail on how all of this works with the blog post that covers the backend system for this application.

Step 3: Install the Android SDK

Appcelerator provides excellent instructions on how to install and configure the Android SDK for use with Titanium Studio.  Instead of re-inventing the wheel, I suggest that you follow the instructions already provided for this step.

Step 4: Install Titanium Studio

In order to install and use Titanium Studio, you will need to register for a developer account with Appcelerator.  Head on over and click the Download Titanium button on the right hand side of the screen.

This will redirect you to a sign up screen.  Fill in the required details and submit the form and check your inbox for a validation email.  Once you have validated your email, you will be redirected back to the Appcelerator site where you can download Titanium Studio.

Once the .dmg file has downloaded, mount the image and follow the instruction to drag Titanium Studio to your Applications folder. 

Note: When you start the application for the first time, you may be prompted to install a Java runtime.  If so, following the instructions that are presented and OSX will automatically find and install the Java runtime for you.

Once Titanium Studio starts, you will be prompted for a location to store your workspace.  The workspace is a location on your local machine where all of your source files and project settings will be stored.

After you select your workspace location, you will be asked for your username and password.  This is the username and password that you used to signup for an Appcelerator account.

Once you are logged in, that IDE may perform an update to ensure that you are running the latest available code.

Now that you have the IDE setup and your SDKs setup, get familiar with the IDE and play around with a few of the sample projects.

In the next blog post we will begin development of the backend application and create our REST API that handle communication between the mobile application and the cloud hosted server.

Getting Started with Mobile Web

Wednesday, May 23rd, 2012

The release of our 2.0 SDK included with it the Mobile Web Release Candidate. The Mobile Web SDK is a port of our Titanium SDK to the HTML5 specification. For the initial release, we support methods and objects that are in the HTML5 specification but, in time, it will be extended support beyond just the HTML5 spec. In this post, we’re going to cover how to get started using the Mobile Web SDK.

The Mobile Web RC is constantly being worked on and new bugs and enhancements are being addressed every day. In order to get the most of out the Mobile Web RC we recommend downloading and utilizing the latest CI build when building your Mobile Web applications.

You can get the latest CI build at: http://builds.appcelerator.com.s3.amazonaws.com/index.html
For instructions on how to install CI builds, check out the wiki article here:http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Installing_Titanium_SDK_Continuous_Builds

 

Create A New Project

In order to create a Titanium mobile project to run on the Mobile Web platform, go through the same steps you would for any other platform (iPhone/iPad, Android). Please take note that you’ll need to remember to select the “Mobile Web” option for these projects.

 

For this example, we’re going to create an application using the “Tabbed Application Template” available via the “Create New Mobile Application” dialog. After providing the necessary information, choose “Next” rather than “Finish” in the dialog box above. In the “Project Template” dialog, choose the tabbed application template and then “Finish”.

 

Once the app is created you can see that the application structure is identical to an iOS or Android application with simply the addition of the “mobileweb” platform specific folder. Just as with Android and iOS, you can use this folder to store platform specific resources.

Check out this wiki article regarding Mobile Web Assets.

 

Viewing and Testing

Titanium Studio includes an integrated web server that you can use for developer-level testing (where you test your own work). You can use this server to test your Mobile Web project within a browser installed on your computer or to host pages accessible within the emulator or simulator. In order to view your application in a browser, choose “Run” > “Mobile Web Preview in Browser” from the App Explorer menu in Titanium Studio.

 

When you are ready to start testing your mobile web application, we suggest doing so first in your desktop browser. Safari and Chrome are the recommended browsers for testing. The reasoning behind testing in a desktop browser is to utilize the web inspector and browser debugging available in your desktop browser. Since you mobile web application is HTML and CSS, using the browser console to test and debug is no different from any other web application.

 

Deploying A Project

A Titanium Mobile Web app is designed to be run from a web server. You can successfully run it from a browser as a local file, but not everything will work correctly. You can package your app using the Deploy menu as shown, then specifying a local directory into which Studio will copy place your project’s files. You’d then upload those files to a web server for general access.

Please keep in mind when deploying to a web server, if your application uses Ti.Network.HttpClient to communicate with different sites, then either those sites must enable CORS (Cross-Origin Resource Sharing) or you must set up a proxy on your web server with CORS enabled.

Resources

CI Builds
CI Build Installation
App Icon and Splash Screen Mobile Web Assets
Cross-Origin Resource Sharing (CORS) – Wikipedia or W3C
Mobile Web Limitations

From the Appcelerator Engine Room: Engineering Update

Wednesday, May 16th, 2012

It’s been a couple of months since my last update and I’m happy to announce that we delivered our 2.0 release on schedule. This was a significant release and there are a number of things you should be aware of as developers:

  1. A new layout engine that minimizes cross-platform discrepancies: if you are using absolute positioning in your app and are updating to 2.0 then you need to read this. You basically need to excise almost all uses of ‘auto’ or 0 for your width and height fields and use Ti.UI.SIZE or Ti.UI.FILL appropriately. You may have also worked around some issues with the older platform that you have to now discard.
  2. Mobile Web: a new platform increases your reach as a developer and allows you to make your application available to Windows Mango and Blackberry 7 users through the web (2.1 CI build). Check it out here.
  3. Cloud Services: we had a surge in use after just a few short days after launch for ACS. We currently have over 23,000 apps that have been enabled for ACS usage. The tremendous demand shows that we have hit a  nerve here with developers wanting to cloud enable their applications with minimal setup and overhead.
  4.  New look and feel for our documentation. We borrowed from an open source engine to provide quick look up, open tabs of items that you’ve viewed, and a snappy new look and feel. Arthur has been very diligent about reviewing every API, checking with the developers, and rewriting and adding samples for clarity.

Last time I mentioned our plans to build a rock solid platform, establish a predicable release cadence, and create a scalable QA organization. I believe we have made good progress in each of these areas:

    1. We have fixed over 640 platform bugs since the start of the year. That’s not unexpected given that we scaled out QA (see below). We’ll continue to emphasize this moving forward–we want to provide you with a platform that you can count on!
    2. We delivered the 1.8.1 and 1.8.2 services packs at the end of January and February respectively. The 2.0 release was officially launched on 4/17 although the software was ready to go and out on github on 3/31. We delayed while we revamped the web site and got our billing back end polished off for launch. The next service pack (2.0.2) is on track for the end of this month and 2.1 is in active development. Note that with the launch of 2.0 we have officially stopped supporting 1.7.x. If you haven’t already considered upgrading your app to the latest 2.0 release then now is the time. I want to thank the team and especially my leadership: Chung, Ingo, Neeraj, Thomas, and Wei for pulling out the stops and marching everyone to the same drumbeat. It isn’t always easy!
    3. Thomas has been busy scaling out QA and has established a partnership to do regression testing which has resulted in a surge of bug reports. This is a good thing as I’d rather know what bugs we have rather than not. We’ve done more testing than ever before on our applications and platform and put in place an awesome test case management system in order to measure and manage our work.

What’s going on with our platform support? Jeff stood up on stage at BlackBerry world and announced support for BlackBerry 10 OS. We’re furiously at work on this and are integrating UI functionality as fast as RIM can throw SDKs at us. What about Windows Apollo, you ask? It’s very strategic for us so stay tuned.

In the end, I still have a burning need for talent here in the Bay Area. We’ve added many folks but are still eager to expand our team. I need iOS, Android, Blackberry Playbook, or Javascript developers and cloud, mobile, and automation QA engineers, and admins for ITOps. Snacks and drinks are free, the fun is liberally available, and we work hard on good code. Send us your resume. Did I mention the fresh churros at the last beer bash?

Carl Orthlieb is Vice President of Engineering at Appcelerator.  Carl is responsible for all product engineering for Appcelerator including the Titanium SDK and Studio, Analytics, Cloud Services, and IT Operations.