Remix.run Logo
zffr 3 days ago

The read me says this approach is extremely maintainable, but I’m not sure I agree.

The design pattern is based on convention only. This means that a developer is free to stray from the convention whenever they want. In a complex app that many developers work on concurrently, it is very likely that at least one of them will stray from the convention at some point.

In comparison, a class based UI framework like UIKit on iOS forces all developers to stick to using a standard set of APIs to customize views. IMO this makes code way more predictable and this also makes it much more maintainable.

netghost 3 days ago | parent | next [-]

Convention works when the culture is there, but I think you're right a dash of typescript and a class or interface definition could go a long ways.

I think the maintainability comes from easy debugging. Stack traces are sensible and the code is straightforward. Look at a React stack trace and nothing in the trace will tell you much about _your_ code.

I'd also point out that this looks like it's about seven years old. We've shifted a lot of norms in that time.

_heimdall 3 days ago | parent | prev [-]

Any code base lives or dies by how well it defines and then sticks to conventions. We can enforce it in different ways, or outsource the defining of convention to other tools and libraries, but we still have to use them consistently in the codebase.

I think the OP here is basically proposing that the developer should be directly responsible for the conventions used. IMO that's not a bad thing, yes it means developers need to be responsible for a clean codebase but it also means they will better understand why the conventions exist and how the app actually works. Both of those are easily lost when you follow convention only because a tool or library said that's how its done.

nonethewiser 3 days ago | parent [-]

Using a framework like react constrains developers in a different way. React isnt simply a convention like the linked example.

_heimdall 3 days ago | parent [-]

I see it differently there, react (any framework) is simply convention built into shared libraries and enforced through tooling.

React is a particularly interesting one because it is still flexible enough that there is still a lot of reliance on developers actively sticking to the conventions recommended.