Development: Difference between revisions

From Poetry MP Wiki
Jump to navigation Jump to search
Admin>Soulmate
(Created page with "== Contexts == The design of the app had considered the following factors: # 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. # 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. The JSON data could be rendered into HTML, and used for importing if the data...")
 
Admin>Soulmate
mNo edit summary
Line 27: Line 27:
* Buttons are generally presented in 3D.
* Buttons are generally presented in 3D.
* Editor mode on desktop PC and tablet, and reader mode on all devices.
* Editor mode on desktop PC and tablet, and reader mode on all devices.
== Build ==
=== Frontend ===
After running “buildProd.bat”, do the following:
# Move “ngsw-worker.js” and “ngsw.json” from folder scripts to root.
# In “ngsw.json”, replace all urls to js file with <code>/scripts/</code> prefix; and make <code>&quot;index&quot;: &quot;/../index.html&quot;</code>.
=== 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".

Revision as of 09:24, 14 September 2022

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. 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".