codemelted.dev

View on GitHub

XPLAT Modules

“Write once, run anywhere (WORA)” was the famous slogan made by Sun Microsystems in 1995. At the time, this technology stack could target dedicated workstations and on premise servers. Java provided a consistent code base between each of those platforms regardless of the operating system. So long as a Java Runtime Environment existed, you could run your code.

Java was unable to keep to their slogan as web browsers became more advanced, mobile devices became ubiquitous, and companies no longer required dedicated servers. Software engineers were now required to learn multiple languages, technologies, and frameworks in order to tackle these multiple platforms.

This project aims to simplify the Platform Stack by developing a set of cross platform (XPLAT) modules to target a select technology for the chosen platform. Each of these modules will implement the same domain design covering common domain use cases. This design consistency between the XPLAT modules will simplify a software engineer’s time and bring back the WORA spirit despite the platform stack.

NOTE: The fixed navigation on this page represents the current implementation of each XPLAT module and the ability to search across all of them via search option.

TABLE OF CONTENTS

Platform Stack

The platform stack above breaks down the different target platforms a software engineer must consider when engineering a technological solution. It breaks down which Chosen Technologies XPLAT modules can be used to help in building a technological solution. Each XPLAT module will implement the functionality described within the Functional Decomposition section and implement a consistent design interface as described within Design Notes section.

Chosen Technologies

Project Setup

Each codemelted_xxx folder represents the core of the particular XPLAT module. It consists of a singular source file and test file to validate the source file. This was chosen to allow software engineers to either fork this project or to utilize this minimum setup for their own custom build solutions. It is good software practice to breakup projects but the singular source file will be well organized.

The sub-sections below document how this project is maintained / versioned.

Tooling

build.ps1 Script

Melt the Code (XPLAT Modules) Build Wrapper

DESCRIPTION: Provides a pwsh core wrapper environment that
   that can build each of the Melt the Code Module projects.
   Any error with this script will throw as an exception.

USAGE:
   ./build.ps1 [action] [target]

ACTIONS:
   --clean : Delete the build outputs.
   --docs  : Generates the module documentation
   --make  : Generates the compiled module
   --help  : Describes this scripts usage
   --prep  : Ensures environment is setup and ready
   --test  : Runs the tests against the module

TARGET:

   cli     : The PowerShell module
   c++     : The C++ module
   flutter : The Flutter module
   js      : The JavaScript module

Versioning

The versioning will be held by each XPLAT module to be queried when included in a software solution. It will also be reflected in the chosen release mechanism for the given technology documented within that module page.

TITLE:     CodeMelted [Technology] XPLAT Module
VERSION:   v0.0.0 (Released on 23 Jan 2021)
WEBSITE:   https://codemelted.dev/[module doc page]
LICENSE:   MIT / (c) 2021 Mark Shaffer. All Rights Reserved.

Where VERSION is defined as:
v0.0.0
 ^ Full implementation of the XPLAT Module Design
   ^ Full implementation of a Domain Use Case
     ^ Partial implementation of a Domain Use Case / bug fix

Functional Decomposition

Asynchronous Domain

TBD

Communication Domain

TBD

Use Console Domain

This domain documents the common use cases when interacting with a user via CLI utilizing STDOUT of the given platform.

Choose Option

Description: Presents a user a list of options to choose from via STDOUT and returns the selected value.

Pre-Condition(s): Developer specifies an array of string options to choose from.

Post Condition: An integer value of the array selection is returned or -1 if an invalid selection is made.

Steps:

  1. User is presented a list of options to select via STDOUT.
  2. User selects an option and presses ENTER key.
  3. END.

Exceptions:

1a: ApiError occurs.

  1. Pre-conditions were not properly specified and require fixing.
  2. Goto step 1.

Press Enter to Continue

Description: Prompts a user with ‘Press ENTER to Continue:’ via STDOUT.

Pre-Condition(s): None.

Post-Conditions: Processing continues.

Steps:

  1. User is presented the prompt.
  2. User presses the ENTER key.
  3. END.

Exceptions:

2a: User types data.

  1. Data is reflected back
  2. Goto step 2.

Read Line

Description: Prompts a user for input via STDOUT and returns back the typed value.

Pre-Condition(s):

Post-Condition: A string of the typed value or empty string is returned.

Steps:

  1. User is presented the prompt at STDOUT.
  2. User enters data via keyboard and presses ENTER key.
    • Data is reflected back if not a password entry.
    • No data is reflected back if it is a password entry.
  3. END.

Exceptions:

1a: ApiError occurs.

  1. Pre-conditions were not properly specified and require fixing.
  2. Goto step 1.

Write Line

Description: Reports via STDOUT the specified string data.

Pre-Condition(s): None.

Post Condition: String data is reflected via STDOUT.

Steps: None.

Exceptions: None.

Database Domain

TBD

Disk Domain

TBD

Logger Domain

TBD

Math Domain

TBD

Media Domain

TBD

Platform Domain

TBD

Storage Domain

TBD

User Interface Domain

TBD

Design Notes

TBD

Test Notes

TBD

Other Projects

Raspberry Pi (Jeep Life)

TBD

Website Navigation

TBD

License

MIT License

Copyright (c) 2021 Mark Shaffer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.