Showing posts with label codeigniter. Show all posts
Showing posts with label codeigniter. Show all posts

Friday, March 4, 2016

Different between CodeIgniter and Laravel frameworks

Different between CodeIgniter and Laravel frameworks


Here, let us make a brief analysis and know the differences between Laravel and CodeIgniter.

Laravel pros and cons

It is common knowledge that, for web application development, Laravel offers expressive, elegant syntax. Such has been its design. The laravel developer will enjoy the development process. Routing, authentication, sessions are some tasks, which are commonly performed, and are made easier, thanks to Laravel.

Importantly, this framework is designed for the PHP's latest version. Therefore, unit testing support and authentication, which are the base development components, are inbuilt. It is commendable that Laravel framework folds with the blade template engine in a smooth manner.

One area where Laravel outdoes CodeIgniter is it has got exceptions. These, with exceedingly detailed stacktrace aren't available for developers who use CodeIgniter..

Use of libraries and models is easier as Laravel has object-oriented libraries. These libraries are supported with autocomplete feature.

Laravel has its own command-line interface. Called as Artisan, it enables developers to perform abundant tasks. So what tasks? Tasks like migrating databases and seeding databases. Also performed is clearing the cache, etc.

Object-Relational Mapping or ORM in Laravel is simple, eloquent and fast. That said, developers will find it very easy to organize the application's database.

Laravel is best suited for building RESTful APIs. Apart from that, Laravel handles event queuing.

However, Routing in Laravel may be odd at times. Owing to the recent entry of Laravel, it may be a bit tougher if not altogether, to get to find answers. Notwithstanding this fact, the numerous forums and IRC are very much active in helping people find answers.


CodeIgniter pros and cons

It is simple, and also quick to set up CodeIgniter. Just download the preferred version from CodeIgniter homepage. Otherwise, from GitHub. Thereafter, unzip the contents.

Nothing can beat CodeIgniter in terms of documentation, which is clear and very well structured. It is such that all the particular concepts of CodeIgniter which are commonly used are explained clearly, that too, with examples.

CodeIgniter is stable. The popular framework has the advantage of having been tested by the developers in large number. Having said that, the chances of bugs or any other problems going unnoticed is minimal.

The templating engine, which is inbuilt in CodeIgniter, is easy to use and is based on mustache-like templating language. Learning this language is simple even for new developers.

No matter whether you know anything about MVC architecture or not; it is very easy to use CodeIgniter.

CodeIgniter offers output caching. Web pages can be cached so that the loading time can be reduced. Besides, efficiency and performance can be enhanced.

Developers using CodeIgniter can easily seek support. Because this framework has a very big community which uses the framework for smaller projects and also very large projects.

It may be an overstatement to call CodeIgniter obsolete. However, it is to be noted that the framework has been released at the time of PHP 4. Many new features were added later to PHP. Hence, the need for extending code files arises to make this framework work.

Another drawback of CodeIgniter is that it does not offer default modular separation.

Both frameworks, which are unique and similar in many ways have their own set of advantages and disadvantages. However, it is the requirements of the developers that decide which is to be preferred. All that said, if you are a developer working on modern apps, it is suggested you go for Laravel. Every Laravel developer company attributes their ease of web development to this framework.

Thursday, October 16, 2014

Install CodeIgniter Framework


In this post we will cover how to install codeigniter framework and we will view the most common steps to install codeigniter framework. CodeIgniter is one of the most popular PHP frameworks around. It uses the Model-View-Controller Architectural design pattern and it’s considered by lots of PHP developers as one of the best framework solution for small to medium projects.

How to Install

The installation itself is such a simple process. First of all, you need to download the CodeIgniter zipped file, upload it to your server and extract it into your home directory. You can download it from https://ellislab.com/codeigniter/user-guide/installation/downloads.html.

Configuring CodeIgniter

Congratulations, now you have CodeIgniter installed on your server. Now it’s time for configuration. Open the application/config/config.php file with your preferred editor and set your base URL. If you intend to use encryption or sessions, set your encryption key. For the database configuration, open the application/config/database.php file with your preferred editor and set your database host, name, user, password and other values that you think it will help you connect to your database. You will find array variables with comments to know the role of each value.

Configuration files

By editing the two previously mentioned files, you are ready to start coding your first web application but CodeIgniter contains more files that enable more configuration and customization abilities. The configuration files can be found in the application/config/ directory. The following is a quick description of what you can do by editing some of the most commonly used configuration files:

autoload.php : specifies which systems (Packages, Libraries, Helper files, Custom config files, Language files and Models) should be loaded by default.

config.php : contains all website configuration.

constants.php : contains defined constants which are used when checking and setting modes when working with the file system.

database.php : contains the settings needed to access your database.

email.php : This file is not created by default. But you can create it and set the default values for the email class. Like: mailtype, charset, newline, protocol, smtp_host, etc.

hooks.php : lets you define “hooks” to extend CI without editing the core files.

mime.php : contains an array of mime types. It is used by the upload class to help identify allowed file type.

routes.php : lets you re-map URI requests to specific controller functions.

smileys.php
: contains an array of smileys for use with the emoticon helper.

upload.php : This file is not created by default. But you can create it and set the default values for the upload class. Like: upload_path, allowed_types, max_size, max_width, max_height, etc.

user_agents.php : contains four arrays of user agent data. It is used by the User Agent Class to help identify browser, platform, robot, and mobile device data. The array keys are used to identify the device and the array values are used to set the actual name of the item.

 

© 2014 4everTutorials. All rights resevered.

Back To Top