Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » General design questions

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

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

Page: 1
Go to End
Author Topic: 851 Views
  • erik
    Community Member
    1 Post

    General design questions Link to this post

    Hi all,

    I have just started working with SS a bit and would like very much to use it for our website, but I will have to do quite a bit of customization to make things work - I have a few questions about the framework that may help me (and others) use it well.

    First: There is a lot of reference to MVC - great! But I would like a better understanding of which classes fall into which part of this. For example, the current eccommerce has a product as a subclass of Page and thus SiteTree, etc .. my first impulse says: "wait a sec .. a page is a view! .. I want a class of type Model for my product object." We do alot of other processing that is related to the product that has nothing to do with anybody looking at it in a webpage. This is how I arrive at the first point of clarification - what class or classes are appropriate for a product in this sense. That will tell me something about what the model is comprised of independant of the SiteTree.

    Second: I go on to think - ok, if I can get the Product encapsulated, then what class or classes do I use to manipulate the data? I don't always want a Page_Controller (for the same reasons as above) so what can I use as the base controller?

    Third (you might have guessed ;)): _Then_ I get to my ProductPage class .. and, although there is a bit of an example for this it the fifth tutorial, I thought it good to bring it up again in this context - how do I then relate the former two parts to the page view itself (elegantly).
    Of course, there will also be ProductCategories (aka. ProductPageHolders) - this part seems pretty straightforward once one can tie the rest of it.

    These are general questions, with the most obvious example I could think of and I am simply hoping to elicit some perspectives that will help to point out the useful classes for each part of the design pattern and some ways to think about making the associations.

    Thanks very much - and to the SS developers: my hat's off to you - beautiful work!

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.