3 ms·
There's presentation logic vs business logic. Tracking whether a button is disabled or not is presentation logic. Projecting a snapshot of business state onto
by wild_preference 8y ago
There's presentation logic vs business logic.
Tracking whether a button is disabled or not is presentation logic.
Projecting a snapshot of business state onto a presentation is also presentation logic.
"Old school PHP application" style seldom made a distinction.
Also, you must add indirection (bad) to split things apart, and indirection doesn't necessarily pay its own rent. An example would be putting an ajax api request (a client's business concern) into a component where the <button> exists that triggers it. Collating that logic with the UI is nice until you want to reuse the logic, and it's usually cheap to extract it from a component, so you can often add indirection on an as-needed basis as you scale.