Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering ServiceStack
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering ServiceStack

Mastering ServiceStack

By : Niedermair
2.5 (2)
close
close
Mastering ServiceStack

Mastering ServiceStack

2.5 (2)
By: Niedermair

Overview of this book

Mastering ServiceStack covers real-life problems that occur over the lifetime of a distributed system and how to solve them by deeply understanding the tools of ServiceStack. Distributed systems is the enterprise solution that provide flexibility, reliability, scaling, and performance. ServiceStack is an outstanding tool belt to create such a system in a frictionless manner, especially sophisticated designed and fun to use. The book starts with an introduction covering the essentials, but assumes you are just refreshing, are a very fast learner, or are an expert in building web services. Then, the book explains ServiceStack's data transfer object patterns and teach you how it differs from other methods of building web services with different protocols, such as SOAP and SOA. It also introduces more low-level details such as how to extend the User Auth, message queues and concepts on how the technology works. By the end of this book, you will understand the concepts, framework, issues, and resolutions related to ServiceStack.
Table of Contents (8 chapters)
close
close

Chapter 1. Distributed Systems and How ServiceStack Jumps in

ServiceStack is a powerful web service framework and it offers many possibilities. ServiceStack's adaptive nature makes the components of the framework fine-grained, which makes it crucial to understand the layout and its components:

  • ServiceStack: Lets you create your own service endpoint.
  • ServiceStack.Interfaces: It holds all the base interfaces that are used for the dependency injection-driven internals of ServiceStack. You can fully customize ServiceStack by implementing and registering one of these interfaces.
  • ServiceStack.Text: In this namespace reside various serialization utilities for JSON, JSV, and CSV. It also offers dynamic JSON processing, diagnostic extensions for printing a formatted dump of an object, URL extensions to deal with the common issues, such as encoding and decoding, stream extensions, and many more.
  • ServiceStack.Client: It contains the relevant clients to connect and consume JSON, XML, JSV, SOAP, and MQ services.
  • ServiceStack.Caching: It holds provider-specific endpoints that can be injected as caching storage (InMemory, Redis, Aws, Azure, Memcached, OrmLite …).
  • ServiceStack.OrmLite: It contains a fast micro-ORM with adapters for popular RDMBS, such as the SQL Server, MySQL, PostgreSQL, SQLite, and many others.
  • ServiceStack.Redis: It holds .NET's leading client for Redis, an open source and advanced key-value store.
  • ServiceStack.Authentication: It provides various authentication providers, such as OAuth, OAuth2, OpenID, in combination with its storage providers, such as OrmLite and NHibernate.
  • ServiceStack.Logging: This includes adapters for many logging frameworks such as Elmah, NLog, Log4Net, and EventLog to provide an interchangeable and loosely coupled logging experience.
  • ServiceStack.Razor: It lets you add a Razor view engine to your web service to provide a single stack implementation of your service and front-end.
  • Various other components, such as extensions to formats (ServiceStack.MsgPack and ServiceStack.Protobuf), web service client frameworks, such as ServiceStack.Api.Swagger, a bundler for web resources (ServiceStack.Bundler), a compiler for cross-platform native Desktop applications (ServiceStack.Gap), and many others.

Note

As the NuGet package names often do not match the namespaces within, the NuGet package names are mentioned separately.

Additionally, ServiceStack offers tools that are focused on simplicity and performance, so (development-) time can be spent on a hassle-free usage. This feature makes it a great alternative to Windows Communication Framework (WCF) and others.

Note

Note that some components are dependency free, such as ServiceStack.Text and ServiceStack.Client, which do not call for a coupled usage with ServiceStack.

One of the big ideas behind ServiceStack is the Code-First approach. Before you start to design your database, you should focus on the domain design and its Plain Old CLR Objects (POCOs), which then can be used through the components of your stack:

  • In Request and Response DTOs
  • In client projects by leveraging a shared assembly
  • As data models in your database
  • As entities in your cache and session
  • In serializers and configurations

Tip

If you ever find the need to apply ServiceStack to an existing database, it will be trivial to derive your POCOs from the database schema, especially, if you are dealing with a large pre-existing database and coupled usage in the codebase. Therefore, you can use T4 scripts that are bundled with ServiceStack.OrmLite, to code-gen your POCOs. You can find these at https://github.com/ServiceStack/ServiceStack.OrmLite/tree/master/src/T4.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering ServiceStack
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon