Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed Default to Static #4

Merged
merged 1 commit into from
Mar 24, 2015
Merged

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Mar 24, 2015

A little while ago, @weaverryan, @xabbuh and me decided Static was a much better name for this than Default.

Default doesn't really explain anything. Does it mean that every request will go to this controller by default? Nope...

Btw, this makes me wonder if we shouldn't use http://symfony.com/doc/current/cookbook/templating/render_without_controller.html instead of this controller?

@javiereguiluz
Copy link
Member

I fully agree with you: Default is not a great name ... but in my opinion, Static is much worse than Default. In the programming world, the static word implies a lot of things that have nothing to do with the purpose of this controller or the related templates. HTML pages are static, but Twig templates, PHP controllers, Symfony routing, etc. are not static.

However, I do like two things from your PR:

  • Rename indexAction() to homepageAction()
  • Render the homepage.html.twig without a controller. That would be a great example to showcase this feature.

@wouterj
Copy link
Member Author

wouterj commented Mar 24, 2015

Well, the template is a static template. That's why we called it a StaticController, it just renders static pages (it could be a simple HTML template instead of twig). I'll update it with your suggestions.

@wouterj
Copy link
Member Author

wouterj commented Mar 24, 2015

Updated to use the template controller. While I really don't like it, I've reverted the rename. 😿

@javiereguiluz
Copy link
Member

Thanks @wouterj.

@javiereguiluz javiereguiluz merged commit fb9d419 into symfony:master Mar 24, 2015
javiereguiluz added a commit that referenced this pull request Mar 24, 2015
This PR was merged into the master branch.

Discussion
----------

Renamed Default to Static

A little while ago, @weaverryan, @xabbuh and me decided Static was a much better name for this than Default.

Default doesn't really explain anything. Does it mean that every request will go to this controller *by default*? Nope...

Btw, this makes me wonder if we shouldn't use http://symfony.com/doc/current/cookbook/templating/render_without_controller.html instead of this controller?

Commits
-------

fb9d419 Use Symfony's template controller
@wouterj wouterj deleted the no_default branch March 24, 2015 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants