SlideShare a Scribd company logo
1 of 24
Introduction to
ServiceStack
Web Services done right,
REST services done easy :)
Service Stack
Why ServiceStack
La prima alternativa a WCF, MVC e WebAPI
◦ Focus su semplicità e velocità
◦ Supporto cross-platform con Mono
◦ Convention over Configuration
◦ No XML Config, No Code-gen
◦ POCOs
◦ Incoraggia l’utilizzo delle best practices (DTO)
◦ Write once, support all
◦ XML, JSON, HTML, CSV, JSV
demo
SERVICESTACK FIRST CONTACT
A Stack of Services
Serializers
Service Endpoints
IoC
ORM
Caching
Components
Service Stack
ServiceStack.Text ServiceStack.Caching
ServiceStack.OrmLite ServiceStack.Redis
Simplicity
◦C# Model-driven development
◦ Definizione delle Web Service API utilizzando DTOs strong-
typed
◦ No Code-gen
◦No Artificial layers or constructs
◦ Completo controllo sugli HTTP Headers e sulla serializzazione
dell’output
◦Endpoint ignorant
◦ C# only, code to interfaces and types not specific formats or
endpoints
◦ C# object IN -> C# object OUT
◦No config required
Simplicity - Client
◦Same C# client can call any web service at any endpoint
◦ Generic C# Service Clients: XML, JSON, JSV and
Soap11/Soap12
◦ Provides ErrorCode, ErrorMessage from WebServiceException
Speed
◦Built on raw IHttpHandlers
◦No runtime reflection or regular expressions
◦Uses Built-in Funq IOC
◦ Funq is 55x faster than Windsor
◦Fastest JSON, JSV text serializers for .NET
◦ ServiceStack.Text is 3.6x faster DataContractJsonSerializer
◦Includes #1 C# Redis Client
◦ Redis is the fastest in-memory NoSQL database
◦Includes ASP.NET config-free caching providers
◦ Memcached
◦ Redis
◦ In-Memory
◦ FileSystem
Encourage Remote Services best practices
◦Influenced by Martin Fowlers Data Transfer Object Pattern
When you're working with a remote interface, such as Remote Facade
(388), each call to it is expensive. As a result you need to reduce the
number of calls, and that means that you need to transfer more data
with each call. One way to do this is to use lots of parameters. However,
this is often awkward to program - indeed, it's often impossible with
languages such as Java that return only a single value.
◦Encourage batch-full, re-usable web services
◦ Discourage chatty, client-specific APIs
◦Importance of a Coarse-grained, well-defined API
◦Simple and flexible serializers with better versioning support
◦Decoupling of message from operation and endpoint
◦Clean separation of DTO from implementation
Encourage best code practices
◦Code-First, Code-Only
◦Auto-wired, Built-in IOC
◦Decoupled, develop services independently. Easy add/remove
◦Develop logic in a DDD clean-room
◦Highly testable
◦ Same test can be used for Unit or XML, JSON, SOAP, etc Integration
tests
◦ HttpListener allows for in-memory integration tests (No HTTP
Server reqd.)
Fuse C# and HTTP as DRY as possible
◦Develop service using only C# POCO types
◦Same service with no config or code-gen
◦ Callable via REST, RPC POX/J or SOAP endpoints
◦ Callable on any format (XML, JSON, SOAP, JSV, CSV, HTML)
◦via HTTP Accept: or ?format=type. JSONP with ?callback=cb
◦ Can process HTTP File Upload multipart/form-data
◦Strong-typed Request DTO can be populated by:
◦ HTTP GET QueryString
◦ HTTP POST DTO Content-Type (i.e. XML, JSON, etc)
◦ HTTP FORM POST x-www-form-urlencoded
◦Can return any of:
◦ Any DTO object -> serialized to Response Content-Type
◦ HttpResult, HttpError for Customized HTTP response
◦ String
◦ Stream
◦ IStreamWriter
Run everywhere in .NET and MONO
◦Supports both ASP.NET and HttpListener hosts:
◦Runs on Windows with .NET 3.5 & 4.0
◦ IIS 5/6/7 (uses IHttpHandler)
◦ VS.NET WebDev server
◦ Console App or Windows GUI
◦ Windows Service
◦Linux/OSX with MONO
◦ Apache + mod_mono
◦ Nginx + MonoFastCGI
◦ XSP
◦ Console App
◦ Haz demo running inside iOS with MonoTouch :)
demo
ServerArchitecture
Client Architecture
Get ServiceStack
NuGet
◦ Install-Package ServiceStack
◦ Register in web.config
Starter Templates
◦ Install-Package ServiceStack.Host.Mvc
◦ Install-Package ServiceStack.Host.AspNet

