<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 應用結構 我們之前已經講過,SF是一個非常嚴格的MVC框架。所以,我們的應用也嚴格遵循MVC分離的原則。 但是,由于本應用已經開發到了6.0版本,筆者對應用結構也有了全新的布局,所以在該版本的應用中,M模塊其實已經不再存在,而改用RESTful API調用的方式。因此本應用的結構也相對比較扁平。 簡單來說,我們創建了一系列的`Controller`,其中的`action`與`routing`關聯,負責接收來自主入口文件(`app.php`)的調派。 在某個具體的`action`中,一般的流程是: * 獲取傳入的參數; * 構建要調用的API URI; * 獲得返回數據并解析[1](https://taylorr.gitbooks.io/building-a-web-site-with-symfony/content/05.03%20structure.html#fn_1); * 將構造好的數據傳遞給一個模板并顯示; 根據應用要提供的功能,我們可以創建相應的`controller`。我們會在稍后的章節中說明各個`controller`的創建。 這個應用有前臺,也有后臺。 前臺是各個公共頁面,如首頁、書籍列表、書籍詳情、書評列表、其它頁面等。下圖是首頁的效果[2](https://taylorr.gitbooks.io/building-a-web-site-with-symfony/content/05.03%20structure.html#fn_2)。 ![](https://box.kancloud.cn/370e7cd5c5b7b2451b6282d82a32c429_1003x2044.png) 后臺需要登陸,顯示相關的統計數據,如下圖所示。 ![](https://box.kancloud.cn/f87338d58d4f479a7844a0aa208bf6ce_1003x1781.png) > 1. RESTful API接口返回的都是JSON格式的數據,所以必須將其轉換到一個對象或者數組以便PHP進一步使用。[??](https://taylorr.gitbooks.io/building-a-web-site-with-symfony/content/05.03%20structure.html#reffn_1 "Jump back to footnote [1] in the text.") > 2. 這是我運行中的站點的首頁,比本教程要創建的首頁更復雜。[??](https://taylorr.gitbooks.io/building-a-web-site-with-symfony/content/05.03%20structure.html#reffn_2 "Jump back to footnote [2] in the text.")
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看