Development

From Poetry MP Wiki
Revision as of 11:52, 16 September 2022 by Admin>Soulmate
Jump to navigation Jump to search

Contexts

The design of the app had considered the following factors:

  1. The app is primarily for one poet only, while a poet could write at almost a few hundreds to thousands poems in a life time, and each poem could be short comparing to a general article.
  2. The whole content could be exported into a portable format, such as JSON, thus the works of a poet may not be restrained by an app and the established content is future proof. The JSON data could be rendered into HTML, and used for importing if the database of the app is to be upgraded.

Development Tools

Backend

Visual Studio, C# .NET, Entity Framework, MySql or Sqlite

Frontend

TypeScript, Angular, Angular Material

Design

Architectural Features

The app will load data to the Web browser as much as possible, such as tags, annotations and poem names, and actively maintain the lists in the frontend without reloading from the backend.

The static read only variant of the app loads the entire collection of a poet into memory.

The app provides some extra features for Chinese, since there exist two writing systems: Simplified and Traditional. A poet should pick either of the two writing systems, and the app may provide instant translation in the reader view. For the static read only variant of the app, each writing system is supported by an exported JSON file. That is, one JSON file for each writing system.

Frontend

  • Material Design
  • Buttons are generally presented in 3D.
  • Editor mode on desktop PC and tablet, and reader mode on all devices.

Build

Frontend

After running “buildProd.bat”, do the following:

  1. Move “ngsw-worker.js” and “ngsw.json” from folder scripts to root.
  2. In “ngsw.json”, replace all urls to js file with /scripts/ prefix; and make "index": "/../index.html".

Backend

Run "DotNetPublishToLocal.bat" to build and publish to locally hosted "poems.localhost".

The build includes data for Chinese data of 2 writing systems. And to make a general release, just exclude folders "Dictionary" and "JiebaReource".

Builds for Linux, MacOS, iOS and Android (Under Construction)