Skip to content

Instantly share code, notes, and snippets.

@lbrenman
lbrenman / Account.js
Created May 28, 2015 01:56
Appcelerator Arrow Salesforce Composite Model Example - Contact With Account
var Arrow = require("arrow");
var Model = Arrow.Model.reduce("appc.salesforce/Account","Account",{
"fields": {
"Name": {
"type": "string",
"description": "Account Name",
"readonly": false,
"maxlength": 255,
"required": true,
@lbrenman
lbrenman / employee.js
Last active August 29, 2015 14:22
Appcelerator Arrow Field Validation in the model and Multiple Field Validation in a pre Block
var Arrow = require("arrow");
var jobTitle = new Array("SA", "SE", "VP", "SAM", "SDR");
var Model = Arrow.createModel("employee",{
"fields": {
"fname": {
"type": "String"
},
"lname": {
"type": "String",
@lbrenman
lbrenman / index.xml
Last active August 29, 2015 14:22
LiveView Test 001
<Alloy>
<Window backgroundColor="white">
<Label>Hello Boyd</Label>
</Window>
</Alloy>
@lbrenman
lbrenman / FinancialWatchList_v1_0.md
Last active August 29, 2015 14:24
Financial Watch List in Arrow

#Stock Watch List using Appcelerator Arrow

See how Appcelerator Arrow can be used to create a mobile Stock Watch List.

The Appcelerator mBaaS is a powerful, scalable middleware platform for accelerating and optimizing mobile applications. In a prior post I described how to leverage the Appcelerator mBaaS, Node.ACS and ACS to create a Stock Watch List that could be utilized in a brokerage application. By storing the Watch List in the mBaaS, you are able to keep the Watch List synchronized among all your mobile devices. Furthermore, the mobile application is more performant since it does not need to make repeated calls to the stock quote service for each stock symbol in the Watch List; instead it can make a call to one API and the mBaaS does the rest. Refer to the blog post for more background on this.

This blog post will

@lbrenman
lbrenman / README.md
Created July 22, 2015 02:26
Appcelerator Titanium PDF Viewer Demo 2 - If not already copied, then retrieve PDF from resource directory and store in file system and view

#PDF Viewer demo - Application Resource

  1. For Android check if PDF has been copied to SDCard
  2. if not, then copy to SDCard and open
  • use docviewer on ios and exernal app (via intent) on android
  1. if so, then open pdf
  • use docviewer on ios and exernal app (via intent) on android

Note that Android, the file is stored in the externalStorageDirectory (SDCard) so deleting the application will not remove the pdf form the SDCard. Use a File Manager app (pn Android) to delete the file

@lbrenman
lbrenman / queryArrayExample.md
Created September 2, 2015 15:54
Appcelerator Arrow - How to query data that contains an array of elements
@lbrenman
lbrenman / MyAccount.js
Last active October 14, 2015 04:02
Arrow Basic (Server Assisted) Sync Example - Custom API With error reporting, Block for setting dates on POST
var Arrow = require("arrow");
var Model = Arrow.createModel("MyAccount",{
"fields": {
"name": {
"type": "String",
"required": true
},
"type": {
"type": "String"
@lbrenman
lbrenman / Account.js
Last active October 27, 2015 04:29
Arrow Custom Authentication Scheme - API Management
var Arrow = require("arrow");
var Model = Arrow.Model.reduce("appc.salesforce/Account","Account",{
"fields": {
"Name": {
"type": "string",
"description": "Account Name",
"readonly": false,
"maxlength": 255,
"required": true,
@lbrenman
lbrenman / README.md
Last active December 6, 2015 16:21
Arrow FInancial Watch List API using ArrowDB and Connector based on MarkitOndemand REST API

#Watchlist Example

An example of a financial watch list API for storing a watch list on the cloud and fetching quote data when you retreive the watch list. The watch list is basically a list of stock symbols (e.g. AAPL, TXN, INTC, ...) stored in an ArrowDB. When the watch list is retreived, Arrow will use a block to fetch stock quote data from MarkitOndemand REST API using my stockquote Arrow connector (addstockquote.js). Alternatively, this can be done with the connector by accessing the markitondemand REST API directly (addstockquote_.js).

Why do a watch list in the cloud instead of on device? So that the watch list will be synced across multiple devices for the same user.

Concept is based on a similar concept implemented in ACS/Node.ACS:

MarkitOndemand APIs are:

@lbrenman
lbrenman / blogpost.md
Last active December 21, 2015 15:20
Arrow SOAP Connector Simple Example

Arrow SOAP Connector Demo

SOAP (Simple Object Access Protocol) is a messaging protocol that allows programs that run on disparate operating systems to communicate using Hypertext Transfer Protocol (HTTP) and its Extensible Markup Language (XML). Even though REST web services are growing in popularity, if you are building a mobile application that connects to Enterprise Data sources most likely that data is exposed as a SOAP web service. Arrow's SOAP connector makes it very easy to expose SOAP services as mobile optimized REST API's that mobile devices prefer.

This blog post is a short demonstration of the Arrow SOAP Connector. You can find information about the connector at software.appcelerator.com.

For this demo, we will use the CDYNE SOAP Weather Service. The WSDL for this service can be found here:

[http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl](http://wsf.cd