Using drupal as backend to a legacy system - advice appreciated

Events happening in the community are now at Drupal community events on www.drupal.org.
chu's picture

I'm looking at a slightly different use of drupal to the typical and interested in getting some feedback from experienced developers.

I have a number of sites whose content is generated purely by in-house staff which is edited using a bespoke php cms. Unlike the drupal style of all-in-one cms, we use a completely separate front-end to display sites while the cms is solely concerned with management of our in-house users and forms which poke various types of content into the db. I won't be changing the front end but I'm looking at the viability of swapping out the back-end cms for drupal.

As I am dealing with data in pre-existing schemas (which won't be changed now), it seems I'd need to make custom modules to handle reading/storing my content types. These would use the usual drupal forms api and act as an interface between the form data and my own models which would take care of the CRUD operations on the legacy data structures.

For example:

author logs into drupal
chooses custom content type 'mytype' and gets drupal-generated form with following fields:

[title]
[text]
[url1]
[youtubeId]
[createdDate]
[expiryDate]

The custom module then does something like:

$mytype = new MyType(); // crud class I have written
$mytype->title = $drupalform->title;
$mytype->text = $drupalform->text;
$mytype->youtubeId = $drupalform->youtubeId;
$mytype->createdDate = $drupalform->createdDate;
$mytype->expiryDate = $drupalform->expiryDate;
$mytype->create();

Any thoughts on this approach?