Posts

Now offering Swift development

touchbee now offers development of new projects for iOS in either Objective-C or Swift. Swift is a new programming language introduced by Apple this summer to replace Objective-C as the main language to develop iOS apps. Some of the advantages of this new languages are:

  • Closures unified with function pointers
  • Tuples and multiple return values
  • Generics
  • Fast and concise iteration over a range or collection
  • Structs that support methods, extensions, protocols.
  • Functional programming patterns, e.g.: map and filter

More information about Swift can be found on Apples official Swift website: https://developer.apple.com/swift/

Software Libraries

Favorite iOS and Android Libraries of 2013

At the beginning of any software project and with mobile apps in particular we ask ourselves the question of which software libraries and tools to utilize. Some libraries are more specialized than others, but in the end there are plenty of common tools available that promise to make the life of the developer much easier. In this post we briefly want to talk about what software libraries are, why we should use them ( or shouldn’t ), where to get them and of course we’ll write up our own favorite library list.

Software libraries

A quick look at Wikipedia leads us to the following description for software libraries:

Library code is organized in such a way that it can be used by multiple programs that have no connection to each other, while code that is part of a program is organized to only be used within that one program.

So in short the software library is code organized in a way that it can be used across multiple software projects, usually without the need of modification. Generally there are two ways for distributing a library: Source code or binary files. Sometimes the source code and the binaries are both distributed by its author. Having the source code available is certainly favorable, as its user can make changes or inspect the source code for security issues.  Occasionally you are only provided with the library binaries. That can be the case if the library is made available for purchase by the author or is closed source.

Android

Libraries on Android are often provided as JAR files, which can be considered the Java equivalent of binary libraries. They are usually added to the Java Build Path in your development tool ( like Eclipse ) and are then ready to be used. If the source code is available, you typically add those libraries as sub-projects to Eclipse.

iOS

The iOS libraries are either binaries ( often times distributed as something like libSuperDuper.a ). Those simply get added to your Xcode library search path. If the source code is made available you it typically comes in the form of a simple folder containing the source code. Larger libraries are also as something called a Framework. Last but not least a lot of times the library is supplied as another Xcode project which you can add as a sub-project to your own.

 

Why should I care?

Honestly, I don’t remember the last app I have worked on that did not make use of a third party library. Simply put, they usually make your developers life easier. That doesn’t mean though you should use as many libraries as possible. In fact, the more libraries you use the more difficult can it be to maintain your project and dependencies.

 

Good and bad libraries

Like with everything, there are good and bad libraries. But, what makes a good or a bad library. Here we are giving you the list of criteria that we use to determine if a library should be used in production code.

Bad library:

  • Code not well written
  • Code has ( a lot of ) bugs
  • Code not often updated/maintained
  • Library not very flexible
  • Missing/No documentation

Good Library:

  • Code is well written
  • Code with no or very few bugs
  • Code is well and often maintained
  • Library is flexible
  • Library is documented
  • Code is highly rated

If you are familiar with GitHub, and the library is available there you should be able to check most of the above criteria by yourself.

 

License & Attribution

Pretty much every library comes with a license that will tell you how you are allowed to use it. Some licenses require you to attribute the library usage within your app. The developer has to be careful what license is attached if he wants to stay out of potential legal issues down the road. A comprehensive list of software licenses can be found here on Wikipedia.

 

Where to find libraries?

There are a lot of libraries out there, free or for purchase. It’s not always easy to find the best library for your app. The most popular ones are most likely hosted on GitHub. If you are an iOS developer I would recommend that you check out either the big archive of CocoaControls or even CocoaPods. The most useful Android libraries are also hosted on GitHub, however there aren’t any good and complete archive websites for those yet.

And finally this post wouldn’t be complete without our favorite iOS and Android libraries we found useful in 2013.

 

Our favorite Android libraries

1. ActionBarSherlock

ActionBarSherlock is an extension of the support library designed to facilitate the use of the action bar design pattern across all versions of Android with a single API.

 

2. ViewPagerIndicator

Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.

 

3. SlidingMenu

SlidingMenu is an Open Source Android library that allows developers to easily create applications with sliding menus like those made popular in the Google+, YouTube, and Facebook apps.

 

4. Gson

Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.

 

5. Little Fluffy Location Library

Battery-friendly background location updates for Android. Perfect for widgets that require periodic updates in background, and for apps that need a reasonably current location available to them on startup. Also works great for apps that do something with location periodically, such as using it to get updates from a server.

 

6. RoboGuice

RoboGuice 2 smoothes out some of the wrinkles in your Android development experience and makes things simple and fun. Do you always forget to check for null when you getIntent().getExtras()? RoboGuice 2 will help you. Think casting findViewById() to a TextView shouldn’t be necessary? RoboGuice 2 is on it.

 

7. Twitter4j

Twitter4J is an unofficial Java library for the Twitter API. With Twitter4J, you can easily integrate your Java application with the Twitter service. Twitter4J is an unofficial library.

 

8. Facebook SDK

Integrate with Facebook to help you build engaging social apps and get more installs.

 

9. Hockey SDK

HockeyApp is the best way to collect live crash reports, get feedback from your users, distribute your betas, and analyze your test coverage.

 

10. Amazon AWS SDK for Java

Get started quickly using AWS with the AWS SDK for Java. The SDK helps take the complexity out of coding by providing Java APIs for many AWS services including Amazon S3, Amazon EC2, DynamoDB, and more.

 

Our favorite iOS libraries

1. AFNetworking

AFNetworking is a delightful networking library for iOS and Mac OS X. It’s built on top of the Foundation URL Loading System, extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.

 

2. JSONKit

Fast and simple JSON parsing library used in many apps.

 

3. Cocoa Lumberjack

It is similar in concept to other popular logging frameworks such as log4j, yet is designed specifically for Objective-C, and takes advantage of features such as multi-threading, grand central dispatch (if available), lockless atomic operations, and the dynamic nature of the Objective-C runtime.

 

4. RestKit

RestKit is an Objective-C framework for iOS that aims to make interacting with RESTful web services simple, fast and fun. It combines a clean, simple HTTP request/response API with a powerful object mapping system that reduces the amount of code you need to write to get stuff done.

 

5. MagicalRecord

MagicalRecord was inspired by the ease of Ruby on Rails’ Active Record fetching. The goals of this code are:

  • Clean up my Core Data related code
  • Allow for clear, simple, one-line fetches
  • Still allow the modification of the NSFetchRequest when request optimizations are needed

 

6. SVProgressHUD

SVProgressHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task.

 

7. SVWebViewController

SVWebViewController is a simple inline browser for your iOS app.

 

8. TTTAttributedLabel

TTTAttributedLabel is a drop-in replacement for UILabel, which provides a simple way to performantly render attributed strings. As a bonus, it also supports link embedding, both automatically with UIDataDetectorTypes and manually by specifying a range for a URL, address, phone number, event, or transit information.

 

9. Hockey SDK

HockeyApp is the best way to collect live crash reports, get feedback from your users, distribute your betas, and analyze your test coverage.

 

10. Facebook SDK

Integrate with Facebook to help you build engaging social apps and get more installs.