Development

From Poetry MP Wiki
Revision as of 21:25, 26 October 2022 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

During development, the frontend and the backend are often running on different hosts. Almost all features of the app could run well in such config, except the locally hosted pictures. The locally hosted pictures are using relative patch in img src, and such constraint is good for static readonly deployment.

Build

Frontend

After running “buildProd.bat”, then copy the files to local Website poems.localhost for testing and packaging.

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)

Releases

The releases are available at Download in the following form:

  • Zip
  • MSI
  • Android app (Under development)
  • iOS app (Under development)

Zip

Zip all files in poems.localhost to a file like PoetryApp1.zip

MSI

PoetryAppSetup.vdproj is a basic MSI project. Since the JavaScript files will mostly have the names changed for versioning, most files of the NG build need to be redefined in the project file.

Android