You are here

A Year With Symfony Writing healthy, reusable Symfony2 by Matthias Noback

By Matthias Noback

You recognize now tips on how to create a Symfony2 software, with routing, controllers, entities or records, Twig templates and perhaps a few unit checks. yet after those easy steps, a few matters will elevate about...
The reusability of your code - How if you happen to constitution your code to make it reusable in a destiny venture? or perhaps within the related venture, yet with a distinct view or in a console command?
The quality of the interior API you might have knowingly or unknowingly created - What are you able to do to make sure that your workforce participants will comprehend your code, and should use it within the approach it used to be intended for use? how are you going to make your code versatile sufficient for use in events such as the only you wrote it for?
The point of security of your software - Symfony2 and Doctrine appear to instantly make you invulnerable for famous assaults in your net software, like XSS, CSRF and SQL injection assaults. yet are you able to thoroughly depend on the framework? And what steps if you happen to take to mend many of the closing concerns?

Show description

Read or Download A Year With Symfony Writing healthy, reusable Symfony2 PDF

Similar web programming books

Why's (poignant) Guide to Ruby

This can be only a small Ruby ebook. It will not weigh down you. it is gentle as a feather (because i have never entire it yet—hehe). and there is a cause this publication will remain gentle: simply because Ruby is easy to profit.

Learn How to Program: Using Any Web Browser

How you can application utilizing Any net Browser is a booklet approximately basic ideas of fine programming perform for whole rookies. no matter if you are simply commencing to get eager about what makes a working laptop or computer paintings, or an place of work employee who has been utilizing computing device functions for years and wish to spend a while delving deeper into what makes them tick, this publication is for you.

Exam Ref 70-486 Developing ASP.NET MVC 4 Web Applications

Arrange for Microsoft examination 70-486 — and aid reveal your real-world mastery of constructing ASP. web MVC-based ideas. Designed for knowledgeable builders able to improve their prestige, examination Ref specializes in the critical-thinking and decision-making acumen wanted for fulfillment on the Microsoft expert point.

The dRuby Book: Distributed and Parallel Computing with Ruby

DRuby has been a part of the Ruby general library for greater than a decade, but few comprehend the real energy of the gem. thoroughly written in Ruby, dRuby allows you to converse among dispensed Ruby approaches as though there have been no obstacles among procedures. this can be one of many few books that covers disbursed and parallel programming for Ruby builders.

Additional resources for A Year With Symfony Writing healthy, reusable Symfony2

Sample text

If it doesn’t, some other part of the application should be able to convert the return value to a Response object in some way or another. 6 Enter the view layer When you choose to return a Response object directly from your controller, you can thereby effectively by-pass the templating engine: class SomeController { public function simpleAction() { return new Response( '

Pure old-fashioned HTML

' ); } } However, when you return anything else (though usually an array of template variables), this return value needs to be converted to a Response object before it can be used as a decent response to be sent back to the client.

Exception listeners The ExceptionListener from the HttpKernel Component itself tries to handle an exception by logging it (when a logger is available) and by executing a controller which may render a page with some information about the error. exception:showAction Another important listener is the ExceptionListener from the Security Component. This listener checks if the original exception that was thrown is an instance of AuthenticationException or AccessDeniedException. In the first case, it starts the authentication process if this is possible.

II Patterns of dependency injection 5 What is a bundle? As we saw in the previous chapter: running a Symfony application means booting the kernel and handling a request or executing a command, where booting the kernel means: loading all bundles and registering their service container extensions (which can be found in the DependencyInjection folder of a bundle). xml file (but this can be anything) and the bundle’s configuration, defined in a separate class, usually in the same namespace, called Configuration.

Download PDF sample

Rated 4.17 of 5 – based on 28 votes