{"action":"created","issue":{"url":"https://api.github.com/repos/linuxdeepin/developer-center/issues/38","repository_url":"https://api.github.com/repos/linuxdeepin/developer-center","labels_url":"https://api.github.com/repos/linuxdeepin/developer-center/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/linuxdeepin/developer-center/issues/38/comments","events_url":"https://api.github.com/repos/linuxdeepin/developer-center/issues/38/events","html_url":"https://github.com/linuxdeepin/developer-center/issues/38","id":134500142,"number":38,"title":"Deepin Application Specification","user":{"login":"Iceyer","id":1117694,"avatar_url":"https://avatars.githubusercontent.com/u/1117694?v=3","gravatar_id":"","url":"https://api.github.com/users/Iceyer","html_url":"https://github.com/Iceyer","followers_url":"https://api.github.com/users/Iceyer/followers","following_url":"https://api.github.com/users/Iceyer/following{/other_user}","gists_url":"https://api.github.com/users/Iceyer/gists{/gist_id}","starred_url":"https://api.github.com/users/Iceyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iceyer/subscriptions","organizations_url":"https://api.github.com/users/Iceyer/orgs","repos_url":"https://api.github.com/users/Iceyer/repos","events_url":"https://api.github.com/users/Iceyer/events{/privacy}","received_events_url":"https://api.github.com/users/Iceyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-18T07:17:16Z","updated_at":"2016-02-19T02:32:27Z","closed_at":null,"body":"# Deepin Application Specification\r\n\r\nEvery application should keep the rule in this document.\r\n\r\n## 1. Application Information\r\n\r\nApplication should set the property Organization-name and Application-name.\r\n\r\nOrganization/Application name can contains alphabet, number and other visible ASCII code, BUT space MUST NOT appear in the name. And we do not approve of no-ASCII code character in the Organization/Application name\r\n\r\nApplication can stay Organization-name empty, but it should always set an Application-name.\r\n\r\n## 2. Standard Path\r\n\r\nThe log, configure and runtime cache of Application should store in specific path.\r\n\r\n**If Organization-name is empty, \"{Organization-name}/\" would not appear in path.**\r\n\r\n### 2.1 User Application Standard Path\r\n\r\nAs an application run for user session, the Standard path should be:\r\n\r\n````\r\nXGD_LOG_HOME_DEEPIN:\r\n    Where deepin-user-specific log should be written.\r\n    XGD_USER_HOME/.log\r\n\r\nDAPP_CONFIG_HOME:\r\n    Where application-specific configurations should be written.\r\n    XDG_CONFIG_HOME/{Organization-name}/{Application-name}\r\n\r\nDAPP_LOG_HOME:\r\n    Where application-specific log should be written.\r\n    XGD_LOG_HOME_DEEPIN/{Organization-name}/{Application-name}\r\n\r\nDAPP_CACHE_HOME:\r\n    Where application-specific cache files should be written.\r\n    XGD_CACHE_HOME/{Organization-name}/{Application-name}\r\n\r\nDAPP_DATA_HOME:\r\n    Where application-specific data files should be written.\r\n    $XDG_DATA_HOME/{Organization-name}/{Application-name}\r\n\r\n````\r\n\r\n### 2.2 System Application Standard Path\r\n\r\nApplication run as system daemon, or with user with no home directory should place it's file in this standard path:\r\n\r\n````\r\nDAPP_CONFIG_SYS:\r\n    /etc/{Organization-name}/{Application-name}\r\n\r\nDAPP_LOG_SYS:\r\n    /var/log/{Organization-name}/{Application-name}\r\n\r\nDAPP_DATA_SYS:\r\n    /usr/share/{Organization-name}/{Application-name}\r\n\r\nDAPP_CACHE_SYS:\r\n    /var/cache/{Organization-name}/{Application-name}\r\n````\r\n\r\nRefs:\r\n\r\n[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.8.html)\r\n\r\n[XDG Base Directory support](https://wiki.archlinux.org/index.php/XDG_Base_Directory_support)\r\n"},"comment":{"url":"https://api.github.com/repos/linuxdeepin/developer-center/issues/comments/186020198","html_url":"https://github.com/linuxdeepin/developer-center/issues/38#issuecomment-186020198","issue_url":"https://api.github.com/repos/linuxdeepin/developer-center/issues/38","id":186020198,"user":{"login":"fasheng","id":3049011,"avatar_url":"https://avatars.githubusercontent.com/u/3049011?v=3","gravatar_id":"","url":"https://api.github.com/users/fasheng","html_url":"https://github.com/fasheng","followers_url":"https://api.github.com/users/fasheng/followers","following_url":"https://api.github.com/users/fasheng/following{/other_user}","gists_url":"https://api.github.com/users/fasheng/gists{/gist_id}","starred_url":"https://api.github.com/users/fasheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasheng/subscriptions","organizations_url":"https://api.github.com/users/fasheng/orgs","repos_url":"https://api.github.com/users/fasheng/repos","events_url":"https://api.github.com/users/fasheng/events{/privacy}","received_events_url":"https://api.github.com/users/fasheng/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T02:32:26Z","updated_at":"2016-02-19T02:32:26Z","body":"s/XGD/XDG/\r\n\r\n日志这块推荐使用 syslog, 实在不方便则放到 `/var/log` 或 `$HOME/.cache`, 如 `$HOME/.cache/deepin/dde-dock/dde-dock.log`, 不建议专门使用 `$HOME/.log` 目录.\r\n\r\n关于 **Application-name**,  可能和之前的规范混淆, 因为按照 https://github.com/linuxdeepin/developer-center/issues/31 的讨论结果, dde-dock 的 Application-name 应该为 `Dock`, 所以这里要么使用 Project-name, 要么专门解释下 Application-name."}}