Skip to content

Instantly share code, notes, and snippets.

View kborchers's full-sized avatar

Kris Borchers kborchers

  • GM Financial
  • Dallas, TX
  • 10:04 (UTC -05:00)
View GitHub Profile
<!DOCTYPE html>
<link rel=stylesheet type="text/css" href="../../../../styles/myapp.css">
<body>
<div data-field=header></div>
<div data-field=customerForm></div>
<div data-field=footer></div>
</body>
<div data-field=customerform class=customerform>
<label for=name>Your name:</label>
@kborchers
kborchers / store-spec.md
Created June 25, 2012 12:57
Initial persistence API draft

Persistence API - draft 0.1

This is a initial proposal on having a very simple persistence layer

Requirements

  • Persist data on local storage as a type of buffer
  • Enable data to be created/saved/persisted/queryied/removed to/from the server side

References

At this year's JBossWorld Keynote, one of the things we wanted to show was the extension of business logic and business rules into the mobile landscape. The premise of the demo was to have a mobile shopping cart app that the sales team of our fictitious company could use to purchase electronics and swag for their customers. Rules were put into place based on the dollar amount of the order placed which would then trigger one or more approvals which would need to happen before the order was placed.

The app was first built as a mobile web app using a combination of jQuery Mobile and Backbone.js. jQuery Mobile provided the structure of the app giving it a mobile-friendly layout and set of controls. Backbone.js was used to provide a clean way to handle data modeling and synchronization, presentation of that data through jQuery Mobile enhanced views as well as the app's URL based routing. Once the app was a full-featured web app, we used Apache Cordova to wrap it up as a native app that could be installed on iOS,

@kborchers
kborchers / persistence-spec.md
Created July 10, 2012 15:34
Initial persistence API draft

Persistence API - draft 0.1

This is a initial proposal on having a very simple persistence layer

Requirements

  • Enable data to be created/saved/persisted/queryied/removed to/from the server side in a consistent manner without no matter the data format expected by the server

References

/* Need to add license, description, etc. */
// This will be broken into its own file to be reused
(function( window, undefined ) {
var aerogear = window.aerogear = {
};
})( this );
// AeroGear Pipeline
$.mockjax({
url: 'tasks',
responseTime: 1000,
responseText: [
{
id: 12345,
data: {
title: "Do Something",
date: "2012-08-01"
}
Generating: /Users/krisborchers/git-repo/beta.aerogear.org/_site/guides/README/index.html
^C/Users/krisborchers/git-repo/awestruct/lib/awestruct/handlers/base_handler.rb:102:in `read': Interrupt
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/handlers/base_handler.rb:102:in `execute_shell'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:86:in `popen3'
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/handlers/base_handler.rb:100:in `execute_shell'
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/handlers/asciidoc_handler.rb:51:in `rendered_content'
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/handlers/layout_handler.rb:48:in `rendered_content'
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/page.rb:127:in `rendered_content'
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/engine.rb:225:in `generate_page'
from /Users/krisborchers/git-repo/awestruct/lib/awestruct/engine.rb:213:in `generate_output'
Task Data
{
id: 12345,
date: "2012-07-30",
title: "Task 1-1",
description: "Task 1-1 description text",
project: "p1",
tags: [ "t1" ]
},
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.1.4 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/ffi-1.1.4/ext/ffi_c/gem_make.out
An error occured while installing ffi (1.1.4), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.1.4'` succeeds before bundling.
Request Headers
POST /todo-server/rest/task HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 124
Origin: http://localhost:8080
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1
Content-Type: application/json
Accept: */*