Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting started with ServiceStack

Getting started with ServiceStack

Avatar for Philip Proplesch

Philip Proplesch

September 09, 2013

More Decks by Philip Proplesch

Other Decks in Programming

Transcript

  1. What? • Code-only • Strongly typed POCOs • XML, JSON,

    HTML, CSV and JSV out of the box • REST and SOAP • Testable • Performance • No other external dependencies
  2. IoC ServiceStack uses Funq by default. public class AppHost :

    AppHostBase { public AppHost() : base("Services", typeof(AppHost).Assembly) { } public override void Configure(Container container) { // TODO: Register your dependencies. } }
  3. Status codes return new HttpResult(responseDto, HttpStatusCode.Conflict) { StatusDescription = "something

    went wrong...", }; throw new HttpError( HttpStatusCode.Conflict, "something went wrong...");
  4. Clients • .NET • *ServiceClient • JavaScript • It‘s just

    a REST endpoint, so use whatever you want... 