Developing on a new platform can be challenging. In fact, that’s why we launched FatFractal. Building your mobile app together with your app’s powerful backend is easier than ever before. But like you, we believe the proof is in the pudding: it’s one thing to create little “hello world” tests and quite another to build an entire app.
You can get up and running on the FatFractal Platform in minutes, writing to your app’s backend without a line of server-side code. And you should try it. Check out Install & Get Started to download the FatFractal Engine and scaffold up an app and check out My First App for iOS or My First App for Android to see how amazing it can be.
The purpose of this tutorial is deeper. We wanted to take you through every aspect of our platform from the point of view of an iOS or Android developer. Even there, we try to walk step-by-step through the process in the IDE (Xcode or Eclipse) and using native APIs too. If you haven’t done a lot of coding for iPhone or Android devices, you can learn a little bit about that as well. Side benefit.
The tutorial steps you through the creation of a mobile app (in iPhone and Android flavors) we’ve called Hoodyoodoo, from start to finish, to illustrate some of the capabilities of the FatFractal Platform.
The source code for this app can be downloaded: the whole app is divided into five, compilable chunks that can be run independently, in case you want to tackle the sections in order. If you want to just look through the final, complete application, you can do that as well. Download the complete tutorial files for Login to view. or Login to view..
The app itself is, conceptually, a simple game. The end-user is presented with two, random pictures of celebrities (or whomever) and selects the one the end-user would, um, “do;” naturally, we mean “do dinner with.” Although the game is played by one individual at a time, per phone, it is really a multi-user experience because the app’s backend keeps track of everyone playing the game, tallying who’s chosen in each case and maintaining a bunch of stats. We think you will be pleasantly amazed at how quickly you can build the app, from start to finish, without ever dealing with the frustrating “backend nonsense.”
Tutorial on the Emergent Framework
Tutorial Part 1: Basic CRUD operations
In Part I, we define a class, write some unit tests to validate our app can perform all CRUD operations properly and then create the UI to add Celebrities to our app’s datastore into our UI and prove we can retrieve them.
In Part I, we will accomplish the following:
- Create our new project
- Add the FatFractal Framework to the project
- Add the Celebrity object model to the project
- Store and Retrieve Celebrity objects
- Use CRUD with images
- Create a UI to add a new celebrity
- Create a UI to retrieve the new celebrity
Tutorial Part 2: How to Use Queries
In Part II, we implement the methods to create the data collected during game-play. We define an object, WouldYa, to store end-user selections, create the UI to present two celebrities to choose from, write queries to populate the UI and store the results on our app’s backend.
In Part II, we will accomplish the following:
- Write queries to retrieve single objects
- Get random objects of a specified type
- Write queries with parameters passed in
- Write tests to validate retrieving multiple objects
- Simplify the code to increase performance
Tutorial Part 3: Event Handlers
In Part III, we will accomplish the following:
- Define an Event Handler in the FatFractal Definition Language (FFDL)
- Define a model to be persisted on the back-end.
- Lazily add two new members to our Celebrity model.
- Initialize update data based on a CRUD event.
- Update the TopCeleb object, if a new celebrity-of-the-moment takes the lead.
Tutorial Part IV: Server Extensions
In Part IV, we will tackle trending data across all our end-users by extending our API. We will create a groovy API extension (i.e. “custom code”) that will efficiently aggregate data across multiple resource types. Yes, we are showing off how the FatFractal Platform allows us to extend our API–but this is also far more efficient for the client code and to optimize performance.
In Part IV, we will accomplish the following:
- Define an API extension in FFDL
- Define a new model that will be generated on the fly and will not be persisted on our app’s backend
- Calculate metrics based on queries from various, persisted collections
- Populate the StatsObject with the result
- Return the result to the client
- Add the UI to the client code to present this information
- Create the client code to retrieve this information from our app’s backend and populate the UI.
Tutorial Part V: Push Notifications
Finally, in Part V, we will top off our app by adding something everybody loves to have but hates to code: push notifications! Using a server extension, we’ll fire off a push notification to Hoodyoodoo users every time a new Top Celebrity is crowned, because we know you don’t want to miss an event like that!
Let’s Get Going: Preliminary SETUP