Showing posts with label mobile. Show all posts
Showing posts with label mobile. Show all posts

Thursday, 20 June 2013

Hands-on with Office Mobile for iPhone

By now, you've no doubt heard that Microsoft Office Mobile for iPhone is now available for iPhone. (Yup, you read that right: It's iPhone-only.) The question is: Should you care?

That depends largely on whether you're already a subscriber to Microsoft's Office 365 and Skydrive services, which (for personal use) cost from £79.99 annually. (If you want to give the app a test run, Microsoft offers a 30 day free trial of Office 365, which you can set up at the Office 365 website.) Because, really, Microsoft Office Mobile is a front-end to that service, not a standalone productivity suite.

Getting connected

Office Mobile does give you access to the three legs of the Microsoft Office suite: Word, Excel, and PowerPoint. Each of the three iOS apps is able to read and edit documents created using their related PC, Mac, or Web applications; if you want to create new documents on the iPhone, Office Mobile lets you do so with Word and Excel, but not PowerPoint.

When you sign in with your Office 365 account from the mobile app, you should also have access to your SkyDrive folder and be able to see any of the files you have stored there. But, after installing the app on two different devices, I found that only one automatically connected to my SkyDrive. For the second install, I needed to use the app's Add a Place tool and choose SkyDrive. Add a Place is also the way you connect to your business' or school's Office 365 SharePoint.

Once connected, Office Mobile displays a file browser with buttons at the bottom which you tap to see your recently used documents, open existing documents, create new ones, or change the app's settings. To create new documents, you tap the app's New button and choose a starting template, either the blank one or one of the three templates provided for Word and Excel, and the app opens a fresh document based on your selection.

Oddly (and inconveniently) the app only lets you create documents; you can't create folders for organizing your documents. You can't add or save files to existing folders, either; they all go in the root directory of your SkyDrive. You can still manage documents using SkyDrive's Web-based interface or your Mac.

You'll be surprised to discover that Office Mobile eschews iOS' autosave features and expects you to save your documents manually--this despite the fact that every other iOS app since the beginning of iOS-time automatically saves anything you're working on. Also, when you do save changes, even on the smallest of documents, it can take several seconds before the SkyDrive save completes.

Word

Working with Word documents in Office Mobile is...interesting. Typing is simple, easy, and works as it should. In fact, Office Mobile feels like a very basic text editor.

Although it isn't obvious until you start using the app, there are two editing modes when working with a document in Word. There is a Preview mode that allows you to select and make changes to formatting of your selected text and an editing mode that allows you to type new text. These two modes use two different methods for selecting text, so you need to change the way you work depending on the mode you're in.

In editing mode, Word uses a non-standard means of text selection: You double-tap a word to select it then use the selection tool as you normally would. Given that this deviates from the way you normally select text in iOS, I found this difficult to discover. Once text is selected you can change its formatting, copy, paste, or add a comment to the selected text, but there is no option for cutting the selected text. Using editing mode you can also change formatting where your cursor appears in the document, so anything new you type will reflect the changes you've made.

In Preview mode, select your text the way you normally do in any other iOS app, tap the text formatting tool, and make your formatting changes. But, once you've made changes this way you are once again working in the app's editing mode, so you can no longer select your text the way you did in Preview mode, instead you have to double-tap the text to make further formatting changes.

Excel

Of the three Office Mobile apps, Excel is the most polished. Office Mobile's spreadsheet tool offers over 125 built-in functions, the ability to select spreadsheet cells to create charts, and, when editing functions, supports tapping cells to add their contents to the function field you're creating. But it has a frustrating lack of intelligence when it comes to the type of data you're editing in a cell. So, while it's possible to change the format of a cell to date, percentage, or currency format, the app's keypad doesn't automatically recognize those differences.

