App Developers Meet BlackBerry 10

If the BlackBerry operating system’s declining U.S. market share suggests it’s become irrelevant, a lot of developers apparently disagree. Over the past year, the number of BlackBerry apps grew by 220 percent -- up to 80,000. Research In Motion’s (RIM) developer events such as BlackBerry Jam frequently sell out, including a recent one in Santa Clara, Calif., the center of the Android and iOS universes.

One optimistic developer is Gameloft, which is developing 11 BlackBerry 10 games. And Truphone, a mobile VoIP provider, has spent the past few months developing a BlackBerry 10 version of its app.

“Overall, we’re optimistic about BlackBerry 10 because it’s a solid, high-quality technology choice at all levels of the stack,” says Adam Linford, head of Labs and Mobile Applications Development at Truphone. “As engineers, we appreciate
that. As a business, we recognize what will make it more attractive to
content and service providers. RIM is also bolting together
an ecosystem platform that enables developers to make money.”

For those developers who are still on the fence -- including ones that have never developed for BlackBerry -- RIM is trying to make it easy to give the new OS a test drive. “If you’re a Java developer, you can explore BlackBerry 10 through Android,” says Larry McDonough, RIM’s BlackBerry developer evangelism manager. “If you’re a native C and C++ developer, you can explore it through our native SDK. If you’re an AIR or Flash developer, you have the best AIR Flash platform in the industry in mobile. Whatever your skill set, we have the tools and the platform for you to easily come explore BlackBerry 10.”

BlackBerry10: What’s Under the Hood?
Some developers say that BlackBerry 10 addresses problems that have dogged other BlackBerry editions.

“Previous versions of the BlackBerry OS have been based on the J2ME
platform
,” says Linford. “Whenever you have a runtime environment like that, you have two options when developing for the platform: Use
the APIs that the manufacturer provides, or write native code and write
your own APIs to ‘glue’ it into the runtime environment from the native
OS -- if they let you. RIM did not, and so you were reliant on the APIs that
they gave you within the runtime.”

In Truphone’s case, the tradeoffs included less control and performance. “This was a massive problem,” says Linford. “Real-time
communications require a high-performance system, and the APIs that RIM provided
in this area were not comprehensive.”

Developing for BlackBerry 10

Changing those kinds of fundamental elements is one example of why BlackBerry 10 is a brand-new OS rather than a point upgrade. But for any OS vendor, a challenge in creating a new platform is finding the right balance: It has to be innovative enough to stand out from the pack, but it can’t be too revolutionary, lest the learning curve turn off many developers.

“The biggest difference is in two parts,” says Linford. “First, the ability to write native
code for the OS on BlackBerry 10. Second, that the native OS supports
many of the standards and patterns that are common to existing operating
systems.

“Being based on QNX, the system is very UNIX-like, which means it’s
friendly to software that runs on existing Linux systems and BSDs, including OSX, iOS and Android. As a result, for those folk that have
already got native code on those platforms, the process of porting is
massively simplified.”

BlackBerry 10 is a microkernel architecture that loads its device drivers at runtime. By comparison, Android has monolithic kernel architecture. “Developers will be able to write more native code they can ship as an app that will change how the BlackBerry 10
system works,” says Linford. “On Android, to change fundamental parts of
the system, you need to release your own version of Android itself. That
could lead to some interesting applications that will have a greater
adoption on BlackBerry 10 compared to Android, given the easier means of
distribution and better user experience for deployment.”

Other aspects of BlackBerry 10 might be tougher for some developers. “The big switch will be memory
management and garbage collection, which you have to do with C++ in BlackBerry 10,” says Linford.
“Previous versions of the OS were all accessed via J2ME, and Java handles
all that for you. You get more control with BlackBerry 10, but along with that
comes added complexity that previously a developer wouldn’t have to worry
about.”

The Principles Behind BlackBerry 10

