Super Scratch Development-1: Ideas from CodeIgniter & Drupal

There are a good number of developers i have seen who still develop sites using Scratch Development. Each and every one of them have their own excuses over CMS and MVC based frameworks. Even most of the fresh students from universities never heard of Web Application Frameworks ( very sad ). So, guiding new freshers to the world of Web Application Framework is little tough and sometimes they get frustrated. In such cases i let them develop using scratch but give them some tools and ideas from codeIgniter and Drupal. After working with such things sooner they become more interested on newer things like Frameworks.

Here i am not going for details just an overview. Otherwise i have to write a whole e-book πŸ˜€ … Is there any good rich guy who can sponsor me to write a book on this .. :))

  1. BASE PATH / Database Operation
    Freshers and other experienced scratch developers mostly uses Relative path ( ./ or ../) to target their image or PHP files. And for database activity i can bet 70% scratch coder uses ( common.php or where they put a connect_to_db function which connects to database.For PATH location i usually suggest to use a ‘config.php’ πŸ˜€ file and store necessary paths like Image folder, JS etc.. and in your code use such folder location to locate your images and other stuffs.

    Now for database activity… in this case i take the risk and usually introduce ActiveRecord of CodeIgniter to the freshers. And for this reason i am very thankful to Hasin Hayder for separating ActiveRecord from CodeIgniter. I used his separation :D.

  2. Template Engine ( tiny but strong / Smarty)
    PHP template Engine can reduce coding lines and it gives a great opportunity to reshape or change the orientation of the site as clients and bosses likes to change their minds very often. In my personal opinion i liked ‘tiny but strong’.

    Ideas From drupal

    : I very much πŸ˜€ like the block mechanism of drupal. In drupal you can put your block in any particular place like left sidebar, right sidebar, footer etc even by theme customizing you can create your particular region where you can put your block . So, this can be easily inherit by using tiny but strong. By using a database table which specify the position of a particular block and some individual block code; you can achieve such functionality. Even the header and footer can be handled more efficiently.

  3. TinyMCE / FCKeditor
    In every web project there are always a number of static pages needs to be handled 😦 like contact us, about us etc. Such cases can be handled by Rich Text Editors like TinyMCE and FCKeditor. Keep the contents of those static pages inside the database. And provide TinyMCE ( my personal favorite ) to edit such contents. In those pages you can retrieve the body content from database.

    you can see their comparison with others πŸ˜€

to be continued …………………………………….. πŸ˜€


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s