-1

I started to make an application, in which the priority is client application size, smaller is better. I have to retrieve and add some data from/to a server, basic Add(), GetAll(), Delete(int id), and secure connection. I don't know, on which platform, application will be smaller because on wcf for security i would use ssl, on .NET sockets: i don't know how to implement security. I am afraid about the size of metadata..
I'm confused..

Regards,
Sergiu.

Denis Biondic
  • 7,943
  • 5
  • 48
  • 79
croisharp
  • 1,926
  • 5
  • 25
  • 40
  • 1
    is the server already written? if so, which protocol does it use? when you talk of 'application size' what exactly does this refer to? size of binary image files? size of memory consumption? do you care just about the size of the binary you compile or does the size of imported 3rd libs matter? when you say size of metadata, which metadata do you refer to? metadata of the messages sent down the wire or metadata contained in the client binaries files? – Adam Ralph Jul 06 '11 at 06:30
  • 2
    "in which the priority is client application size" - Why? Seems like a bad start. – H H Jul 06 '11 at 06:42
  • I mean the size of client application *.exe, the size of imported libs of course matters.I meant the metadata of service.. I think i will use sockets, it gives me 2 benefits: 1. size of client application 2. working on all versions of .NET – croisharp Jul 06 '11 at 07:18
  • what does 'metadata of service' mean? – Adam Ralph Jul 06 '11 at 12:28
  • When you generate with svcutil an library, through you connect to the service, that is called metadata.. – croisharp Jul 06 '11 at 13:13
  • that sounds horrible - as mentioned in my answer I would look at using OpenRasta rather than WCF and then you can avoid all the WSDL and SOAP nonsense on the client – Adam Ralph Jul 06 '11 at 16:01

2 Answers2

1

Are you implementing the server side code? If so, I would recommend doing this over RESTful HTTP using OpenRasta. OpenRasta is a framework which provides a natural abstraction for implementing the common HTTP methods POST, PUT, GET and DELETE in a RESTful which should map directly to the data operations you describe. IMHO it is much better than any WCF based alternatives and certainly better than re-inventing the wheel and doing this using a low level socket API. As for SSL, this can be used with OpenRasta - see this answer.

On the client side, you can invoke these operations using simple HTTP requests, obviously with the relevant SSL code in place, see this answer for an example of how to do this. Again, since HTTP is used on the server side, this would be much better than using a low level socket API since the protocol (HTTP) is already well defined and abstracted for you (and anyone else wanting to consume the resources).

Community
  • 1
  • 1
Adam Ralph
  • 29,453
  • 4
  • 60
  • 67
1

If you don't have server created yet you can check WCF Data Services. It is technology for exposing CRUD operations over some data source (most common is Entity framework on top of SQL server). You will secure data service with HTTPS.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670