1

What I'm looking for is a way to auto-generate a simple web-based CMS for a simple pre-existing SQL database. To be used by 'app administrators', not the general public.

Something that:

  • allows basic create/update/delete operations on the DB tables
  • understand simple table relationships and hides db keys to the CMS user
  • can have generic or custom validation

For example, let's say I have 2 SQL tables.

product category 
-----------------
id - int (PK)
name - string 

-

product
--------
id - int (PK)
category_id - int  (Fk)
name - string
default - bool

typical instances could be

  • category row: 1,meat
  • category row: 2,fruit

.

  • product row: 1,1,bacon,true
  • product row: 2,1,chicken,true
  • product row: 3,2,banana,true
  • product row: 4,2,orange,false

the auto-generated web-based CMS would have the following pages:

  1. index page
  2. list existing category page (with add, edit, delete buttons on each row)
  3. category form page (used when inserting, editing)
  4. list existing product page (with add, edit, delete buttons on each row)
  5. product form page (used when inserting, editing)

In the product form page, there would be one form field per db field, but, and this is fundamental, the 'category' field would be a dropdown showing existing categories by name rather than by id.

Some images to explain what i'm talking about.

enter image description here enter image description here enter image description here

At the moment, we have a small custom internally-developed framework to do this kind of things but I'm sure there are better offers on the market, just can't seem to find them.

I'm open to technologies, it could be a php thing with a config file, it could be something that auto generate the CMS from some Java JPA entities with annotation like @OneToMany and the like. Anything that is setup in an instant, doesn't modify the db structure, can be extended and can be used by someone who doesn't know db foreign keys and the like.

4
  • Sounds like what phpMyAdmin does :) Commented Feb 28, 2016 at 14:24
  • :-) No. In phpmyadmin, there wouldn't be the foreign key link using a nice name instead of id (see screenshot #3). Also, the DB is not necessarily MySQL Also, the solution should allow custom validation and hide the complexity of the low level DB. To be used by someone who manage the app but is not a techie. Thanks
    – MikaelW
    Commented Feb 28, 2016 at 14:30
  • So, in other words, your app needs to do things that follow from a requirements document, and cannot simply be auto-generated from a database schema. Well then isn't that your answer? Commented Feb 28, 2016 at 15:36
  • The real app itself, for the general public, is 100% custom and is developed as such. What i'm talking about here is the cms part. A way for app managers to change the app data in a safe way. That cms is 90% generic and 10% custom hence my question to auto generate the 90%.
    – MikaelW
    Commented Feb 28, 2016 at 17:27

1 Answer 1

1

The question is already a bit aged, but maybe someone still stumbles upon it. Most of the mvc-based PHP frameworks offer a feature called scaffolding. With this feature you can easily create simple masks for CRUD operations. Instead of ids ususally a display-field is used for defining relations. I often use CakePHP to achieve what you describe, but it requires a naming-convention to work out of the box. So you'd have to rename your tables and database keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.