0

We are a student team maintaining a mobile app written mainly in javascript (also jquery) and PHP. We recognized that we have to improve the structure of our code and have to implement structures and workflows within the Team.

Status of the code:

By now the code is still very tangled, not loosely coupled.

Classnames with identical names in different folders.

Wide usage of == instead of ===.

Wide usage of global variables.

We reinvented the wheel for parts of the code. (where frameworks already existed for certain purposes)

Status Methods/Tools:

We are now implementing SCRUM

We use Redmine Backlogs which works good for us.

We implemented a usable branching model for git. (http://nvie.com/posts/a-successful-git-branching-model/)

We started to use jsdoc to do an inline documentation of the code.

We stumbled across SonarQube (a code quality checking tool) and think this might be helpful.

We are still new to TDD and skeptic about it. We do not have expertise in designpatterns but would like to apply them. Only few in our team of round about 6 people know the basic concepts of MVC, MVV, MVP.


We want to start with refactoring our code (to unobtrusive js?) around the first week of september.

Which steps would you suggest so that we don't stumble too much and that the process is kept transparent and motivation is high?

Would you start by fixing little issues like the == / === thing? (things SonarQube comes up with) Would you start with implementing a TDD framework but without having a testable MVC/MVV ? Would you start with separating js from html and css? Would you start with bugfixing of old, not yet resolved tickets to have absolutely clean branches?

Thank you very much for any suggestions/ideas/best practices

Marc

1 Answers1

0

Well .. step nr.1: read this book. You have time enough for that till September.

Watch following lectures:

These materials should give you some sense of the subject.

As for real first steps, separating the HTML from JavaScript is a nice place to begin. If you know how to do event delegation in javascript - good. If not, look into it.

Then you can move on to fixing the part of page that spews out the HTML. Separate the SQL, add some abstraction, some OOP principles.

If you end up aiming at something MVC-shaped, then this list of links might help a bit.

Community
  • 1
  • 1
tereško
  • 58,060
  • 25
  • 98
  • 150