【问题标题】:Why should I use url-routing ? What are the benefits ? Is it a must for all SPAs?为什么要使用 url-routing ?有什么好处?是所有 SPA 都必须的吗?
【发布时间】:2016-10-15 13:40:59
【问题描述】:

为什么要使用 url-routing(例如 react-routerui-router)?

有什么好处?

所有 SPA 都必须这样做吗?

以后可以添加路由吗?

我是网络开发的新手,有人可以解释一下路由有什么大不了的吗?

如果桌面应用程序可以没有路由,那么为什么对 web 应用程序如此重要?

【问题讨论】:

    标签: url-routing


    【解决方案1】:

    服务器会将客户端请求传递给应用程序。该应用程序获得了请求的 URL,但它应该如何处理呢?这就是路由器的目的,将请求路由到应用程序内此类请求的适当处理程序。

    【讨论】:

      【解决方案2】:

      为什么要使用路由?

      • 返回按钮
      • 分享链接
      • 使用书签

      来自 IRC 的回答(感谢 fkm !):

      <joco42> but in theory, i could do an SPA without any routing right ?
      no change in the url at all, ever
      would that be possible?
      <fkm> joco42: In theory. But the users wouldn't be able to use the back-button or share/bookmarks links.
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-01-21
        • 2011-04-24
        • 2015-01-04
        • 2010-09-09
        • 2022-06-11
        • 2014-10-26
        • 1970-01-01
        相关资源
        最近更新 更多