Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7193617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:12:24+00:00 2026-05-28T20:12:24+00:00

I am new to symfony2. I started it with some tutorials and then started

  • 0

I am new to symfony2. I started it with some tutorials and then started building SYMBLOG. I have understood it and i am able to add or change the functionality. I have a bit confusion in the workflow, I mean How the files work together to render a page or to produce an output. Can anyone explain me in detail from the beginning how this flow goes on in symfony2. starting from the user request say user enters a url till the symfony2 displays results. please include the routing.yml in the flow. ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:12:24+00:00Added an answer on May 28, 2026 at 8:12 pm

    You should check out this link. Symfony – the big picture

    It explains in detail all the steps involved from the time you enter the URL in the browser to the page getting rendered.

    Basically all requests go to a Front Controller. Its job is to route the requests to the appropriate controller code. It does this with the help of the routes defined in the app/config/routing.yml file. The controllers which are defined in src/<BundleName>/Controller/<name> perform some business logic, like getting data from the Model (Repository) and send that information to the View (Templates). The views are simply HTML code. Symfony uses a templating engine called Twig. Instead of including <?php ... ?> blocks in the HTML code, Symfony passes the data from the controller and it can be easily used inside the view within Twig {% %} or {{ }} blocks.

    Simply put, here is the workflow:

    1. Browser sends Request
    2. Request received in front controller web/app_dev.php or web/app.php
    3. Front controller checks the routes defined in app/config/routing.yml and sends the request to the appropriate
      controller defined in src/<BundleName>/Controller/<controller_name>
    4. Controller prepares the content that is needed in the HTML (Example – query the database from src/<BundleName>/Repository) and sends the information to the View – src/Resources/views/<twig file name>
    5. The view creates the HTML and sends it back to the controller
    6. The controller creates an HTTP response and sends it back to the browser

    There are things like the app/AppKernel that come in between but I have skipped it.

    Here are the useful excerpts from the link provided above:

    URL:

    http://localhost/Symfony/web/app_dev.php/demo/hello/Fabien
    

    What’s going on here? Let’s dissect the URL:
    app_dev.php: This is a front controller. It is the unique entry point of the application and it responds to all user requests;
    /demo/hello/Fabien: This is the virtual path to the resource the user wants to access.
    Your responsibility as a developer is to write the code that maps the user’s request (/demo/hello/Fabien) to the resource associated with it (the Hello Fabien! HTML page).

    Routing:

    Symfony2 routes the request to the code that handles it by trying to match the requested URL against some configured patterns. By default, these patterns (called routes) are defined in the app/config/routing.yml configuration file. When you’re in the dev environment – indicated by the app_dev.php front controller – the app/config/routing_dev.yml configuration file is also loaded. In the Standard Edition, the routes to these “demo” pages are placed in that file:

    _welcome:
    pattern:  /
    defaults: { _controller: AcmeDemoBundle:Welcome:index }
    

    Controller:

    Symfony2 chooses the controller based on the _controller value from the routing configuration: AcmeDemoBundle:Welcome:index. This string is the controller logical name, and it references the indexAction method from the Acme\DemoBundle\Controller\WelcomeController class:

    class WelcomeController extends Controller
    {
        public function indexAction()
        {
            return $this->render('AcmeDemoBundle:Welcome:index.html.twig');
        }
    }
    

    View:

    The controller renders the src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig template

    {% extends "AcmeDemoBundle::layout.html.twig" %}
    
    {% block title "Hello " ~ name %}
    
    {% block content %}
        <h1>Hello {{ name }}!</h1>
    {% endblock %}
    

    You may also want to check out the Symfony2 architecture

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to symfony2 and and now i have installed Sonata Admin bundle.
I am new to Symfony2 and stuck at the following problem. I have an
I am building a Symfony project, and have created a new plug-in named sfUtilsPlugin
We are building a new site using Symfony2, and Assetic looks very promising for
I'm new to Symfony2 and I must admit I'm enjoying it. I started playing
I have tested symfony and started with 2.0 now the new 2.0.1 version it
I'm new to Symfony2 and I have maybe a simple question about encoding my
I'm new in symfony2, I have an instance when I'm trying to installing vendors
I have implemented remember me functionality in Symfony2. When I log in with remember
I'm new to Symfony2 (with knowledge in 1.2-1.4) and having little trouble trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.