Skip to content

The New Quick Tour #8892

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

Merged
merged 4 commits into from
Dec 19, 2017
Merged

The New Quick Tour #8892

merged 4 commits into from
Dec 19, 2017

Conversation

weaverryan
Copy link
Member

Fixes #8884

Hi guys!

The quick tour will now be 3 parts (instead of 4), and I've finished the first 2 parts. I'm purposely using the first person point of view and more conversational language.

Cheers!

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really nice. Chapters are short, engaging and they build hype gradually. Fantastic work so far. I can't wait to read the rest of chapters. Thanks!


If you've used a web framework before, you should feel right at home with
Symfony. If not, welcome to a whole new way of developing web applications.
Symfony. If not, welcome to a whole new way of developing web applications. Symfony
*embraces* best practices, keeps backwards compatbility (Yes! Upgrading is always
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: compatbility

user's requests and that code is defined via the **routing** configuration.
And the contents displayed in the browser are usually rendered using
**templates**.
This creates a new ``quick_tour/`` directory with, at first, just *one* file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this explanation about having just 1 file called composer.json confusing. Users won't ever see this single file but the entire project files, so I'd recommend to remove this.


Actions and Controllers
~~~~~~~~~~~~~~~~~~~~~~~
Where did these files come from? They came from recipes installed by Symfony Flex.
Copy link
Member

@javiereguiluz javiereguiluz Dec 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's too early to mention concepts like Flex and recipes. They run a "create-project" command and they got a project created. That's intuitive. If we add this mention to Flex/recipes, things complicate without a clear benefit.

Can we already load the project in a browser? Of course! You can setup
:doc:`Nginx or Apache <setup/web_server_configuration>` and configure their document
root to be the ``public/`` directory. But, for development, Symfony has its own server.
Install it with:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install it and run it with: ?

After reading the first part of this tutorial, you have decided that Symfony was
worth another 10 minutes. Great choice! In this second part, you'll learn about
Symfony Flex: the amazing tool that makes adding new features as simple as running
one command. It's also the reason why Symfony is perfect for a small micro-service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just asking: can this sound arrogant? --> "[...] Symfony is perfect for [...]" Could we reword it?

files. Thanks to recipes, adding features is seamless and automated: install a package
and you're done!

You an find a full list of recipes and aliases by going to `https://symfony.sh`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: an find -> can find


You an find a full list of recipes and aliases by going to `https://symfony.sh`_.

What did this recipe do? In addition to automatically enabling the bundle in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"enabling the bundle" <-- will people understand that? It's the first time that "bundle" is mentioned in the Quick Tour. Maybe: "enabling the feature" is better?

A configuration file that sets up Twig with sensible defaults.

``config/routes/dev/twig.yaml``
A route that helps you debug your error pages: it's added only in the ``dev``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the first time that "environment" is mentioned. Maybe we can remove this entirely -> "it's added only in the dev environment."

$ composer require profiler

Yes! This is another alias! And Flex *also* installs another recipe, which automates
the configuration of Symfony's WebProfilerBundle. What's the result? Refresh!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to never mention bundles in the Quick tour. What if we replace Symfony's WebProfilerBundle by Symfony's Profiler ?

Flex will *uninstall* the recipes: removing files and un-doing changes to put your
app back in its original state. Experiment without worry.

More Feature, Architecture and Speed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo? More Feature, ... -> More Features, ...

@weaverryan weaverryan changed the title [WIP] The New Quick Tour The New Quick Tour Dec 17, 2017
@weaverryan
Copy link
Member Author

Thanks for the fast review Javier! And now it's fully finished and the last chapter is ready for review :)

// ...
}

That's it! The new log message be written to ``var/log/dev.log``. Of course, this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

message be written -> message will be written ?


Every bit of work that's done in a Symfony app is done by an *object*: the Logger
object logs things and the Twig object renders templates. These objects are called
*services* and they are the *tools* that make you dangerous.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this "dangerous" word is going to be understood well by people with basic English level, which are most of our readers. Why if we say something easier to understand, like: "...the tools that give you super powers!"

}
}

Yes! This works too: no configuration, no time wasted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no configuration -> no service configuration needed or something like that?

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to see this finished!

(and, again, lines deleted are twice the lines added)

@weaverryan
Copy link
Member Author

Changes made!

@weaverryan weaverryan merged commit e2a9b82 into symfony:4.0 Dec 19, 2017
weaverryan added a commit that referenced this pull request Dec 19, 2017
This PR was squashed before being merged into the 4.0 branch (closes #8892).

Discussion
----------

The New Quick Tour

Fixes #8884

Hi guys!

The quick tour will now be 3 parts (instead of 4), and I've finished the first 2 parts. I'm purposely using the first person point of view and more conversational language.

Cheers!

Commits
-------

e2a9b82 tweaks thanks to Javier
3beccde Comments thanks to Javier and fixing build issues
a1b02e9 adding progress
b0d46e5 WIP - 2/3 parts of the quick tour finished
@weaverryan weaverryan deleted the quick_tour branch December 19, 2017 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants