• Mention two useful shorcut functions available globally in cake php

      0 comments

    Following are 2 main shortcut functions available in cakephp

    // similar to print_r(), but dumps to the view and
    // is disabled if debug isn't > 0 in config.php
    pr($anything); 
    
    // returns the correctly internationalized plural or
    // singular depending on locale.
    __n($singular, $plural, $count, $return);
    

    If you are working with CakePHP and haven’t figure it out yet, it’s worth looking through basics.php in the API docs.

  • why cakephp? interview question

      0 comments

    In an interview the interviewer asked,

    Why we use cakephp? We can just have our own structure and keep developing projects without making things more complicated. Why cake?

    The best answer for this question from the cakephp Cookbook is,

    We don’t have to re-invent the wheel. Every time we sit for a new project, we have a more structural way of developing the project with an already installed development environment and we just have to start our rapid application straight a way with the business logic.

    Some of the key features the framework provides are,
    - MVC structure
    - Code generation
    - CRUD for database interaction
    - Application scaffolding
    - Code generation
    - Built-in validation
    - Data sanitation
    - Flexible casching
    - Localization

    and lot more………

    Our primary goal is to enable you to work in a structured and rapid manner–without loss of flexibility – by cakephp org.