Java Techies- Solution for All
Symfony
1.1 Introduction
Symfony is a PHP web application. It is for MVC
applications. Symfony is free software and released
under the
MIT(Massachusetts Institute of Technology) license
. Learn More... |
1.2 Request and Responses in Symfony
Symfony provides PHP approach via two classes that allow you to
interact with the HTTP request and response in an easier way. Learn More... |
1.3 Symfony Application flow
Incoming requests are interpreted by the routing and passed to
controller functions that return Response objects. Each page of
your site is defined in a routing configuration file that maps
different URLs to different PHP functions. Learn More... |
1.4 Symfony2 Component
First, Symfony2 is a collection of over twenty independent
libraries that can be used inside any PHP project. These
libraries, called the Symfony2 Components, contain something
useful for almost any situation, regardless of how your project is
developed. Learn More... |
1.5 Symfony Vs Simple PHP
you'll build the token blog application using only flat PHP. To
begin, create a single page that displays blog entries that have
been persisted to the database. Learn More... |
1.6 Install and Configure Symfony
Symfony2 packages "distributions", which are fully-functional
applications that include the Symfony2 core libraries, a selection
of useful bundles, a sensible directory structure and some default
configuration. Learn More... |
1.7 Front Controller
With one file handling all requests, you can centralize things
such as security handling, configuration loading, and routing. Learn More... |
1.8 Creating Page
A route defines the URL (e.g. /about) to your page and specifies a
controller (which is a PHP function) that Symfony2 should execute
when the URL of an incoming request matches the route path. Learn More... |
1.9 Controller
A controller is a PHP function you create that takes information
from the HTTP request and constructs and returns an HTTP response
(as a Symfony2 Response object). Learn More... |
1.10 Request and Response Object
Besides the values of the routing placeholders, the controller also
has access to the Request object when extending the base Controller
class. Learn More... |
1.11 Routing
A route is a map from a URL path to a controller. For example,
suppose you want to match any URL like /blog/my-post or
/blog/all-about-symfony and send it to a controller that can look
up and render that blog entry. Learn More... |
1.12 Templates
A template is simply a text file that can generate any text-based
format (HTML, XML, CSV, LaTeX ...). Learn More... |
1.13 DataBase and Doctrine
Doctrine is totally decoupled from Symfony and using it is
optional. Doctrine ORM, which aims to let you map objects to a
relational database (such as MySQL, PostgreSQL or Microsoft SQL). Learn More... |