Client for Existing Custom Data Abstract Server

This article is a continuation of Data Abstract New Project Wizard (.NET)

After choosing to connect your .NET project to a custom server, the next step is to provide the details of the server you wish to use.

At the minimum, you need to provide the address, also referred to as the Target URL of the server. Custom servers by default run on port 8099, and the default address will usually end with /bin.

If your server uses a different channel or message type, you can also adjust the respective setting, and you can provide an optional AES password, if your server is set up to use the AES Encryption Envelope.

After you click "Next", the wizard will connect to the server and retrieve the list of available Data Services. By default, most servers that expose a single data service use the name "DataService", but if your server uses different names or exposes more than one data service, you can select the appropriate name from the drop-down.

The wizard will also determine if your server needs login and show the respective settings, if necessary. If your server uses the default login infrastructure, Login will be done via a service named "LoginService", and you can provide either a username/password combination or a custom login string to authenticate.

If you are connecting to the PCTrade Sample Server, that server will accept any username/password combination where username and password are identical (for example "test"/"test").

Next, the project wizard will show you a list of all tables exposed by the domain selected before, grouped by schema. You can select which tables you plan to access to have the wizard automatically generate the proper code stubs for the tables in question.

Don't worry: you can always add access to additional tables later on; there is also no harm in simply selecting all tables from the start, even if you don't need them yet.

As the last step, you can choose between some options for the generated client project.

Note: Depending on the project type, some options might not be available. For example, XSDs are not supported on Windows and Silverlight applications, so the wizard will default to DA LINQ (which we recommend to use in any case), and client-side Business Rules Scripting support may also not be available for these platforms.

  • DA LINQ and XSD are two different technologies for accessing and working with local data on the .NET platform. DA LINQ will generate strongly typed classes for your tables that you can work with using regular IEnumerable/sequence APIs such as for/each and LINQ. It is the more modern data access technology and generally recommended.
  • Data Streamers define how data is encoded for transfer between your client and the server. Bin2 is generally the best choice and should be selected unless you have explicit reasons not to. The choice you make here needs to reflect what is exposed by the server.
  • Finally, support for running Business Rules Scripting on the client side can be enabled, where available, allowing your client application to validate data locally and provide information on the invalid data without additional server roundtrips — assuming such business rules are defined on the server.

Finish

Click Finish, and you are done; the wizard will create your project(s) and open them in the IDE, ready to build and run.

You may want to continue reading about The Client Project Generated by the Data Abstract New Project Wizard.