5093 Posts in 1516 Topics by 1113 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 745 Views |
-
Custom pages to manage external database

13 July 2011 at 10:58pm
First off - generally very impressed with Silverstripe, one of very few "true" CMS that actually have data modelling and a clean separation from template layer, so congrats to the developers.
Basically we are considering rebuilding a site which has a huge and complex database, and I'm not convinced it's a realistic proposition to try to migrate the whole thing to Silverstripe data model. However, if I could utilise the excellent Silverstripe API to essentially create CRUD interface to an external database that would be great.
Is this a realistic idea? For example, create a page that lists thousands of records from external DB in a grid in the same format as would be displayed with ModelAdmin? And then allow editing of individual records in style of Silverstripe but with data going back and forth to external DB.
Many thanks in advance.
-
Re: Custom pages to manage external database

15 July 2011 at 6:39am
That would be possible, but migrating the database might be easier using a Custom CSV importer http://doc.silverstripe.org/sapphire/en/howto/csv-import
I've used it to create product Databases and even automatically populate the Image relations. Granted I've only done it on DBs of 1200 records. I'm even using silverstripe to create DBs for iPhone apps this way
-
Re: Custom pages to manage external database

16 July 2011 at 1:24am
Thanks for the CVS import link, might be an option even though our DB is very big and complex.
However, what I'm really interested in is the general idea of having custom CMS pages, how to have forms, list data, how to go about getting a form to post to the back-end, process, and then return some data back to the page etc.
I suppose it's as much about understanding the MVC and executionj pipeline so I can learn how to add these custom pages. We would need to add a lot of custom pages to match up to the functionality of current homebrew CMS.
Are there good tutorials that cover custom CMS pages that aren't jsut about plain model CRUD? Something to show how to create a form, post the data to a controller etc?
-
Re: Custom pages to manage external database

16 July 2011 at 2:02am
There may be some good starting points on http://ssbits.com, plus the regular tutorial section has a good simple form tutorial http://doc.silverstripe.org/sapphire/en/tutorials/3-forms
Plus the two books are helpful.
What you're looking for is actually relatively easy to implement in SS. Well compared to building a CMS from scratch
since SS has some pretty robust tools for forms. And if you can't find the code you need on SS Bits or in the modules the Forums and IRC are your best resource.
Good Luck
| 745 Views | ||
|
Page:
1
|
Go to Top |