It also fails to differentiate between text and numbers. So, even if you have a spreadsheet cell containing numeric data, you still get a standard QWERTY keyboard; that means tapping a couple of keys before you can enter the data you need. Contrast this with Numbers, Apple's spreadsheet app, which is aware of the kind of data being entered in a field and adjusts the keyboard accordingly.

Office Mobile's Excel app has the added benefit of letting you create charts by selecting a range of cells, choosing the formatting tool, and then selecting Create Chart. The app offers six different chart types; when you select the type of chart you want to create, the app adds a new sheet containing the chart type you've selected. Updating your spreadsheet data adjusts the chart accordingly. Unfortunately, once you create a chart, or if you are working with a chart created using any other version of Excel, it is not possible to change the chart type, delete the chart, or sheets created when creating a new chart. In fact, you can not delete any sheets using the iOS app.

PowerPoint

As noted earlier, you can not create PowerPoint presentations using Office Mobile, but you can edit any of your existing presentations and, if you connect your phone to a projector, display, or television, you can use the app as a presentation tool. Editing is limited to changing the order in which slides appear in your presentation and making changes to the content of text and comments that appear in existing slides and to your slide notes. You can not make changes to transitions, images, or create new text boxes. But, as a presentation tool, it works pretty well. It's the kind of app that, if you're in a pinch and have the necessary adapters, could save your bacon if something happens to your computer.

If you've used PowerPoint or any other presentation tool in the past, you know presentation files can be behemoths. Unfortunately, I found that my connection to SkyDrive consistently timed out when I tried to upload changed presentations. In many cases, that was because my phone went to sleep before the save finished. But even when I made sure the phone stayed awake, Office Mobile had difficulty getting large files from my phone to my SkyDrive.

SkyDrive integration

In my initial testing I found that the Office app's SkyDrive integration was spotty at best. (To be fair, this is also true of Microsoft's SkyDrive app.) Most documents created using the app or Microsoft's Web apps synchronized with SkyDrive, but depending on their size, uploading files from my phone, had those timeout issues.

Documents created on my Mac and saved in my Mac's SkyDrive folder often took hours to appear on my phone. This may be a limitation of SkyDrive on my Mac, but, if you're accustomed to Dropbox, which synchronizes immediately, it will be an unwelcome surprise to anyone who thinks the doc they just saved in SkyDrive will be available on their phone.

I also found that when saving changes to an existing document, SkyDrive often reported conflicts with an existing copy of the document on SkyDrive. This, despite the fact that I was the only one editing the document and only on my phone. Subsequent saves worked, but it almost never allowed me to save changes to documents the first time I tried.

Final impressions

While these are only initial impressions, and fuller use may turn up solutions to some of these problems, on first look this app does not impress. Yes, it's Microsoft Office on your iPhone, but it's Office in air quotes--which is to say that, while you can create and edit Office documents on your phone, there isn't much here in the way of added value and, in fact, may only introduce frustration to your daily grind. Also, the fact that it's an iPhone-only app seems like an unnecessary limitation on Microsoft's part. While it's possible to use the Web-based version of Office on your iPad, a native iPad app seems like a more obvious solution.

Tuesday, 18 June 2013

Xamarin 2.0 works mobile development magic

Unless you've been living on a planet far, far, away from the galactic trade routes, you know there are only two practical choices of programming languages -- Java and Objective-C -- for developing native mobile apps. If you are an experienced C# codesmith who wanted to try your hand at Android or iOS app development, you were out of luck. No longer: Xamarin 2.0, an SDK produced by Xamarin, allows you to write Android and iOS apps using C# code. Equally important, you can do this with Microsoft's Visual Studio.

The Xamarin SDK is based on an open source project known as Mono that allows Microsoft .Net applications to run on other platforms. Xamarin currently consists of class libraries, a C# compiler, and a virtual machine. The class libraries implement the core APIs of Microsoft's .Net 4.0 framework. The compiler complies with the C# 5.0 standard, and it has support for namespaces and assemblies. The virtual machine executes the Common Language Infrastructure bytecode generated by the C# compiler.

