Javascript client
Of course, you're able to call your ServiceStack webservice from your JavaScript client, too.
We do provide our own JsonServiceClients which mimics the .NET Clients in functionality that we make use of in our Redis Admin UI:
- JsonServiceClient.js - Pure JavaScript client
- JsonServiceClient.closure.js - a Google Closure enabled version of the client allowing compilation and bundling within a Closure project
Although most dynamic languages like JavaScript already include support for HTTP and JSON where in most cases it's easier to just use the libraries already provided. Here are a couple of examples from Backbones Todos and Redis StackOverflow that uses jQuery to talk to back-end ServiceStack JSON services:
$.getJSON("http://localhost/Backbone.Todo/todos", function(todos) {
alert(todos.length == 1);
});
$.post("questions", { UserId: authUser.Id, Title: title, Content: body, Tags: dtoTags }, refresh);
In our pursuit to provide the fastest end-to-end communication we've also developed a JsvServiceClient in JavaScript that uses the fast JSV Format:
JSV is marginally faster than safe JSON in modern browsers (marginally slower than Eval) but because of the poor JS and String Performance in IE7/8 it performs over 20x slower than IE's native eval()
.
- Why ServiceStack?
- Important role of DTOs
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
-
Getting Started
-
Designing APIs
-
Reference
-
Clients
-
Formats
-
View Engines 4. Razor & Markdown Razor
-
Hosts
-
Security
-
Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in profiling
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Dump Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- MVC Integration
- ServiceStack Integration
- Embedded Native Desktop Apps
- Auto Batched Requests
- Versioning
- Multitenancy
-
Caching
-
HTTP Caching 1. CacheResponse Attribute 2. Cache Aware Clients
-
Auto Query
-
AutoQuery Data 1. AutoQuery Memory 2. AutoQuery Service 3. AutoQuery DynamoDB
-
Server Events
-
Service Gateway
-
Encrypted Messaging
-
Plugins
-
Tests
-
ServiceStackVS
-
Other Languages
-
Amazon Web Services
-
Deployment
-
Install 3rd Party Products
-
Use Cases
-
Performance
-
Other Products
-
Future