What is the best PHP CRUD system/libary?

10 replies
I need to do a bunch of CRUD for an upcoming project. I'll probably start it myself and then outsource it, but I want to pick the software stack.

Grocery CRUD seems very nice; however, I'm really not crazy about dragging in a framework.
#crud #php #system or libary
  • Profile picture of the author David Beroff
    I've been using PDO, (if I understand your question correctly).
    Signature
    Put MY voice on YOUR video: AwesomeAmericanAudio.com
    {{ DiscussionBoard.errors[9484293].message }}
    • Profile picture of the author NobleSavage
      Originally Posted by David Beroff View Post

      I've been using PDO, (if I understand your question correctly).
      I think we are miss-communicating. PDO looks like an abstraction layer for databases. I going to stick to the same database -MySQL .

      I need user interface Create, Read, Update and Delete. For Example: Auto PHP Codeigniter CRUD | Grocery CRUD but that uses the Codeignitor framework. I'd prefer to use an independent library.
      {{ DiscussionBoard.errors[9484791].message }}
      • Profile picture of the author David Beroff
        And that's my point. You don't have to use PDO's database-independent ability; in fact, I think few people actually do. I personally only use it with MySQL.

        The biggest benefit to using PDO is that, when used correctly, you can avoid the potential for malicious SQL injection.
        Signature
        Put MY voice on YOUR video: AwesomeAmericanAudio.com
        {{ DiscussionBoard.errors[9484833].message }}
        • Profile picture of the author NobleSavage
          Originally Posted by David Beroff View Post

          And that's my point. You don't have to use PDO's database-independent ability; in fact, I think few people actually do. I personally only use it with MySQL.

          The biggest benefit to using PDO is that, when used correctly, you can avoid the potential for malicious SQL injection.
          Ok, that is a good selling point. In the past I've used ODBC and that always lead to problems -- especially with optimization. But I'm also looking for something that uses Ajax/Jason/jQuery and widgets to create an easy UI.

          Right now this looks good Build CRUD Application with jQuery EasyUI - jQuery EasyUI

          I guess I could use ODP for the php/MySQL calls.
          {{ DiscussionBoard.errors[9485118].message }}
          • Profile picture of the author David Beroff
            Originally Posted by NobleSavage View Post

            ...I'm also looking for something that uses Ajax/Jason/jQuery and widgets to create an easy UI.
            I just recently started using jQuery in places where it makes sense for this project, such as their datepicker, and I was also able to use their approach to AJAX, again, in the few places where that adds value to this particular site. Where the latter needs to access the database, I also use PDO.

            I guess I'm saying that it's not really an either/or, but rather that each tool has its respective place, and they can all co-exist. I must admit that I'm still trying to understand what the value-add of (any) framework is, as I'm doing this all with straight PHP, and I'm not seeing any downside.
            Signature
            Put MY voice on YOUR video: AwesomeAmericanAudio.com
            {{ DiscussionBoard.errors[9486150].message }}
            • Profile picture of the author jlucas
              Originally Posted by David Beroff View Post

              I must admit that I'm still trying to understand what the value-add of (any) framework is, as I'm doing this all with straight PHP, and I'm not seeing any downside.
              If you can setup a good schema and interpolate the data between PHP and jQuery and visa-versa, there isn't much of a value-add to be found IMHO

              Yii actually creates the tables for you and lets you plan everything with a nice interface. I've worked with it because I've had to, but I have the same philosophy.

              Big fan of the jQuery UI datepicker, and I use the dialog box quite often.
              {{ DiscussionBoard.errors[9486217].message }}
              • Profile picture of the author David Beroff
                Originally Posted by jlucas View Post

                If you can setup a good schema and interpolate the data between PHP and jQuery and visa-versa, there isn't much of a value-add to be found IMHO
                OK, thank you. (I'd been wondering if I simply missed the cool-kid train.)

                Yeah, I prefer to design the database schema manually, plus I make the entire document "compilable" by feeding it through PHP to combine my various numeric constants (mostly for column sizes and types) with the table definitions to "generate" the table creation SQL. Sprinkle in an entity relationship diagram via LucidChart, and I'm good to go!
                Signature
                Put MY voice on YOUR video: AwesomeAmericanAudio.com
                {{ DiscussionBoard.errors[9486736].message }}
                • Profile picture of the author NobleSavage
                  Ok, I did a little more research and EasyUI is mostly shit I'll never use.

                  David, why did you pick PDO over MySQLi? The main advantage I see is that PDO has support for 12 different databases.

                  I've never used a framework, but from my understanding the main difference is Inversion of Control InversionOfControl

                  I found a really good discussion of PDO and SQL injection at StackExchange
                  php - Are PDO prepared statements sufficient to prevent SQL injection? - Stack Overflow

                  Still researching....
                  {{ DiscussionBoard.errors[9487354].message }}
                  • Profile picture of the author David Beroff
                    Originally Posted by NobleSavage View Post

                    David, why did you pick PDO over MySQLi? The main advantage I see is that PDO has support for 12 different databases.
                    My understanding is that it's become the preferred approach due to safety concerns, which in turn improves maintainability as more people embrace that. I don't have an exact reference to cite here, but I'm sure you can find some.
                    Signature
                    Put MY voice on YOUR video: AwesomeAmericanAudio.com
                    {{ DiscussionBoard.errors[9487411].message }}
  • Profile picture of the author jlucas
    If you are dragging in a framework, I recommend Yii:
    PHP Master | Build a CRUD App with Yii in Minutes

    If you are going to use EasyUI, I wouldn't use the mysql extension like they have in their examples. It is deprecated as of PHP 5.5. The manual recommendation is to use mysqli or PDO:
    PHP: Introduction - Manual

    I've used ODBC with mssql databases, but no personal experience with mysql and ODBC so I have no opinion on that one.
    {{ DiscussionBoard.errors[9486049].message }}

Trending Topics