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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Migrating a Site to Silverstripe /

What you need to know when migrating your existing site to SilverStripe.

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

Automatic code generation from database


Go to End


2 Posts   3352 Views

Avatar
Ricardona

Community Member, 26 Posts

3 May 2009 at 9:52am

Hi all,

I refer to the automatic code generation of an entire application from nothing more than a few tables in a database.

In SilverStripe is possible generate the model, controller and views based in current database schema?

Thanks in advance

Ricardo Cardona R

Avatar
Double-A-Ron

Community Member, 607 Posts

4 May 2009 at 10:20am

No, but I've often thought that this would be handy - a-la CakePHP and Symfony.

The trouble is, the Silverstripe system follows a defined database structure based on the code that is present - not the other way round.

When you install Silverstripe, or add a new page/data type, the correctly structured database tables are created for you. I think messing with this structure and using a generator to create MVC code for you will only give you problems.

Cheers
Aaron