2

I'm developing two applications. One is a windows store app that will run on WinRT and one is a WPF application that will either run on Windows 7 or 8.

The two applications are supposed to communicate through an SSL connection (Tcp). I would like to have a common class created that will be used by both applications (So that changes to the class will affect both projects).

I've tried using a portable class library, however, it doesn't support any SSL or even TCP connections (There is no System.Net.Sockets namespace). This is probably because windows store apps use StreamSocket instead of SslStream or TcpClient and WPF applications don't have StreamSocket.

Is there anything in common that will help me develop this class? Is there perhaps any way that I can use SslStream/TcpClient in a windows store app or StreamSocket in a WPF application? Having two different classes for the same functionality is very bad design.

Orestis P.
  • 805
  • 7
  • 27

1 Answers1

0

We use CSLA business object framework at my shop, and it helps address this very need. Essentially, your business project is first written in regular old .NET, and for your non-.NET biz project (ours is SL), you can simply add existing code as a link, and use compiler directives when needed to hide .net-specific code. It works pretty well, give it a look-see. http://www.cslanet.com/

Fair warning, it does take some time to get comfy w/ the framework, but one of its goals is to address this very problem.

Joe
  • 1,295
  • 13
  • 16