Skip to content

Are pull request for code refactoring welcome? #30

Open

Description

@tndev

After reviewing the code before using it I decided to include your library into our workflow.

But I think that some parts of the code could be changed, which - in my opinion - could make it easier for foreigners to unterstand what the code actually does. At least I would like to understand the code that deals with sensitive data.

Some suggestions I have:

  • use spaces instead of tabs because it then would look the same in all editors.
  • divided the code in some smaller logical parts and move the Classes in individual files, so that the functions can be seen in whole.
  • use a standardised coding style e.g. JavaScript Standard Style

If you like that idea, then I would be happy to help you with that by creating a roadmap and by sending pull requests.

Activity

  1. jschyma commented on Apr 22, 2017

    @jschyma
    Owner

    Hi,

    that sounds like a good idea.
    Currently I don't have much time to work on this project - so improvements from others are definitely welcomed.
    So please feel free to do so and send pull requests. I will have a look at them and then merge them into the repository.

    So thanks a lot for your contribution in advance.

    BR
    Jens

  2. tndev commented on Apr 23, 2017

    @tndev
    ContributorAuthor

    I added the first iteration as pull requests. It normalises the code the the standard format.

    My suggested roadmap after this step would be:

    1. Move the Classes in the file Classes.js to individual files (Code cleanup 2 #32).
    2. Check if functions that are longer then 50 lines can be divided into smaller logical parts.
    3. Change the definition of the Classes to use prototype instead of me_… = this; me_….functioName = function() {} (or maybe even use class)
  3. tndev commented on Apr 25, 2017

    @tndev
    ContributorAuthor

    I already started my third pass. There I will focus on the MsgInitDialog of the FinTSClient.js.

    I will split the steps marked by you as comments into individual functions:

       // 1. Dialog ID zuweisen
       // 2. System Id
       // 3. Möglicherweise neue kommunikationsdaten
       // ...

    This will give a better overview about the MsgInitDialog function, and allow to easier understand what is done in this step, furthermore it reduces the risk that the cb callback is called multiple times or never.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions