3 ms·
This looks very interesting, but I have a few comments from the introduction: - Single-page apps offer a more native-app-like experience, but there's no reason
by Jare 14y ago
This looks very interesting, but I have a few comments from the introduction:
- Single-page apps offer a more native-app-like experience, but there's no reason they must throw away the advantages of web over app. Almost any conceivable app is going to have different top-level states, and many apps are going to let you access different pieces of content. Support URLs to go directly to those states and to those pieces of content for two reasons: ability to be linked / indexed from outside, and navigability via the browser history. I believe the correct way to look at this is to explicitly think of these top-level states/content, and then look at supporting them in a URL, not the other way around that you suggest ("we probably need to reduce the level of detail that we support in URLs somewhat").
- The MVC pattern predates web apps, web sites and the www itself. The thing I always found shocking was that server side apps, not client, used the pattern at all. That said, getting rid of controllers altogether due to the myriad approaches and variants that exist out in the wild is a sensible idea.
Many thanks for taking the time to write this book!
- SoftwareMaven 14y agoI completely agree with the MVC thing. It always felt forced and unnatural for page-based web applications, so it was disconcerting to see controllers getting railed on as inappropriate to single-page apps because they were dragged down to the client from the server world. However, while I think the incorrect history should be ripped out of the book (if for no other reason than there are people who will write off the book because of the inaccuracy), I've always felt that the controller part of MVC wasn't defined explicitly so much as surveyed to see what was left after the model and view, so I'm ok with the book not liking it. It has surprised me for many years that we haven't found an architecture better than MVC for apps, because I've never been comfortable with any controller code in any app I've worked on.