Presentation on theme: "There is more than just easy webservices. All the boring stuff you will forget after the slides have passed."— Presentation transcript:
There is more than just easy webservices
All the boring stuff you will forget after the slides have passed
Stefan Daugaard AP in Computer Science Developer/Architect at Atea Denmark Currently working on Atea Tele.NET developer since 2002 Silverlight developer back in 2011 with high use of WCF “Caught” in a discussion about webservices in November 2011 Got annoyed by RPC style, code-gen webservices
Is it needed? Does it solve anything?
Code-gen It fails…too often Archaic Xml configuration Distribution, misspelling…or even horrible merges Defaults that is bound to make you cry Why do I need to set values that should be default! Fixed serialization Could be nice to talk to more systems no matter who they are RPC style services Maintenance hell Chatty services Bulk it!
Official subtitle: Web Services done right, REST services done easy :) Simple and model-driven Endpoint ignorant Authentication built-in IoC based Easy access to HTTP Fast as lightning Cross platform Extendable Oh!... And clients are in the box
This is where the most wheels are turning in your development
IService Service And a lot more…
Conventionbased registrations Throw exceptions and have magic httpstatuscodes Strong typed returns It’s more than CRUD PATCH etc. Restrict access to your services
It’s dead simple Fullfills the basic needs It’s fast If you don’t like …add an adaptor
Do you really need EF? Do you trust your developers to know SQL? Want to get closer to the server? Pragmatic over academic
You added caching so now you have more problems Cachekey generation It’s so darn hard!!!
Estimates and guesses leaves you nowhere Easy to give response to the average Joe Thank you mr. Saffron and Dixon Don’t reinvent the wheel!!!
if( request.Id != default(int) ) It’s getting boring! Leverage the same validation in several places Fine grain it where needed
If you want another content type If you need to return an image If you want to be a joker?
CORS Please don’t use AddHeader If you want to you can do it Location …Link? Not sure you want to go that way ;)
…unless you want to go all JS on me :)
Client interfaces IServiceClient IRestClient IRestClientAsync Implementations Soap11ServiceClient (only for IServiceClient) Soap12ServiceClient (only for IServiceClient) JsonServiceClient(Async) JsvServiceClient(Async) XmlServiceClient(Async) Or you can hookup to the XSDs or WSDLs as well Might be handy when delivering services to external partners
If you order now you will get … for only $19.99
Supports ASP.NET and HttpListener hosts Runs on Windows with.NET 3.5 and 4.0 IIS 5/6/7 (uses IHttpHandler) VS.NET WebDev Server (Cassini) IIS Express Console App, Windows Gui, Windows Service Linux/OSX with Mono Apache + mod_mono Nginx + MonoFastCGI XSP Console App A demo have been done inside iOS with MonoTouch
Source: https://github.com/ServiceStack Wiki: https://github.com/ServiceStack/ServiceStack/wiki More docs: Community resources: https://github.com/ServiceStack/ServiceStack/wiki/Community -Resources Links to InfoQ articles:
Main contributor: Demis Bellot Currently creating awesomeness at StackExchange It’s been around for a while First commit Dec 21, 2008 It is well maintained Currently at version Jun – Jan – Jun – 2.2.0
LinkedIn: Blog: GitHub: Tutorials will be published soon at Tech.Pro Book will be started of as an OS project this year Feel free to contact me with any questions, or if you want me to come talk more about ServiceStack