Skip to content

Deployment Scenarios

Terry Burton edited this page Nov 10, 2025 · 32 revisions

The following describes various deployment scenarios for the GS1 Barcode Syntax Engine.

Key:

  • Light blue elements are software components that the user is responsible for programming.
  • Hyperlinked elements are specific GS1 Barcode Syntax Engine APIs that the user programs against.

Standalone native code user application (statically linked)

graph TB
    subgraph App["Native User Application (statically linked)"]
        AppCode["Application Code<br/>(C/C++)"]
        SyntaxEngine["Syntax Engine<br/>C functions"]
    end

    AppCode -->|Functional API| SyntaxEngine

    style App fill:#f9f9f9,stroke:#333,stroke-width:3px
    style SyntaxEngine fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5

    click SyntaxEngine "https://gs1.github.io/gs1-syntax-engine/" "Syntax Engine C API"
Loading
  • You are developing an application that compiles to native code in a language such as C or C++.
  • You require your application executable to be self-contained, with no dependency on external shared libraries.
  • You develop directly against the functional C API of the GS1 Barcode Syntax Engine.
  • When the GS1 Barcode Syntax Engine is updated, you will rebuild and redeploy your application to incorporate the new version.
  • You may choose to vendor the GS1 Barcode Syntax Engine source code within your project or maintain it separately and link it statically during your build process.
  • This deployment model is ideal for embedded systems, offline environments, or portable binaries where external dependencies are undesirable.
  • An example console application in C is provided.

Native code user application linked against the Syntax Engine

graph TB

    subgraph App["Native&nbsp;User&nbsp;Application&nbsp;(dynamically&nbsp;linked)"]
        AppCode["Application Code<br/>(C/C++)"]
    end

    subgraph Lib["Syntax&nbsp;Engine&nbsp;shared&nbsp;library&nbsp;(.dll,&nbsp;.so,&nbsp;.dylib)"]
        SyntaxEngine["Syntax Engine<br/>C functions"]
    end

    AppCode -->|Functional API| SyntaxEngine

    style App fill:#f9f9f9,stroke:#333,stroke-width:3px
    style Lib fill:#f9f9f9,stroke:#333,stroke-width:3px
    style SyntaxEngine fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5

    click SyntaxEngine "https://gs1.github.io/gs1-syntax-engine/" "Syntax Engine C API"
Loading
  • You are developing an application that compiles to native code in a language such as C or C++.
  • You deploy your application together with the GS1 Barcode Syntax Engine built as a separate shared system library (e.g. .dll, .so, .dylib)
  • You develop against the functional C API of the GS1 Barcode Syntax Engine.
  • Multiple applications can share the same library instance, reducing memory footprint and simplifying updates.
  • When the GS1 Barcode Syntax Engine is updated, you redeploy only the shared library, typically without needing to rebuild or redeploy your application, as newer versions are generally API-compatible.
  • You can either link dynamically at build time or load the library at runtime using the platform’s dynamic linking mechanisms.
  • An example console application in C is provided.

Managed code application using the Syntax Engine bindings

graph TB
    subgraph App["Managed&nbsp;User&nbsp;Application"]
        AppCode["Application Code (C#/Java/Swift)"]

        subgraph Wrapper["Syntax&nbsp;Engine&nbsp;Wrapper&nbsp;Classes"]
            direction LR
            CSwrapper["C#"]
            JavaWrapper["Java"]
            SwiftWrapper["Swift"]
            CSwrapper ---|or| JavaWrapper ---|or| SwiftWrapper
            linkStyle 0 stroke:transparent,fill:none;
            linkStyle 1 stroke:transparent,fill:none;
        end

        Bindings["Language-based<br/>'bindings'"]
    end

    Lib["Syntax Engine<br/>shared library<br/>(.dll, .so, .dylib)"]

    AppCode -->|Object-Oriented API| Wrapper
    Wrapper -->|Native Extensions| Bindings
    Bindings -->|Foreign Function<br/>Interface| Lib

    style App fill:#f9f9f9,stroke:#333,stroke-width:3px
    style Wrapper fill:#fff,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style Bindings fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style Lib fill:#f9f9f9,stroke:#666,stroke-width:3px
    style CSwrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style JavaWrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style SwiftWrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5

    click CSwrapper "https://gs1.github.io/gs1-syntax-engine/cs/" "Syntax Engine C# API"
    click JavaWrapper "https://gs1.github.io/gs1-syntax-engine/java/" "Syntax Engine Java API"
    click SwiftWrapper "https://gs1.github.io/gs1-syntax-engine/swift/" "Syntax Engine Swift API"

