Skip to content

Development History

Neil Mather edited this page Oct 23, 2020 · 1 revision

Big dev/architectural milestones

The Fixometer

Restarters was originally called the Fixometer. It was built in 2015/2016, in its own hand-built MVC framework (somewhat modelled on Laravel). This work was done by Alan at Level73 (https://level73.it/). [TODO: overview of initial features]

Restarters.net

We ported the application to Laravel in 2018. This work was done with We Create Digital (https://wecreate.digital/) Code was ported to Laravel models, views and controllers (and wasn’t too onerous as MVC pattern was already in use), but it wasn’t a full rewrite - where possible, existing code was reused rather than rewritten, and still legacy code from this is remaining in various places. For example, SQL queries using DB::raw rather than Eloquent still exist.

This 2018 work was as part of work funded by Nesta Connected Communities project. Large pieces of additional functionality were created as part of this work also - including enabling the ‘Repairer’ role and supporting functionality for that (invites/RSVPs, etc), internationalisation, allowing self-registration on the platform, and starting integration with Discourse and MediaWiki. [TODO: more detail on other features added during the port]

Introducing Vue

We started using Vue in 2020.

Dirty bits

Monolithic app.js

We have a mega-file of mostly jQuery that was doing all of the client-side behaviour. It's big and messy and disorganised.

We'll resolving this slowly over time as we move the client-side to Vue.

Global JS/CSS/assets vs Laravel-specific JS/CSS/assets

We have both resources/global/.... and resources/assets/...

resources/assets was what we always had from the beginning of Laravel app. In recent rebrand work (2020), WCD added in resources/global for styles that would also be shared by Discourse and MediaWiki, but resources/assets/ kept for anything Laravel specific. I'm not sure how useful this distinction is and I've personally found it a bit confusing at times - some things are in two places. Discourse is at present not using ANY of the global CSS/JS from Laravel. The wiki is using some of it, but also has some local overrides.

Legacy code

As mentioned in the history, we ported the application to Laravel in 2018, but it wasn’t a full rewrite. Where possible, existing code was reused rather than rewritten, and still legacy code from this is remaining in various places. For example, SQL queries using DB::raw rather than Eloquent still exist. We refactor as necessary if we're revisiting a bit of code.

API

There's a few API calls dotted around in various controllers (some in API controllers, some in Http Controllers). The code is dotted about, and also the routing isn't very consistent or RESTful.

We want to make a cleaner and more coherent API.

Misc

Xrefs - linking images to things

This is a vestigial tail from pre-Laravel days… it chiefly links images to other entities, at least that's all I've ever seen it link. The table ids that are used in the table itself come from .env (e.g. .env.example:44)

Should be created as part of the initial migration - database/migrations/2018_04_19_102108_initialise_fixometer_db.php:200.