Skip to content

Commit

Permalink
Update guides and links after rename to Pine
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Apr 14, 2024
1 parent 14a38d0 commit bf422f7
Show file tree
Hide file tree
Showing 61 changed files with 130 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-elm-silent-teacher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: download elm-time
run: |
pwsh -nologo -noprofile -command "Invoke-WebRequest 'https://github.com/elm-time/elm-time/releases/download/v2023-09-12/elm-time-bin-v2023-09-12-linux-x64.zip' -OutFile elm-time-linux-x64.zip"
pwsh -nologo -noprofile -command "Invoke-WebRequest 'https://github.com/pine-vm/pine/releases/download/v2023-09-12/elm-time-bin-v2023-09-12-linux-x64.zip' -OutFile elm-time-linux-x64.zip"
pwsh -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('elm-time-linux-x64.zip','./elm-time');}"
- name: install elm-time
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-website-elm-time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: download elm-time
run: |
pwsh -nologo -noprofile -command "Invoke-WebRequest 'https://github.com/elm-time/elm-time/releases/download/v2023-09-12/elm-time-bin-v2023-09-12-linux-x64.zip' -OutFile elm-time-linux-x64.zip"
pwsh -nologo -noprofile -command "Invoke-WebRequest 'https://github.com/pine-vm/pine/releases/download/v2023-09-12/elm-time-bin-v2023-09-12-linux-x64.zip' -OutFile elm-time-linux-x64.zip"
pwsh -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('elm-time-linux-x64.zip','./elm-time');}"
- name: install elm-time
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-website-pinevm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: download build tool
run: |
pwsh -nologo -noprofile -command "Invoke-WebRequest 'https://github.com/elm-time/elm-time/releases/download/v0.1.6/elm-time-bin-v0.1.6-linux-x64.zip' -OutFile elm-time-linux-x64.zip"
pwsh -nologo -noprofile -command "Invoke-WebRequest 'https://github.com/pine-vm/pine/releases/download/v0.1.6/elm-time-bin-v0.1.6-linux-x64.zip' -OutFile elm-time-linux-x64.zip"
pwsh -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('elm-time-linux-x64.zip','./elm-time');}"
- name: install build tool
run: |
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Elm-Time
# Pine

The cross-platform runtime environment for the Elm programming language.
Cross-platform runtime environment for the Elm programming language

Elm-Time integrates web server and database management system, automating the persistence and maintenance of application state and database migrations.
To learn more about the database management system and persistence, see the dedicated guide on [persistence of application state](./guide/persistence-of-application-state-in-elm-time.md)
Pine integrates web server and database management system, automating the persistence and maintenance of application state and database migrations.

The Elm-Time compiler offers various interfaces supporting the automatic generation of Elm code at build time. This automation frees applications from boilerplate and glue code and allows us to focus on business logic.
To learn more about the database management system and persistence, see the dedicated guide on [persistence of application state](./guide/persistence-of-application-state-in-pine.md)

The integrated Elm compiler offers various interfaces supporting the automatic generation of Elm code at build time. This automation frees applications from boilerplate and glue code and allows us to focus on business logic.

## Getting Started

Download the pre-built Elm-Time binary for your platform at <https://elm-time.org/download>, or on the [releases page](https://github.com/elm-time/elm-time/releases) on GitHub.
Download the pre-built Pine binary for your platform at <https://pinevm.org/download>, or on the [releases page](https://github.com/pine-vm/pine/releases) on GitHub.

The `elm-time` executable file integrates all functionality to build apps and operate web services.

The command below runs a server and deploys a full-stack web app:

```txt
elm-time run-server --public-urls="http://*:5000" --deploy=https://github.com/elm-time/elm-time/tree/8dbd5c91853fbcef3b645d95bccc01a886ccd7e2/implement/example-apps/docker-image-default-app
elm-time run-server --public-urls="http://*:5000" --deploy=https://github.com/pine-vm/pine/tree/8dbd5c91853fbcef3b645d95bccc01a886ccd7e2/implement/example-apps/docker-image-default-app
```


## Docker Image

