Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Elm #56

Open
3 of 5 tasks
mrapacz opened this issue Jul 16, 2017 · 0 comments
Open
3 of 5 tasks

Refactor Elm #56

mrapacz opened this issue Jul 16, 2017 · 0 comments

Comments

@mrapacz
Copy link
Collaborator

mrapacz commented Jul 16, 2017

Type

Enhancement

Current behaviour

We need to improve our frontend code, the more we add to it, the worse it gets. We should do this as soon as we finish with #34

Expected behaviour

My suggestions:

  • Add proper setters like here

  • roomId is an Int, not sure why that's the case, as in most of the cases we convert it to String.
    We could just make it a string and AFAIK, that's the way it should be done anyway.

  • Actually in the later stages I would refrain from using a raw id as it's not so safe, I believe our frontend part should use encoded ids, we don't want to let users know how much data we actually have in our dbs.

  • As for the architecture:

    • Create Update.elm for Room and move all room-specific logic to this file
    • Create Msgs.elm for Room resource
    • I believe that we should have separate modules for Room, Profile ([Elm] User profile page #35) and DataPanel (or however we would call the module taking care of the question, subject forms etc.)
  • We could move all the user-facing strings to one module/library (it would be much easier to deal with translations later should we encounter the need to do that)

Motivation / use case

Our project grows larger, we need to remodel it so that it's easier to maintain.

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

No branches or pull requests

2 participants