More Related Content

What's hot

Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
ASP.NET Core 3.0 Deep Dive
ASP.NET Core 3.0 Deep DiveASP.NET Core 3.0 Deep Dive
ASP.NET Core 3.0 Deep DiveJon Galloway
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIvan Kruglov
 
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...Andrea Dottor
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationStuart (Pid) Williams
 
Building a Service Mesh with Envoy (Kubecon May 2018)
Building a Service Mesh with Envoy (Kubecon May 2018)Building a Service Mesh with Envoy (Kubecon May 2018)
Building a Service Mesh with Envoy (Kubecon May 2018)Douglas Jones
 
Embracing Nservicebus Best Practices
Embracing Nservicebus Best PracticesEmbracing Nservicebus Best Practices
Embracing Nservicebus Best PracticesParticular Software
 
JBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerJBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerChristina Lin
 
JUDCon Brazil 2013 - Vert.x an introduction
JUDCon Brazil 2013 - Vert.x an introductionJUDCon Brazil 2013 - Vert.x an introduction
JUDCon Brazil 2013 - Vert.x an introductionSamuel Tauil
 
Ускоряем загрузку картинок вебсокетами
Ускоряем загрузку картинок вебсокетамиУскоряем загрузку картинок вебсокетами
Ускоряем загрузку картинок вебсокетами2ГИС Технологии
 
Writing RESTful web services using Node.js
Writing RESTful web services using Node.jsWriting RESTful web services using Node.js
Writing RESTful web services using Node.jsFDConf
 
Play + scala + reactive mongo
Play + scala + reactive mongoPlay + scala + reactive mongo
Play + scala + reactive mongoMax Kremer
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Stephane Manciot
 

What's hot (20)

Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
ASP.NET Core 3.0 Deep Dive
ASP.NET Core 3.0 Deep DiveASP.NET Core 3.0 Deep Dive
ASP.NET Core 3.0 Deep Dive
 
Node js for enterprise
Node js for enterpriseNode js for enterprise
Node js for enterprise
 
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir DžaferovićJavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.com
 
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
Web services
Web servicesWeb services
Web services
 
Building a Service Mesh with Envoy (Kubecon May 2018)
Building a Service Mesh with Envoy (Kubecon May 2018)Building a Service Mesh with Envoy (Kubecon May 2018)
Building a Service Mesh with Envoy (Kubecon May 2018)
 
Servicestack
ServicestackServicestack
Servicestack
 
Node js crash course session 2
Node js crash course   session 2Node js crash course   session 2
Node js crash course session 2
 
Embracing Nservicebus Best Practices
Embracing Nservicebus Best PracticesEmbracing Nservicebus Best Practices
Embracing Nservicebus Best Practices
 
JBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerJBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP container
 
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter LehtoJavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
 
JUDCon Brazil 2013 - Vert.x an introduction
JUDCon Brazil 2013 - Vert.x an introductionJUDCon Brazil 2013 - Vert.x an introduction
JUDCon Brazil 2013 - Vert.x an introduction
 
JAX-RS 2.1 Reloaded @ Devoxx
JAX-RS 2.1 Reloaded @ DevoxxJAX-RS 2.1 Reloaded @ Devoxx
JAX-RS 2.1 Reloaded @ Devoxx
 
Ускоряем загрузку картинок вебсокетами
Ускоряем загрузку картинок вебсокетамиУскоряем загрузку картинок вебсокетами
Ускоряем загрузку картинок вебсокетами
 
Writing RESTful web services using Node.js
Writing RESTful web services using Node.jsWriting RESTful web services using Node.js
Writing RESTful web services using Node.js
 
Play + scala + reactive mongo
Play + scala + reactive mongoPlay + scala + reactive mongo
Play + scala + reactive mongo
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
 

Viewers also liked

Kuliah Kerja Praktekachmad Solichin 1207550804088528 9
Kuliah Kerja Praktekachmad Solichin 1207550804088528 9Kuliah Kerja Praktekachmad Solichin 1207550804088528 9
Kuliah Kerja Praktekachmad Solichin 1207550804088528 9arisyf
 
Digging deeper into service stack
Digging deeper into service stackDigging deeper into service stack
Digging deeper into service stackcyberzeddk
 
Service stack all the things
Service stack all the thingsService stack all the things
Service stack all the thingscyberzeddk
 