To deploy in a docker container, use the `elm-time/elm-time` image from the [GitHub Container registry](https://github.com/elm-time/elm-time/pkgs/container/elm-time) (`ghcr.io/elm-time/elm-time`). The tags are aligned with the version IDs in the CLI executable file.
To deploy in a docker container, use the `elm-time/elm-time` image from the [GitHub Container registry](https://github.com/pine-vm/pine/pkgs/container/elm-time) (`ghcr.io/elm-time/elm-time`). The tags are aligned with the version IDs in the CLI executable file.

```txt
docker run -p 5000:80 -p 4000:4000 --env "APPSETTING_adminPassword=test" ghcr.io/elm-time/elm-time
Expand All @@ -34,32 +34,32 @@ docker run -p 5000:80 -p 4000:4000 --env "APPSETTING_adminPassword=test" gh

A selection of guides on the most popular topics:

+ Building full-stack web apps: [./guide/how-to-build-a-full-stack-web-app-in-elm-time.md](./guide/how-to-build-a-full-stack-web-app-in-elm-time.md)
+ Building full-stack web apps: [./guide/how-to-build-a-full-stack-web-app-in-elm.md](./guide/how-to-build-a-full-stack-web-app-in-elm.md)

+ Building a backend or web service: [./guide/how-to-build-a-backend-app-in-elm-time.md](./guide/how-to-build-a-backend-app-in-elm-time.md)
+ Building a backend or web service: [./guide/how-to-build-a-backend-app-in-elm.md](./guide/how-to-build-a-backend-app-in-elm.md)

For an overview of all guides and documentation, see the [`guide` directory](./guide/).

## Example Apps

### Rich Chat Room

The [rich chat room example app](https://github.com/elm-time/elm-time/tree/main/implement/example-apps/rich-chat-room) demonstrates features typically found in a chat app, such as user names, message rate-limiting, sound effects, etc.
For a detailed description of this app, see the readme file at <https://github.com/elm-time/elm-time/blob/main/implement/example-apps/rich-chat-room/README.md>
The [rich chat room example app](https://github.com/pine-vm/pine/tree/main/implement/example-apps/rich-chat-room) demonstrates features typically found in a chat app, such as user names, message rate-limiting, sound effects, etc.
For a detailed description of this app, see the readme file at <https://github.com/pine-vm/pine/blob/main/implement/example-apps/rich-chat-room/README.md>

### Elm Editor

[Elm Editor](https://github.com/elm-time/elm-time/tree/main/implement/example-apps/elm-editor) is a web app for developing Elm programs.
[Elm Editor](https://github.com/pine-vm/pine/tree/main/implement/example-apps/elm-editor) is a web app for developing Elm programs.

As an integrated development environment, it assists us in reading, writing, and testing Elm programs and in collaborating with other developers.

<a href="https://github.com/elm-time/elm-time/tree/main/implement/example-apps/elm-editor/README.md">
<a href="https://github.com/pine-vm/pine/tree/main/implement/example-apps/elm-editor/README.md">
<img src="./guide/image/2021-03-17-elm-editor-user-interface.png" width="500" />
</a>

To see Elm Editor in action, check out the public instance at https://elm-editor.com

To learn more about Elm Editor, see <https://github.com/elm-time/elm-time/tree/main/implement/example-apps/elm-editor/README.md>
To learn more about Elm Editor, see <https://github.com/pine-vm/pine/tree/main/implement/example-apps/elm-editor/README.md>

### More Examples

Expand Down
4 changes: 2 additions & 2 deletions guide/elm-silent-teacher.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Elm Silent Teacher is a game teaching the basics of programming. Through a serie
The default course teaches syntax and the core library of Elm, a programming language used to build websites, games, bots, and other kinds of apps.

+ To try an example course, visit <https://silent-teacher.netlify.app/>
+ Elm Silent Teacher is open-source; you can find the code at <https://github.com/elm-time/elm-time/tree/main/implement/elm-time/ElmTime/learn-elm>
+ You can modify the exercises and customize the learning path in the [`Exercise` module](https://github.com/elm-time/elm-time/blob/main/implement/elm-time/ElmTime/learn-elm/src/Frontend/ElmSilentTeacher/Exercise.elm)
+ Elm Silent Teacher is open-source; you can find the code at <https://github.com/pine-vm/pine/tree/main/implement/elm-time/ElmTime/learn-elm>
+ You can modify the exercises and customize the learning path in the [`Exercise` module](https://github.com/pine-vm/pine/blob/main/implement/elm-time/ElmTime/learn-elm/src/Frontend/ElmSilentTeacher/Exercise.elm)
+ A blog post on Elm Silent Teacher is at <https://michaelrätzel.com/blog/elm-silent-teacher-an-interactive-way-to-learn-elm>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# How to Build a Backend App in Elm-Time
# How to Build a Backend App in Elm

To support building backend apps, Elm-Time brings the following components:
To support building Elm backend apps, Pine brings the following components:

+ Web service platform as a type of Elm application. Enables handling HTTP requests from clients.
+ Database management system: Guarantees state changes in the backend Elm app are [ACID](https://en.wikipedia.org/wiki/ACID), and deployments are type-safe.
+ Volatile processes: A generic interface for hosting third-party components in containers and integrating them with the Elm app, similar to the 'ports' in frontend Elm apps.

Elm-Time integrates and manages these aspects automatically to avoid distractions and lets us focus on business logic.
Pine integrates and manages these aspects automatically to avoid distractions and lets us focus on business logic.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# How to Build a Full-Stack Web App in Elm-Time
# How to Build a Full-Stack Web App in Elm

Elm-Time makes building full-stack web apps easier by shielding app developers from incidental complexity.
By automating the work to integrate frontend and backend implementations, Elm-Time lets us focus on business logic.
Elm makes building full-stack web apps easier by shielding app developers from incidental complexity.
By automating the work to integrate frontend and backend implementations, Pine lets us focus on business logic.

In summary, our approach here is to compile frontend and backend in a single build process from a single code base and use compilation interfaces to automate program code generation.

For the development of frontends using Elm, there are already a lot of resources, including books and online courses. This guide assumes you are familiar with developing web frontend apps using Elm.
This guide focuses on integrating frontend Elm apps with a backend Elm app. For the development of backend apps specifically, there is a dedicated guide at [How to Build a Backend App in Elm-Time](./how-to-build-a-backend-app-in-elm-time.md).
This guide focuses on integrating frontend Elm apps with a backend Elm app. For the development of backend apps specifically, there is a dedicated guide at [How to Build a Backend App in Elm](./how-to-build-a-backend-app-in-elm.md).


## How to Deliver the Frontend to a Browser

To make a web browser load the frontend app, we deliver it as an HTML file in response to an HTTP request. We might also include other files, but in any case, we need at least one main HTML document.

So we subscribe to HTTP requests in the backend app and then send an HTTP response containing the HTML document.
But how do we get that HTML into the backend program? Our code repository contains the Elm modules making up the frontend app. We invoke the Elm compiler as part of the backend build to get the corresponding HTML or JavaScript. We do this by adding a declaration to the `CompilationInterface.ElmMake` Elm module. For each declaration in that module, Elm-Time invokes the `make` command and then replaces the declaration in `CompilationInterface.ElmMake` to hold the resulting file.
But how do we get that HTML into the backend program? Our code repository contains the Elm modules making up the frontend app. We invoke the Elm compiler as part of the backend build to get the corresponding HTML or JavaScript. We do this by adding a declaration to the `CompilationInterface.ElmMake` Elm module. For each declaration in that module, The build process invokes the `make` command and then replaces the declaration in `CompilationInterface.ElmMake` to hold the resulting file.

The `make` command allows us to build the frontend into a single HTML file embedding the necessary JavaScript code. We don't have to deliver a separate JavaScript file to the web browser when we use this option.

Expand All @@ -30,7 +30,7 @@ This enables the Elm compiler to check for type mismatches and generate error me
## How to Exchange Elm Values between Frontend and Backend

So we have delivered the frontend app to client web browsers and made sure the update functions for communication between them use matching types.
But how do we let them exchange Elm values? Any software that wants to communicate over the network must serialize and deserialize these messages. Since the code implementing these functions depends entirely on the message type, we let Elm-Time generate this code automatically at build time.
But how do we let them exchange Elm values? Any software that wants to communicate over the network must serialize and deserialize these messages. Since the code implementing these functions depends entirely on the message type, we let Pine generate this code automatically at build time.

The Elm module `CompilationInterface.GenerateJsonConverters` provides automatically generated JSON encoders and decoders for Elm types of your choice.

Expand Down Expand Up @@ -85,9 +85,9 @@ The approach introduced above allows for the flexible composition of frontends:
+ When using multiple frontend apps, we can choose whether to use the same message type for multiple frontends or whether to use different message types.


## Background and Design Goals of Elm-Time
## Background and Design Goals of Pine

The design of Elm-Time and its boundaries follows from observations of how incidental complexity in software development leads to wasted effort. When looking at what developers spend time on, we notice some code rarely needs to be changed, while other parts must be adapted frequently. Elm-Time takes over where incidental complexity would otherwise cause frequent rework.
The design of Pine and its boundaries follows from observations of how incidental complexity in software development leads to wasted effort. When looking at what developers spend time on, we notice some code rarely needs to be changed, while other parts must be adapted frequently. Pine takes over where incidental complexity would otherwise cause frequent rework.

+ Code that needs to be frequently adapted is generated automatically in the background and invisible by default.
+ Code only written once and never needs to change remains part of our application code, checked into version control.

0 comments on commit bf422f7

Please sign in to comment.