An Introduction to CodeIgniter - Mkwebdeveloper Technical Mantra

Mkwebdeveloper Technical Mantra

Sub Kuch Milega Bus Tum Search Kro

Breaking

Mkwebdeveloper

Tuesday, 31 July 2018

An Introduction to CodeIgniter

CodeIgniter is a PHP-driven framework, containing a grab-bag of libraries, helpers, plug-ins and other resources, that takes care of many of the more complex procedures and functions for which PHP is famous. CodeIgniter does all the heavy lifting for you while maintaining high performance. It will simplify PHP syntax, streamline the code underlying your web pages, and—best of all—have you churning out dynamic, interactive, professional websites in no time.
Here are some of the principal benefits of coding your next project in CodeIgniter:
  • It makes coding in PHP simple, quick and user-friendly.
  • It’s an excellent framework for learning more about how PHP works as you code.
  • It underpins the Model/View/Controller (MVC) approach to web development—a best practice philosophy all developers should adhere to.
  • It’s built on a linear, easy-to-use folder structure.
  • It’s open source and simple to configure and customize for your own needs.
  • You can construct your own cleaner URI lines in CodeIgniter.
There are more reasons why you should start investigating this framework, and you’ll doubtless discover these for yourself when you visit and download the latest version(at the time of writing, version 2.0.1). Before you unzip and install the file though, head to the User Guide and read a little about CodeIgniter.
This is where you’ll see one of this framework’s best aspects—it has one of the most comprehensive and user-friendly how-to guides of any web development tool. If you can’t find what you need in the table of contents at (click on the tab at top right), head to the forums and join the ever-growing, highly passionate CodeIgniter community.

Tiers Come Easy

The Model/View/Controller approach to programming aims to keep the business logic of an application separate from the display logic, splitting the presentation aspect of an application (what the user sees in their browser) and the nuts and bolts that drive that application into three interconnected tiers:
  • The Model, which represents data structures. Classes contained within the Model tier will contain methods that interact with a database.
  • The View, which looks after presentation. A View will normally be a web page, but can also be a page fragment like a header or footer.
  • The Controller, which does most of the hard work, and is an intermediary between the Model, the View, and any other resources needed to run your application.
Separating a project in this manner means each tier does its job extremely efficiently, maintaining its relationship with other tiers yet operating within clearly defined boundaries. It also means multiple Views and Controllers can interface with the same Model, and new or different Views and Controllers can interface with a Model without forcing a change in the Model design.
You’ll find plenty of information out there on the web to help you grasp what MVC is about and why it’s worth building your applications around the MVC axiom. Once you start familiarizing yourself with CodeIgniter, MVC will become far less abstract.

It’s a Set Up

Step one is to download and install CodeIgniter. You might want to squirrel this original copy away in a templates folder. Each time you start a new project, you can copy the necessary folders from this template, customizing them as you go along. For example, you’re not going to need to copy the user guide folder or license file every time you start a new project.
What you will need is the index.php file, and the two main folders: system and application. It’s the application folder you’ll be working out of most of the time, but it’s worth taking a peek through the subfolders in the system folder.

No comments:

Post a Comment

IRCTC ऐप से अब ट्रेन के साथ Ola कैब भी कर सकेंगे बुक, PhonePe से भी कर सकेंगे पेमेंट

IRCTC ने यात्रियों की सुविधा के लिए ओला कैब के साथ साझेदारी की है, इसके साथ ही टिकट का भुगतान अब PhonePe ऐप से भी किया जा सकेगा

Pages