SlideShare a Scribd company logo
AND




This is an introductory post on using StackMob for the backend services of your mobile
applications. The StackMob platform helps you build, deploy and scale your backend
while making it very easy for you to add push notifications, social integration and more
to your apps. Here is a blog posting on why services like StackMob are a value-add for
Appcelerator developers.

Why a PaaS for Mobile Developers Makes Sense

Here is my brief outline on the benefits StackMob provides: More Information Available
on website

     •   REST Based API
     •   Custom Code Integration
     •   Social Media Integration
     •   Push Notification
     •   Separation of Production and Staging Environments

In this first part of a three part series we will cover a very basic implementation using a
Javascript REST based API. StackMob provides an IOS and Android SDK so you can create
a native module if you like. In the last few weeks I created a functioning IOS module and
have started working on an Android module that I will release to the Marketplace soon.

In this initial example I have created, there are two simple objects: users and photos. We
will expand on the relationship in a later posting, but this is good enough for now.

First you need to go to StackMob and get an account. They are still in beta, but if you
indicate that you are trying to integrate with Appcelerator, they will give you priority
access.

Create An App
Here we will create our user object. StackMob allows us to specify that the object is a
user object and this is how we can log in and out of our application. No trying to roll
your own authentication method. It is using xAuth over HTTPS, so you are all set.

Click "Create a Schema" to Add the User Object
then enter the appropriate information for your user object
I have added another object called Photos. I am using it to post data to the server.
StackMob made the integration with Amazon S3 very easy.
Here is my photo object
When you are all done, you should have something that looks similar to this, if you have
been following along.
In a few minutes, I created my app and created two objects using their platform. Lets
test out what we created in the Console before we even get to code; click on the link
that says "Console"




This will bring you to the Console that will allow you to go through all of
the CRUDmethods to test your objects you have created
If you click GET for the default method our application, you will get a listing of the
schema you have created based on your application object; the output should look
similar to this.


Ok enough StackMob, where is the Appcelerator code....

First you need to initialize the module. I have created a file called credentials which
holds your StackMob credentials and associated application information. Here is what
the file looks like.

Now with the credentials set, here is how you intialize the module.

And finally, here is how you create a user object to go along with the object you created
in the console.

the successful output from the module should look something like this.

The client create method is a nice wrapper around a POST of the REST API call to create
the user object. The whole objective of the module I created is to cut down on the time
spent coding the oAuth API and get straight to doing productive things. The way the
module is created, it will take the parameters and return the results as a JSON object

Here we make an API call through the module to get the list of all of the user(s) we have
created in the system.
And to get a specific user, we can pass in the value for the user name in the GET query
like this.

In Part Two I will cover setting up the Amazon S3 Integration and the uploading of image
files to the system.

Complete Listing

LINKS

       •   StackMob
       •   Appcelerator
       •   Zipped Project Used in the blog posting
       •   Part 1a - Logging In with StackMob User Accounts

	
  

More Related Content

What's hot (20)

PDF
JOSA TechTalks - RESTful API Concepts and Best Practices
Jordan Open Source Association
 
PDF
Progressive Web Apps by Millicent Convento
DEVCON
 
PPTX
Tips and Tricks for new async web client capabilities on model driven apps
Mehdi El Amri
 
PPTX
Introduction to Android Programming
Raveendra R
 
PDF
Set up email authentication using react native + firebase auth + react naviga...
Katy Slemon
 
PDF
An introduction to AngularJS
Yogesh singh
 
PPTX
WordPress and IoT
WordPress Trivandrum
 
PDF
Web driver selenium simplified
Vikas Singh
 
PPTX
Creating a custom connector in mule
Achyuta Lakshmi
 
PDF
WordPress Launch Checklist
MakeWebBetter
 
PPTX
Microsoft identity platform community call-May 2020
Microsoft 365 Developer
 
PPT
Ajax Highlights
Sharvan Kumar
 
PPTX
Introduction to AngularJS Framework
Raveendra R
 
PDF
O365con14 - a developer jam with yammer
NCCOMMS
 
DOCX
Angular js getting started
Hemant Mali
 
PPTX
Rest security in mule
Son Nguyen
 
PPT
Authentication across the Atlassian Ecosystem - AtlasCamp 2011
Atlassian
 
PPTX
Integration with Microsoft SharePoint using Mule ESB
Sanjeet Pandey
 
PPTX
What's new in Angular 2?
Alfred Jett Grandeza
 
PPTX
Implement Authorization in your Apps with Microsoft identity platform-June 2020
Microsoft 365 Developer
 
