Tuesday 6 January 2015

Checklist to Avoid Mishappenings of Web Development

Want to become a better programmer? Here i find a good list of mistakes usually done by developers during small or big web development projects.

Let's have a look:
  • Is error reporting on and display errors on in development and off in production?
  • Do not suppress errors in your code
  • Implement a logging framework to avoid future code errors
  • Use a caching strategy to speed up code compilation.
  • Use best practices for programming design patterns.
  • Always test your code and repeat testing each time whenever a change occurs in code base.
  • Review and audit your team members code before and after merging code to the code base.
  • Practice defensive programming.
  • Learn and use OOPs principles to make code flexible.
  • Have a solid workflow and processes for developing and deploying code.
  • Differentiate between read/write database queries.
  • Use a solid database library which can connect to multiple databases.
  • Test SQL queries for exploits.
  • Learn and use indexes on database tables
  • Use database transactions.
  • Secure sensitive data in the database.
  • Use different coding environments: development, staging, production.
  • Implement a backup and monitoring strategy.
Read original article here >>  http://www.sitepoint.com/18-critical-oversights-web-development/

Monday 8 September 2014

Why Developers Prefer Cakephp Framework For Large Scale Website Development?

Nowadays, CakePHP is a commonly-used PHP framework that helps developers to build dynamic websites and web applications at ease. Originated since 2005, Cakephp is an open source, MVC structured platform that offers a well managed code behind interface to quick start your project.

Some Facts
  • Around 43% of Cakephp websites are built in business category globally. (Source: BuiltWith)
  • In 2013, Cakephp is 5th most promising frameworks among all other PHP platforms. (Source: SitePoint)
  • Easily available large communities of skilled Cakephp developers make complex website development smooth.
While Cakephp is a robust and reliable website development framework, there are some more excellent advantages for developers:

Zero Configurations

Cakephp framework operates with ZERO configurations, so it helps developer to pay full attention on logical part rather than dealing with configuration issues. Also Cakephp developers don’t have to manage extra configurations excluding database connections, as it consists of auto removed features.

Regular Updation

CakePHP is certainly everyone’s ideal choice in all PHP frameworks because it consistently remains to be upgraded and is often utilized by expert PHP programmers in world-wide. Cakephp offers customized solutions to make programmers app meet with their client’s requirements.

Language Support

It is hard for developers to work with same language all times. This is the reason why language support is a key feature of Cakephp framework, as it supports numerous languages that helps programmer to work comfortably. It removes the warrior work with only one language at all.

Code Re-usability

Cakephp facilitate developers with code re-usability feature that saves their lots of time in writing similar codes over and over again. Also it helps developer to finish their work in short time-frame. Hence programmers can also expand the usability of their applications using plug-ins.

Thursday 7 August 2014

How To Integrate Wordpress Blog With Cakephp Application?


 Cakephp Wordpress Integration

Integration of blog with Cakephp application is not new for a PHP developer, but if we talk about cross platform integration, it takes time to understand functionality and compatibility of both frameworks. The same problem occurred with me last month, when client required integrating a Wodpress CMS with Cakephp Application.

I have researched a lot and find a good tutorial Integrating Wordpress with Your Website in Wordpress support section. Here is the process I followed:
  • First install WordPress and copy & paste wordpress folder into app/webroot of CakePHP.
  • Access .htaccess file from CakePHP root directory and place these lines, given below:
          RewriteEngine on
          RedirectMatch temp ^/blog/wp-admin$ http://www.example.com/blog/
          RewriteRule ^blog$ blog/ [L]
          RewriteRule ^blog/wp-admin$ blog/wp-admin/ [L]
          RewriteRule ^$ app/webroot/ [L]
          RewriteRule (.*) app/webroot/$1 [L]

This results URL like this: “http://www.example.com/blog/“, but if you want URL like this: “http://www.example.com/blog”, there should be little change in this process:
  • First install WordPress and copy & paste this folder same folder where your ‘app’ folder remained.
  • Here find CakePHP - .htaccess file to run wordpress from webroot/blog directory (Original Source: Githhub.com):
           <IfModule mod_rewrite.c>
            RewriteEngine on

            RewriteCond %{REQUEST_URI} !^/blog.*
            RewriteCond %{REQUEST_URI} !-f
            RewriteRule ^$ app/webroot/ [L]

            RewriteCond %{REQUEST_URI} !^/blog.*
            RewriteCond %{REQUEST_URI} !-d
            RewriteRule (.*) app/webroot/$1 [L]
           </IfModule>

If you have some more methods to share, please comment below.

Tuesday 29 April 2014

News: Cakephp 1.3.18 and 2.4.8 released on April 29, 2014





Cakephp core team has announced the availability of Cakephp 1.3.18 and 2.4.8 on April 29, 2014. Cakephp Developers, who are struggling with security issues, now recommended to use SecurityComponent.


Lists of expected changes in 1.3.18 are given below:
  • Model conditions containing : or ? are now handled correctly. This fixes issues around using casting in conditions
  • SecurityComponent form tampering hashes now include the URL path as a hash input.

Lists of expected changes in 2.4.8 are given below:
  • SQLServer now properly appends the schema name when describing tables.
  • Hash::extract() can now match boolean attributes.
  • fclose() errors when using shells should no longer happen.
  • CakeResponse::file() now throws an exception when paths contain '..'.
  • ShellDispatcher now casts argv to an array. This fixes issues when cake console was invoked from a non-cli SAPI.
  • TextHelper::autoLink() now correctly links urls with subdomains containing '\_'.
  • SecurityComponent form tampering hashes now include the URL including the query string as a hash input.

Friday 11 April 2014

Infographic: Comparison Between Cakephp And CodeIgniter!

PHP Frameworks (Cakephp and CodeIgniter) provide a firm structure for code. It also saves us from rewriting the same code and creating the functionalities all over again.

While CodeIgniter would be well-suited for smaller applications, CakePHP is an advanced framework-distributed under MIT license. Each framework has its own pros and cons, but it really depends on your project's complexity and provision to choose the suitable one.

So here is an Infographic that provides a brief comparison between Cakephp and CodeIgniter frameworks with their respective pros and cons:


Wednesday 12 March 2014

Why Cakephp Framework is Best Choice for Website Development?

Cakephp is an open source programming language that helps to develop efficient and potential websites and its applications. Now-a-days, it is the first choice for most developers and programmers to develop a website fast. Now question arises, if there are so many other PHP frameworks available for web development, why several developers and programmers still trust on Cakephp? So, here are the features that make Cakephp highly noticeable from other frameworks:

Open Source

Open source in terms of computing is stands for: 


Similarly, Cakephp is an open source website development platform that ensures users for free availability and modification of code. Many cakephp developers use it to develop customized CMS and websites. One main advantage is most of the big Cakephp Communities like Github offers updates, codes and plug-ins for free use.

Model-View-Controller (MVC) Architecture


Cakephp is based on the Model-View-Controller pattern that isolates the business layer from the presentation layer.  Therefore, model is responsible for database connectivity and saving data to the database. The view processes data in supported format and layout. The controller handles the user request. 

Code Reusability

As we discussed previously Cakephp is an open source framework, hence several communities provides freely available codes which is reusable and can be modified. Thus, it makes CakePHP website development faster as CakePHP developers can use already existed code. It also increases efforts and potential of developers regarding optimized logic and structure in developing the web applications for a website.

CRUD

Image Courtesy: programming-free.com

CRUD stands for Create, Read, Update and Delete. CakePHP provides CRUD concept based on Active Record design pattern. The Active Record design is an approach to access data from database. It’s built-in to wrap the database table and row in a php class itself. So, CRUD is an easy act for cakephp programmers to create, modify and delete entities from the system.

Easy to configure and Built-in Libraries

The best part of Cakephp framework is easy configuration and installation. You just install it from Cakephp.org and use it with some initial modifications like database connectivity and change in security files. It saves developers time configuring the CakePHP as it can automatically detect most features and settings. It has many in-built validation rules or libraries that can be easily used for particular uses.

Monday 3 March 2014

News: Cakephp 2.4.6 released on March 02, 2014


Cakephp core team has released the new Cakephp version 2.4.6 on March 02, 2014. People, who are struggling with previous Cakephp version’s issues, now can download this bug-fix Cakephp 2.4.6 release from Githhub.com/cakephp .

Some of the changes are given below:
  • Extract task handles quotes inside validation messages correctly.
  • Model::field() now works with fields translated with TranslateBehavior.
  • Core tests are no longer part of PEAR packages. This solves issues when the pear package is used as a composer dependency, and an incorrect classmap was generated.
  • FormHelper::checkbox() can now generate checkboxes for empty values.
  • Postgres can now convert boolean fields to integer when using SchemaShell.
  • Changes to how ID's are generated for radio inputs were reverted. These changes caused issues in some applications.
  • API documentation has been improved.
  • Reverse routing for prefixed actions was improved.
  • Temporary associations setup with TranslateBehavior::bindTranslation() are now correctly unbound & restored.
  • Clearing data with MemcacheEngine will now work with greater than 100 slabs.
  • Validation::decimal() now works with localized floats.
  • Invalid data in datetime pickers is now correctly handled.
  • FormHelper::postLink() and FormHelper::postButton() now handle N dimensional data.