Before we code

Before we code, we take paper, pencil and sketch a user experience. It is the core. The kernel. Without this even perfectly-written, well-tested, highly-optimized application will not pay off as intended.

We do the interface as simple as possible. User logs in, what does he/she do next? There usually should be only one desired way: it should be very clear indicated and easy to get.

How do we code?

We primarily PHP-MySQL coders. We have as scalable team of 2-10 people. All PHP apps are stuffed with HTML5, CSS3 and JavaScript/jQuery frontend, — so these languages are not a problem and supplied on a good level.

We love Yii and Codeigniter frameworks. Some of you can say that they don’t want their project to be based on an open-source framework. We can argue on this: «The project which is large enough definitely needs a framework. If not using any existent one, we should build (or buy) a new one for you. This is not efficient, as open-source development frameworks we use are delivered in a very high and well-tested quality».

Optimized software

Even on a small-scale projects every millisecond of processor time matters. We benchmark. We try to find new ways of speeding-up the code we build. As less database queries as possible. As less database inserts as possible. Caching? Before writing a caching routine for each particular module, we estimate how it’s gonna affect hard-drive… will it give speed benefit or slow down a file system? It really matters, when your project lifts off.

Well-tested

Testing is a main part of the development process. The majority of this work is done during a development process: developer tests single methods and processes, which are followed by the whole module testing.

After the separate bits of code are ready, we test the whole application.

Why 3 weeks cycles?

Today, due to constantly changing circumstances, it is usually difficult to plan long-time. In some cases, planning is more expensive than testing; in some cases planning is impossible (it is usually impossible to plan something that didn’t exist before). Furthermore, one common source of expensive defects is requirement gaps, e.g., unrecognized requirements. It is impossible to list all requirements that should be met even in most comprehensive plan.

Here comes testing! In just 3 weeks we develop the product which clearly explains your entire idea. This is enough to start. The earlier you start, the earlier your business start to achieve it’s goals. The next cycle will begin right after the first one is finished: this will stuff your product with additional features. At the end of each cycle we are able to decide where to go, what are the current priorities, requiremnts and what shall we change to face the changing world.

That’s an amazing level of freedom! Let’s launch and drive traffic to see to test the idea straight away!

Some examples

We are sure it’s important for you how do we write code.

Application is files. We believe that well-written application’s files are arranged in a very clear way. We arrange it this way:

In complex applications each folder consists of subfolders structured with regards to application logic. Here comes an example Class of Model responsible for Local Database management.

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Local Database Management Class
 *
 * @package     2find
 * @subpackage  Models
 * @category    Management
 * @author      Viktor Kuzhelnyi @justboil.co.uk
 */

class Local_db extends CI_Model {

    // Vendors list (when used) is cached. We store it here.
    var $vendors_cache                = array();
    
    // Database cache before insert. Used to accumulate database requests and insert them at once.
    var $db_batch_cache               = array(); 
    
    // Options when retrieved are cached. We store them here.
    var $options_cache                = array();
    
    // Prices vendor statistical information when retrieved are cached. We store them here.
    var $prices_vndr_stats_cache      = array();
    
    // Site ID. Used in database requests.
    var $JB_siteid;
    
    /**
     * Constructor
     */    
    public function __construct()
    {
        parent::__construct();
        
        // Connect Local Database
        $this->load->database('local_db');
    }
    
    // --------------------------------------------------------------------
        
    /**
     * Delete Common
     *
     * Allows to delete entrys while checking for special allowances.
     *
     * @access    public
     * @param    string
     * @param    int
     * @param    string
     * @param    int
     * @param    bool
     * @param    bool
     * @return    void
     */
    public function delete($table, $id, $colname='id', $limit=1, $check_rights=FALSE, $check_siteid=TRUE)
    {
        // Limit number (just in case, to make deletions more safe)
        if ($limit !== FALSE)
        {
            $this->db->limit($limit);
        }
        
        // Check for siteid match (again, just in case, to make it more safe)
        if ($check_siteid)
        {
            $this->db->where('siteid', _jb_siteid());
        }
        
        // Special allowance tag (used in some tables)
        if ($check_rights)
        {
            $this->db->where('allow_delete', '1');
        }
        
        // Primary condition (colname and id)
        $this->db->where($colname, $id);
        
        // Perform Delete
        $this->db->delete($table);
    }
    
    /* .... */
    
}

/* End of file local_db.php */
/* Location: ./application/models/local_db.php */

?>