JOSA TechTalks - RESTful API Concepts and Best Practices
Jordan Open Source Association
 
Progressive Web Apps by Millicent Convento
DEVCON
 
Tips and Tricks for new async web client capabilities on model driven apps
Mehdi El Amri
 
Introduction to Android Programming
Raveendra R
 
Set up email authentication using react native + firebase auth + react naviga...
Katy Slemon
 
An introduction to AngularJS
Yogesh singh
 
WordPress and IoT
WordPress Trivandrum
 
Web driver selenium simplified
Vikas Singh
 
Creating a custom connector in mule
Achyuta Lakshmi
 
WordPress Launch Checklist
MakeWebBetter
 
Microsoft identity platform community call-May 2020
Microsoft 365 Developer
 
Ajax Highlights
Sharvan Kumar
 
Introduction to AngularJS Framework
Raveendra R
 
O365con14 - a developer jam with yammer
NCCOMMS
 
Angular js getting started
Hemant Mali
 
Rest security in mule
Son Nguyen
 
Authentication across the Atlassian Ecosystem - AtlasCamp 2011
Atlassian
 
Integration with Microsoft SharePoint using Mule ESB
Sanjeet Pandey
 
What's new in Angular 2?
Alfred Jett Grandeza
 
Implement Authorization in your Apps with Microsoft identity platform-June 2020
Microsoft 365 Developer
 

Viewers also liked (7)

PPTX
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Aaron Saunders
 
DOCX
SubAid User Guide - Overview
Aaron Saunders
 
PDF
Identify & Unlock Your Mobile Strategy
Aaron Saunders
 
PDF
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Aaron Saunders
 
PDF
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
Aaron Saunders
 
PDF
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Aaron Saunders
 
PPTX
Mobile Application Workshop - So You Want To Build a Mobile App?
Aaron Saunders
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Aaron Saunders
 
SubAid User Guide - Overview
Aaron Saunders
 
Identify & Unlock Your Mobile Strategy
Aaron Saunders
 
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Aaron Saunders
 
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
Aaron Saunders
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Aaron Saunders
 
Mobile Application Workshop - So You Want To Build a Mobile App?
Aaron Saunders
 
Ad

Similar to StackMob & Appcelerator Module Part One (20)

PPTX
PaaS + Appcelerator = WIN
Aaron Saunders
 
PDF
Mobile app class Chicago
Matthew Dobson
 
PDF
Five Elements of Software Engineering for Mobile
3scale.net
 
PDF
Matt training-html-halfday
Matthew Dobson
 
PPT
Joomla as a mobile App backend - ideas, examples and experiences
Andy_Gaskell
 
ZIP
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
Andrew Chalkley
 
KEY
Titanium Mobile Intro
Marshall Culpepper
 
PDF
I Love APIs - Oct 2015
Mike McNeil
 
PDF
Joe Emison - 10X Product Development
ServerlessConf
 
PDF
Enterprise Data Sheet
Laura Khalil
 
PPT
API Architecture Summit 2014- APIs: A Mobile Developer's Perspective
Niall Roche
 
PPTX
Building The Wix SDK
David Zuckerman
 
PDF
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
PDF
MongoDB.local Berlin: App development in a Serverless World
MongoDB
 
PDF
Designing Web Apis Building Apis That Developers Love Jin Brendasahni
reknesluima
 
PDF
Magnet rest2mobile: Turn REST APIs into mobile SDKs (iOS, Android & JS)
Pascal Jaillon
 
PDF
Training Semester Report, Api Types of Apps
RamanTayal4
 
PDF
HTML5 Slides
Matthew Dobson
 
PPT
Mobile + cloud = heaven
X.commerce
 
PDF
apidays LIVE Australia 2020 - Contract-first API development with Spot by Fra...
apidays
 
PaaS + Appcelerator = WIN
Aaron Saunders
 
Mobile app class Chicago
Matthew Dobson
 
Five Elements of Software Engineering for Mobile
3scale.net
 
Matt training-html-halfday
Matthew Dobson
 
Joomla as a mobile App backend - ideas, examples and experiences
Andy_Gaskell
 
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
Andrew Chalkley
 
Titanium Mobile Intro
Marshall Culpepper
 
I Love APIs - Oct 2015
Mike McNeil
 
Joe Emison - 10X Product Development
ServerlessConf
 
Enterprise Data Sheet
Laura Khalil
 
API Architecture Summit 2014- APIs: A Mobile Developer's Perspective
Niall Roche
 
Building The Wix SDK
David Zuckerman
 
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
MongoDB.local Berlin: App development in a Serverless World
MongoDB
 
