PCTrade 2.0

Starting with version 8, Data Abstract provides a brand new Samples Suite called "PC Trade". One of main purposes we've pursued was to unify all the examples provided by Data Abstract for all platforms (.NET, Cocoa, Java, Delphi, and JavaScript) to provide a consistent sample experience. At the same time, we wanted to improve the existing examples and bring them to a new level by showing real-life scenarios of using our products.

During the creation of the new samples, we tried to focus on two scenarios: On the one hand we wanted to highlight Data Abstract features as simply as possible to provide an entry point into the technology and let you explore individual features. But on other hand we also wanted to show experienced users how everything can come together, in a more complex app.

The new Samples Suite consists of two parts – namely the Complex Samples set and the Simple Samples set.

Complex Samples

The complex samples set represents sophisticated and close-to-real-life business solutions. It shows a wide variety of Data Abstract features and how they can work in concert and fit together in real-life conditions.

The core features presented in the complex sample suite are:

  • User authentication and user roles
  • Using Briefcases
  • Using Business Rules Scripting for implementing business logic
  • Tracking data modifications
  • Synchronous and asynchronous server requests
  • Working with tree-like data structures
  • Reporting

and many others common and platform-specific features.

The given solution is an application for a fictitious small company that sells computer equipment. The company has two departments: the income and sales departments, all this under the leadership of a CEO. Depending on their role, users can manage goods requests, income orders, sales orders, create reports, etc.

Sales orders can be created by the sales manager directly in the store by using a Desktop application, or by the customer either using a mobile application or through the online Web store.

From a technical point of view, this complex solution consists of the Server and the Client parts.

Server

Out of the box, the PCTrade database is provided in SQLite format and hosted in Relativity Server as PCTrade schema in the automatically created DASamples domain. All business logic is implemented in JavaScript via Business Rules Scripting technology.

The DASamples domain uses the standard logins (Developer/Relativity for the developer login, and Data/Relativity for the data login). To simulate role-based access, the first name and email address of records of the Users table can also be used as data login.

Client

The Client side is presented by a set of applications which cover several platforms and can be divided into 3 big categories:

  • Mobile
  • Desktop
  • Web

The desktop applications are presented by one application for each desktop platform (.NET WPF, macOS, Delphi). These applications offer the same functionality on each platform and allow the user to create/modify various orders, manage price-lists and get some reports. This also shows that our solutions are completely compatible.

The mobile applications are presented for the .NET (Windows Phone) and iOS platforms only at the moment; an Android version written in Java is in the works for a future update. With help of the mobile application, the sales manager can create orders on the site of the customer.

Finally, a web application is provided in the form of an online store which uses the Data Abstract for JavaScript library. Users can sign in/log in there, put goods into baskets, create orders and see their status.

Simple Samples

In contrast to the complex samples, the simple samples are designed to be as simple as possible, and focus on individual features.

The main idea is to show the most simple way to use Data Abstract, and is mostly targeted at users that are just getting started with the product or want to learn about a particular feature or technology.

Server

As for the complex samples suite covered above, the server part of the simple samples is presented by the DASamples domain hosted on Relativity Server. In order to clearly split databases for complex and simple samples and avoid any cross-modifications, simple samples works with its own Simple schema inside the domain.

Client

The client samples are presented in 3 groups, and where feasible, we try to have a sample in each of the three groups, for each feature:

  • The Console samples are the most simple. In many cases, they consist of a single source file, where a certain feature is shown, and they forgo having bells and whistles. The console samples have a linear flow and usually contain several steps which are performed one by one.

  • Desktop samples are a bit more sophisticated, since they have a layered structure with dedicated ServiceAccess, DataAccess and UI, and they contain a certain amount of "boiler-plate" code that is needed for GUI apps that are not specific to DA. The desktop samples also support Bonjour/Zeroconf (where available), which simplifies and automates the connection to Relativity Server.

  • The last group of samples is presented with the Mobile application. Mobile samples are, in essence, similar to the desktop samples, but targeted at various mobile platforms rather than desktops. The Mobile application also supports Bonjour/Zeroconf.