This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ischeme:ischeme [2010/07/28 12:10] ebainomu created |
ischeme:ischeme [2011/03/23 00:19] (current) ebainomu |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== iScheme ====== | ====== iScheme ====== | ||
- | iScheme is a prototype implementation of [[http:// | + | [[http:// |
+ | \\ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | iScheme is built on top of an R5RS [[http:// | ||
- | iScheme is built on top of an R5RS [[: | ||
===== Accessing iPhone APIs ===== | ===== Accessing iPhone APIs ===== | ||
Line 8: | Line 12: | ||
iScheme provides developers with an event-driven programming style for accessing iPhone capabilities as well as interacting with native applications, | iScheme provides developers with an event-driven programming style for accessing iPhone capabilities as well as interacting with native applications, | ||
- | < | + | < |
(begin | (begin | ||
(CURRENT-LOCATION | (CURRENT-LOCATION | ||
Line 19: | Line 23: | ||
</ | </ | ||
- | Scheme programs are directly executed on the iPhone and it is possible to write scripts that interact with native applications e.g., making a phone call by simply evaluating '' | + | Scheme programs are directly executed on the iPhone and it is possible to write scripts that interact with native applications e.g., making a phone call by simply evaluating '' |
+ | |||
+ | |||
+ | |||
===== Distributed Programming in iScheme ===== | ===== Distributed Programming in iScheme ===== | ||
When writing distributed iPhone applications in iScheme, the developer does not need to deal with low-level distribution concerns in Objective-C such as dealing with the Bonjour framework for service discovery, and socket APIs for remote communication. iScheme provides distribution constructs that abstract away these low-level distribution issues. | When writing distributed iPhone applications in iScheme, the developer does not need to deal with low-level distribution concerns in Objective-C such as dealing with the Bonjour framework for service discovery, and socket APIs for remote communication. iScheme provides distribution constructs that abstract away these low-level distribution issues. | ||
- | Let us demonstrate these constructs with an example: | + | Let us demonstrate these constructs with an example: |
- | + | ||
- | So, how do we realise | + | So, how do we realise |
==== Exporting functions as services ==== | ==== Exporting functions as services ==== | ||
Line 34: | Line 43: | ||
In the example of the news service application, | In the example of the news service application, | ||
- | < | + | < |
(define news-service (service-type iPhone-news)) | (define news-service (service-type iPhone-news)) | ||
(export-service news-publisher news-service) | (export-service news-publisher news-service) | ||
Line 41: | Line 50: | ||
A service type is defined using the '' | A service type is defined using the '' | ||
- | ==== Service discovery | + | |
+ | ==== Service discovery ==== | ||
Service discovery in iScheme is by way of registering an event handler on a service type, which is triggered whenever a function exported under that type is encountered in the network. | Service discovery in iScheme is by way of registering an event handler on a service type, which is triggered whenever a function exported under that type is encountered in the network. | ||
- | < | + | < |
(when-discovered news-service | (when-discovered news-service | ||
(lambda (publisher-ref) | (lambda (publisher-ref) | ||
Line 54: | Line 64: | ||
The '' | The '' | ||
+ | ==== Asynchronous remote communication ==== | ||
+ | |||
Once a reference to the remote function is obtained, remote function invocations can be performed by means of the '' | Once a reference to the remote function is obtained, remote function invocations can be performed by means of the '' | ||
- | < | + | < |
(define (submit-news publisher-ref) | (define (submit-news publisher-ref) | ||
(for-each | (for-each | ||
| | ||
| | ||
- | | + | list-of-articles)) |
</ | </ | ||
- | The '' | + | The '' |
The '' | The '' | ||
In order to get the return value of a remote invocation, iScheme provides '' | In order to get the return value of a remote invocation, iScheme provides '' | ||
- | < | + | < |
(define (submit-news publisher-ref) | (define (submit-news publisher-ref) | ||
.... ;;iterator over news articles | .... ;;iterator over news articles | ||
Line 78: | Line 90: | ||
</ | </ | ||
The '' | The '' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
===== Example Applications ===== | ===== Example Applications ===== | ||
iScheme has been used to develop a couple of non-trivial iPhone applications. | iScheme has been used to develop a couple of non-trivial iPhone applications. | ||
- | * AmbiScrabble: | + | * [[example_applications# |
+ | |||
+ | |||
+ | * [[example_applications# | ||
+ | |||
+ | ===== Publications ===== | ||
+ | |||
+ | * Engineer Bainomugisha, | ||
===== What about Apple' | ===== What about Apple' | ||
- | iPhone apps developed in iScheme do not require any modifications to the iPhone OS, therefore, they can be deployed to the iPhone like any other third party apps. So far we have used Apple' | ||
+ | < | ||
+ | iPhone apps developed in iScheme do not require any modifications to the iPhone OS, therefore, they can be deployed to the iPhone like any other third party apps. So far we have used Apple' | ||
+ | |||
+ | < | ||
+ | [[http:// | ||
+ | </ |