RIM used five principles to create BlackBerry 10. Some of them should look familiar to PlayBook developers because they’re adapted from the 2.0 version of that platform.

One example is “Content is king.” RIM gives developers access to the entire screen instead of making elements such as status bars fixed and off limits.

“Every pixel on the screen is presentable and usable by the developer,” says McDonough. “Then, content plays the primary role.”

RIM combined this principle with another -- “multitasking as second nature” -- in the “peeking” feature, which aims to balance full-screen usage with the fact that other tasks occasionally will require the user’s attention. For example, when users hear an alert chime while composing a message, they can peel back a corner of that screen to see if it’s something that they need to deal with right away.

If so, they can click on it and not lose the message they were composing. When they do, another principle takes effect: “fluid workflow,” in which clicking on something in one app causes something else to launch. “We enable developers to implement those kinds of automatic invocations of other applications very easily and cleanly,” says McDonough.

Will these developer and user features be enough for BlackBerry to recapture market share? The answer won’t come until after the first quarter of 2013, which is when the first BlackBerry 10 devices will hit the market. But it’s worth consideration by developers who are looking to stay ahead of the curve.

Photo: Getty Images

Apple Cooks up DIY iOS Apps

There are more than 550,000 iOS apps. Imagine how many more there would be if creating them required little or even no coding experience.

That’s the basic premise behind “Content Configuration for Device Platforms,” an Apple patent application (No. 20120089933) published in April. Apple’s proposed tool aims to avoid shortcomings that are found in similar GUI-centric products for website development.

“In most instances, such tools can only assist users with basic features,” says Apple in its patent application. “Users wanting customized elements must still have knowledge of one or more computer-programming languages. For example, while some web-content development tools can assist with the creation of basic hyper-text markup language (HTML) content, these tools have even more limited capabilities to edit cascading style sheet (CSS) elements.”

Apple aims to avoid those kinds of drawbacks. For example, “the authoring tool leverages a JavaScript library running in the background to enhance the code elements by writing additional code that facilitates the smooth functioning of the objects defined by the code elements, even when those objects are implemented on diverse devices. The JavaScript library instantiates the objects specified by the user using the authoring tool and generates additional code (HTML/CSS/JavaScript) as needed to display the content. This allows the authoring tool to substitute alternate implementations for various situations, such as diverse devices, as needed.”

The mention of “diverse devices” is noteworthy since device fragmentation is currently a major headache in the Android world but not in iOS. It’s possible that Apple plans -- as rumored -- to expand its iOS device lineup into smaller iPads and larger iPhones, as well as PCs. If so, the proposed tool could help smooth over the differences that would result.

HyperCard for Mobile?
Not surprisingly, Apple declined to provide input for this article, so we asked three experienced iOS developers to give their thoughts on the patent application. Here are highlights of what they had to say:

“This sort of looks like a modern incarnation of HyperCard,” says one major game developer who preferred not to be identified for fear of irritating Apple. “HyperCard was years ahead of its time -- so far ahead, in fact, that it didn’t really fit into the market at the time of its release.

“Despite solving a problem that nobody really had yet, HyperCard brought basic application development to the masses. Kids could develop apps in it. It was visual, powerful and easy to use. Depending on how Apple positions this new tool, I can see it playing a role similar to HyperCard,” says the anonymous game developer.

Another developer -- Charley Price, co-founder and chief creative officer of Hidden Variable Studios -- agrees that the tool appears useful. “While that’s no doubt a great help for any native developer, it will certainly help novice developers the most,” says Price.

Even so, Price cautions that the tool alone can’t guarantee an app’s success. “While UI is important, there’s so much more that goes into building a great app,” says Price. “You will still need an innovative concept or a unique take on an existing consumer need, which adds a fair amount of complexity and no doubt requires a fair degree of programming know-how. There’s no silver bullet that offsets the many nuanced complexities of development, but this should encourage many more developers to give it a go, which is great to see!”

