Tuesday, April 21, 2009

Writing a RemObjects SDK for .NET Server and Mac Client


In this article, we will walk through the process of creating a fully working client and server application using RemObjects SDK, with the server written in .NET and the client written for Mac OS X.

The article assumes you have Visual Studio and the latest RemObjects SDK for .NET installed in a Windows VM or on a separate PC on your network, and the Xcode 3.0 with the latest RemObjects SDK for OS X on your Mac.

The .NET Server

Start off by going into Visual Studio to create your server application. Choose FileNew Project from the menu and locate the RemObjects SDK node underneath the language of your choice (C#, Delphi Prism or Visual Basic .NET) - for our example, we’ll choose C#, as most people are familiar with that. Don’t worry, you'll be writing literally two lines of code for this, which easily translate into Delphi Prism or VB if necessary).

For the purposes of this article, choose the Windows Forms Server option, pick a destination folder and name your project “MyROServer”. Click OK to continue.

Next, you will be presented with the New RemObjects SDK Server wizard. Since we will be creating our client application in Xcode, on the Mac side, you can uncheck the Also create a matching client application checkbox. Beyond that, all the default settings should be good, although in a real-life project you may want to click into Advanced Project Options to configure names for service and library, or choose different communication channels. Once again, click OK to have the project created.


On the right-hand side of Visual Studio, you now see your project in Solution Explorer. Next to the usual source files in your language of choice (here .cs), you will see a .RODL file which contains the service definitions for your server. Double-click the file (or press the red RemObjects SDK icon in the toolbar above) to edit the RODL.

No comments: