4 ms·
So,I guess mixing presentation and logic is OK now? 'Cos as a PHP programmer I used to get shat on all the time for that and I'd like a chance to, you know, unl
by drivingmenuts 8y ago
So,I guess mixing presentation and logic is OK now? 'Cos as a PHP programmer I used to get shat on all the time for that and I'd like a chance to, you know, unload on someone else for a change.
NM, I'll just go back to my cave now.
- wild_preference 8y agoThere'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.
- stevebmark 8y agoGood thing "logic" isn't a concern and separating view code from view code doesn't make sense ;)