Designing Web Apis Building Apis That Developers Love Jin Brendasahni
reknesluima
 
Magnet rest2mobile: Turn REST APIs into mobile SDKs (iOS, Android & JS)
Pascal Jaillon
 
Training Semester Report, Api Types of Apps
RamanTayal4
 
HTML5 Slides
Matthew Dobson
 
Mobile + cloud = heaven
X.commerce
 
apidays LIVE Australia 2020 - Contract-first API development with Spot by Fra...
apidays
 
Ad

More from Aaron Saunders (8)

PDF
Quick Way to work with Models and Alloy in Appcelerator Titanium
Aaron Saunders
 
PDF
Simple Unit Testing in Appcelerator Titanium Alloy
Aaron Saunders
 
PPTX
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
Aaron Saunders
 
PPTX
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
Aaron Saunders
 
PPTX
Introduction to Module Development with Appcelerator Titanium
Aaron Saunders
 
PPTX
Alloy Simple App Demonstration
Aaron Saunders
 
PDF
Clearly Innovative Inc Capabilities
Aaron Saunders
 
PPTX
Modeveast Appcelerator Presentation
Aaron Saunders
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Aaron Saunders
 
Simple Unit Testing in Appcelerator Titanium Alloy
Aaron Saunders
 
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
Aaron Saunders
 
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
Aaron Saunders
 
Introduction to Module Development with Appcelerator Titanium
Aaron Saunders
 
Alloy Simple App Demonstration
Aaron Saunders
 
Clearly Innovative Inc Capabilities
Aaron Saunders
 
Modeveast Appcelerator Presentation
Aaron Saunders
 

Recently uploaded (20)

DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 

StackMob & Appcelerator Module Part One

  • 1. AND This is an introductory post on using StackMob for the backend services of your mobile applications. The StackMob platform helps you build, deploy and scale your backend while making it very easy for you to add push notifications, social integration and more to your apps. Here is a blog posting on why services like StackMob are a value-add for Appcelerator developers. Why a PaaS for Mobile Developers Makes Sense Here is my brief outline on the benefits StackMob provides: More Information Available on website • REST Based API • Custom Code Integration • Social Media Integration • Push Notification • Separation of Production and Staging Environments In this first part of a three part series we will cover a very basic implementation using a Javascript REST based API. StackMob provides an IOS and Android SDK so you can create a native module if you like. In the last few weeks I created a functioning IOS module and have started working on an Android module that I will release to the Marketplace soon. In this initial example I have created, there are two simple objects: users and photos. We will expand on the relationship in a later posting, but this is good enough for now. First you need to go to StackMob and get an account. They are still in beta, but if you indicate that you are trying to integrate with Appcelerator, they will give you priority access. Create An App
  • 2. Here we will create our user object. StackMob allows us to specify that the object is a user object and this is how we can log in and out of our application. No trying to roll your own authentication method. It is using xAuth over HTTPS, so you are all set. Click "Create a Schema" to Add the User Object
  • 3. then enter the appropriate information for your user object
  • 4. I have added another object called Photos. I am using it to post data to the server. StackMob made the integration with Amazon S3 very easy. Here is my photo object
  • 5. When you are all done, you should have something that looks similar to this, if you have been following along.
  • 6. In a few minutes, I created my app and created two objects using their platform. Lets test out what we created in the Console before we even get to code; click on the link that says "Console" This will bring you to the Console that will allow you to go through all of the CRUDmethods to test your objects you have created
  • 7. If you click GET for the default method our application, you will get a listing of the schema you have created based on your application object; the output should look similar to this. Ok enough StackMob, where is the Appcelerator code.... First you need to initialize the module. I have created a file called credentials which holds your StackMob credentials and associated application information. Here is what the file looks like. Now with the credentials set, here is how you intialize the module. And finally, here is how you create a user object to go along with the object you created in the console. the successful output from the module should look something like this. The client create method is a nice wrapper around a POST of the REST API call to create the user object. The whole objective of the module I created is to cut down on the time spent coding the oAuth API and get straight to doing productive things. The way the module is created, it will take the parameters and return the results as a JSON object Here we make an API call through the module to get the list of all of the user(s) we have created in the system.
  • 8. And to get a specific user, we can pass in the value for the user name in the GET query like this. In Part Two I will cover setting up the Amazon S3 Integration and the uploading of image files to the system. Complete Listing LINKS • StackMob • Appcelerator • Zipped Project Used in the blog posting • Part 1a - Logging In with StackMob User Accounts