Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
Sounds like what phpMyAdmin does :) – Lightness Races in Orbit Feb 28 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 Feb 28 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? – Lightness Races in Orbit Feb 28 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 Feb 28 at 17:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.