Produkte Werbung
Produkte WerbungProdukte Werbung
Produkte Werbungcahowe274
 
Pinscape666.no-ip.org shops!
Pinscape666.no-ip.org shops!Pinscape666.no-ip.org shops!
Pinscape666.no-ip.org shops!guestb7778c
 
Cat Oca Mediateca
Cat Oca MediatecaCat Oca Mediateca
Cat Oca Mediatecarvuoci
 
Online Collaboration In Learning Emergency Services
Online Collaboration In Learning   Emergency ServicesOnline Collaboration In Learning   Emergency Services
Online Collaboration In Learning Emergency Servicesjerryl
 
Sosiaalinen Media 23022010
Sosiaalinen Media 23022010Sosiaalinen Media 23022010
Sosiaalinen Media 23022010Teemu Rauhala
 
Listovka Middleware iTV IPTV
Listovka Middleware iTV IPTVListovka Middleware iTV IPTV
Listovka Middleware iTV IPTVMrCloud
 
Hello Father Christmas
Hello Father ChristmasHello Father Christmas
Hello Father Christmasanahera
 
Sviluppo apps multipiattaforma con visual studio e xamarin
Sviluppo apps multipiattaforma con visual studio e xamarinSviluppo apps multipiattaforma con visual studio e xamarin
Sviluppo apps multipiattaforma con visual studio e xamarinFabio Cozzolino
 
ePortfolio Symposium presentation
ePortfolio Symposium presentationePortfolio Symposium presentation
ePortfolio Symposium presentationjerryl
 

Viewers also liked (20)

Kuliah Kerja Praktekachmad Solichin 1207550804088528 9
Kuliah Kerja Praktekachmad Solichin 1207550804088528 9Kuliah Kerja Praktekachmad Solichin 1207550804088528 9
Kuliah Kerja Praktekachmad Solichin 1207550804088528 9
 
Digging deeper into service stack
Digging deeper into service stackDigging deeper into service stack
Digging deeper into service stack
 
Service stack all the things
Service stack all the thingsService stack all the things
Service stack all the things
 
CloudValley
CloudValleyCloudValley
CloudValley
 
Passover
PassoverPassover
Passover
 
Produkte Werbung
Produkte WerbungProdukte Werbung
Produkte Werbung
 
Pinscape666.no-ip.org shops!
Pinscape666.no-ip.org shops!Pinscape666.no-ip.org shops!
Pinscape666.no-ip.org shops!
 
Gamifying Moms
Gamifying MomsGamifying Moms
Gamifying Moms
 
Edu Tourism
Edu TourismEdu Tourism
Edu Tourism
 
Cat Oca Mediateca
Cat Oca MediatecaCat Oca Mediateca
Cat Oca Mediateca
 
Online Collaboration In Learning Emergency Services
Online Collaboration In Learning   Emergency ServicesOnline Collaboration In Learning   Emergency Services
Online Collaboration In Learning Emergency Services
 
Colors
ColorsColors
Colors
 
Sosiaalinen Media 23022010
Sosiaalinen Media 23022010Sosiaalinen Media 23022010
Sosiaalinen Media 23022010
 
Listovka Middleware iTV IPTV
Listovka Middleware iTV IPTVListovka Middleware iTV IPTV
Listovka Middleware iTV IPTV
 
The Beauty Of Mathematics
The Beauty Of MathematicsThe Beauty Of Mathematics
The Beauty Of Mathematics
 
Hello Father Christmas
Hello Father ChristmasHello Father Christmas
Hello Father Christmas
 
Demostraciones
DemostracionesDemostraciones
Demostraciones
 
Sviluppo apps multipiattaforma con visual studio e xamarin
Sviluppo apps multipiattaforma con visual studio e xamarinSviluppo apps multipiattaforma con visual studio e xamarin
Sviluppo apps multipiattaforma con visual studio e xamarin
 
ePortfolio Symposium presentation
ePortfolio Symposium presentationePortfolio Symposium presentation
ePortfolio Symposium presentation
 
Tanzania
TanzaniaTanzania
Tanzania
 

Similar to Introduction to ServiceStack Web Services

Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...
Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...
Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...Samsung Open Source Group
 
Service stack linkedin
Service stack linkedinService stack linkedin
Service stack linkedinRaju Golla
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachPROIDEA
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
“ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture” “ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture” HYS Enterprise
 
Domain's Robot Army
Domain's Robot ArmyDomain's Robot Army
Domain's Robot Armydomaingroup
 
