-
Notifications
You must be signed in to change notification settings - Fork 0
Dart Client
The Dart project is an exciting new initiative from Google that helps you build and maintain large structured modern web apps. It comes with all batteries included, including a comprehensive library, rich Eclipse and JetBrains IDE's, built-in debugging in Dartium and Chrome (with source maps) and is being developed by many of the top talent behind Googles world-leading V8 JavaScript engine and the comprehensive GWT toolkit.
As we expect Dart to prove to be a popular web platform target in future, we've jumped in early and have developed a flexible Dart JsonClient that allows you to effortlessly consume ServiceStack JSON services in idiomatic Dart. The client takes advantage of some of Dart's features like noSuchMethod
and Future<T>
to provide a natural and easy to use API, E.g:
var client = new JsonClient("http://www.servicestack.net/Backbone.Todos");
client.todos() //GET /todos
client.todos(1) //GET /todos/1
//POST /todos ...
client.todos({'content':'Add a new TODO!', 'order':1})
//PUT /todos/1 ...
client.put('todos/1', {"content":"Learn Dart","done":true})
//DELETE /todos/1
client.delete('todos/1')
//GET /files/services/FilesService.cs.txt
client.files("services/FilesService.cs.txt")
.then( (fileInfo) => ... )
//Handling responses with Futures
client.todos(1)
.then( (todo) => ... )
The JavaScript idiom of using callbacks for handling async callbacks is still supported:
client.todos(1, (todo) => ...) //Handling responses with callbacks
But this is discouraged in Dart, whose async APIs all return Futures.
- Why ServiceStack?
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
- Getting Started
- Reference
- Clients
- Formats
- View Engines 4. Razor & Markdown Razor
- Hosts
- Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in caching options
- Built-in profiling
- Messaging and Redis
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- Plugins
- Tests
- Other Languages
- Use Cases
- Performance
- How To
- Future