Swift vs. Objective-C

Swift vs. Objective-C

IS SWIFT EASIER TO LEARN?

From a pure programming standpoint, you’re almost guaranteed to be more productive using Swift. Of course, if you’re an expert Objective-C developer, that might not be the case.

Swift is the obvious choice if you’re new to iOS and looking to get up to speed quickly. The language will stay out of your way allowing you to focus on the things that matter: making your app work the way you want it to!

WILL I HAVE TO LEARN BOTH OBJECTIVE-C & SWIFT?

Just about every iOS app is built using libraries of code created by Apple in Objective-C. Many apps also use libraries created by other developers (which, to-date, have been written in Objective-C as well). Libraries are useful things you can use to save a lot of time and add functionality into your app easily.

Now you may be wondering…

“If all the existing libraries are written in Objective-C, won’t I still have to continue using Objective-C?”

The answer is no, Swift can interact easily with Objective-C code whether it’s a single file or an entire library. This means you’ll be able to build your application in Swift while taking advantage of Objective-C libraries very much like you would before.

Keep in mind that Objective-C isn’t going anywhere anytime soon, so if you’re inheriting an Objective-C codebase, or looking to modify an existing Objective-C library, wading into the Objective-C waters is inevitable.

How do I do [x] with Swift?

With Objective-C being close to 35 years old, and it having been language used to build Mac OSX and iOS applications for years, there’s a substantial community and body of knowledge out there constantly documenting best practices, approaches to common and not-so-common problems, pretty much anything you can think of about using Objective-C.

When learning Swift, something that may be an issue for a little while will be the comparatively slim set of resources out there. Stackoverflow, blogs, tutorial sites are quickly compiling info on all aspects of Swift development, but it’ll take some time to reach the saturation point that Objective-C currently enjoys.

In the meantime, a few excellent resources are objc.io (despite the name, they’re into Swift as well) and http://iosdevweekly.com/. The Swift documentation is also a great place to start.

So what’s the answer – Objc or Swift?

Moving forward, Swift. The combination of a cleaner, perhaps more familiar syntax, a more modern language, and superb backwards compatibility makes Swift a great choice to use in your iOS apps, whether you’re new to the platform or a long-time Objective-C guru.

Use This Technique to Beautifully Manage Your Database

Use This Technique to Beautifully Manage Your Database

If you’ve ever said to yourself, “I’d love to learn how to use a database, but I don’t have time to learn SQL, PSQL or any of those funky coding languages!”

… then I have something you.

Active Admin!

It’s beautiful. It’s free. And best of all, you can get started by adding just 1 line of code to your Rails app.

Watch the video above to learn the “Who, What, Why & When” in less than two minutes. And then give Active Admin a try.

PS. Don’t have time for coding right now? Click here to view a running demo of Active Admin that you can peak at.

Video Highlights

  • Active Admin helps you manage data (and your database) using Rails.
  • With Active Admin you can quickly create, read, edit and delete data.
  • Active Admin is free (and open source). You can get started right now by visiting Active Admin on Github or by adding the following to your gemfile:
gem 'activeadmin', github: 'gregbell/active_admin'