Category: Symfony

  • Working Example

    In this chapter, we will learn how to create a complete MVC based BookStore Application in Symfony Framework. Following are the steps. Step 1: Create a Project Let’s create a new project named “BookStore” in Symfony using the following command. Step 2: Create a Controller and Route Create a BooksController in “src/AppBundle/Controller” directory. It is defined as…

  • CMF Edition

    Content management system is one of the largest market in the web application scenario. There are a lot of frameworks available for content management system, in virtually all languages under the sun. Most of the frameworks are easy to work as an end customer but very hard to work with as a developer and vice-versa.…

  • REST Edition

    In any modern application, REST service is one of the core fundamental building blocks. Be it a web-based application or a slick mobile application, the front-end is usually a well designed interface for the back-end REST services. Symfony REST edition provides a readymade template to kick-start our REST based web application. Let us learn how…

  • Advanced Concepts

    In this chapter, we will learn about some advanced concepts in Symfony framework. HTTP Cache Caching in a web application improves performance. For example, hot products in a shopping cart web application can be cached for a limited time, so that it can be presented to the customer in a speedy manner without hitting the…

  • Unit Testing

    Unit test is essential for ongoing development in large projects. Unit tests will automatically test your application’s components and alert you when something is not working. Unit testing can be done manually but is often automated. PHPUnit Symfony framework integrates with the PHPUnit unit testing framework. To write a unit test for the Symfony framework,…

  • Email Management

    Email functionality is the most requested feature in a web framework. Even a simple application will have a contact form and the details will be sent to the system administration through email. Symfony integrates SwiftMailer, the best PHP email module available in the market. SwiftMailer is an excellent email library providing an option to send email…

  • Logging

    Logging is very important for a web application. Web applications are used by hundreds to thousands of users at a time. To get sneak preview of happenings around a web application, Logging should be enabled. Without logging, the developer will not be able to find the status of the application. Let us consider that an…

  • Internationalization

    Internationalization (i18n) and Localization (l10n) help to increase the customer coverage of a web application. Symfony provides an excellent Translation component for this purpose. Let us learn how to use the Translation component in this chapter. Enable Translation By default, Symfony web framework disables Translation component. To enable it, add the translator section in the configuration file, app/config/config.yml.…

  • Cookies and Session Management

    Symfony HttpFoundation component provides cookie and session management in an object-oriented manner. Cookie provides client-side data storage and it only supports a small amount of data. Usually, it is 2KB per domain and it depends on the browser. Session provides server-side data storage and it supports a large amount of data. Let us see how to create a cookie…

  • Ajax Control

    AJAX is a modern technology in web programming. It provides options to send and receive data in a webpage asynchronously, without refreshing the page. Let us learn Symfony AJAX programming in this chapter. Symfony framework provides options to identity whether the request type is AJAX or not. Request class of Symfony HttpFoundation component has a…