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

Building a RESTish API in C# and ASP.NET

Jack Scott
October 29, 2014

Building a RESTish API in C# and ASP.NET

Jack Scott

October 29, 2014
Tweet

More Decks by Jack Scott

Other Decks in Programming

Transcript

  1. C# and the .NET Framework •C# is the language, like

    Java or Ruby. C# is very similar to Java, but with a lot of improvements. •.NET Framework is the ecosystem (runtime and libraries) • Actually a bit more complex than this, but we’ll ignore that for now.
  2. ASP.NET and ASP.NET MVC • ASP.NET is the foundation web

    library, covering the HTTP protocol. • MVC stands for “Model, View, Controller”, a way of architecting web applications. • ASP.NET MVC is Microsoft’s very slick nice MVC implementation, great for doing “normal” websites and web applications.
  3. ASP.NET Web API • ASP.NET Web API is a REST

    framework built on top of ASP.NET. • Handles automatically: • HTTP status codes and response messages. • Serialisation and deserialization of XML, JSON, BSON, HTML Forms, and more. • Really simple default routing, but arbitrarily complex routing is possible. • Sensible security defaults (ie, prevents SQL injection).
  4. It’s (mostly) open source. Microsoft has released a lot under

    FOSS licenses, but what they haven’t has been re-implemented by the Mono project.
  5. The cheap way: • Download Visual Studio Express (Windows) or

    MonoDevelop (Windows, Linux, Mac). • There’s a free version of Xamarin as well if mobile development is your thing.
  6. The expensive way: • Buy a license for Visual Studio

    Professional ($500+). •Buy a license for Xamarin ($25+).