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.

General Questions /

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

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

Naming Convention for Controller/Model


Go to End


2 Posts   636 Views

Avatar
tfliam

Community Member, 20 Posts

16 November 2011 at 10:05am

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?

Avatar
Willr

Forum Moderator, 5523 Posts

22 November 2011 at 11:00pm

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!