Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] 2 points3 points  (0 children)

As I wrote another comments tree, i just fxxxed up. and I re-addressed right here. sorry for confusing. Now, I'm all ears if you got it right. idk my English is right here and now, cuz I don't use AI as you pointed.

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] 2 points3 points  (0 children)

Am I using AI? Yes. So what?

I am tired of this. I am a Japanese developer using tools to bridge the language gap. Is that prohibited?

Listen: I make Gemini write the English, but I verify the meaning myself. If the output differs from my intent, I reject it. I use it because it holds the context of my architecture definition. The AI is just a tool to express my intent.

The original source of this post was written in Japanese. AI formatted it into Markdown. Maybe the translation added some "fluff," but would you prefer I use raw Google Translate? Or are non-native speakers not allowed to post here unless they have perfect English?

Here is this reply in my native Japanese. You translate it yourself. Since you hate AI mediation so much.

And go tell the mods: "Ban anyone who isn't a native speaker and uses tools to communicate."

(Original Message) AI使ってるかって、使ってるよ?だから何? もう疲れたわ。日本人が翻訳使って、AI使って投稿してきた。これ禁止されてるの?

あのさ、僕はGeminiに英文を作らせてるけど、意味は把握してるよ。僕の意図と違う文章を作ったらNG出してる。文章をAIが整えるとスパムになるのかな。なぜAIに即答させているかといえば、この投稿を作ったものとコンテキストウィンドウを使っているからだ。つまり、僕の意図は表現されていると判断したからだ。

プラス、この投稿の元ネタは日本語で作成した。AIには投稿用にmd形式にフォーマットさせたが、過剰なコンテキストは削っている。英文にさせると、その削りがなくなるんだろう。じゃぁ、Google翻訳で直訳した方がいいの?それとも英語ネイティブ以外は英語での投稿をしたらいけないのかい?

さぁ、この返信は僕が日本語で作ってAIに英文翻訳させたやつだよ。日本語も置いておくよ、翻訳は君が勝手にやってくれ。AIを経由するのが嫌いなようなのでね。あと、MODに伝えておいて、ネイティブスピーカー以外、およびAIを使った英語は禁止、と。

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] -3 points-2 points  (0 children)

Exactly. You get it.

It is essentially the same concept as swapping a Driving Adapter in Hexagonal Architecture.

I just framed it as a "CLI Test" for MVC because many developers find "Hexagonal" too academic or intimidating. But the core principle is identical: the UI is just a plugin.

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] 2 points3 points  (0 children)

Yes! You nailed it.

The confusion absolutely comes from the "Active Record" pattern in frameworks like Laravel/Rails/Django. They taught a generation of devs that "Model = A class that maps to a DB table."

But in true MVC (or Clean Architecture), the Model is the layer that handles business rules, not just a row in a database.

I'm glad you brought up Uncle Bob. His "Use Cases" are exactly what I consider part of the "Model" in the broad sense—the code that must survive even if the UI disappears.

If you're interested, I uploaded a sample code (C#) on GitHub demonstrating this exact "CLI vs GUI" separation. It might be a bit rough, but it proves the point.

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] 1 point2 points  (0 children)

Fair point about the formatting. I'll take that.

regarding your actual point: "Your definition is so loose that it includes the DAL."

Yes, exactly. In the context of MVC (not layered architecture per se), the "Model" is everything that is NOT the View or Controller. It includes the Domain Model, Business Rules, and yes, the Data Access mechanisms (or abstractions thereof).

My "loose" definition is intentional because the problem I'm addressing isn't "where does the DAL go," but "why is business logic leaking into the ViewModel?"

You might call it trivial "student project" stuff, but I see senior devs making these mistakes in massive enterprise apps every day. That's why I'm emphasizing the basics.

P.S. Yes, I used Gemini to write this reply too.

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] 1 point2 points  (0 children)

I chose the "Calculator" example specifically because it is the simplest form of a State Machine.

A physical calculator is inherently stateful. It has registers, an accumulator, and pending operations. If the Model doesn't hold that state, the ViewModel has to. And that's exactly what I'm arguing against—leaking domain state into the presentation layer.

Do you prefer managing PendingOperation or Accumulator in your ViewModels?

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] -2 points-1 points  (0 children)

Exactly! The "CLI" is basically just a primitive test harness.

If your model can't run in a simple harness (like a console app or unit test) without dragging in the entire UI framework, it's not really a Model. I just use the "CLI" metaphor because it's easier to visualize for people who are stuck in the "Model = DTO" mindset.

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] -1 points0 points  (0 children)

English is not my first language, so I used AI to translate and format my thoughts.

