3

In the past I've done some WebAPI http service development on Microsoft platform (both Asp based and self-hosted) Now I'm beginning to learn how to do Web development outside of Microsoft platform. My question is: what is the open-source equivalent of WebAPI? Specifically, how does one create a back-end part of a Web application, featuring multiple Controllers (or similar constructs) , where each Controller has its own set of CRUD operations. For example, with WebAPI I would create a CustomersController, a ProductsController, an OrdersController, and each one would have GET, POST, DLETE and PUT operations for their respective domain model. All these Controllers would exist within the same Web application. So, I'm looking for a way to create such application using open-source stack.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
  • Related question http://stackoverflow.com/questions/6620805/what-framework-to-use-for-restful-services-in-net (please do not close it as well) – Michael Freidgeim Dec 19 '16 at 00:08

3 Answers3

4

First of all: WebAPI is indeed open source (see http://aspnetwebstack.codeplex.com/). But if you want to "deploy outside of Microsoft platform": Do you want to stick with .NET?

If you want to stick with .NET, then I can recommend ServiceStack. But you should look at their license model first. AFAIK they have changed from MIT license to something different. Don't know if it can still be used for commercial projects.

If you want to change your programming language: Take a look at Scala. I just switched from C# to Scala and I love it. It runs in the Java Virtual Machine (hence almost everywhere), but is much nicer and more powerful than Java (in my opinion). For Scala there is for example Spray as full fledges web service backend architecture.

Another bet would be PHP. Done it a long time, too. I for myself do not like it so much, but many big websites are build with PHP anyway. The two big players that I have in mind are symfony2 and Zend Framework 2.

Of course there are many other possible alternatives.

Hope this helped a bit...

Thekwasti
  • 222
  • 2
  • 10
  • Thanks! This does help. My goal is to learn and use an open-source stack outside of MS, so C# is not a requirement. I do, however, prefer to use a programming language that is more structured then JS, preferably, object-oriented.So, for my front-end I'm looking to use angular with Dart. I will definitely look at Scala and Spray. Thanks! – Eugene Goldberg Jan 31 '14 at 15:56
  • Be ready to totally rethink the way of structuring applications. Even though Scala is OO, it leans much more into the functional direction andSpray (especially Spray Routing which lets you create your "controllers") uses a freaking strange one the first, but incredible elegant way on the second look, way to describe the structure of your webapplication backend. – Thekwasti Jan 31 '14 at 20:19
1

IMO the thing that comes closest to ASP.NET Web API (from the feature focus point of view) is Nancy.

http://nancyfx.org/

I like it a lot!

leastprivilege
  • 18,196
  • 1
  • 34
  • 50
0

Well, after looking into a number of back-end Http service options, the most compelling to me is Node.js. For the front-end AngularJS appears to be a great option to try. My reason for looking into all of this was to get started developing Web applications totally outside of Microsoft platform (which is what I do at work). So, for the time being, I'm willing to give the MEAN stack a shot and see what develops. Thanks everyone for helping me! -Eugene

Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167