Symfony2 Jobeet Day 10: The Forms

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. Any website has forms, from the simple contact form to the complex ones with lots of fields. Writing forms is also one of the most complex and tedious task for a web developer: you need to write the HTML form, implement validation rules for each field, process the values to store them in a…


Symfony2 Jobeet Day 9: The functional Tests

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. Functional tests are a great tool to test your application from end to end: from the request made by a browser to the response sent by the server. They test all the layers of an application: the routing, the model, the actions and the templates. They are very similar to what you probably already…


Symfony2 Jobeet Day 8: The Unit Tests

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. Tests in Symfony There are two different kinds of automated tests in Symfony: unit tests and functional tests. Unit tests verify that each method and function is working properly. Each test must be as independent as possible from the others. On the other hand, functional tests verify that the…


Symfony2 Jobeet Day 7: Playing with the Category page

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. Today we will make the Category page like it is described in the second day’s requirements: “The user sees a list of all the jobs from the category sorted by date and paginated with 20 jobs per page“ The Category Route First, we need to add a route to define a pretty URL for the category page.…


Symfony2 Jobeet Day 6: More with the Model

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. The Doctrine Query Object From the second day’s requirements: “On the homepage, the user sees the latest active jobs”. But as of now, all jobs are displayed, whether they are active or not: [crayon-5f2a120d4991d081288462/] An active job is one that was posted less than 30 days ago. The $entities…


Symfony2 Jobeet Day 5: The Routing

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. URLs If you click on a job on the Jobeet homepage, the URL looks like this: /job/1/show. If you have already developed PHP websites, you are probably more accustomed to URLs like /job.php?id=1. How does Symfony make it work? How does Symfony determine the action to call based on this URL? Why is…


Symfony2 Jobeet Day 4: The Controller and the View

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. Today, we are going to customize the basic job controller we created yesterday. It already has most of the code we need for Jobeet: A page to list all jobs A page to create a new job A page to update an existing job A page to delete a job Although the code is ready to be used as is, we will…


Symfony2 Jobeet Day 3: The Data Model

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. If you’re itching to open your text editor and lay down some PHP, you will be happy to know that today will get us into some development. We will define the Jobeet data model, use an ORM to interact with the database and build the first module of the application. But as Symfony does a lot of work…


Symfony2 Jobeet Day 2: The Project

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. We have not written a single line of code yet, but, in Day 1, we setup the environment and created an empty Symfony project. This day is about the project specifications. Before diving into the code head-first, let’s describe the project a bit more. The following sections describe the features we…


Symfony2 Jobeet Day 1: Starting up the Project

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. What is Jobeet? Jobeet is an Open-Source job board software which provides you day-by-day tutorials, that will help you learn the latest Web Technolgy, Symfony 2.3.2 (for those who don’t know yet, Symfony is a framework for PHP). Each chapter/day is meant to last about one hour, and will be the…