noodlewerk / Spaghetti

A Cocoa framework for object mapping to and from not-so-RESTful webservices.
BSD 2-Clause "Simplified" License
23 stars 5 forks source link

Spaghetti

A Cocoa framework for object mapping to and from not-so-RESTful web services.

Introduction

Connecting your app to a web server can be such a joy. Especially if that web server provides an API that was designed in cooperation with you and using the conventions of REST. Unfortunately this isn't always the case. Small design decision have big consequences for the implementation on the client side, leaving you with your super-RESTful framework that is a pain to connect to.

Spaghetti is a framework for connecting your app to a web server, but doesn't make too many assumptions on how RESTy that web server is. It consists of separate layers of abstraction that can be customized depending on the needs of the API. This makes it easy to connect to REST and less-than-horrible in other cases.

Features

Getting Started

Clone this repo and take a look at the demo code.

Overview

           +----------------+ +----------------+ +----------------+
Manage     |    Backend     | |    Schedule    | |    Operation   |
           +----------------+ +----------------+ +----------------+

           +----------------+ +----------------+ +----------------+
Calling    |    Endpoint    | |      Call      | |   Dialogue     |
           +----------------+ +----------------+ +----------------+

           +----------------+ +----------------+ +----------------+
Mapping    |     Mapping    | |      Path      | |    Transform   |
           +----------------+ +----------------+ +----------------+

           +----------------+ +----------------+ +----------------+
Store      |      Store     | |    ObjectID    | |   ObjectType   |
           +----------------+ +----------------+ +----------------+

           +----------------+ +----------------+
Utilities  |     Parser     | |      Path      |
           +----------------+ +----------------+

Service

At top we have a set loosely related classes that provide high-level functionality to manage and schedule operations.

Calling

The connection layer deals with creation and configuration of calls over the line.

Mapping

Mapping is the process of transforming data from a generic dictionary format to objects of custom classes.

Store

Utilities

The mapping and storing of data use a set of custom utilities that provide functionality not readily available in Apple's frameworks:

Build in XCode

The source comes with an XCode project file that should take care of building the library and running the demo app. To use Spaghetti in your project, you can build a static Framework using the SpaghettiUniveral target.

Documentation

Documentation generated and installed by running from the project root:

appledoc -p Spaghetti -v 0.1 -c Noodlewerk --company-id com.noodlewerk -o . .

See the appledoc documentation for more info.

License

Spaghetti is licensed under the terms of the BSD 2-Clause License, see the included LICENSE file.

Authors