Showing posts with label CodeIgniter. Show all posts
Showing posts with label CodeIgniter. Show all posts

CodeIgniter: Best PHP Framework for beginner

After writing first post on CodeIgniter I decided to write this.

CodeIgniter is better for a beginner.
If you know PHP programming (basics), CodeIgniter is for you.





All frameworks I can think of in the PHP world are strongly object oriented, so provided you're comfortable with that, you should be in a good place to make a start. The advantage with using a framework is that you can learn best practices, which is especially important in the PHP ecosystem - as a PHP programmer myself I can tell you that there are a number of poor practices that are passed around on blogs etc, and it will pay to learn from the correct sources.

As we know, Codeigniter is a Model/View/Controller (MVC) based framework so this is best structure to build any application. Each request comes to controller and performing any database interaction though Model, all out put goes to View for the end result. Where as, in custom PHP each single page serves as MVC where we can see so much complexity.

Pros of CodeIgniter: 

  • Super easy to set up and use. This makes the entry level for a newer PHP developer much lower.
  • Extremely well-documented, with examples in a lot of places to illustrate usage.
  • Extremely fast.
  • Huge community. As with Cake, since CI has been around so long you can almost always find your answer via Google, CI forums, or their IRC channel. This also means there’s lots of code contribution to help get things done (like Paypal libraries, etc)


Ready to Go & Almost Zero Configuration:
If you are going to start a new project with custom PHP then you obviously need to set and collect couple of files to get this start. You must need to build database & other configuration files. Mostly, developers have to write everything from scratch. In Custom development, we will see database queries and other php functions being used directly into lot of files. Following are few files we need in custom development.

Custom PHP
– connection.php
– config.php
– Database.Class.php
– login.php
– logout.php

CodeIgniter
In Codeigniter we dont need to worry about such classes and configurations. We will only need to download latest version from there website and after unzipping and setting up few things you are ready to go. The whole zip comes with 3 folders usually,

– application
– system
– user_guide

The system/ folder contains all libraries and classes which we can add and use in our application. We dont need to do anything with system folder because all our work will go to application folder. The application folder is a set of folders and each folder name defines the purpose of its creation.

These two files are needed to setup in CodeIgniter:

– application/config/config.php file with a text editor and set your base URL.
– application/config/database.php If you intend to use a database then set your database settings.

Download CodeIgniter from here.




Introduction to CodeIgniter:






CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.

CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

CodeIgniter is a dynamically instantiated, loosely coupled system with high component singularity. It strives for simplicity, flexibility, and high performance in a small footprint package.

CodeIgniter is a toolkit for people who build web applications using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.

Really fast. We challenge you to find a framework that has better performance than CodeIgniter.

MVC=>
Models are PHP classes that are designed to work with information in your database.
A view is simply a web page, or a page fragment, like a header, footer, sidebar, etc. In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type of hierarchy.
The controller communicates with the model and the view.
The controller is primarily for co-ordination between the view and the model.

the Model contains the data and behaviour of the application, the View is responsible for displaying it to the user and the Controller deals with user input.


Download the CodeIgniter Version 2.2.0 from:
www.codeigniter.com

all versions available for download at:
https://ellislab.com/codeigniter/user-guide/installation/downloads.html







 Benefits of using CodeIgniter:

-Codeigniter is fast, reliable, lightweight and more capable.
-PHP framework is an easy debug that allows you easily to get out the errors in your development. Codeigniter Development can extend your PHP coding to get the specific functions through frameworks.
-In web Development, many features are almost the same so that you can describe the same code in different way.
-Codeigniter PHP Development is a most easy way to utilize a modular programs.
-Codeigniter PHP Development is compatible with most web servers, numerous operating systems and platforms.
-For many relational database management systems, PHP can be used.
-In worldwide, PHP developers are located and without any difficulty with Codeigniter PHP development you can find enormous amount of support through forums and blogs.
-Codeigniter has an outstanding performance as well as presentation.
-While configuring the PHP framework, Codeigniter is famous among developer because of effort investment.
-Using CodeIgniter, You can construct your own cleaner URI lines
-No commercialism - It’s 100% free and they don’t offer to force you to buy products/services. (Unlike Zend Framework)
-Offers flexibility and easy management With MVC based framework.