• <small id='Nwrlr'></small><noframes id='Nwrlr'>

      <i id='Nwrlr'><tr id='Nwrlr'><dt id='Nwrlr'><q id='Nwrlr'><span id='Nwrlr'><b id='Nwrlr'><form id='Nwrlr'><ins id='Nwrlr'></ins><ul id='Nwrlr'></ul><sub id='Nwrlr'></sub></form><legend id='Nwrlr'></legend><bdo id='Nwrlr'><pre id='Nwrlr'><center id='Nwrlr'></center></pre></bdo></b><th id='Nwrlr'></th></span></q></dt></tr></i><div id='Nwrlr'><tfoot id='Nwrlr'></tfoot><dl id='Nwrlr'><fieldset id='Nwrlr'></fieldset></dl></div>
      <legend id='Nwrlr'><style id='Nwrlr'><dir id='Nwrlr'><q id='Nwrlr'></q></dir></style></legend>

    1. <tfoot id='Nwrlr'></tfoot>
        <bdo id='Nwrlr'></bdo><ul id='Nwrlr'></ul>

        一个 RESTful 持久性解决方案,可用于 Backbone.js.

        时间:2023-10-02

            <i id='Ancsf'><tr id='Ancsf'><dt id='Ancsf'><q id='Ancsf'><span id='Ancsf'><b id='Ancsf'><form id='Ancsf'><ins id='Ancsf'></ins><ul id='Ancsf'></ul><sub id='Ancsf'></sub></form><legend id='Ancsf'></legend><bdo id='Ancsf'><pre id='Ancsf'><center id='Ancsf'></center></pre></bdo></b><th id='Ancsf'></th></span></q></dt></tr></i><div id='Ancsf'><tfoot id='Ancsf'></tfoot><dl id='Ancsf'><fieldset id='Ancsf'></fieldset></dl></div>
              <bdo id='Ancsf'></bdo><ul id='Ancsf'></ul>
                <tbody id='Ancsf'></tbody>

                  <tfoot id='Ancsf'></tfoot>
                  <legend id='Ancsf'><style id='Ancsf'><dir id='Ancsf'><q id='Ancsf'></q></dir></style></legend>

                  <small id='Ancsf'></small><noframes id='Ancsf'>

                  本文介绍了一个 RESTful 持久性解决方案,可用于 Backbone.js... 在 PHP 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我先说我是一个蹩脚的程序员,我确信我想做的事情可以在 10 行 node 或 Rails 或其他东西中完成,但 PHP 是我可用的.

                  I'll preface this with saying that I'm a crappy programmer, I'm sure that what I want to do could be done in 10 lines of node or Rails or something else, but PHP is what I have available.

                  所以,我希望找到一个简单的 PHP 库,它将数据库调用封装在一个类似于 RESTful 模型的 API 中.

                  So, I'm hoping to find a simple PHP library which wraps the database calls in an API that looks similar to the RESTful model.

                  我在尝试找到这样的东西时收效甚微——搜索 PHP CRUDPHP REST 会出现无数个页面,我不知道如何过滤它们.

                  I've had little success trying to find such a thing -- searching for PHP CRUD or PHP REST turns up several zillion pages, and I've no idea how to filter through them.

                  我真的想在这里保持简单,我不想要像 Zend 之类的大框架.我在 Backbone 中处理的模型非常简单.我只想将 GETs 发送到 /notes/3POSTs 到 /notes,等等,并让 PHP 对数据库做正确的事情.

                  I'm really trying to keep things simple here, I don't want a big framework like Zend or something. The models I'm dealing with in Backbone are really simple. I just want to send GETs to, say, /notes/3 or POSTs to /notes, etc, and have PHP do the right thing to a database.

                  也许我的要求太多了,但在我看来,这正是 Rails 等其他框架所提供的.有什么建议?TIA...

                  Perhaps I'm asking too much, but it seems to me that this is what other frameworks like Rails provide. Any suggestions? TIA...

                  推荐答案

                  EDIT Nov 2018: 虽然我不会敲 CodeIgniter,但现在 Laravel(目前是5.5)是我使用的框架.

                  EDIT Nov 2018: Although I wouldn't knock CodeIgniter, nowadays Laravel (currently 5.5) is the framework I use.

                  这是一篇好文章总结总结我使用 Laravel 的原因.

                  Here is a good article that sums up the reasons I use Laravel.

                  要快速入门,我建议使用 Laracasts.这是一个订阅视频教程服务,深入介绍如何使用 Laravel(以及其他与 Web 开发相关的内容).

                  To get jump started, I recommend Laracasts. It's a subscription video tutorial service that goes in depth on how to use Laravel (and other web dev related things).

                  原始答案:

                  Codeigniter 对我来说,是最简单的类 Rails 框架.它很简单,您可以轻松地从头开始构建 CRUD 应用.

                  Codeigniter, to me, is the easiest of the Rails-like frameworks. It's bare bones, and you can build a CRUD app from scratch easily.

                  推出自己的应用的最大问题是安全性.Codeigniter 可以通过保护您免受许多常见的安全风险(例如直接使用 $_POST 数组,而不是正确过滤您的数据)来帮助您构建一个不易被黑客入侵的站点.更不用说它提供的许多帮助类,例如表单验证.

                  The biggest issue with rolling your own app is security. Codeigniter can help you build a less hackable site by shielding you from many of the common security risks, such as using $_POST arrays directly, and not properly filtering your data. Not to mention the many helper classes it offers such as form validation.

                  您可以在他们的网站上查看文档.只要您记住导航隐藏在每个页面的顶部,它就非常易于使用.:D

                  You can view the documentation on their website. It's very easy to use as long as you remember the navigation is hidden at the top of each page. :D

                  这篇关于一个 RESTful 持久性解决方案,可用于 Backbone.js... 在 PHP 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将变量从控制器传递到视图 - Laravel 下一篇:将 Backbone.js 模型插入 MySQL 数据库

                  相关文章

                  最新文章

                    • <bdo id='B137b'></bdo><ul id='B137b'></ul>

                    <small id='B137b'></small><noframes id='B137b'>

                    <i id='B137b'><tr id='B137b'><dt id='B137b'><q id='B137b'><span id='B137b'><b id='B137b'><form id='B137b'><ins id='B137b'></ins><ul id='B137b'></ul><sub id='B137b'></sub></form><legend id='B137b'></legend><bdo id='B137b'><pre id='B137b'><center id='B137b'></center></pre></bdo></b><th id='B137b'></th></span></q></dt></tr></i><div id='B137b'><tfoot id='B137b'></tfoot><dl id='B137b'><fieldset id='B137b'></fieldset></dl></div>
                  1. <tfoot id='B137b'></tfoot>

                      <legend id='B137b'><style id='B137b'><dir id='B137b'><q id='B137b'></q></dir></style></legend>