UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Services > Web Designing and Development

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2008, 01:35
Ben Ben is offline
Premium Member
 
Join Date: Jan 2007
Location: setcookie()
Posts: 1,605
Send a message via AIM to Ben Send a message via MSN to Ben Send a message via Yahoo to Ben
Default PHP Framework: CodeIngniter

Well I've been coding in PHP happily for around a year now and even though sometimes there's no mood for coding the fix for me seems to be using PHP frameworks - and now I can't stop coding!!

There is one specific PHP framework - open source and all, that's called CodeIgniter, its a really easy PHP framework and it literally comes out of the box. I was setup and already making stuff in 10 minutes, and now I have created a small application (probably the smallest I've done) which sends mail via a form. I probably guess that other frameworks are the same, well this has libraries for absolutely everything, including sending e-mails (and attachments), to creating HTML forms. I've never really known what a PHP framework does before but this seriously has blown me away - and I'll be rewriting my forum script from scratch using this framework.

The user guides are probably the best I've ever seen and I probably would of lost even the first insight without them, including two fantatic tutorials on their site too, which helped kick me off the ground.

They use the MVC approach and it is really easy to understand.

V: stands for views and its the pages that the content is viewed from, from Controllers.
C: controllers control the functionality of your application, different functions are for different segment URLs (so function hello() would be for yoursite.com/hello) for instance. Here is my small app:

PHP Code:
<?php

    
class Site extends Controller {
        public function 
index() {
            
$this->load->view('site_view'); // we allow this function to be used in site_view.php
            
$this->load->helper('form'); // start the forms helper
            
echo "Send Mail:";
            echo 
form_open('site/send');
            echo 
form_input('message');
            echo 
'
            '
;
            echo 
form_submit('submit','Submit Message');
            echo 
form_close();
        }
        public function 
send() {
            
$this->load->view('site_view'); // we allow this function to be used in site_view.php
            
$this->load->library('email'); // start the email library
            
$message=$_POST['message'];
            
$this->email->from('ben@dynbb.com','Ben Stones');
            
$this->email->to('stonesben@gmail.com');
            
$this->email->subject('Some subject');
            
$this->email->message($message);
            
$send=$this->email->send();
            echo 
$this->email->print_debugger();
            if(
$send) {
                echo 
"Sent";
            }
            else {
                echo 
1;
            }
        }
    }

?>
it isn't as complicated as it seems. If you know OOP and are advanced to intermediate in PHP, I recommend seeing this first - and you'll seriously change your mind.

*breathes*
__________________
dynBB.com Blog PHP MySQL Webmaster Tutorials and Articles - blog.dynbb.com - find tutorials and Webmaster articles on PHP, MySQL CodeIgniter and more! also: dynBB forums
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-11-2008, 02:26
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Looks rather good - thanks for sharing Ben .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-11-2008, 00:11
new member
 
Join Date: Aug 2008
Posts: 6
Default

CodeIgniter gets a big thumbs up from me, too. I've used it to develop a number of sites over the past couple of years. Development time is reduced - compared to coding from scratch - and it does not add much bloat that some frameworks add to an application.
__________________
GoDaddy codes: MTECH330 for 30% off .com domains (works on renewals) - MTECH1 for 10% off any order - MTECH2 for 20% off orders over $50. Non-expiring, use multiple times.

Last edited by stupha; 06-11-2008 at 00:14. Reason: typo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-11-2008, 12:23
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

I must get back to learning my PHP again....
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-11-2008, 17:49
Ben Ben is offline
Premium Member
 
Join Date: Jan 2007
Location: setcookie()
Posts: 1,605
Send a message via AIM to Ben Send a message via MSN to Ben Send a message via Yahoo to Ben
Default

Quote:
Originally Posted by DPS Computing View Post
I must get back to learning my PHP again....
Google is all you need .
__________________
dynBB.com Blog PHP MySQL Webmaster Tutorials and Articles - blog.dynbb.com - find tutorials and Webmaster articles on PHP, MySQL CodeIgniter and more! also: dynBB forums
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-11-2008, 02:42
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by Ben View Post
Google is all you need .
& time!!!
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-11-2008, 11:49
Ben Ben is offline
Premium Member
 
Join Date: Jan 2007
Location: setcookie()
Posts: 1,605
Send a message via AIM to Ben Send a message via MSN to Ben Send a message via Yahoo to Ben
Default

Quote:
Originally Posted by DPS Computing View Post
& time!!!
quit your job then
__________________
dynBB.com Blog PHP MySQL Webmaster Tutorials and Articles - blog.dynbb.com - find tutorials and Webmaster articles on PHP, MySQL CodeIgniter and more! also: dynBB forums
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-11-2008, 17:32
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by Ben View Post
quit your job then
And then how do I pay the Internet bill?
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-11-2008, 16:57
Ben Ben is offline
Premium Member
 
Join Date: Jan 2007
Location: setcookie()
Posts: 1,605
Send a message via AIM to Ben Send a message via MSN to Ben Send a message via Yahoo to Ben
Default

Quote:
Originally Posted by DPS Computing View Post
And then how do I pay the Internet bill?
I'm sure you can get a discount somehow - how about AOL? I'm sure they're desperate for customers
__________________
dynBB.com Blog PHP MySQL Webmaster Tutorials and Articles - blog.dynbb.com - find tutorials and Webmaster articles on PHP, MySQL CodeIgniter and more! also: dynBB forums
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-11-2008, 17:20
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by Ben View Post
I'm sure you can get a discount somehow - how about AOL? I'm sure they're desperate for customers
I'm already discounted . And AOL? - I might as well just not pay Virgin if I was going to join AOL. Disconnection from Virgin and joining AOL have the same effect .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 10-12-2008, 12:17
Junior Member
 
Join Date: Dec 2008
Posts: 16
Default

Ben that's great, and i think that i got to pay attention in php classes.
They are extremely hard + boring for me at least.
__________________
Search Engine Optimisation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 10-12-2008, 13:53
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by Jessica View Post
Ben that's great, and i think that i got to pay attention in php classes.
They are extremely hard + boring for me at least.
I actually quite enjoy learning PHP. Its just finding the time to learn every language and computing topic that I want to learn! Thats the problem these days you can no longer be a "jack of all trades" within computing like in the 80s and early 90s as the subject is just so vast now!
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 10-12-2008, 15:19
Ben Ben is offline
Premium Member
 
Join Date: Jan 2007
Location: setcookie()
Posts: 1,605
Send a message via AIM to Ben Send a message via MSN to Ben Send a message via Yahoo to Ben
Default

Quote:
Originally Posted by DPS Computing View Post
I actually quite enjoy learning PHP. Its just finding the time to learn every language and computing topic that I want to learn! Thats the problem these days you can no longer be a "jack of all trades" within computing like in the 80s and early 90s as the subject is just so vast now!
yep . PHP is a great programming language and is easy to learn. There are so many new languages popping up as the latest trend among ... Mac-favoured people (*sign*) (as in I want a Mac rofl!)... one of them is Ruby and Ruby on Rails...

Frameworks in PHP haven't been around a long time, probably since around 2005 for the popular ones nowadays ... and they're based on frameworks with Ruby and other languages alike...

PHP originally had intention where you can embed HTML with PHP which developers loved in those days and are good for new developers but as you create complex applications you really want to seperate PHP logic from HTML to keep it tidier ... frameworks allow you to do this and keeps applications easier for other developers to modify such as for open source software... of course PHP frameworks can be used for your average PHP projects too .
__________________
dynBB.com Blog PHP MySQL Webmaster Tutorials and Articles - blog.dynbb.com - find tutorials and Webmaster articles on PHP, MySQL CodeIgniter and more! also: dynBB forums
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 10-12-2008, 16:13
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 6,494
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Thank you for that nice insight Ben .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Christmas Gigs Announced! (02/12/2008 )
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 10-12-2008, 17:10
Ben Ben is offline
Premium Member
 
Join Date: Jan 2007
Location: setcookie()
Posts: 1,605
Send a message via AIM to Ben Send a message via MSN to Ben Send a message via Yahoo to Ben
Default