Using ServiceStack to Build APIs

This course explores how to use ServiceStack as an alternative to ASP.NET MVC, Web API and WCF for building web services and MVC-based applications.
Course info
Rating
(397)
Level
Intermediate
Updated
Nov 29, 2012
Duration
5h 27m
Table of contents
ServiceStack Overview
Creating a Simple Service
Using the C# Client
Authentication and Authorization
Filters
IoC and ORM
Validation and Caching
Debugging and Profiling
Messaging
Razor Plugin
Description
Course info
Rating
(397)
Level
Intermediate
Updated
Nov 29, 2012
Duration
5h 27m
Description

Building web services today can be very confusing. It is not easy to pull together all the different technologies required to build an API or distributed service, because there are so many choices. ServiceStack makes things much simpler by providing a convention-based "stack" of services that allow you to build a clean service-based API using standard web service formats and protocols, without having to worry about all of the infrastructure needed to provide it. This course explains what ServiceStack is, and how you can use it as an alternative to ASP.NET MVC, Web API and WCF for quickly building elegant and speedy applications that can run on just about any platform. If you want a simple convention-based approach for building services and APIs in .NET, and you want it all in one package, you may be interested in checking out this course.

About the author
About the author

John Sonmez is the founder of Simple Programmer (http://simpleprogrammer.com), where he tirelessly pursues his vision of transforming complex issues into simple solutions

More from the author
Beginning Lua
Intermediate
2h 50m
2 Dec 2013
Beginning HTML 5 Game Development With Quintus
Intermediate
2h 52m
25 Oct 2013
Beginning HTML5 Apps For Firefox OS
Intermediate
2h 20m
17 Oct 2013
More courses by John Sonmez
Section Introduction Transcripts
Section Introduction Transcripts

ServiceStack Overview
John Sonmez: Hi. This is John Sonmez from Pluralsight, and in this course we are going to be learning about ServiceStack. And in this module, we're going to be going over the basics of ServiceStack just to get an understanding of what ServiceStack exactly is. It's a little bit confusing from the description of what exactly is ServiceStack, how can you use it, and what all does it encompass? But in this module, we're going to cover all of that, we're going to look a little bit at the architecture, and we're going to talk about what makes ServiceStack different than some of the other web type of framework that you can use to create web services. And we'll talk about some of the basic philosophy behind the ServiceStack approach to web services.

Creating a Simple Service
Hi! This is John Sonmez from Pluralsight. And in this module, we're going to go ahead and create a simple service using ServiceStack, so we're going to see just how easy it is to create a service. We're going to create a request and response for that service. We're going to see how to call that service just from a web browser and we're going to be beginning to implement our protein tracking application.

Using the C# Client
Hi this is John Somnez from Pluralsight. In this module we're going to be talking about using the C# Client in order to communicate with that service that we built in the last module. So we'll be communicating with our protein tracking service and we'll see how easy it is to get setup to use that C# Client. And we'll also take a brief look at using some other clients or basically just calling the web service from JavaScript. But we're mainly going to focus on the C# Client and learn about how to use this as we create an application to consume the web service we created in the last module.

Authentication and Authorization
Hi, this is John Sonmez from Pluralsight. And in this module, we're going to be talking about authentication and authorization inside of ServiceStack. And authentication and authorization are definitely important topics for any web service and they're often fairly difficult to implement. But ServiceStack does make this pretty easy just like a lot of the other things in ServiceStack because it offers some framework support that can really help you to get these things implemented very easily. We're going to go over most of the forms of authentication and authorization that you can use in ServiceStack and see how to set those up and we'll even see how to get Twitter authentication working inside of your web services.

Filters
Hi, this is John Sonmez from Pluralsight and in this module, we're going to be talking about filters inside of ServiceStack and filters are a pretty common concept in a lot of MVC style frameworks and web service frameworks and we're going to be using them inside of ServiceStack in order to save us some code. We're going to talk a little bit about what filters are and why you might want to use them and then we'll see how easy it is to implement filters inside of ServiceStack.

IoC and ORM
Hi, this is John Sonmez from Pluralsight, and in this module we're going to be taking a look at the IoC Container and ORM or Object Relational Mapper that is built into ServiceStack. So ServiceStack includes an IoC Container and an Object Relational Mapper which is different than many other frameworks out there because most of the time you're trying to find your own IoC container or your own Object Relational Mapper, but ServiceStack is going to provide this for you. And now you don't have to use these in ServiceStack but I think it's important to learn a little bit about them because they are really good implementations of IoC containers and Object Relational Mappers that are designed with some of the same type of design decisions that we're involved in ServiceStack. So they're going to be really easy to use and really lightweight and fast. And you can always of course swap out your own components but it's worth taking a look and understanding how these things work especially since they are so integrated into ServiceStack itself.

Validation and Caching
Hi, this is John Sonmez from Pluralsight. And in this module we're going to be looking at validation and caching inside of ServiceStack. So, we've already covered just a little bit of both of these topics, but we're going to be going more in depth into these topics in this module, and we're going to see how to actually implement some real caching and to use that in our service and the same thing with validation. We're going to see how we can implement a complex validation on our DTO so that we can automatically validate any requests that are coming in to our service.

Debugging and Profiling
John: Hi, this is John Sonmez from Pluralsight and in this module we're going to be looking at the bugging and profiling inside of ServiceStack. So far we've covered a lot of the features of ServiceStack, but we haven't really covered how to figure out what is happening when something goes wrong. So in the module, what we're going to be focusing on is how you might be able to debug your ServiceStack service, and we're going to look at this from quite a few different angles here. There are quite a few different tools that are built into ServiceStack that you can utilize to figure out exactly what's going on inside your service.

Messaging
Hi, this is John Sonmez from Pluralsight. And in this module, we're going to be looking at Messaging in ServiceStack. So, up to this point, we've been using ServiceStack to create web services. But ServiceStack can actually do more than just create web services, it can also be used as a service bus. And if you don't know what a service bus is, that's okay. We're going to cover that in this module and we're going to cover how to create one and use one inside of ServiceStack and we'll see how we can even reuse our existing DTO's or data transformation objects that we create in our web services so we can reuse those complete services and now have a guaranteed transport or a durable transport that's provided by a message bus inside of ServiceStack.

Razor Plugin
Hi, this is John Sonmez from Pluralsight. In this module, we're going to be taking a look at the Razor View Engine or basically the Razor plugin for ServiceStack. And so far, up to this point, we've used ServiceStack mainly for our REST based web services and then we saw how we could use it for messaging. But we can also use ServiceStack to render views. So we can actually replace MVC or create an MVC web application using ServiceStack reusing our services again just like we did with messaging, but this time we're going to be able to render some HTML, render some pages that a user could use and you can actually create an entire website, entire web application using your existing API just by adding views for the API calls.