Loading
  • You are developing an application that runs in a managed code environment, such as .NET (C#), Java or Swift.
  • You develop against the object-oriented wrapper API of the GS1 Barcode Syntax Engine, which provides a native interface in your target language such as C#, Java or Swift.
  • Your deployment includes the language bindings (native interface extensions) that connect your managed runtime to the shared native library build of the Syntax Engine.
  • The bindings are loaded at runtime using the language’s foreign function interface (FFI) or native extension mechanism.
  • When the GS1 Barcode Syntax Engine is updated, you will redeploy the shared library and bindings, but typically not your application since compatibility is maintained across versions.
  • This model is suited for enterprise, desktop, or service applications where managed languages are preferred.
  • Quick start guides for the C#, Java and Swift wrappers are provided, as are comprehensive examples for a WPF-based GUI for C# and console examples for Java and for Swift.

Mobile app using the Syntax Engine bindings

graph TB
    subgraph App["Mobile&nbsp;App&nbsp;Package&nbsp;(APK&nbsp;or&nbsp;IPA)"]
        direction TB

        AppCode["Application Code<br/>(Kotlin / Java / Swift / Objective-C)"]

        subgraph Wrapper["Syntax&nbsp;Engine&nbsp;Wrapper&nbsp;Classes"]
            direction LR

            JavaWrapper["Java<br/>(Android)"]
            SwiftWrapper["Swift<br/>(iOS)"]

            JavaWrapper ---|or| SwiftWrapper

            linkStyle 0 stroke:transparent,fill:none;
        end

        Lib["Bundled<br/>Syntax Engine<br/>shared library"]

    end

    AppCode -->|Object-Oriented API| Wrapper
    Wrapper -->|NDK bindings /<br/>bridging layer| Lib

    style App fill:#f9f9f9,stroke:#333,stroke-width:3px
    style Wrapper fill:#fff,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style Lib fill:#f9f9f9,stroke:#666,stroke-width:3px
    style JavaWrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style SwiftWrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5

    click JavaWrapper "https://gs1.github.io/gs1-syntax-engine/java/" "Syntax Engine Java API"
    click SwiftWrapper "https://gs1.github.io/gs1-syntax-engine/swift/" "Syntax Engine Swift API"

Loading
  • You are developing a mobile app that runs on Android or iOS.
  • You develop against the object-oriented wrapper API of the GS1 Barcode Syntax Engine, which provides a native interface in your target language: Java (Android) or Swift (iOS).
  • Your deployment includes the language bindings that connect your mobile development language to a bundled instance of the Syntax Engine as a shared (native) library using NDK bindings / C bridging.
  • When the GS1 Barcode Syntax Engine is updated, you will typically redeploy your mobile application.
  • Quick start guides for building mobile apps for Android and for iOS are provided, as well as comprehensive example applications for Android and iOS.

Browser-based user application

graph TB

    subgraph Browser["Browser Application"]
        AppCode["Application Code<br/>(JavaScript)"]
        HTML["HTML"]
        CSS["CSS"]
    end

    subgraph Resources["Downloaded Web Assets"]
        Wrapper["JavaScript<br/>wrapper<br/>module"]
        Engine["Syntax Engine<br/>WASM build"]
    end

    AppCode -->|Object-Oriented API| Wrapper
    Wrapper -->|WASM Loader| Engine

    style Browser fill:#f9f9f9,stroke:#333,stroke-width:3px
    style Resources fill:#fff,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
    style Wrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style Engine fill:#f9f9f9,stroke:#666,stroke-width:3px

    click Wrapper "https://gs1.github.io/gs1-syntax-engine/js-wasm/" "Syntax Engine JavaScript API"
Loading
  • You are developing a client-side web application that runs entirely within a browser environment.
  • You develop against the JavaScript wrapper API of the GS1 Barcode Syntax Engine.
  • Your application loads the wrapper and WASM or JavaScript-only resource from a web server, alongside your HTML and JavaScript assets.
  • All processing occurs within the browser’s JavaScript virtual machine, ensuring data remains on the client side.
  • When the GS1 Barcode Syntax Engine is updated, you redeploy the WASM/JS resource and wrapper on your web server — client applications automatically use the latest version.
  • This deployment is ideal for interactive barcode validation tools, client-side data entry validation, or offline-capable web apps.
  • A quick start guide for creating a minimal browser app is provided, as is a comprehensive example HTML + JavaScript web application.

Node.js based user application

graph TB

    subgraph NodeApp["Node.js Application"]
        direction TB

        AppCode["Application Code<br/>(JavaScript)"]

        subgraph Resources["NPM Package"]
            direction TB
            Wrapper["JavaScript<br/>wrapper<br/>module"]
            Engine["Syntax Engine<br/>WASM build"]
            Wrapper -->|WASM Loader| Engine
        end

    end

    AppCode -->|Object-Oriented API| Wrapper

    style NodeApp fill:#f9f9f9,stroke:#333,stroke-width:3px
    style Resources fill:#fff,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style Wrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style Engine fill:#f9f9f9,stroke:#666,stroke-width:3px

    click Wrapper "https://gs1.github.io/gs1-syntax-engine/js-wasm/" "Syntax Engine JavaScript API"
Loading
  • You are developing an application that runs within the Node.js JavaScript runtime environment.
  • You develop against the JavaScript wrapper API of the GS1 Barcode Syntax Engine.
  • Your application loads the wrapper and the WASM or JavaScript-only build of the GS1 Barcode Syntax Engine from the local filesystem (e.g., installed via npm).
  • This allows you to use the same API surface as browser applications, with Node.js providing the execution environment.
  • When the GS1 Barcode Syntax Engine is updated, you simply redeploy or reinstall the npm package, without changing your application code, as the API is designed to remain compatible.
  • This setup is ideal for server-side JavaScript, CLI tools, or microservices that process barcodes programmatically.
  • A quick start guide for creating a minimal Node.js application is provided, as is a comprehensive example Node.js console application.

Syntax Engine as a web service supporting user applications

graph TB
    subgraph ExtSys["Frontend System"]
        UserApp["Client Application Code<br/>(E.g. P.o.S. / ERP module)"]
    end

    subgraph WebService["Backend or Local Node.js Service"]
        direction TB

        Service["Server Application Code<br/><br/>Custom endpoints, e.g.<br/>- /scanData<br/>- /AIdata<br/>- /dlURI"]

        subgraph Resources["NPM Package"]
            direction TB
            Wrapper["JavaScript<br/>wrapper<br/>module"]
            Engine["Syntax Engine<br/>WASM build"]
        end

    end

    subgraph Backend["Backend systems"]
        DB["E.g. Master data"]
    end

    UserApp <-->|HTTP request/<br/>HTTP response| Service
    Service -->|Object-Oriented API| Wrapper
    Wrapper -->|WASM Loader| Engine
    UserApp <-.-> Backend

    style ExtSys fill:#f9f9f9,stroke:#333,stroke-width:3px
    style WebService fill:#f9f9f9,stroke:#333,stroke-width:2px
    style Resources fill:#fff,stroke:#333,stroke-width:2px
    style Engine fill:#f9f9f9,stroke:#666,stroke-width:3px
    style Backend fill:#f9f9f9,stroke:#333,stroke-width:2px
    style Wrapper fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5
    style DB fill:#e8e8e8,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5

    click Wrapper "https://gs1.github.io/gs1-syntax-engine/js-wasm/" "Syntax Engine JavaScript API"
Loading
  • You are developing a bespoke application in a runtime environment that cannot easily link directly to external libraries (such as an ERP system module or report).
  • Your environment can make HTTP requests and receive HTTP responses.
  • You implement a web service that internally links to the Syntax Engine (using one of the methods described above) — for example, in Node.js — that exposes custom endpoints (e.g., /scanData, /aiData, /dlURI).
  • Your bespoke application calls the web service endpoints to validate or parse barcode data and receives responses in standard formats such as JSON.
  • The web service can be deployed locally or remotely, provided network access is available.
  • You can maintain compatibility by versioning your endpoints, ensuring that updates to the GS1 Barcode Syntax Engine or service implementation do not break existing clients.
  • When the GS1 Barcode Syntax Engine is updated, you redeploy the web service with the updated library; the client application typically requires no changes.
  • An example web service in Node.js and C# WPF-based web service user application are provided.