Team Orion

COMP6051: Social Networking Technologies

Secondary Menu
  • Home
  • Blog
  • Intro
  • Plan
  • Academia
  • Analysis
  • Design
  • Dev
  • Evaluation
You are here: Home ∼ Implementation ∼ Testing and code quality

Testing and code quality

Published by Peter West on 29th April 2014 | Leave a response

Throughout implementing the prototypes, we’ve employed a number of testing methodologies to ensure that the product is of a high quality. In this post, we’ll discuss four methodologies we have used: regression testing, code modularity, code quality checking and code metric monitoring.

Regression testing

After each significant change was made to the code, the prototype would be compiled into an android app and run through a number of scenarios on a phone. The purpose of testing in this way was to make sure that any changes did not break features which previously worked.

Code modularity

We made a number of design decisions to ensure that the code would be modular and easily maintainable:

  • Adopting the server-client architecture leads to a disconnect of the user and the database.
  • Using object oriented languages leads to modular code. In particular, the use of RedBean ORM and Backbone.js led to separately defined models, making it easily maintainable.
  • Separation of DOM and JavaScript using jQuery and Angular reduces the coupling that is generally prevalent with web applications.

Code quality checking

The design of JavaScript can make it susceptible to common mistakes. In particular, it doesn’t check if a variable hasn’t been declared, so if it is written to, it will be declared in the global scope.

To alleviate these issues, we used Douglas Crockford’s book JavaScript: The Good Parts. He advises on design patterns, and advocates using a code checking tool, JSLint. We used this to ensure that we did not make some common mistakes.

Code metric monitoring

As the amount of code increases, more time needs to be spent ensuring that it is of a high standard. We therefore imposed restrictions on the number of lines of code (in PHP and JavaScript) we would write, in order to ensure adequate time for testing. The following table shows the limits and final line counts of the prototype:

Language Line count limit Final line count
PHP 1000 691
JavaScript 1000 944
LESS N/A 767
HTML N/A 372
XML N/A 13
Total 3000 2787

Code statistics generated using CLOC

Conclusion

Using these methodologies has meant that the prototype is of a high standard, making it maintainable and reliable. This will be particularly useful in future applications of LeapIn.it, when other developers may need to access the code.

Posted in Implementation Tagged architecture, development, leapin.it, project managment, prototype

Article written by Peter West

I'm a Web Science MSc student at the University of Southampton. I'm interested in user interface design and open data. My website

Please comment with your real name using good manners.

Leave a Reply Click here to cancel reply.

← Previous Next →

Recent Posts

  • REST API 3rd May 2014
  • Conclusion and Future work 2nd May 2014
  • LeapIn.it REST API 2nd May 2014
  • Code availability 1st May 2014
  • Marketing and pitching 1st May 2014

Team Orion

Noura N Alomar

Software Engineering MSc

Steed Crazyq

Web Technology MSc

Peter West

Web Science MSc

Mentor

Rob Blair

Web Science PhD

Critical Friends

Laura Hyrjak

Web Science MSc

Faranak Hardcastle

Web Science MSc

Michael Day

Web Science MSc

Tags

Planning Implementation social factors prototype architecture gamex research survey leapin.it Academic Background user interface Introduction marketing ideas Design Evaluation development user story Analysis project managment Uncategorized

Calendar

February 2023
MonTueWedThuFriSatSun
« May  
 12345
6789101112
13141516171819
20212223242526
2728 

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Secondary Menu

  • Home
  • Blog
  • Intro
  • Plan
  • Academia
  • Analysis
  • Design
  • Dev
  • Evaluation

Copyright © 2023 Team Orion.

Powered by WordPress and Path. Back to Top