4 ms·
that's also my tip for devs working in my team when they ask me where they should write a piece of logic : - would you need to change that code if the UI is no
by bsaul 3y ago
that's also my tip for devs working in my team when they ask me where they should write a piece of logic :
- would you need to change that code if the UI is now a command line application ? No ? then it's in the model layer.
EDIT: i've also been in those codebase a LOT, and actually decided to create a blueprint of a mobile codebase with an emphasis on the model layer. I'm not going to post it here because i want to remain anonymous, but i've been using it in my projects (and my friend's have been doing the same) for the past 6 years..
- mpweiher 3y agoCool. And great to see I'm not alone. I've written about mine here: https://blog.metaobject.com/2022/06/blackbird-simple-reference-architecture.html https://blog.metaobject.com/2022/06/blackbird-simple-referen... Maybe we should form APSMA, the Association for the Promotion of Sane Mobile Architecture?
- bsaul 3y agoActually let me share a story : I usually never ever advise my customers to rewrite their app from scratch. And yet here i was, doing it for the 4th time in a row for 4 different customers, in just 2 years, simply because the codebase were a total mess each time. So i thought "well, there's got to be a problem with iOS developers here in Paris". And so i decided to give a talk to the largest iOS dev group in Paris to show my model layer template. I started with a poll : who has ever heard about "layered architectures" ? Well, there was about 100 people in the room, and only 2 people raised their hands. I talked to them afterwards, they were both backend developers originally, and were absolutely stunned nobody else in the room knew the term. So, that was just to tell you that the problem is a cultural one. Apple never ever mentions architecture in their documents / talks. So most mobile devs that start in this path start by coding fancy animations, and only much MUCH later, after a lot of projects turned ugly, do they start to realize there is another world for them to discover.
- jim180 3y agomy story is almost identical to yours + I was backend engineer many many years ago :) would you mind sharing your presentation?