Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Update code tree #80

Closed
5 tasks
Trim opened this issue Aug 23, 2017 · 5 comments
Closed
5 tasks

Update code tree #80

Trim opened this issue Aug 23, 2017 · 5 comments

Comments

@Trim
Copy link
Member

Trim commented Aug 23, 2017

Hello,

According to comments on #70, we will certainly do some initial big pull requests updating all the code (to automatically beautify the code files).

I want to suggest to update also the code tree structure and to document it.

Currently, what I've seen is this one if I understand it correctly:

root
  ↳ chrome: contains user interfaces
    ↳ content
      ↳files for all user interfaces: `.xul` for layout description and `.js` for javascript event handling
    ↳ skins: every subfolder contains custom CSS files for every supported Operating System
      ↳ common
        ↳ images
      ↳ mac
      ↳ unix
      ↳ win
      ↳ winaero
  ↳ components: contains javascript objects which interacts with  Exchange Web Service API
  ↳ defaults
    ↳ preferences: contains extension default preferences
  ↳ email: contains same directory structure than root, but with sources specific to the email tagging part
    ↳ chrome
      ↳ content
    ↳ interfaces
      ↳ one directory by interface using prefix exchangeMsg
  ↳ interfaces
    ↳ one directory by interface using prefix exchange with files with `miv` prefix (I don't understand)
    ↳ exchangeAddressBook
      ↳ chrome
        ↳ content
        ↳ directories containing interfaces for AddressBook
        ↳ locale
          ↳ exchangecontacts: contains one directory by localization
    ↳ global
    ↳ updater
    ↳ xml2json: Seems to be a new XML parser that make JSON objects
    ↳ xml2jxon: Seems to be the older XML parser to objects that is still used in some components
  ↳ locale
    ↳ exchangecalendar

Edit (2017.11.11):

According to the comments below, we will switch to such a structure:

  • root
    • addressbook
      • content
      • exchangeapi
      • interface
      • locale
    • base
      • exchangeapi
      • interface
        • exchangeFunctions (was global directory)
        • xml2json: Seems to be a new XML parser that make JSON objects
        • xml2jxon: Seems to be the older XML parser to objects that is still used in some components
      • locale
    • calendar
      • content
      • exchangeapi
      • interface
      • locale
    • emailtag
      • content
      • exchangeapi
      • interface
      • locale
    • theme
      • common
        • images
      • mac
      • unix
      • win
      • winaero

I've made a task by main sub-directory as I think I'll make one pull request by task.

@Trim
Copy link
Member Author

Trim commented Aug 23, 2017

I see two possible data structures:

Either one tree by extension feature:

root
  ↳ addressbook
    ↳ content
    ↳ exchangeapi
    ↳ interface
    ↳ locale
  ↳ base
    ↳ exchangeapi
    ↳ interface
      ↳ exchangeFunctions (was global directory)
      ↳ xml2json: Seems to be a new XML parser that make JSON objects
      ↳ xml2jxon: Seems to be the older XML parser to objects that is still used in some components
    ↳ locale
  ↳ calendar
    ↳ content
    ↳ exchangeapi
    ↳ interface
    ↳ locale
  ↳ emailtag
    ↳ content
    ↳ exchangeapi
    ↳ interface
    ↳ locale
  ↳ theme
    ↳ common
      ↳ images
    ↳ mac
    ↳ unix
    ↳ win
    ↳ winaero  

Or a common data structure containing a folder by feature:

root
  ↳ exchangeapi
    ↳ addressbook
    ↳ base
    ↳ calendar
    ↳ emailtag
  ↳ interface
    ↳ addressbook
    ↳ base
    ↳ calendar
    ↳ emailtag
  ↳ locale
    ↳ addressbook
    ↳ base
    ↳ calendar
    ↳ emailtag
  ↳ theme
    ↳ common
      ↳ images
    ↳ mac
    ↳ unix
    ↳ win
    ↳ winaero

@advancingu
Copy link
Member

I personally find the first structure to better fit the project, as it makes the various components more clear. That way if anything ever needs to be split out into a separate project in the future, the separation should already be more evident than in the second structure.

Seeing that there are two XML parsers, perhaps both of them can be replaced by something built into Thunderbird these days? I would guess that these parsers were added a long time ago.

@Trim
Copy link
Member Author

Trim commented Aug 25, 2017

That makes sense, indeed. I think too that first structure will help new developers to understand where to work to fix a bug.

For the XML parsers, I think too we can use Mozilla tools to parse XML to DOM and then create JSON from DOM serialized as string. Although, I think that work will be a long term goal we shouldn't care right now, because it seems right now that code works and because other goals like directory structure update, automatic indentation and localization are more critical.

@advancingu
Copy link
Member

Fully agree. The parsers are not urgent.

@advancingu
Copy link
Member

Major changes are in place. I believe this can be closed now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants