• Web 2.0 platform and Programming Language

    We are promoting Web 2.0 platform in our template design, xHTML in our scripting and PHP programming language in our server side programming. So try our services and be satisfied with the outcome.

  • HTML/xHTML Standard

    This site passed and uses the W3C XHTML 1.0 Transitional standard, CSS level 2.1 driven, Javascript and with a latest trend of Table-less xHTML scripting by not using <table> tag in making our script.

  • Website History

    This website was founded last October 18, 2007, fully bought the domain February 2008 and has been continually updating. We are located at heart of The City of Golden Friendship Cagayan de Oro the City.

PHP Object Oriented Programming (OOP) using Model View Controller (MVC) approach

This is a tutorial and example on PHP Object Oriented Programming (OOP) using Model View Controller (MVC) approach.
It has a simple secure Session login.

It is secure from the following:
- SQL injection.
- Multiple random login attempt
- Cross Site Scripting

This approach are using the following OOP features:
- Class
- Abstract Class
- Inheritance (Extending a class)
- Visibility (public, private, protected)
- Interfaces

MVC features:
- Model model.php
- View
— view/login.php
— view/defaults.php
- Controller controller.php


MVC flowchart hierarchy:

/* config.php */
abstract class Config {
}
/* database.php parent config.php */
interface intDB {
}
abstract class DB extends Config implements intDB {
}
/* methods.php parent database.php */
interface intMethods {
}
class Methods extends DB implements intMethods {
}

/* model.php parent methods.php */
class modelBlog extends Methods {
}
/* controller.php parent model.php */
class controllerBlog extends modelBlog {
}
/* view/login.php */
/* view/defaults.php */

/*
execute index.php
new controllerBlog();
*/

Installation:
- Unzip blog_20110213.zip to your htdocs
- Import database blog.sql using database name blog
- Run it with this url http://localhost/blog/index.php
- Login default are username: user and password: user

Back to list One Comment Feb 12, 11 at 01:56 pm
  1. Download blog_20110213
  2. Download mvc

One Response to PHP Object Oriented Programming (OOP) using Model View Controller (MVC) approach

  1. VPS says:

    ablution…

    Every convenience brings its own inconveniences along with it….

Leave a Reply

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

*


eight × 4 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

My Blogs

  • Configuring CodeIgniter for website with HTTPS protocol view more...
    Posted: Jan 05, 12 at 11:27 am
  • Keyword “Cagayan de Oro PHP Programmer” iWebProvider.com is Number 1 at Google Search view more...
    Posted: Feb 15, 11 at 05:54 pm
  • PHP get root URL and root Directory path view more...
    Posted: Feb 15, 11 at 02:47 am
  • PHP Object Oriented Programming (OOP) using Model View Controller (MVC) approach view more...
    Posted: Feb 12, 11 at 01:56 pm
  • Launching of the new 2011 iWebProvider.com Template Design view more...
    Posted: Feb 03, 11 at 08:17 pm

Most Popular Blogs

  • PHP get root URL and root Directory path view more...
    Posted: Feb 15, 11 at 02:47 am
  • Search Engine Friendly URL to convert .php and replace with .html file extension using .htaccess view more...
    Posted: Jan 19, 11 at 09:44 am
  • PHP Class for sending Email and preventing Email Spam view more...
    Posted: Jan 19, 11 at 09:41 am
  • PHP Function to Limit String output or display view more...
    Posted: Jan 19, 11 at 09:39 am

Wise Words

"Hard work surpasses genius"

by: Mark

"It’s not about how many you have learned but how much you have utilized and mastered what you have learned."

by: Mark

"The function of good software is to make the complex appear to be simple."

by: Grady Booch

Latest Comments

abseiled... The best post I ever found that captured all the arguments around heading syntax was he...

by: Server

ablution... Every convenience brings its own inconveniences along with it....

by: VPS

abscises... What about "a collection of oldies..but goldies" ?...

by: Server

Keep in Touch

If you would like to find out more about us, just email us at inquiry[AT]iwebprovider.com