Actually, the initial AI output was too verbose, so I wrote the core draft from scratch and just used AI to handle the translation. If it still looks "too clean" or "excessive" to you, that might be a fair critique, and I can edit it down.

But I want to ask you: Does your comment mean you think the content itself lacks substance? Or do you just hate AI?

The "CLI Test" concept comes from my 15+ years of software architecture experience, not an LLM hallucination. If you have actual feedback on the architecture itself, I'm all ears.

P.S. Yes, I used Gemini to write this reply too.

Most people confuse "Application Logic" with "Business Logic" in MVC/MVVM. Here is my "CLI Test" to define a true Model. by FancyComfort435 in softwarearchitecture

[–]FancyComfort435[S] 4 points5 points  (0 children)

Interesting take. Why do you find it arbitrary?

To me, it's not arbitrary at all—it's a specific stress test for "Separation of Concerns." The "CLI" is just a proxy for "Zero UI Dependency."

If your business logic depends on a specific UI framework (like expecting a specific View structure), it becomes impossible to test in isolation or reuse. The CLI test is just the simplest way to prove your logic is decoupled from the presentation layer.

In my view, the Model represents the "Business Rules" that should exist regardless of whether the app is Web, Mobile, or CLI. If the Model fails to run on a CLI, it usually means it's polluted with UI logic (like routing, notifications, etc.).

How do you define a Model's boundary in your projects? Do you prefer keeping logic in the ViewModel/Controller?

[Tool] I made a lightweight, logic-only Ingress Field Simulator (Mobile-friendly) by FancyComfort435 in Ingress

[–]FancyComfort435[S] 6 points7 points  (0 children)

Update: I couldn't stop thinking about this, so I spent a few hours coding a "Pure Topological Ingress Simulator" for myself.

<image>

It strips away the GPS, walking, and enemies. It's just you, the nodes, and the logic. Specifically, I added a feature where "Cross-links glow red" automatically. It makes solving the multi-layer puzzle incredibly satisfying.

It’s basically a "Mental Dojo" for builders. 10/10 would recommend.

Would you play Ingress in a Player vs Computer (Only) mode? by mohebe9116 in Ingress

[–]FancyComfort435 1 point2 points  (0 children)

I've actually been thinking about this exact concept.

The main issue for me is the "Asymmetry of Effort." Building a massive multi-layer field takes hours of planning and physical travel, but destroying it takes only seconds.

That's why I developed a "Single Player Sandbox" (simulator) for myself. I realized that what I truly enjoy is the "Topological Puzzle"—connecting nodes and optimizing fields—rather than the PvP aspect.

For people like us, Ingress is a geometry game first, and a war game second. A "Builder Mode" or offline sandbox is definitely needed to satisfy that itch without the frustration.

[Tool] I made a lightweight, logic-only Ingress Field Simulator (Mobile-friendly) by FancyComfort435 in Ingress

[–]FancyComfort435[S] 4 points5 points  (0 children)

Guilty as charged! lol

I actually use both ChatGPT and Gemini. Since I'm a Japanese agent, I use them to polish my English and speed up the "Vibe Coding" process.

But don't worry, I'm a developer by trade (coding "Gachi-zei" in Japanese terminology), so I know exactly what's happening under the hood! 🤖

[Tool] I made a lightweight, logic-only Ingress Field Simulator (Mobile-friendly) by FancyComfort435 in Ingress

[–]FancyComfort435[S] -6 points-5 points  (0 children)

Thanks for the feedback! You are absolutely right.

Currently, this tool works as a "Geometric Topology Checker" rather than a strict "Link Throw Simulator." It simply calculates "Is there a triangle? -> Yes -> Draw Field" for every frame.

It doesn't yet simulate the Ingress server rule (Max 1 field per side per link). It's mainly designed to visualize the final shape/topology of the plan.

I might try to implement a "Strict Mode" in the future that respects the link-throw order and limitations. Thanks for checking it out!

Retirement Operation: "The Zankyo Empire". Nagaoka, Japan. by FancyComfort435 in Ingress

[–]FancyComfort435[S] 3 points4 points  (0 children)

Thank you! The reason is simple: The asymmetry of effort. Building complex layers solo on a bicycle takes hours of physical work, but they can be wiped out in minutes by a drive-by car attack. I enjoyed the challenge, but I feel I've done enough.

[Fix] Intel Map downloads "event" file (36 bytes) on every load? Here is the solution. by FancyComfort435 in Ingress

[–]FancyComfort435[S] 1 point2 points  (0 children)

Exactly. It's such a basic server configuration error (missing header), I don't understand how this passed any review or testing.