DEVNET-2005 Using the Cisco Open SDN Controller RESTCONF APIs
DEVNET-2005	Using the Cisco Open SDN Controller RESTCONF APIsDEVNET-2005	Using the Cisco Open SDN Controller RESTCONF APIs
DEVNET-2005 Using the Cisco Open SDN Controller RESTCONF APIsCisco DevNet
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesMatt Turner
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresqlbotsplash.com
 
CNCF Singapore - Introduction to Envoy
CNCF Singapore - Introduction to EnvoyCNCF Singapore - Introduction to Envoy
CNCF Singapore - Introduction to EnvoyHarish
 
Docker + Microservices in Production
Docker + Microservices in ProductionDocker + Microservices in Production
Docker + Microservices in ProductionPatrick Mizer
 

Similar to Introduction to ServiceStack Web Services (20)

Dot Net Introduction
Dot Net IntroductionDot Net Introduction
Dot Net Introduction
 
Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...
Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...
Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...
 
Service stack linkedin
Service stack linkedinService stack linkedin
Service stack linkedin
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
E sampark with c#.net
E sampark with c#.netE sampark with c#.net
E sampark with c#.net
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Mean stack
Mean stackMean stack
Mean stack
 
Global Windows Azure Bootcamp - San Diego
Global Windows Azure Bootcamp - San DiegoGlobal Windows Azure Bootcamp - San Diego
Global Windows Azure Bootcamp - San Diego
 
“ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture” “ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture”
 
Domain's Robot Army
Domain's Robot ArmyDomain's Robot Army
Domain's Robot Army
 
DEVNET-2005 Using the Cisco Open SDN Controller RESTCONF APIs
DEVNET-2005	Using the Cisco Open SDN Controller RESTCONF APIsDEVNET-2005	Using the Cisco Open SDN Controller RESTCONF APIs
DEVNET-2005 Using the Cisco Open SDN Controller RESTCONF APIs
 
Distributing OSGi
Distributing OSGiDistributing OSGi
Distributing OSGi
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 
2 万林涛
2 万林涛2 万林涛
2 万林涛
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
 
CNCF Singapore - Introduction to Envoy
CNCF Singapore - Introduction to EnvoyCNCF Singapore - Introduction to Envoy
CNCF Singapore - Introduction to Envoy
 
Docker + Microservices in Production
Docker + Microservices in ProductionDocker + Microservices in Production
Docker + Microservices in Production
 

More from Fabio Cozzolino

Costruire app per WinPhone, iOS e Android con C# e Xamarin
Costruire app per WinPhone, iOS e Android con C# e XamarinCostruire app per WinPhone, iOS e Android con C# e Xamarin
Costruire app per WinPhone, iOS e Android con C# e XamarinFabio Cozzolino
 
Microsoft Integration Platform
Microsoft Integration PlatformMicrosoft Integration Platform
Microsoft Integration PlatformFabio Cozzolino
 
Notify your Windows Store app with Service Bus Notification Hub
Notify your Windows Store app with Service Bus Notification HubNotify your Windows Store app with Service Bus Notification Hub
Notify your Windows Store app with Service Bus Notification HubFabio Cozzolino
 
Community Tour 2009 Windows Azure Overview
Community Tour 2009 Windows Azure OverviewCommunity Tour 2009 Windows Azure Overview
Community Tour 2009 Windows Azure OverviewFabio Cozzolino
 

More from Fabio Cozzolino (7)

Xamarin
XamarinXamarin
Xamarin
 
Xamarin Robotics
Xamarin RoboticsXamarin Robotics
Xamarin Robotics
 
Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
Costruire app per WinPhone, iOS e Android con C# e Xamarin
Costruire app per WinPhone, iOS e Android con C# e XamarinCostruire app per WinPhone, iOS e Android con C# e Xamarin
Costruire app per WinPhone, iOS e Android con C# e Xamarin
 
Microsoft Integration Platform
Microsoft Integration PlatformMicrosoft Integration Platform
Microsoft Integration Platform
 
Notify your Windows Store app with Service Bus Notification Hub
Notify your Windows Store app with Service Bus Notification HubNotify your Windows Store app with Service Bus Notification Hub
Notify your Windows Store app with Service Bus Notification Hub
 