Android, meanwhile, has a few tools of its own to make the learning curve as flat as possible. One is example is the Massachusetts Institute of Technology’s App Inventor, which is currently under development.

HTML5 = Loss of Control?
Some developers wonder why Apple would want to encourage the development of Web apps, which are inherently cross-platform, rather than maintaining its current ecosystem, including the 30 percent royalty that Apple would lose in an HTML5 world. In fact, the tool has features for accommodating the kind of device diversity that cross-platform development entails.

“At the moment, HTML5 on mobile is pretty terrible, so there’s no particular threat to Apple’s app ecosystem,” says the anonymous game developer. “But it’s certainly not in their long-term interest to support a transition away from native apps and toward HTML5 apps.

“Finally, HTML5 and Web-based apps are naturally much less responsive than native applications. Apple is interested in having the best, most responsive, least complicated user interface on its devices. It’s hard to imagine that they’d be satisfied with what HTML5 can produce today, though I suspect it will eventually be good enough.”

The proposed tool may be less about expanding the iOS ecosystem and more about maintaining the status quo, says Amit Knaani, ooVoo’s head of product.

“The patent describes an authoring tool that produces multimedia content based on Web technologies such as HTML5, CSS and JavaScript,” says Knaani. “The described tool isn’t a software-development tool, not even for someone with little or no development experience. The description resembles the latest authoring tools from Apple, such as iAd Producer or, more recently, iBooks Author. This patent might just exist to protect the next generation of these tools.”

Photo: @iStockphoto.com/cnythzl

Tips for Building and Deploying Cloud-based Apps

The cloud and cloud-based solutions are here to stay. Recent IDC research shows that worldwide revenue from public IT cloud services exceeded $16 billion in 2009 and is forecasted to reach $55.5 billion in 2014. Clearly, the pace of growth is quite staggering.

Companies of every size and stripe are leveraging the cloud to outsource noncore competencies, improve efficiencies, cut costs and drive productivity. Central to every company’s cloud strategy is determining how best to build and deploy cloud-based applications.

Here are a few best practices to help you make the process of building and deploying applications as straightforward as possible.

1. Design your applications for performance and scalability.
Building cloud-based applications is vastly different from building on-premise ones, so you need to design your applications to maximize their ability to benefit from the cloud’s elastic computing nature. The most obvious way to do this is to create stateless apps because they scale better.

Many thought leaders believe that the stateless model facilitates much greater scalability than conventional computing and combines effectively with virtualization to achieve optimum data-center utilization.

2. Build upon existing assets.                                 
For companies seeking to maximize the value and efficiency of their cloud applications, the best approach is to build upon existing assets rather than start from scratch. Existing assets offer various benefits: First, they can be shared and reused, often more quickly and smoothly than new ones. Second, IT users have some degree of comfort using them. And the bottom-line justification: They are probably paid for.

An existing asset, such as a mobile sales app, can be repurposed and tweaked to create a new cloud-based app in a foreign language for a field sales force.

Software as a Service (SaaS) applications are a good choice for such sharing and reuse as they enable business users to collaborate, create and share assets quickly and easily.

3. Determine the right amount of isolation and sharing of assets.
The flip side of sharing is isolation. Some assets need to be shared by all users, while others need to be restricted to certain users due to their confidential or sensitive nature. At the same time, it is desirable to create multi-tenancy collaborations so that users in different groups of your company can develop and share information and assets that will enhance the productivity of all tenants.

4. Don’t ignore taxonomy and governance procedures for your assets.
Categorizing and defining your assets is vital -- especially if you work in an enterprise or even global company with hundreds or thousands of assets in different countries and dozens of languages. Besides including the most obvious assets -- such as applications, operating systems and network platforms -- you should add such intellectual assets as designs, implementation documents and even marketing information.

To make your life as easy as possible, consider detailing attributes for your assets so you can search for them effortlessly. For example, label your assets by vertical markets (such as finance and manufacturing) and level of adoption (such as mature, advanced and beginner).

