5 ms·
One problem we're having with the hybrid approach (Laravel + Mithril) is not being able to reuse common UI components between php & js rendered parts. Laravel h
by dsego 8y ago
One problem we're having with the hybrid approach (Laravel + Mithril) is not being able to reuse common UI components between php & js rendered parts. Laravel has blade templates, and mithril is coded similarly to react.
The other problem is deciding which to use when starting a new feature or section. A page may start out fairly static but end up needing a rewrite when the specs change and start requiring more dynamic UI elements.
- scarface74 8y agoI would rather change a page if and when it is needed by a new feature than over engineer up front.
- a_wild_dandan 8y agoAnd I would rather over-engineer a bit now to make feature additions trivial & rewrites unnecessary. Different stroke for different folks, I guess.
- scarface74 8y agoBut you don’t know what features you may need or whether the abstractions will make sense until you have two or three examples.
- a_wild_dandan 8y agoDefinitely, which is why I leave room for those unknowns with a some preemptive over-engineering. Worst case, those (well-known, general, popular) abstractions don't get used and the project works. Best case, they really save my butt and the project works. Worth it either way, imo!
- hombre_fatal 8y agoWell, the thing is that you don't know if you're "over engineering" up front. That's the whole challenge. And rewriting down the road because of the wrong gamble can be very costly. Make the wrong bet enough times and you'll see that it's not over-engineering but just engineering for changing requirements. A classic example is thinking it will be simpler to avoid React and use a few .show()/.hide() toggles. Simple at first. Then as you take on complexity, you start to feel like the lumberjack who thought he could save time by skipping the axe sharpening.
- scarface74 8y agoExactly. You don’t know what you will need. It’s the classic concept of YAGNI and emergent design.
- guu 8y agoHere’s an approach you might find interesting. Use JS rendering for all your pages but continue to use Laravel for routing/passing data to view: https://reinink.ca/articles/server-side-apps-with-client-side-rendering https://reinink.ca/articles/server-side-apps-with-client-sid...