Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Silverstripe for UI, but external database

Go to End

2 Posts   1568 Views


Community Member, 2 Posts

17 April 2008 at 9:25am


We are implementing a multi-functional data-driven website, and we are planning to use Silverstripe/Sapphire as the CMS/Framework. The issue that we have been struggling with is this:

We already have a fully-fleshed out database schema, and we are planning on implementing a db api that will utilize a mix of stored procedures and php coded business logic to interact with the data. We are doing this so that other applications can interface with the same db, and if we ever change our business rules, we only have to change it in one place. So ideally we want to create our api first, and have our framework interact with this api, or perhaps write SS classes to interact directly with those db tables.

So is Silverstripe the right solution for this situation? As I understand it, the SS db is built using the DataObject classes as definitions, but we want a situation where the framework model interacts with pre-exiting tables. Is this possible in SS?

Also, if SS would be good for this situation, would it be beneficial or necessary to have our api classes implement DataObjectInterface so that Silverstripe can recognize and interact with our objects? Are there any good examples out there showing how to properly implement DataObjectInterface?

Any advice you SS gurus can give me would be greatly appreciated.

Thank you in advance,


Forum Moderator, 801 Posts

17 April 2008 at 9:22pm

you'll run into problems when trying to use the sapphire object relational model without the database tables it expects. i think you're on the right track with building the external api first (controller layer), but that's not necessarily connected to building the datalayer without silverstripe. its pretty easy to build a silverstripe datamodel without any views to it :)