Development

Changeset 28324

You must first sign up to be able to contribute.

Changeset 28324

Show
Ignore:
Timestamp:
02/28/10 22:42:40 (5 years ago)
Author:
hugo.hamon
Message:

[doc] fixed chapter 11 of Jobeet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.4/jobeet/en/11.markdown

    r24847 r28324  
    22========================== 
    33 
    4 Yesterday we created our first form with symfony. People are now able to post 
    5 a new job on Jobeet but we ran out of time before we could add some tests. 
    6  
    7 That's what we will do today. Along the way, we will also learn more about the 
    8 form framework. 
     4In chapter 10, we created our first form with symfony. People are now able to post a new job on Jobeet but we ran out of time before we could add some tests. That's what we will do along this chapter. Along the way, we will also learn more about the form framework. 
    95 
    106>**SIDEBAR** 
     
    177173 
    178174The ##ORM## tester provides the `check()` method to check that one or more 
    179 objects in the database matches the criteria passed as an argument. 
     175objects in the database match the criteria passed as an argument. 
    180176 
    181177    [php] 
     
    302298    ; 
    303299 
    304 If you remember from day 10, the "Publish" link has been configured to be 
     300If you remember from chapter 10, the "Publish" link has been configured to be 
    305301called with the HTTP `~PUT|PUT (HTTP Method)~` method. As browsers don't 
    306302understand `PUT` requests, the `link_to()` helper converts the link to a form 
     
    308304to force the method to `PUT` by passing it as a third option of the `click()` 
    309305method. Moreover, the `link_to()` helper also embeds a ~CSRF token~ as we have 
    310 enabled CSRF protection during day 1; the `_with_csrf` option simulates this 
     306enabled CSRF protection during chapter 1; the `_with_csrf` option simulates this 
    311307token. 
    312308 
     
    465461    <?php if ($job->expiresSoon()): ?> 
    466462     - <?php echo link_to('Extend', 'job_extend', $job, array('method' => 'put')) ?> for another <?php echo sfConfig::get('app_active_days') ?> days 
    467     <?php endif; ?> 
     463    <?php endif ?> 
    468464 
    469465Then, create the `extend` action: 
     
    673669### ~XSS~ and ~CSRF~ Protection 
    674670 
    675 During day 1, you learned the the `generate:app` task created a secured 
    676 application by default. 
     671During chapter 1, you learned the `generate:app` task created a secured application by default. 
    677672 
    678673First, it enabled the protection against XSS. It means that all variables used 
     
    763758sensible defaults. 
    764759 
    765 Running the task is similar to running any other symfony built-in task: 
     760Running the task is similar to run any other symfony built-in task: 
    766761 
    767762    $ php symfony jobeet:cleanup --days=10 --env=dev 
     
    807802>by returning an integer explicitly at the end of the task. 
    808803 
    809 See you Tomorrow 
    810 ---------------- 
    811  
    812 Testing is at the heart of the symfony philosophy and tools. Today, we have 
    813 learned again how to leverage symfony tools to make the development process 
     804Final Thoughts 
     805-------------- 
     806 
     807Testing is at the heart of the symfony philosophy and tools. In this chapter, we have learned again how to leverage symfony tools to make the development process 
    814808easier, faster, and more important, safer. 
    815809 
     
    818812forms are secure by default. 
    819813 
    820 Our tour of great symfony features do not end today. Tomorrow, we will create 
    821 the backend application for Jobeet. Creating a backend interface is a must for 
    822 most web projects, and Jobeet is no different. But how will we be able to 
    823 develop such an interface in just one hour? Simple, we will use the symfony 
    824 admin generator framework. Until then, take care. 
     814Our tour of great symfony features do not end today. In the next chapter, we will create the backend application for Jobeet. Creating a backend interface is a must for most web projects, and Jobeet is no different. But how will we be able to develop such an interface in just one hour? Simple, we will use the symfony admin generator framework. 
    825815 
    826816__ORM__