6 ms·
So, just a day ago, I got dragged into a meeting where many people were involved in a discussion about the new Cloud Enterprise Application Architecture Templat
by jiggawatts 7y ago
So, just a day ago, I got dragged into a meeting where many people were involved in a discussion about the new Cloud Enterprise Application Architecture Template. Or whatever.
It had a 3-tier architecture.
I asked: Why?
And they answered: Why not?
I answered: Because layers must only be introduced if needed. Is there a need?
They answered: The standard design is the need.
I clarified: Is there a technical requirement? Or perhaps an organisation one, such as disparate teams working on the two components?
They answered: No! Of course not! It's a unified codebase for a single app written by a single person! But it is not Enterprise enough! It must be split into layers! And then, you see, it will will match our pattern and belong.
I verified the insanity: Are you saying that this finished, working application isn't currently split into layers, but you want it split into layers simply so that it can have layers?
They chorused: Yes.
- NicoJuicy 7y agoI actually like DDD, where code is executed per domain with a bounded context. Not for a single person though, but it will force kin developers to think more deeply. Otherwise it could easily result in a code-mesh/hell.
- Vinnl 7y ago> I answered: Because layers must only be introduced if needed. Is there a need? It might have gone better if you had also stated why that is the case, e.g. "every additional layer exponentially increases the likelihood of bugs being introduced, so their introduction must be worth that risk, or the higher cost of mitigating measures". Of course, the challenge will still be that "likelihood of bugs" is rather abstract, and often people believe they can be prevented just by paying more attention, and assume that that will happen of its own accord.
- organsnyder 7y agoI did a project like that at my old job. It was a single screen with a single purpose (login the user via oauth SSO, then collect a couple of pieces of input and submit them to a backend webservice), so it was assigned to me rather than creating a project team. To make it match the rest of our application architecture I created a REST layer in C# that communicated via SOAP to an ESB that forwarded the SOAP request to a Java webservice that finally forwarded it to the backend system. I did depart from our organizational norm by doing the frontend with plain HTML+JS (plus Boostrap, IIRC) rather than AngularJS. Yes, it was complicated, but I think there is a benefit: it's very clear where certain functionality should live. The C# REST layer was application-facing, so it took care of SSO and basic validation. The Java webservice contained the business logic to validate things from an broader enterprise perspective. The ESB was a piece of trash that did provide authnz so the Java webservice didn't have to. Was it worth the complexity? Probably not, in this case. But those sorts of applications tend to have long lifespans and evolving requirements, so the standardization can be helpful.
- ratww 7y ago> Yes, it was complicated, but I think there is a benefit: it's very clear where certain functionality should live Off-topic, but your post reminds me of this Michael Feathers article [1], where he argues that while programming languages have tools to support encapsulation, the don't really work, but the thing about microservices (or layers in this case) is that they actually force us to actually encapsulate our code. [1] https://michaelfeathers.silvrback.com/microservices-and-the-failure-of-encapsulaton https://michaelfeathers.silvrback.com/microservices-and-the-...
- organsnyder 7y agoThat's a really good article—thanks for sharing it. I totally agree that forced encapsulation (ideally with tightly-governed contract-first APIs) is the most enticing selling point of microservices.
- marmaduke 7y agoI went through this, more or less, several years ago. But now I see the uselessly layered app being almost effortlessly retrofitted with new top and bottom layers, keeping only the original middle layer. If they hadn't layered it, the new retrofitting wouldn't even be possible and the company wouldn't have that contract. Was it insanity?
- jressey 7y agoThen you do the layering when you need to. One of my biggest gripes about many engineers is their desire to fix technical debt for no business purpose. In your example, the team tasked with retrofitting would have introduced the layers when the need to make changes arose.
- silveroriole 7y agoWhat actually happens in a “business purpose focused” company: You tell the boss you need to double the estimate they gave to the customer, so that you can pay the tech debt and add those layers we need. Boss refuses, we need that change now so get it done without fixing the debt, why is the team so incompetent that they didn’t add layers to start with, why didn’t you just fix the tech debt on your own time in quiet periods, we can’t have a ticket for that since it doesn’t add business value, blah blah... ;)
- _def 7y agoThat's why there's no final answer to "layer: yes or no?". It depends. And as a developer it's your job to guess which decision is more likely to save you time (= money) in the future. There's no way to know the right answer for sure because it depends on further (business) decisions that aren't made yet.
- jressey 7y agoWhat you're describing sounds to me like poor departmental relationships and the typical challenges of lots of people with lots of goals working together. I sure hope all of y'all's companies are 'business purpose focused' or you're gonna be looking for a new job pretty soon.
- deleted 7y ago[deleted]
- hyperman1 7y agoThe 3 tier architecture was a reaction to VB and RAD-like tools, where things like data validation and database I/O were coupled directly to the input component. It was common for these frameworks to not even have an object for data transfer sitting between UI and DB. This was the timeframe where more and more manual work was automated. Hence it was a common situation where input used to be given by a human, but now comes from another application. The simplest way to do that kind of retrofit was to drive the UI from the application: The application fills in its own gui fields which triggers the validation, then simulates a click on OK. This caused al kinds of ungodly messes. You need a gui for background processes, reliability was low, etc.. 3 tier architecture were a way to say 'never again' to this style of programming. Forcing people in to it was necessary. But that was another time. Mindlessly applying an architecture without understanding why is of course dumb. But not applying an architecture without understanding it's pros and contras is just as dumb. It all depends on the quality of the architects in question. Not that I want to call you dumb, of course. IT today is different from 20 years ago.
- specialist 7y agon-tiered architectures were born during the transition from "workgroup" to "client/server". This upheaval caused an industry-wide loss of programming lore. It wouldn't have been too bad, except the ODBC interface inadvertently led to abandoning schema-aware programming models like VB's ADO, Paradox, FoxPro, etc. At the same time, object oriented became fashionable. So we ended up with ORMs, ActiveRecord, and various offshoots. Mostly because no one remembers life before client/server.
- aprdm 7y agoCan you talk more about workgroup?
- ratww 7y agoNot the GP, but I used to work in desktop development for enterprise businesses. Most multi-user apps were two tiered: client and database. The way they worked was by connecting directly to the database and/or a shared filesystem in the local network. All validation happened client-side. Database credentials and fine-grained file/directory permissions were the only security measures. That and the NAT. ;) There's still software in the market that uses this model, like some niche ERPs from the 90s and software catered to small/mid businesses.
- debt 7y agoI’m trying an experiment in my new role where I deliberately avoid these types of projects. They usually don’t deliver on time and are too stressful to work with. It’s not worth it both personally and from a career perspective. However if they manage to deliver a complex design on time, I’ll have lost a great career opportunity. It’s a gamble either way, but high complexity both in organization and design, usually yields a high failure rate on just about every metric I can think of except the metric of “I’m going to use this complex design to get another job and bail myself out of the dumpster fire I’m creating before I have to deliver anything of value”.
- afriendofjungs 7y agoYou're lucky you got some form of discussion out of the people you work with. Whenever I try to steer conversation towards "technical accountability" where I ask what I think are legitimate questions concerning application design and architecture, the mood is as if no-one else believes it's of any importance and I am that weird guy putting spokes in the wheels of a great project. My arguments aren't refuted, they're conveniently ignored. People are honestly dumbfounded and prefer to change subject at best, at worst they lash out with what seems to be simplistic thinly-veiled "culture" attacks -- "oh, please, not with that abstraction/encapsulation argument again, we've got work to do"-sort of utterances.
- spookthesunset 7y agoI’ve had those “well, your project is fucked” meetings. The ones where all the leads are architecture astronauts inventing requirements as they go. “We have to have the ability to pass the original authentication the entire way down the stack including the rabbitmq instance too. Why? “Security” Okay.... ... astronaut proceeds to fill two whiteboards with ungrounded nonsense. All you can go is smirk and just wait until the whole project gets mysteriously canceled because no mortal could ever implement it successfully. Honestly as long as I don’t need to directly depend on them, these are some of my more favorite meetings. So surreal. That and when the team infights the entire time.
- jiggawatts 7y agoThe most impressive architecture I've ever seen was from these two consultants from a big-4 consultancy that had been sitting at a desk at the customer site for literally years. They had lunch together, never talked to anyone that I could see, and I didn't even know what they did for the first couple of years. I walked past their desk one evening after hours and noticed a printed A3 page of their high-level design diagram. It was... spectacular. It had over a hundred tiny icons, each representing various systems. Triangles for directory systems, cylinders for databases, and little arrows connecting these things. You have to picture a spider web of connections between dozens of each type of system. The notion that this could be implemented was absurd beyond all comprehension. Just one of the tiny little arrows was connecting SAP to a custom system vaguely similar to Siebel. This arrow represented on the order of thousands of tables and API endpoints that need to be hooked up. Another arrow connected an Active Directory with a million accounts to an Oracle directory of the same scale. Another arrow represented synchronisation between a cloud-hosted payroll service to an on-premises equivalent product. Half the systems didn't exist. Three quarters of the connections didn't exist. Most would have to be written as bespoke code. Some of the arrows would in turn require load balancers, distributed systems, and change tracking databases of their own. We're talking thousands of man years of effort to implement this thing. It was audacious in the breadth of its scope to the point of going past insane into the brilliant daring art that's only possible if you can appreciate it at the right level of understanding. That understanding was that these two brilliant people had been collecting something like $4K/day each for years and produced something that dares your to call them on their bluff. But nobody dared say that the emperor has no clothes. They pulled it off. I was truly impressed.
- wayoutthere 7y agoI would say that this could very easily be justified as standardizing and de-skilling development and production operations. That's a very good business reason to standardize architecture patterns, because it's cheaper to use a pattern that is sometimes overkill than it is to have a bespoke architecture for every app.
- deleted 7y ago[deleted]
- trophycase 7y agoDecoupling and modular design is pointless?
- jiggawatts 7y agoIn this case, yes. There is such a thing as pointless busywork that has no tangible benefit to the business, user, or the future codebase maintainer.
- ZainRiz 7y agoThe number of code repositories I've seen where the database layer was (leakily) abstracted away "in case we ever need to migrate" is WAY greater than the number of code bases where there was actually a need to migrate. Yet they all still introduced the headaches of having to update the abstraction layer whenever you wanted to make schema changes
- he0001 7y agoWhat would you do instead?
- yellowapple 7y agoAre these three tiers respectively called "model", "view", and "controller", by chance?
- he0001 7y agoWhat do you propose instead?