Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

2020 01 31 New Start

Endre Bock edited this page Jan 31, 2020 · 1 revision

A fresh clean start

Why?

Whats happened to have a new start?
This project is my playground to test and train new technologies on make web apps. But I was long time away and had no time to actualized the project.
Now most of my dependencies are deprecated and already replaced by new one. Also the MDC as released and looking different. React gave a new use-Functions and other improvements.
The try up upgrade lead into a complete not working project.

As second I make a lot of new ideas and learn also new interessting stuff on my daily work.

Maintenance dependencies

It seems also for larger companies a bigger problem to maintain the dependencies. Projects are made and for 2 or more years not touched. Then the stakeholders want to have new features which required new major version of some dependencies. They coming of course with breaking changes. So the project must be actualized.
If the project has a very high amount of dependencies, then it mostly comes with a need to actualize many or most parts of the project.
Of course I have to tell the stakeholder, that the team need (for example) a week to bring the project back in work, before we can start with new features. But that wasn't planned to destroy the complete budget. At this moment, the project is dead.

Avoiding dependencies == avoiding maintenance?

No! But if we reduce the dependencies to the real minimum, then is the chance higher, that the project can be "fast" actualize after some years.
But, what are minimum of dependencies?
To realize that, I restart this experimental project. I have here a most similar situation: Rarely updated and need newest dependencies to continue.

Reducing dependencies by invest for work

One way I see, is to change the definition of minimum required dependencies. An example: To output the time I use a library to do it:

class Presenter {
  public present():ViewModel {
    const model = new ViewModel();
    const formatter = new DateTimeFormat('YYYY-MM-DD');
    model.currentDate = formatter.now();

    return model;
  }
}

That seems of course very clear and easy. Imagine we have that on hundreds of places. We upgrade now our library from 1.x to 8.x after some years.
The usage changed now to:

class Presenter {
  public present():ViewModel {
    const model = new ViewModel();
    const formatter = DateTimeFormatFactory.createFormatter('now', {format:'YYYY-MM-DD'});
    model.currentDate = formatter.format();

    return model;
  }
}

It seems easy to do, but on hundreds or thousands of places it need many time to do.

In that cases we have some ways:

First, wrap all used dependencies at begin. That will work so long, if the dependency methodology not changing.

The second way is, for small stuff to do a own component. Often we need only 10 or 20 percent of a library. In that cases is the work of wrapping similar to do your own. (Security stuff is excluded in that idea!)

The third way is the complete opposite. Take dependencies as hell. Do the project quick & dirty. And don't maintain the project, just do always new. In projects with continues ie. integration/delivery you could it a valid strategy to build, use and trash it. (React use-Functions may made for that kind of scenario)

To answer now the into-question "Why restart?", I can now answer: In this experimental project I want to proof the second strategy to reduce the dependencies to get its quicker upgradable and maintainable.

Necessary dependencies in maintainable projects with clean architecture

Ok, I decide (in role of stakeholder) to invest time(or money;) to get the project maintainable. In that are all questions and ideas of the last 2 years still valid.

This project will continue in:

  • React with TypeScript as toolkit for DOM handling.
  • High testing coverage and code quality metric
  • Lowest dependencies to 2rd party libraries
  • Try to be mostly free from any framework
  • Using MDC as toolkit for UI design/output.

So my dependencies at least are:

Other stuff, like Packing¹), Forms, Routing, PWA, Storage, Speech detection, Messaging, Data Input, and so on, I will do by own project code.

¹) Using browsers import mechanism and don't ugly-fy the code.