Community Tour 2009 Windows Azure Overview
Community Tour 2009 Windows Azure OverviewCommunity Tour 2009 Windows Azure Overview
Community Tour 2009 Windows Azure Overview
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Introduction to ServiceStack Web Services

  • 2. Web Services done right, REST services done easy :) Service Stack
  • 3. Why ServiceStack La prima alternativa a WCF, MVC e WebAPI ◦ Focus su semplicità e velocità ◦ Supporto cross-platform con Mono ◦ Convention over Configuration ◦ No XML Config, No Code-gen ◦ POCOs ◦ Incoraggia l’utilizzo delle best practices (DTO) ◦ Write once, support all ◦ XML, JSON, HTML, CSV, JSV
  • 5. A Stack of Services Serializers Service Endpoints IoC ORM Caching
  • 7. Simplicity ◦C# Model-driven development ◦ Definizione delle Web Service API utilizzando DTOs strong- typed ◦ No Code-gen ◦No Artificial layers or constructs ◦ Completo controllo sugli HTTP Headers e sulla serializzazione dell’output ◦Endpoint ignorant ◦ C# only, code to interfaces and types not specific formats or endpoints ◦ C# object IN -> C# object OUT ◦No config required
  • 8. Simplicity - Client ◦Same C# client can call any web service at any endpoint ◦ Generic C# Service Clients: XML, JSON, JSV and Soap11/Soap12 ◦ Provides ErrorCode, ErrorMessage from WebServiceException
  • 9. Speed ◦Built on raw IHttpHandlers ◦No runtime reflection or regular expressions ◦Uses Built-in Funq IOC ◦ Funq is 55x faster than Windsor ◦Fastest JSON, JSV text serializers for .NET ◦ ServiceStack.Text is 3.6x faster DataContractJsonSerializer ◦Includes #1 C# Redis Client ◦ Redis is the fastest in-memory NoSQL database ◦Includes ASP.NET config-free caching providers ◦ Memcached ◦ Redis ◦ In-Memory ◦ FileSystem
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Encourage Remote Services best practices ◦Influenced by Martin Fowlers Data Transfer Object Pattern When you're working with a remote interface, such as Remote Facade (388), each call to it is expensive. As a result you need to reduce the number of calls, and that means that you need to transfer more data with each call. One way to do this is to use lots of parameters. However, this is often awkward to program - indeed, it's often impossible with languages such as Java that return only a single value. ◦Encourage batch-full, re-usable web services ◦ Discourage chatty, client-specific APIs ◦Importance of a Coarse-grained, well-defined API ◦Simple and flexible serializers with better versioning support ◦Decoupling of message from operation and endpoint ◦Clean separation of DTO from implementation
  • 16. Encourage best code practices ◦Code-First, Code-Only ◦Auto-wired, Built-in IOC ◦Decoupled, develop services independently. Easy add/remove ◦Develop logic in a DDD clean-room ◦Highly testable ◦ Same test can be used for Unit or XML, JSON, SOAP, etc Integration tests ◦ HttpListener allows for in-memory integration tests (No HTTP Server reqd.)
  • 17. Fuse C# and HTTP as DRY as possible ◦Develop service using only C# POCO types ◦Same service with no config or code-gen ◦ Callable via REST, RPC POX/J or SOAP endpoints ◦ Callable on any format (XML, JSON, SOAP, JSV, CSV, HTML) ◦via HTTP Accept: or ?format=type. JSONP with ?callback=cb ◦ Can process HTTP File Upload multipart/form-data ◦Strong-typed Request DTO can be populated by: ◦ HTTP GET QueryString ◦ HTTP POST DTO Content-Type (i.e. XML, JSON, etc) ◦ HTTP FORM POST x-www-form-urlencoded ◦Can return any of: ◦ Any DTO object -> serialized to Response Content-Type ◦ HttpResult, HttpError for Customized HTTP response ◦ String ◦ Stream ◦ IStreamWriter
  • 18. Run everywhere in .NET and MONO ◦Supports both ASP.NET and HttpListener hosts: ◦Runs on Windows with .NET 3.5 & 4.0 ◦ IIS 5/6/7 (uses IHttpHandler) ◦ VS.NET WebDev server ◦ Console App or Windows GUI ◦ Windows Service ◦Linux/OSX with MONO ◦ Apache + mod_mono ◦ Nginx + MonoFastCGI ◦ XSP ◦ Console App ◦ Haz demo running inside iOS with MonoTouch :)
  • 19. demo
  • 22.
  • 23.
  • 24. Get ServiceStack NuGet ◦ Install-Package ServiceStack ◦ Register in web.config Starter Templates ◦ Install-Package ServiceStack.Host.Mvc ◦ Install-Package ServiceStack.Host.AspNet

Editor's Notes

  1. Difficult to describe because it does a lof of thingsCross-platform