M
M
Muxto2014-01-08 16:55:30
API
Muxto, 2014-01-08 16:55:30

Web server in C#, how to make an API for the client?

Hello.
I have a server, it sits above a database. The server has classes with their own methods. There are about 40 methods. Let's say the server is on the local network, with a static IP.
I want a client written in C# to be able to access server methods, pass objects as an argument, and receive objects as a response. Objects are small, 1 MB maximum.
I don't know much about servers. Already confused among REST, DCOM, JSON and similar scary words.
It is desirable that it be as simple as possible.
Perhaps someday in the future, there will be an application on Andriod, iOS, or even a website as a client. Ready to sacrifice them for the sake of simplicity.
Advise one technology and throw links to the documentation.
Thank you.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Muxto, 2014-01-09
@Muxto

Thanks for answers.
I read about the listed technologies and eventually chose WCF - it seemed the easiest to implement ( msdn.microsoft.com/ru-ru/library/ms734712%28v=vs.1... ).
The question is closed.

S
Sergey, 2014-01-08
Protko @Fesor

Read about Restfull services. There are a million articles, everything is very simple ... No one will write api for you, but there are a lot of examples with implementation under .NET.

K
Kroz, 2014-01-08
@Kroz

If I understand correctly, you want to write a server in C# too.
We use ServiceStack for this ( https://github.com/ServiceStack/ServiceStack ). Version 3 branch is free, starting with version 4 - paid. Very good and worthy piece, fast in development.
There is also a Web API from Microsoft ( www.asp.net/web-api ), it requires writing a bit more code than ServiceStack, but it's free and "standard".
Both allow you to do both REST and RPC (maybe you have mostly RPC if you write about methods, and this is not a simple CRUD).

A
Alexander, 2014-01-08
@avorsa

www.asp.net/web-api

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question