You might also want to specify roles for people handling those assets. Think: creators, managers, users and those who can modify and share assets with others.

5. Allay your security worries before committing to a vendor.
Putting your data and apps in the cloud is fraught with security risks. Top-of-mind concerns for most companies are: data integrity, data location, data recovery, regulatory compliance, and privacy. The overarching concern is “Will my data be safe?” Before committing to a cloud vendor, consider getting a neutral third-party to do a thorough security assessment of the vendor. Companies should also conduct their own high-level audits of a vendor’s security and ask the vendor for proof of its security claims.

Taming the Parallel Beast

Many programmers seem to think parallelism is hard. A quick Internet search will yield numerous blogs commenting on the difficulty of writing parallel programs (or parallelizing existing serial code). There do seem to be many challenges for novices. Here’s a representative list:

  • Finding the parallelism. This can be difficult because when we tune code for serial performance, we often use memory in ways that limit the available parallelism. Simple fixes for serial performance often complicate the original algorithm and hide the parallelism that is present.
  • Avoiding the bugs. Certainly, there is a class of bugs such as data races, deadlocks, and other synchronization problems that affect parallel programs, and which serial programs don’t have. And in some senses they are worse, because timing-sensitive bugs are often hard to reproduce -- especially in a debugger.
  • Tuning performance. Serial programmers have to worry about granularity, throughput, cache size, memory bandwidth, and memory locality. But for parallel programs, the programmer also has to consider the parallel overheads and unique problems, like false sharing of cache lines.
  • Ensuring future proofing. Serial programmers don’t worry whether the code they are writing will run well on next year’s processors -- it’s the job of the processor companies to maintain upward compatibility. But parallel programmers need to think about how their code will run on a wide range of machines, including machines with two, four, or even more processors. Software that is tuned for today’s quad-core processors may still be running unchanged on future 16-, 32- or even 64-core machines.
  • Using modern programming methods. Object-oriented programming makes it much less obvious where the program is spending its time.
  • Other reasons that parallel programming is considered hard include the complexity of the effort, insufficient help for developers unfamiliar with the techniques, and a lack of tools for dealing with parallel code. When adding parallelism to existing code, it can also be difficult to make all the changes needed to add parallelism all at once, and to ensure that there is enough testing to eliminate timing-sensitive bugs.

Use Serial Modeling to Evolve Serial Code to Parallel
The key to success in introducing parallelism is to rely on a well-proven programming method called serial modeling. Using serial modeling tools and technique, programmers can achieve parallelization with enhanced performance and without synchronization issues. The essence of the method involves consistently checking and resolving problems, and beginning early in the process to slowly evolve the code from pure serial, to serial but capable of being run in parallel, to truly parallel.

The first step is to measure where the application spends time -- effort spent in hot areas will be effective, while effort spent elsewhere is wasted. The next step is to use a serial modeling tool to evaluate opportunities for potential parallelization and determining what would happen if this code ran in parallel. This kind of tool observes the execution of the program, and uses the serial behavior to predict the performance and bugs that might occur if the program actually executed in parallel.

Checking for problems early in the evolution process, while a program is still serial, ensures that you don’t waste time on parallelization efforts that are doomed because of poor performance. You can then model parallelizations that resolve the performance issues or, if no alternatives are practical, focus your efforts on more profitable locations.

The tool can also model the correctness of the theoretical parallel program, and detect race conditions and other synchronization errors while still running the serial program. Although the program still runs serially, it is easy to debug and test, and it computes the same results. The programmer can change the program to resolve the potential races, and after each change, the program remains a serial program (with annotations) and can be tested and debugged using normal processes.

When the program has fully evolved, the result is a correct serial program with annotations describing a parallelization with known good performance and no synchronization issues. The final step in the process is to convert those annotations to parallel code. After conversion, the parallel program can undergo final tuning and debugging with the other tools. The beast has been tamed.


