Code Monkey home page Code Monkey logo

examples's Introduction

Lighter Examples

Examples for the Lighter SQLite environment, SwiftUI and server side.

Note: The examples require Swift 5.7 / Xcode 14b for proper plugin support.

When embedding a package using Enlighter (like NorthwindSQLite.swift), a local package seems to be required w/ the Xcode 14 beta (3...5). Otherwise the Swift package plugins do not seem to run. In the example project this is the "AppLogic" package. If Xcode gets stuck or doesn't run the plugin, a package update sometimes help.

Northwind Database

The Northwind database is a common database example that has been ported to SQLite. Lighter provides a Swift version of that in the NorthwindSQLite.swift repository.

Note: The particular SQLite version of the Northwind database is quite lacking. For example booleans are stored as TEXTs, many columns are inappropriately marked as NULLable.
That actually makes it a good example on how to deal with such databases in Lighter.

The Swift Northwind API: Documentation.

Examples

  • Northwind Database:
    • NorthwindWebAPI (A server side Swift example exposing the DB as a JSON API endpoint, and providing a few pretty HTML pages showing data contained.)
    • NorthwindSwiftUI (A SwiftUI example that lets one browse the Northwind database. Uses the Lighter API in combination with its async/await supports.)
  • Custom database:
    • Bodies (A SwiftUI example which loads a list of solar bodies from the web and keeps an offline-first, local cache in a SQL source based Lighter setup.)

Dependencies

This example pulls in a lot of bigger dependencies. A real Lighter project can actually work w/ no external dependencies at all.

Screenshots

Northwind SwiftUI

Screenshot 2022-08-16 at 16 41 31

Northwind Web API

MacroSample-Product-List

Macro-Sample-Product-Detail

Solar Bodies

Screenshot 2022-08-12 at 16 05 09

Who

Lighter is brought to you by Helge Heß / ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

Want to support my work? Buy an app: Code for SQLite3, Past for iChat, SVG Shaper, Shrugs, HMScriptEditor. You don't have to use it! πŸ˜€

examples's People

Contributors

helje5 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.