Simple CRUD Generation

2019-03-29 05:57发布

This is what I have:

  • An entity-relational schema, modelled for Doctrine 2.0 (in PHP);
  • The generated database, on a MySQL server.

This is what I want:

A very basic CRUD web-interface to the database, that allows me to (you guessed it!) create, read, update and delete records, with extra credit for implementing CRUD operations on entities and relations instead of records.

Now, I'm terrible at writing web applications myself (read: I'm lazy). Are there any options to generate a CRUD web application from a MySQL database, or from a set of Doctrine entities?


  1. I'd be willing to stop using PHP (and thus rewrite the entities for JPA, Ruby ActiveRecord, etc...) but not MySQL.
  2. I see a lot of similar questions: however, most of these questions have answers that give CRUD operations for in PHP code, or recommend using Doctrine.
  3. An answer such as "There is no such tool, stop being lazy" would also be appreciated.

7条回答
我欲成王,谁敢阻挡
2楼-- · 2019-03-29 06:28

I've been looking for a drop-in admin panel like this too, so far I've 3:

AjaxCrud - http://ajaxcrud.com/ Peek from Code Canyon - http://bit.ly/toKKrB SQLBuddy - http://www.sqlbuddy.com/

Love to hear any other suggestions!

查看更多
狗以群分
3楼-- · 2019-03-29 06:35

If your hosting setup can handle Python, the web2py framework offers instant CRUD for a database and a very user friendly (and laziness-friendly) online dev environment. I don't think it's designed to be laid overtop of an existing database, but you can import a CSV file with your database contents. http://www.web2py.com

One of the great things about web2py is that creating custom (public) CRUD pages is also dead easy. In a controller file it's as easy as

form = CRUD.create(db.myTable)
return dict(form = form)

Then in a view file you just add

{{=form}}

And that's it! All of the form creation, input validation, etc., is handled for you. I should also add that the data abstraction layer in web2py is very easy to learn and meshes with mySQL easily. One great thing about it is that web2py performs on-the-fly changes to your datastructure or even migrations from one DB back-end to another.

Not every hosting company knows how to support web2py, but it's easy to deploy on the Google App Engine or with a company like Fluxflex.com

查看更多
Evening l夕情丶
4楼-- · 2019-03-29 06:37

Ruby on Rails' "Scaffolding" should be exactly what you're looking for...

查看更多
forever°为你锁心
5楼-- · 2019-03-29 06:45

Symfony does this (at least the 1.x series I am used to). I should think version 2.0 also does, under either Doctrine or Propel (and both of those will work with MySQL).

查看更多
趁早两清
6楼-- · 2019-03-29 06:47

You should have a look at Grocery CRUD.

Really simple, easy to use /deploy and neat UI.

http://www.web-and-development.com/grocery_crud/

I did a complete web CRUD of my DB in a couple of hours (including additional PHP webservices) Amazing :-)

查看更多
Fickle 薄情
7楼-- · 2019-03-29 06:48

CakePHP (user guide) takes a database model and generates controllers that do basic CRUD operations for all of your tables. It also includes views and a basic stylesheet.

查看更多
登录 后发表回答