In what order are the ServiceStack examples supposed to be grokked?

Stephen Patten picture Stephen Patten · Apr 7, 2013 · Viewed 32k times · Source

Just out of curiosity I like to know the preferred ordering, based on technical level and new api of the examples.

For the most part, all the base infrastructure concerns all smell the same i.e. setup of the host ect.. but when it comes to the Service Models, Service Interface, and Endpoint setup, which are the most current and preferred?

Thank you, Stephen

Answer

mythz picture mythz · Apr 8, 2013

ServiceStack example projects aren't supposed to be consumed in any particular order, they're just different examples illustrating what you can do with ServiceStack.

Setting up ServiceStack

If you want to know how to create and setup a ServiceStack service the easiest way is to Create your project with ServiceStackVS VS.NET extension, there's also the Getting Started section on the wiki and the Hello World example project can give you a good idea of what ServiceStack enables. This gist is another a good example of what you get with just 1 C# .cs class in ServiceStack.

Designing and structuring a REST API

If you're comfortable with setting up and configuring ServiceStack I've provided a detailed overview of how I'd go about designing a REST API inc. the physical layout and code structure in this earlier answer.

Example Projects, Use-cases and Live Demos

Otherwise the example projects and live demos are good reference examples showing how ServiceStack can be used to power individual use-cases. So you would basically just explore the ones that are similar to your use-case. I'll provide a description of each

Email Contacts

The EmailContacts repository is a new guidance available that walks through the recommended setup and physical layout structure of typical medium-sized ServiceStack projects, including complete documentation of how to create the solution from scratch, whilst explaining all the ServiceStack features it makes use of along the way. It also shows how to make use of ServiceStack's new Rabbit MQ Support.

HTTP Benchmarks

The HttpBenchmarks repository allows you to upload Apache HTTP Benchmarks to visualize and analyze their results. It's an example of a "Social website" supporting Twitter, Facebook, Google and LinkedIn OAuth providers, Registration of new Users, Personalized home page, Creation of User-defined top-level routes (e.g. twitter.com/userslug). It also walks through its integration with Glimpe, DotNetOpenAuth, FineUploader, DotNetZip and Highcharts.js. Hosting and deploying to AWS, Configuration of SSL certificates and enable forced redirects to https.

Chat

Chat takes you through how to build a rich Single Page Chat WebApp using Server push notifications enabled by ServiceStack's integrated support for Server Sent Events. It walks through the Server Event client bindings in /js/ss-utils.js to provide a number of flexible options for invoking pre-defined functionality in existing web apps, which it uses to show how to remote-control other users Chat Window with minimal effort.

Razor Rockstars

A server-side (and client-side) generated HTML Website generated using just ServiceStack's built-in Razor and Markdown Razor HTML support. It shows how existing ServiceStack services can be enhanced with Razor views enabling the same Service to power both a web site and rich native Desktop and Mobile clients.

Northwind.Data

Another rich server-side website further illustrating the ability of being able to build both a feature-rich website as well as REST and typed message-based APIs re-using the same ServiceStack services, serving both browsers and native Desktop and Mobile clients. Other than providing a rich browsing experience it shows how to provide a rich OData-like experience using LLBLGen.

Matt Cowan provides a good tutorial of how he built Nortwind.Data on his blog and provides a Great Followup showing how to add Theming to ServiceStack Razor Views.

Real-time Order fulfillments

StarBucks-like real-time ordering fulfillment Single Page App built with ServiceStack, MVC, AngularJS, SignalR, Sqlite and Redis. Supports different user roles where any User can create an order which gets placed in a Queue and can be fulfilled by an authenticated 'Fulfiller'.

Social Bootstrap API

A Backbone.js-based Single Page App built with ServiceStack + ASP.NET MVC showing how to enable all different Authentication Providers in a single App, be able to connect to Social APIs and the different ways of how to integrate ServiceStack + MVC.

ServiceStack.UseCases

We've changed the way we're creating demo applications, instead of complete stand-alone example apps we're developing single-purpose applications showcasing a single use-case.

ServiceStack.Examples

Where all ServiceStack example projects were kept containing simple, stand-alone, single-purpose focused single page apps.

Starter Templates

Different working starting templates for popular configurations of ServiceStack: