Hello guys,
I am Alex an iOS Developer and I took a look at your project and wanted to give you some advice. Maybe they will help you. If not, just ignore them. ;)
◉ A mocking framework
◉ A dependency injection framework (I am a really big fan of DI Frameworks and I wouldn't start a new project without one but it will be a bit of work to implement it afterwards.. But you won't regret it)
In your documentation you mention
In general, the App is built with MVC and MVVM pattern. As the code is still under construction. Depending on the complexity of project in the future, some other patterns might be applied.
After taking a quick look at your project I noticed the HomeInteractor - there is noch Interactor in MVC / MVVM. It looks like you are using something between MVC, MVVM and VIPER. It would help a lot if you would consider using one Design Pattern for the project. It will make your code much more readable. (I am a big fan of VIPER and I love it... You can test literally everything)
The HomeViewController has nearly 500loc and the project just started.
You should probably force anyone to write tests for the added code. If you force yourself to write "cleaner" code. Especially for your essential classes like the HomeInteractor.
I don't know the plans for the project but if it becomes bigger you will struggle with the compile time. You should really consider using Clean Architecture (one random Medium Article) this will help you so much. It's always better to do this right at the start. :)
Just some thoughts after taking a quick look at your project. But your code looks actually quit good. Although I am missing some things, good job! 👍 I thought this post could help you.
BTW: I don't know if "Enhancement Request" is the right topic. Sorry if not.
If you have questions or want to discuss you can always reach out to me on Twitter (@AlexSmponias) or on LinkedIn.
I disagree about the Dependency Injection framework. Dependency Injection is basically providing a function or a class with all things it needs. This can easily be done without the use of a framework (which has to be checked and understood before including).
@dasdom I agree with you that you don't need a Dependency Injection Framework now! But if you start using Clean Architecture (or Feature Splitting) and use different Targets or Projects it will make your life so much easier. I don't know how long you want to maintain this app and how big it will become but I assume that it will be used for a few years.
If your app gets bigger your compile time will increase and there are some tips to decrease it again. But really big projects have to split there App in different Targets / Projects because they can't handle the compile time. And this is there a DI Framework comes in handy. It's such a pain to implement it afterwards, split your code etc.
It's like a Mocking Framework. If you just write a few tests, forget it. If you write hundreds of tests it will be your best friend. ;)
And for the people who think: "WTF is this guy talking about? What is a DI Framework" I recommend the following Medium article :) iOS Dependency Injection Using Swinject
I think this is mostly a matter of taste. I still disagree.
From the scope of this app, my feeling is that this will never reach the state that you need several targets to make the compile time bearable.
And about mocking: I like to have to complete control of my mocks. And this again is quite easy to without a framework. Frameworks often add more friction.
In my experience software is always getting bigger than you would think. There are always new ideas etc.
Why would you want full control of your mocks? I mean you just want to check if the funcs were called and configure them? A Mocking Frameworks safes you so so so much time.
Hello @Smponias ,
thanks for your suggestions.
I will share this issue with our architects that we can get back to you as soon as possible.
thanks,
LMM
Corona-Warn-App Open Source Team
Most helpful comment
I disagree about the Dependency Injection framework. Dependency Injection is basically providing a function or a class with all things it needs. This can easily be done without the use of a framework (which has to be checked and understood before including).