Skip to main content

Important

This document is copyrighted (c) 2009-2021 Superbase Software Limited and is not permitted to be distributed by anyone other than Superbase Software Limited and its licensees.

All translations, derivative works, or aggregate works incorporating any of the information in this document must be cleared with the copyright holder except as provided for under normal copyright law.

If you have any questions, please contact info@simpol.com

Disclaimer

No liability for the contents of this document can be accepted. Use of the concepts, examples and other content is at your own risk. As this is a new edition of this document, there may be errors and inaccuracies that may damage your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility for any damages caused.

All copyrights are held by their respective owners unless specifically noted otherwise. Use of term in this document should not be regarded as affecting the validity of any trademark or service mark.

The naming of particular products or brands should not be seen as endorsements.

You are strongly recommended to back up your system before any major software installation, and continue to do so regularly. 

New Versions of this Document

This document will continue to be updated and re-released over time. It is recommended that you always ensure you have the latest version of this documentation. Normally the latest version will be included with any update of the main product.

Who Should Read This Book

If you are new to Superbase NG development and require a comprehensive introduction to the Superbase NG product, then this book is a good place to start. It begins by describing the pieces of the product and then explains various approaches to working with the package, depending on the user's project.

Superbase NG and SIMPOL

The name of the product is Superbase NG. This includes the development environment, Superbase NG Personal, the compiler, the code libraries and the runtime system. The programming language used in this product is SIMPOL. You may see mentions of SIMPOL instead of Superbase NG, but this will be regarding the programming language and not the product. Consider the mention of SIMPOL and Superbase NG as being almost interchangeable. Much of the Superbase NG product is built using the SIMPOL programming language.

Conventions Used in This Book

Throughout the book, various conventions are used to identify items such as program code, file names and data types.  A fixed-pitch font is used for these throughout this document. Blocks of code have a grey background and are usually set in a separate section. Emphasized items are typically in an italic font.

Why SIMPOL?

The design ideas behind the SIMPOL programming language and the development tools associated with Superbase NG are a direct result of years of exposure to customer program code. We have looked at what worked well, at what caused problems, and have made informed decisions concerning fine points in the product.

The goal for SIMPOL is to provide a powerful, yet accessible programming language. A common problem in the past was that the easiest programming languages to start with did not enforce enough discipline to ensure that the products that grew from them were able to be maintained and developed. As a result, a powerful product might wither from a lack of resources to improve and support it beyond a certain level. The design of SIMPOL promotes code reuse and careful design while simultaneously being simple enough to grasp for a beginner. It allows for both object-oriented and functional programming styles, and these can be mixed and matched where appropriate.

Another guiding principle for SIMPOL was that of being cross-platform. By designing the language to hide the vast majority of platform-specific issues, applications can be written once and run without change on other platforms.

Finally, in the heritage of numerous products from the mid-'80s through the mid-'90s, a conscious effort was made to provide higher-level tools that assist non-programmers to succeed in solving their problems. At the same time, we chose to build the tools in SIMPOL itself, so that these tools can be extended easily. By producing various layers of decreasing complexity within the same toolchain, users can enter into the development process at the level which they are comfortable, and still grow and progress over time with the product if they choose. We found that with similar preexisting products, they often become dead ends when the desires of the user exceed the capabilities of the tools. At the other end of the spectrum, there are many complex tools available on the market for developmental work, but most are outwith the abilities of those who are not programming for a living.

Running Superbase NG Programs

When Superbase NG is installed on Windows, an association is created between the *.smp file extension and the location of the smprun32.exe loader program. That means that any SIMPOL program can be run from the command line simply by typing its name, or by double-clicking it in Windows Explorer. If the program is a GUI-style program, then it will display a terminal window when the program is run. To avoid this, you can create a shortcut for the program that uses the smpwin32.exe loader program.

On Linux, the binary executables should normally be placed in the /usr/bin/ directory and the loadable libraries in the /usr/lib/ directory. That means that programs can be run simply by using the smprun loader program without referring to its location. There is no special GUI loader program for Linux, as none is required. If desired, a shebang line can be added to the beginning of the *.smp file and the file made executable, and then the program can be run directly, as on Windows.

Deploying Superbase NG Programs

Once you have completed a program using Superbase NG and wish to distribute the results, you need to make sure that you include all the pieces necessary together with your compiled program. Since Superbase NG provides a component architecture, only the components required to run your application need to be redistributed with it. These files can be found in the simpol\redist directory. The essential components include the application loader, the core SIMPOL language library, and your program. Additionally, if you used any components, then the associated library files must also be included. There are various loaders, depending on the type of program you are running. Below is a list of them:

Table 1.1. Superbase NG Runtime Loaders Application Type
Application Type Loader for Win32 Loader for Linux x86
CGI - Web Server Applications smpcgi32.exe smpcgi
Fast - CGI - Web Server Applications smfcgi32.exe smfcgi
ISAPI - IIS Web Server Applications smisap32.dll N/A
Console Programs smprun32.exe smprun
GUI Programs smpwin32.exe smprun
Loader to call SIMPOL Functions as DLL Calls smexec32.dll N/A

There are two different loaders for regular programs on Windows; this is because Windows differs between programs that have their own window and programs that do not. On Linux, all programs share the same loader program (except for specialized programs such as web server applications). The list of required libraries, arranged by component, is shown below:

Table 1.2. Superbase NG Runtime Components
Component Required File(s) Win32 Required File(s) Linux x86
Web Server Applications smcgi32.dll libsmpolcgi.so
LXML – XML Document Object Model

smlxml32.dll, iconv.dll, libxml2.dll, libxslt.dll, zlib1.dll

libsmpollxml.so,

Uses the libxml2 support from the distribution

ODBC – SIM- POL ODBC Client smodbc32.dll  
Summary
Component Required File(s) Win32 Required File(s) Linux x86
PPCS – SIMPOL Multi-User Database Client smppcs32.dll libsmpolppcs.so
PPSR – SIMPOL Multi-User Database Server smppsr32.dll libsmpolppsr.so
SBME – SIMPOL Single-User Database Client smsbme32.dll libsmpolsbme.so
SLIB – SIMPOL Shared Library Access (*.DLL, *.so) smslib32.dll libsmpolslib.so
SOCK – SIMPOL TCP/IP Socket Support smsock32.dll libsmpolsock.so
UTOS – SIMPOL File System Support smutos32.dll libsmpolutos.so
WXWN – SIMPOL GUI Components

smwxwn32.dll, wxbase28u_vc_simpol.dll,
wxmsw28u_adv_vc_simpol.dll,
wxmsw28u_core_vc_simpol.dll

libsmpolwxwn.so, plus the wxWidgets runtime package for 2.8.x for the distribution
Note

The only item listed above that cannot be distributed simply as a library file is the PPSR component. This is the code that implements the multi-user database server. To distribute the server, it is necessary to buy the appropriate database license and then use that registration number to install the Superbase NG database server engine on the customer's computer. Copying the PPSR component's DLL will result in the engine simply not working at all. It requires a correct installation with a valid registration number.

Summary

Since this is a quick start guide, as a starting point it may be a good idea to take a quick look at what came in the package, and to divide it up into various areas.