Skip to main content

Introduction to CodeIgniter

Introduction

I've been playing around with CodeIgniter as my PHP web framework for a while now and I would like to share my simple steps in getting started with the tool. I think it's maybe too late to post this one up on the internet as there are lots of articles describing the said tool. But anyway, I'll just post this one so that I have some reference in the future how I did things to work with CodeIgniter.

CodeIgniter is a simple, light and fast web framework.

And web frameworks are encapsulation of the repetitive tasks we do when developing a website. One of the many important issue solved by this framework is maintenance. We get to have our code separated so that we have proper maintenance of our site. When I say separation of code, it's a conceptual thing. Web framework, most if not all, are implementation of the MVC pattern where we separate logic from presentation. It's model and view respectively. And CodeIgniter does that with ease.

Let me demonstrate. Mostly we do have actions as our PHP scripts, i.e. listcustomers.php to list all our customers. And we have code inside like so:

For some simple sites this works but imagine we'll have other scripts that does similar to this like listvendors.php, listitems.php. I'd imagine we'll separate the part where the connection is and include it in all of these scripts. Yes it solves the problem.

Download and Install

You need to have a web server and a PHP interpreter to run PHP and optionally we can install MySQL. I know these are lots but need not to worry. There's XAMPP to help us. Download and install XAMP and we've got all three working and ready to use.

Visit CodeIgniter website to download the said package. Assuming we put XAMPP to C:\xampp, we can unzip the package to C:\xampp\htdocs\codeigniter and that's it. We can now access the page through our browser. Open up your browser of choice and go to http://localhost/codeigniter/. Voila! We have a codeigniter website up and running.

Comments

Popular posts from this blog

Add Brave Browser to Netbeans

We'll I'm liking Brave now, great isn't it. With the token and all and privacy and stuff. And all the good stuff, right? So what other good thing we can do about it other than adding it to our favorite editor. So here it is, adding it is through Tools->Options->General Edit Web Browser Manager and add this setting below. Find the brave.exe usually it can be found in C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe and voila we're good. See you next posts everyone!

Theory of the Genesis of Bam-e

Well, I was pondering of things today. I mean no things? Like nothing? Can't mine like shit, electricity is down almost every 2 hours so I was wondering to myself... How the hell the name "Bam-e" came to be? As a programmer I need to know the origin of it. Like learning new techniques in programming. I need to dissect things. First off, maybe it's a Tagalog term. I think so. And yeah I found it, or did I. I thought the story goes like this. Someone named Dave came to visit Bam. Here it goes... Dave: Hi, Bam ano yang ginawa mo? Bam: Nagluluto Dave: Yay, maganda yan! Masarap ba yan? Bam: Ah wala, hinalo ko lang ang mga natirang ingredients Dave: Ano name nyan? Bam: Hindi ako sure eh! Dave: Patingin nga? Bam: Sure Dave: Pancit lang naman yan Bam eh! Well, if you don't know tagalog. I'm sorry, I'm not the person to talk to. I'm Bisaya and I'm very bad at tutoring Filipino. The hell, I got 79% when I was in high school. I hate the God ...

Lithium first glimpse

I decided to review my PHP and now I’m interested with the Lithium project. I wanted to get my hands on it just to see what it can do and what are the good stuff in it. Lithium by the way is a PHP web framework, it’s RAD. If you don’t know what a PHP web framework is, I don’t think I can help you. But a Google with the topic can result to many useful resources. I almost forgot most of my PHP background because it’s been 2 years since I coded it. And it was with 4.3 and Oracle. I’m not too sure about what to do next. Instead of installing everything from scratch, I decided to install XAMPP . It’s easy and good stuff (I think). Unlike before, installing PHP and Apache, make Apache recorgnized PHP, add a module to it, install MySQL… You know what I mean. It’s a hassle. But with XAMPP, it’s just a single install and everything is in there. Of course, this doesn’t help if you’re a geek and pretend to know everything and installing everything by hand makes you happy. But for me, it’s fine...