Introduction to PHP Framework

PHP is used to develop dynamic web-based systems in simple and easy ways. PHP is open-source free code that has a different framework when compared to other development technology.

As we described previously ous post PHP is the most simple and easy development technology.

PHP has different frameworks. PHP Framework is the collection of PHP code that has with command PHP syntax. All PHP framework has its own advantage and drawbacks.

Those PHP framework

  1. CodeIgniter
  2. Laravel
  3. Symfony
  4. YII
  5. CaKe PHP
  6. Phalcon

In these tutorials we cover some basic and general concept of two PHP framework that leading in the open source development. The first top two lists. CodeIgniter and Laravels

What is CodeIgniter?

Codeigniter is a PHP framework that is used to develop simple and large project in a short period of times. CodeIgniter is a very lightweight PHP framework ,easy to learn , easy to download, easy to install and configures. In codeigniter the writing code it very color and simple steps.

Codeigniter follow the MVC pattern to manage source code.

MVC means Model View and Controller

M: Model means where a business logic written here.

In model we write active query operation written. Acive query means Insert,Read,Updating,Delete query operation.

View: means where the user interface is written. These view contains all HTML, CSS, javascript.

Controller: Controller is the intermidator of view and controllers. Without control codeitniter application can not run. Models and view can be communicated through controllers.

How to Download CodeIgniter Setups ?

Downloading codeigniter setups is very easy and striaght forward like any other downloading. You can download codeigniter setups from codeigniter website by click one button links.

The downloading codeigniter is not use any comand and we can use only interface.

To download codeigniter setups you can simple search on google by typing download codeigniter setups and choose the first link from google and open codeigniter portal and click download link on the portal.

How to Install CodeIgniter Setups

To install codeigniter setups we must check first your localserver runing or not if it is not runing you can not install codeigniter setups successfully. Codeigniter is a php framework used for server side scripting languages.

After downloading codeigniter setups from codeigniter portals and extract it and copy all file in the folder and paste it on the folder htdocs/project_name.

Then your project name by typing these command.

localhost:/project_name

the above command is used to displat your fresh codeigniter projects.

How Display Hello World on Codeigniter

To display hellow world by codeigniter is very easy process that used check weather our setups is correctly configured or not.

Hellow world we can run in two way by using codeigniter, One ways use view and controller or by only using controllers.

Remembers: by using controller we can run condeigniter setups.

Create HomeController PHP file in Controller folder copy paste the following codes.

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

class HomeController extends CI_Controller
{
	public  function index()
	{
		echo "Hello World!"
	}

}

the above code is used to display Hello World by using Controller in codeiniter.

Display Hello world by using Controller and view it takes some steps than the above process.

In these way we have to create view, that contains html file that display hellow world on it and controller that call them by using function.

Lets it show it by step by steps.

Create hello.php on view folder and copy paste the following code on it.

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

class HomeController extends CI_Controller
{
	public  function index()
	{
		echo "Hello World!"
	}

}

the above code is used to display hello world on the screen when controller call them by using functions, how it call by using functions

As we create controller on the above we can use that controllers and create function on HomeController and name it function hello(); lets show by coding.

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

class HomeController extends CI_Controller
{
	public  function index()
	{
		echo "Hello World!"
	}

	public function hello(){
		$this->load->view('hello')
	}

}

The above both two ways of displaying hello world on codeingiter has their own syntax and semantics.

The legal ways of creating by using view and controller it the legal process of codeignite frameword.

What is Laravel ?

Laravel is an elegant php frame work that used to develop large project with multiple teams. Laravel has very large support community. I development support community is the very important things. When developing you may get error to fox that error you can get multple support portals onlines.

It has large stackover problem solutions based on any case of your laravel projects. Every opensource developer related to php used laravel frameworks. We can install laravel on every platforms, we can install laravel on windows ,Ubuntu,Mac OS.

How to Download and Install Laravel Setups

Downloading and installing laravel is very easy process. To download laravel and install laravel on your local or remote machine your must have the following setups

  1. Composer => is notting but it is package managers,
  2. Local server / WAMP,LAMP,XAMPP and other local server
  3. Internet Connection/ for first time your machine must be connect to internet access.

Commands that used to install laravel projects

create folder that your project store on it.

to create folder use these command

mkdir project
cd project
==========
composer create-project --prefer-dist laravel/laravel lms
cd lsm

the command is used to download and install laravel projects.

Laravel act as Server side script language when use api.

Laravel can also connect with any other front-end developement technologies

For more information please choose laravel menu from the above button and you can get more project that developed by laravel setups.

Summary

PHP is the power house of framework when compared to other developement technology.

PHP framework is the buildigin block of developement process.

Author: bbnadmin

2 thoughts on “Introduction to PHP Framework

Leave a Reply

Your email address will not be published. Required fields are marked *