Jump to:

22975 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Naming Convention for Controller/Model

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 297 Views
  • tfliam
    Avatar
    Community Member
    20 Posts

    Naming Convention for Controller/Model Link to this post

    Hi, I have noticed that some people use "ClassnamePage.php" for their controller/model, yet some people use "Classname.php" only, without the Page word appearing at the end, but for these 2 naming, both their codes are similar that their Models both extend Page and Controller extends Page_Controller.

    Technically, are they any differences for having the "Page" word for the file name?

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Naming Convention for Controller/Model Link to this post

    No differences at all. More a personal preference and depends on the context. For example I use UserDefinedForm instead of UserDefinedFormPage which is a bit of a mouthful!

    297 Views
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.