Photo: @iStockphoto.com/angelhell

Dawn of the Phablet

Larger than a smartphone, smaller than a tablet and equipped with a stylus, the hybrid “phablet” has emerged as a subset of the mobile device category.

Samsung’s Galaxy Note, which entered the U.S. market earlier this year, is perhaps the best-known example. The Android-based product includes a 5.3-inch touch screen and a stylus, which Samsung had dubbed “S Pen.” LG’s Optimus Vu has also rolled out a 5-inch Android device that’s equipped with a stylus, which launched in South Korea in March. Other mobile players are likely to follow, especially now that Samsung’s phablet sales have eclipsed the 5 million unit mark.

Josh Flood, senior analyst with ABI Research, says he believes phablets compete with 6- to 8-inch tablets and premium smartphones. Last year, 6- to 7-inch tablets accounted for 6 percent of total tablet shipments (about 3.7 million units). Flood expects the bulk of the tablet market to remain in the 9-inch-plus range for the next 5 years.

So what type of buyer will spring for a phablet?

“Many of the handset vendors and operators believe the initial typical user will be what they term ‘feature chasers,’” explains Flood. “Additionally, users who are less concerned about data consumption will be prime targets for phablets, as they desire a greater Web-browsing experience and better graphics from sites such as YouTube.”

Impact on Mobile Developers

The phablet’s stylus, coupled with the larger display, will provide the greatest hook for mobile developers, according to industry watchers.

“The stylus is a very important thing that has finally come back to handheld mobile devices,” says Mike Newman, president of On the GoWARE, a Los Angeles firm that specializes in mobile development, developer training and recruitment.

Styluses were widely used with mobile devices a decade ago, but the rise of the iPhone made them unfashionable, says Newman. He’d like to see the stylus stick around this time: “It opens up a whole other realm of creativity you can have with your software.”

A stylus gives mobile application developers an extra feature to look at and play with, says Flood. “Application developers can now include an extra dimension in their apps, with pressure sensitivity as a key feature of the S Pen.”

Stylus-friendly Apps

At this point, stylus-oriented applications are limited to drawing, sketching and note-taking, says Flood. He points to Graffiti, WritePad, 7notes, PhatPad and MyScript Memo as examples.

But the stylus presents plenty of opportunities for other app categories. For example, Flood says gaming applications may start using the stylus substantially over the next three to six months. In a simple football game, the pressure of the stylus could indicate the power of the quarterback’s pass, he notes.

And the stylus may have an even greater impact on the brain and puzzle segment of mobile gaming, says Flood. “The stylus will enable users to navigate puzzles and flick between solutions at a quicker and more stimulating pace.”

For user interfaces, the opinions are mixed. A stylus’ precision input could lead to richer apps and user interfaces overall, says Newman. While a desktop developer can integrate many controls into an application’s UI, mobile applications tend to be “dumbed down” to aid with navigation and accommodate fingers. But Flood doesn’t think the stylus will influence user interface design -- at least for general use. “The majority of users will still prefer to use their fingers to operate their phones’ operating system,” he says.

Building From Scratch

Samsung recently unleashed mobile developers on stylus-driven applications. In April, the company invited developers to build stylus-integrated apps using the S Pen SDK. Voting is still going on, but the top apps will receive $205,000 in cash and prizes. The apps submitted covered a range of functions, from diagramming football plays to applying makeup.

Developers should start from scratch when building apps for phablets, says Naga Hariharan, director of product management at Quickoffice, which makes mobile office-productivity software. Don’t just throw a smartphone or tablet app on a phablet. Take the nuances of this new form factor into account and consider how users interact with this particular device, says Hariharan. How users accomplish a task such as highlighting text and moving it around a document will unfold a lot differently via finger touch versus the fine control of the S Pen. “Create an application that is custom-fit for that device and you have a better chance of succeeding,” he says.

Photo: Getty Images