xitrum-framework / xitrum-new

Empty Xitrum project skeleton, like the one created by "rails new"
http://xitrum-framework.github.io/
21 stars 5 forks source link

Use "Layout" traits instead of "AppController" #1

Closed rtreffer closed 12 years ago

rtreffer commented 12 years ago

This patch renames and moves the AppController. This should encourage a different hierarchy for Layout logic and generalized application logic.

This should encourage:

What do you think about it?

ngocdaothanh commented 12 years ago

The "AppController" idea is from Rails. Your idea is also reasonable.

How about keeping the current AppController (for before filters etc.) and adding Layout?

rtreffer commented 12 years ago

Sure, although I'd prefer names that tell you s.th. about the content, e.g. AuthenticatedUserOnly or "with Users" or "with Users[Admin]" :-)

I'm not a huge fan of generic name that catches all those methods that should go "somewhere".

You are thinking about the impact for xitrum-demo (and docs), right? I could try to do this against the demo repository.

ngocdaothanh commented 12 years ago

It's good practice. How about changing "Layout" to AppLayout, DefaultLayout, or s.th. like that?

It's nice if you update xitrum-demos and xitrum-doc later.