Fat Fractal Tutorial for iOS: Getting Started

Learn how to make an iOS app with a back end like Twitter in this beginner Fat Fractal tutorial! By .

Leave a rating/review
Save for later
Share

Mobile backend services, also known as BaaS (Backend-as-a-Service), have become very popular these days because they save you a ton of time and money when it comes to developing an app that needs a remote database.

Tutorial Team member Antonio Martinez recently wrote an article about how to choose the best backend provider for your iOS app that covered many of the most popular options, like Parse, StackMob, and more.

In the time since Antonio wrote that article, there’s a new game in town! It’s called Fat Fractal, and we’re big fans.

Fat Fractal offers a number of advantages over other back-end providers, and in this tutorial we’re going to give you some hands-on experience with it so you can see if it’s right for you.

Keep reading to learn more about Fat Fractal, and how it stands out from other service providers like Parse!

Why Fat Fractal?

I have used Parse, Stack Mob, and recently a few months ago, Fat Fractal to write apps for my iOS consulting company. There were always something that didn’t feel quite right when using Parse or Stack Mob.

  1. Data modeling. Providers like Parse force you to use their own objects called PFObjects. This made me feel uncomfortable as I like to define my objects as subclasses of NSObject, instead of having extra overhead or lock-in in case I decide to change backend providers.
  2. Querying for data. Some extremely simple queries, if you are writing your own backend, turn into unimaginably complex API calls when using services like Parse. I remember writing an Instagram-like app for a client which had to make over 10 (!) separate API calls to the backend to just retrieve a profile page, when using Parse. This adds to alot of round trip requests and slow loading times.
  3. Server-side extensions. Way too much code that should be executed on the server, are instead being done on the iOS client. This is because the lack of control and access you have on the backend on services like Parse and Stack Mob.

So how does Fat Fractal stack up with regards to the rest of the BaaS providers? Let’s hear it from the founders of Fat Fractal themselves:

Compared to other BaaS, Fat Fractal is better thought through, and does not end up being a frustration at some point when you want to do something hard. The focus is on not limiting a developer in any way.

What we feel we do well:

  1. Datagraphs and relationships, including back references, which we have filed patents for. This is extremely powerful, and you can literally retrieve an object graph in a single query.
  2. Queries and the ability to walk through datagraphs to get what you want very efficiently.
  3. Permissions and security are way better thought through than anyone else.
  4. Support for native objects (NSObjects) that does not intrude on your client code, and support for binary data.
  5. The ability to develop your backend on localhost, test, debug and then deploy it to the cloud when you are satisfied.”

Also, Cory Wiles, a long-time iOS developer and BaaS enthusiast, has two blog posts about his experience with Fat Fractal which you can read here and here. Also, you can find his recent BaaS comparison reports – lots of extremely detailed information here, definitely worth checking out!

Here is a quote from Cory on why he loves Fat Fractal:

“Over the past 2 years I have used various BaaS services (Parse, Stackmob, Kinvey) with production apps and where I hand-rolled my own webservices using RDBMS, as well as NoSQL, which are not just ‘hello world’ tutorials. Each one has its niche in the market; but when making the decision of which service I would use for developing WhoNote, and any future applications, FatFractal is the clear choice.

I am able to keep clean, native objects easily, define a complex object-graph, implement proper server-client design with extensions, event handlers, scheduled tasks and last, but not least, have configurable implicit and explicit permissions while developing in an exact duplicate, local, development environment that I then push to the cloud. FatFractal is the next evolution of app development platforms.”

So with that, here is a tutorial for you to try out Fat Fractal for yourself, and see how it can help you reduce server-side complexities as an iOS developer!

Getting Started

In this tutorial, you will be building a social networking app similar to Twitter – but implemented 100% by yourself. :]

Your app will allow users to posts short messages like “tweets”, follow/unfollow other uses, and see “tweets” from users that they have followed.

Most of the heavy lifting and data querying will be done by the server backend, so you would need a robust BaaS service provider like Fat Fractal to do so.

So let’s create an account! Head over to Fat Fractal and click Login / Register:

Login

Fill in your email and the password you want, and follow the instructions there after to get your FatFractal account.

FatFractalRegistration

Check your email for a verification link to complete activation of your account. Click on the link and log in to your account.

ValidateEmailForFatFractal

You will be redirected to a welcome page, with a big button that allows you to Add a new Domain. Click that:

Add a Domain

In the form that appears, fill in the name of the domain you want. For this tutorial, I am using rwtweet as my domain name. You will have to use something else. The description is optional and you can fill in anything you want.

New Domain

Next, add an application to your domain by clicking on Add a new application:

Add a new application

Choose NoServer for Type, No Server Sandbox for Subscription, the domain you entered earlier, and then name the app the same as your domain. You can give it an optional description if you would like as well.

NewApp

Click Create, and you are done! You now have a fully working application and backend running in the cloud – though you can’t interact with it just yet ;)