personium / app-cc-home

Demo page
http://personium.io/demo/home-app/
Apache License 2.0
2 stars 5 forks source link

No way to determine which version (regular or Biz) should the user see #65

Closed dixonsiu closed 6 years ago

dixonsiu commented 7 years ago

Since Personium does not have any way to determine which is which. I am working on a proposal to solve the following issues.

  1. There is no automated way to determine which HomeApp the User (data subject, object, passive user) or organization (data consumer/provider) must use.
    Currently either version of HomeApp can be logged in.

  2. In HomeApp, the list of installed apps contains HomeApp itself and accidentaly got rendered.
    Current hotfix is not to render the app with the same box name as the running app (HomeApp).

dixonsiu commented 7 years ago

Proposal

Introduce the following new key/value pairs for profile.json so that the app can determine the rendering routine properly.

  1. "CellType": <cell's type>
  2. "Passive":

Since there is no limitation on what we can put in a Personium cell, we try to categories cells in the following types.

Data Subject/Provider/Consumer

  1. "Person"
    Data subject which is supposed to be a "real" person.
    Issue No.1 solved: HomeApp is the default app.

    {
        "DisplayName":"Guest",
        "Description":"",
        "Image": ...
        "CellType": "Person"
    }
  2. "Organization"
    Data consumer or provider which is an organziation.
    Issue No.1 solved: HomeApp for Biz is the default app.
    Examples: P's Mart

    {
        "DisplayName": "P's Mart (Wakaba Branch)",
        "Description": "",
        "Image": ...
        "CellType": "Organization"
    }

Extra Information on Data subject/provider/consumer

The key/value pair ("Passive": ) specifies whether the cell is active or passive.
Default value for "Passive" is false.
For father,

    {
        "DisplayName":"Father",
        "Description":"",
        "Image": ...
        "CellType": "Person"
    }
   OR
    {
        "DisplayName":"Father",
        "Description":"",
        "Image": ...
        "CellType": "Person"
        "Passive": false
    }

For child (who is not old enough to manage its data),

    {
        "DisplayName":"Child",
        "Description":"",
        "Image": ...
        "CellType": "Person",
        "Passive": true
    }

Tools or software that work on data

  1. "App.Home"
    Management app that display client/business apps
    Issue No.2: Basic rule is for app in this category is not to display any App.Admin.Cell.
    Examples: HomeApp, HomeApp for Biz

    {
        "DisplayName":"HomeApp",
        "Description":"ホームアプリセル",
        "Image": ...
        "CellType": "App.Admin.Cell"
    }

To Be Determined

  1. "Other" or "Misc" (TBD)
    Data subject which is an object.
    Examples: car, apartment

  2. "App.xxxx" (TBD)
    Management software that can display all the details inside a unit cell or regular cell.
    Examples: UnitManager, CellManager

  3. "App.Personal"
    Client app for data subject.
    Examples: MyBoard, Calorie Smile, Wakaba Municipal Info Bank

    {
        "DisplayName": {
            "en": "MyBoard", 
            "ja": "マイボード"
        },
        "Description": {
            "en": "Demo application (MyBoard).",
            "ja": "デモアプリ「マイボード」"
        },
        "Image": ...
        "CellType": "App.Personal"
    }
  4. "App.Business"
    Business app for data consumer/provider.
    Examples: Wakaba Municipal Info Bank for Biz

    {
        "DisplayName": { 
            "en": "Wakaba Municipal Info Bank",
            "ja": "わかば市情報バンク" 
        },
        "Description": { 
            "en": "Admin application for Wakaba Municipal Info Bank.", 
            "ja": "わかば市情報バンクアプリセルです。" 
        },
        "Image": ...
        "CellType": "App.Business"
    }
shimono commented 7 years ago

I think the newly introduced key "CellType" should rather be just "Type" because profile.json is a file for describing the profile of the Cell.

shimono commented 7 years ago

We should not probably introduce type value "passive". Instead it should be handled with another key, e.g. ("Passive": true or "Active": false) later. A person, organization or object.. may be passive, whereas other person, organization or object.. maybe active.

shimono commented 7 years ago

Word choice "App"/"Schema"/"Client" should be carefully considered. Also, the polymorphism may be taken into account, i.e. by introducing a convention like below, forward matching can extract super-class of the "Type" defined.


Client.Cell.Personal - home-app type client for personal use Client.Cell.Business - home-app type client for business use Client.App.Personal - application client for personal use Client.App.Business - application client for biz use

We should also probably consider the "sub-schema". (The new notion we discussed the other day to handle multiple views in same app for multiple user roles, e.g. teacher, student etc.)

Isn't that "Personal"/"Business" thing handled with sub-schema, rather than Cell's "Type"? I do not have my answer for this yet.

dixonsiu commented 7 years ago

To avoid confusion, I prefer CellType because new comers might think that is application type when the cell is for an application.

dixonsiu commented 7 years ago

Can't agree with you on the following names. Usually when management app has personal and business version, most modules are shared, therefore, they will most probably be hosted inside the same cell sharing the same profile.json. Client app makes sense because modules are not shared. Let's discuss it during Sprint meeting

Please check the revised proposal (comment No. 2) for management app like HomeApp.

dixonsiu commented 6 years ago

The following commits solve this issue.

  1. Commit 7267f99d9d5247462351f7bd028d1a71d7873290
  2. Commit 6354bee89b0e11fed52c2d05c0dfe743fddabff3
  3. Commit f039aa954294e7537409039cc6d4842123e4f4ed