The Xamarin SDK also provides platform-specific frameworks that work with Google's Android APIs and Apple's iOS APIs. However, these frameworks are not abstraction layer APIs that only access a lowest common denominator of platform services. Instead, they provide "bindings" -- mechanisms that enable C# method calls to properly invoke native methods designed for use with a different programming language -- to the native APIs for each platform. The Android API binding frameworks are called Mono for Android, while those for iOS are called MonoTouch. The result: Xamarin lets you write a native mobile app entirely in C# code.

To use the Xamarin SDK to its fullest, the app should be factored so that its UI code is uncoupled from its core algorithmic code. That is, you write the core algorithms with the .Net framework, then implement the native UI for each target platform using the Mono for Android and MonoTouch frameworks. The factored design allows the app to be built and deployed on both Android and iOS devices, where the app's core code uses the native API of the target platform. This scheme lets you repurpose field-tested C# code and libraries. It also provides some flexibility in choosing how many of the platform's native APIs to use. For example, your app might draw on the .Net networking stack for network services or rely on the platform's own networking stack frameworks.

To develop your Android and iOS apps, you can use Xamarin's own IDE, Xamarin Studio, or stick with Visual Studio. The Xamarin IDE allows you to organise projects into solutions so that one build command will make both an Android app and an iOS app. The Xamarin IDE also lets you execute and debug code in simulators for each platform or on the devices themselves. There's no compromise if you prefer to develop in Visual Studio, as Xamarin lets you build, download, and debug app code on the target devices with Microsoft's IDE.

iOS app development: It's complicated

Although Xamarin lets you use your Windows PC for iOS development, that doesn't mean you don't need a Mac. For a number of reasons, Xamarin still requires Apple's iOS SDK tools to complete the code generation. For example, the Xcode simulator is required for code debugging, and the app's interface must be designed using Xcode's layout and storyboard editor, Interface Builder (IB). Finally, to distribute apps in the App Store you must use Xcode's code-signing mechanism.

How is it possible to use Visual Studio to write and debug iOS apps? Xamarin performs a clever sleight of hand that sets up the Mac as a back-end build server to Visual Studio. Installing Xamarin on the Mac places a remote build server on the computer. This build server uses Apple's Bonjour service discovery protocol so that Windows systems can find it on the network and establish remote sessions with it. An inexpensive Mac Mini can be used as a shared network resource for multiple Windows developers.

When you execute a build with Visual Studio, the remote session has the build server issue the appropriate command lines to the Xcode build tools. (This works because the Xcode IDE itself is simply a GUI layered over command-line tools.) After the build completes, the iOS simulator on the Mac starts and remote commands from Visual Studio operate the simulator through the Xcode debugger. Or the Xcode debugger can download the code onto an iOS device, and you can debug it there through Visual Studio.

The other aspect to iOS app development is whether to IB or not to IB. The UI of an iOS app can be constructed two ways: either through program code or by using Xcode's visual editor. IB lets you lay out the app's interface by pointing, clicking, and dragging UI elements. These UI elements are actually Cocoa Touch framework objects in a serialised format. That is, you manipulate the UI objects themselves in IB. This ability to edit Cocoa Touch objects is not easily duplicated on the PC. Therefore, you either have to use IB on the Mac to design the app's UI or write the UI entirely in code to implement it. In the latter case, you can use a utility like PaintCode, which lets you design the UI visually; it then generates the appropriate Objective-C or C# code.

Constructing the UI for an Android app can be accomplished with Windows tools, because Android uses XML to store the layout. Xamarin Studio has a graphical layout editor similar to IB that lets you construct the Android app's UI visually. Xamarin also provides an add-in that implements this graphical editor in Visual Studio.

Using Xamarin Studio to run a C# app in the iOS simulator. A breakpoint has been set in a platform-specific UI file that manages the native implementation of a log-in screen.