Post Mortem: Xiine for iOS
In the Sept/Oct 2011 issue of CODE Magazine, I wrote about Xiine for Android. Let me remind you that Xiine is an electronic reader application for CODE Magazine. It was originally written in C# using WPF and is based on SOA architecture. With this software, all subscribers (it’s free) can read CODE Magazine issues on a PC. You can download Xiine at http://www.xiine.com.
Xiine is popular for digital content. There are desktop, Web, WebOS, and of course, the Android edition, which is now being distributed by Android Market and Amazon Marketplace.
There was one platform missing, though: the iOS version. That's the reason we decided to write Xiine for iOS and share this new experience. Because CODE is a magazine, the same version should be supported on both the iPod Touch/iPhone and the iPad.
Xiine for iOS was CODE’s very first Apple project and we passed through some roadblocks.
We wanted the users to have a good UI experience, just like the Android version so we made a list of goals:
- Authenticate Xiine users.
- List available brands and respective issues.
- Make clean and intuitive screens.
- Display user information.
- Enable reading articles.
- List already read articles.
- Zoom in and out on an article page.
- Save a history of what has been read.
- Use up minimal code-writing time.
What Went Right
Because we’d already done a lot of technological work, this project seemed fairly painless.
We took advantage of the existing architecture for the Android project.
The architecture is very simple (Figure 1):
Figure 1: The architecture for Xiine service is simple.
- Apple devices access the REST service at xiine.services.com, requesting a JSON object.
- The REST server responds to the device, which understands the JSON object and converts it into real information.
Creating a Similar User Interface and Re-using Code
The login screen on the Android version should be similar to the iOS version. Due to different resolutions, it's not possible to be exactly the same, but we could have the same simplicity and functionality: Enter the user name and password.
After the log in, the user can see the available brands (see Figure 2). The iOS version is much the same as the Android page and shows the title and description on the list.
Figure 2: These are available brands as viewed on the iPhone.
After the brand is chosen, a list of magazine issues with complete information is displayed when a magazine is clicked (Figure 3). It’s a little bit different on the iOS version, but not much.
Figure 3: This is a list of magazine issues on the iOS.
Like logging in and choosing a brand, there is minimal difference between the Android and iOS versions for choosing an article from the list.
There wasn’t much work to do to write the code for the interface because we could base the iOS on the Android code that already existed.
Because we already had the Android version, we didn't need to worry about layout and how the objects would fit in different screen resolutions. We already had the layout set and even though Objective-C was a brand new language for us, it was learnable.
Because we already had the Android version, we didn't need to worry about layout and how the objects would fit in different screen resolutions.
Just like when we built the Android version, the usage of the JSON library was one of the most important parts of the project, as all the information needed was available from a WCF service. Also, we had already made the changes needed for the Android version, so we didn't have to touch a single line of code!
By: Mr Milton Abe
Milton has been working in software development since 1999 when he started his first project at IPT-USP, Sao Paulo, Brazil.
He taught software development for three years at FASP University (Sao Paulo/Brazil) and was responsible for the first .NET project at Porto Seguro, the largest insurance company in Brazil, developing alarm and truck tracking systems.
Milton has worked at EPS Software, Houston, TX (www.eps-software.com) for four years, especially with MVVM, MVC and WCF architectures as well as Android development.