![]() |
| Powered by phpBay Pro |

Mvc Development With Php in the Fuse Php Framework
Let's face it - there are a lot of development frameworks out there, especially for PHP. CodeIgnitor and CakePHP come to mind immediately as leading PHP frameworks, but in this article I'm going to give some compelling reasons as to why you should be doing your PHP development with the Fuse PHP Framework. Fuse is a Model/View/Controller framework for PHP.
1. FUSE is easy to get running
The installation scripts included with Fuse guarantee that you'll have a working install a few minutes after downloading. Fuse was built so that PHP developers don't have to feel like they were learning an entirely different language in order to make use of the framework. The syntax and structure follow normal PHP conventions, and everything from the method names to parameter order was designed to be as intuitive as possible. Let's face it - everyone wants to use the newest, best, and most appropriate tool for the job. However, developers will often shy away from doing things differently because of the learning curve. They fear that introducing new technologies or methodologies will increase their project timeframe and decrease productivity. Fuse was built with a deadline-oriented mentality in mind: you can get started quickly, and you don't have to know every in and out of the framework to start building your project.
2. Data access has never been easier
Fuse's data modeling makes accessing your data easier than you ever thought possible. The management scripts will give you create, read, update, and delete access right off the bat, and customizing your queries is as simple as can be. Let's say you want to list your products, but also include their category_name, which lives in the product_categories table. In Fuse, all you have to do is open your ProductController and add this line:
public $list_options = array( 'include' => 'product_categories' );
That's it. Now when you iterate through your products, you can use the variable <{category_name}> in your template to display the category name for your product. Let's say we only want to display 20 categories? Try this:
public $list_options = array( 'include' => 'product_categories', 'limit' => 20 );
Fuse offers a whole slew of data methods just like these, and your queries can be as simple or as complicated as you need them to be. You will rarely have to write a query, but if you want to, Fuse even offers an object to take the headache out of writing queries . And, as always, if you just want to hand code a query the old fashioned way, Fuse will never stop you. A core principal of Fuse is that it's designed to aid the programmer, not force him or her into the methodologies that we've deemed best.
3. A simple but extremely powerful templating engine
Fuse contains its own robust, intuitive templating engine that allows you to truly separate your code from your presentation. As with everything else, the templating system was designed to be intuitive, and "designer friendly". Want to loop through the products we fetched above? Try this:
<{ITERATOR products}>
name: <{name}><br />
category: <{category_name}><br />
<br />
<{/ITERATOR}>
Want to apply a function to one of your fields? How about we only display the first 200 characters of our description:
<{ITERATOR products}>
name: <{name}><br />
category: <{category_name}><br />
description: <{ print(substr(description, 0, 200)) }>
<br />
<{/ITERATOR}>
Maybe our products can be in more than one category, and we want to fetch them? After adding a one line method to our Product model that looks like this:
public function get_categories() {
return $this->product_categories->fetch_all();
}
We can do:
<{ITERATOR products}>
Name: <{name}>
Categories:
<{ITERATOR get_categories()}>
<{name}>
<{/ITERATOR}>
<{/ITERATOR}>
Yes, <{name}> will know that when you're in the products loop, you want the product name and when you're in the product categories loop, you want the category name.
4. Searching your data has definitely never been easier.
Your client tells you that they want to be able to search records with any combination of title, date, description, id, and author. You know this is going to be an annoying task of using if/then statements to build a search query. Unless you're using Fuse, where you can do it all with a few lines of code. The FuseDataController object, which handles all of the wheeling and dealing your app does with the database, has builtin search capabilities that will automatically sanitize data, generate the search query, and maintain the search session across pages. All you have to do is tell it which fields a user can search on, and it's ready to go. You can search fields values directly, with wildcards on either side, between two date intervals, or even have Fuse automatically parse strings like "restaurant AND (mexican OR Thai)" simply by setting your 'filter_type' to 'parsed_boolean'.
5. Builtin management of photos for albums, user profiles, etc.
Let's say you're building a site that allows users to create a profile, add photo albums, then add photos to those albums. You're going to want several different sizes - a full sized image, a thumbnail for browsing, and a tiny thumbnail for a contact sheet type of display. You also want to watermark each image with your site's logo. This can be a pretty tedious task if you're not using the FusePhotoController, which should have you up and running in about a half hour if you're slow.
6. Simple but fully featured, scalable user management and ACL
A lot of sites need user authentication. I've seen a lot of custom implementation in my time, and because of the complexity of doing it right, mostly they rely on a very basic user scheme that allows little or no granularity or scalability when it comes to setting permissions. Fuse has a simple to implement, but fully granular and scalable user authentication and permissions scheme built right in. Need to associate users with groups that all have different permissions? No problem. Have a user who's in the "editors" group, but shouldn't have access to delete an article? Just add a restriction for that user. Need to set it up so that when a user tries to access a restricted page, they are asked to login, then redirected back to the original page on success? It's already done. Password encryption? SHA-1, MD5, and crypt() are all supported. I could go on. You can read about it on your own here
7. Integration with existing non-Fused projects
I mentioned above that Fuse endeavors to never prevent the developer from doing what he or she needs to do. If you have a project that's already done in standard, inline PHP, Fuse can go right alongside your existing code without upsetting any of the existing functionality. In fact, if you include the Fuse bootstrap in one of your existing php scripts, you can add Fuse functionality to that script without having to edit any of the existing code. I have several projects right now that were handed to me as inline PHP, and I put Fuse right on top of it without having to re-code a single line of the existing project. However, I can now use Fuse moving forward for new features and updated functionality.
Conclusion
There you have it. Just a selected list of reasons you should switch to Fuse. Today. For the project you're working on. Right now. Make things easier on yourself. I've introduced a lot of people to MVC development and Fuse and, without fail, every single one has said, after just one project, that they could never possibly go back to their old methodologies of inline scripting and manually writing every query. Comments welcome.
About the Author
Jim Keller has been working closely with Internet Technology for nearly a decade, and is currently the CEO of Philadelphia Website Design Firm Context Technology Solutions, an end-to-end provider of IT and Internet solutions in the Philadelphia area. Mr. Keller holds a Bachelor of Science degree from LaSalle University with a major in Information Technology and minors in Computer Science and Communication. Although his technical skillset is varied, ranging from Windows network administration to advanced database management, his primary focus is web application development. He is the creator of the FUSE application framework, which provides development tools and a structured methodology for use in rapid application development. Mr. Keller has worked on a wide range of projects in a variety of industries, and most often assumes the role of senior software engineer or project manager.
![]() |
![]() Current Limiting Fuse Model 218A4293P630B New US $4,637.99
|
![]() Square D 1200Amp Bolt Loc NEMA 1 Switchgear w 1200 Amp Fuses US $4,500.00
|
![]() 25 Lot NEW Buss 7T 7 Telpower Fuse 7T7 Lucent 100202753 US $4,331.25
|
![]() ENTIRE INDUSTRIAL FUSE CABINET LOADED US $3,500.00
|
![]() 3 UNUSED SC SM 5S NON DISCONNECT 15KV FUSE ASSEMBLY US $3,500.00
|
![]() GE Spectra ADS36800LB Fuse Panelboard Switch 800 A 600V US $3,495.00
|
![]() New Littelfuse 4500 Amp 600 Volt KLPC 4500 Time Delay Current Limiting Fuse US $2,000.00
|
![]() SQUARE D FUSES US $2,000.00
|
![]() ABB 9F60BHH905 VIZ 75 Transformer w GE Fuse 120V US $1,999.99
|
![]() ABB 15CLPT VIZ 75 Transformer w Cutler Hammer Fuse 120V 2400 460GY US $1,999.99
|
![]() Bussmann Current Limiting Fuse LAR HO5 US $1,955.00
|
![]() Bussmann Current Limiting Fuse LAR HO4 US $1,955.00
|
![]() Modicon AS P840 000 Power Supply ASP840000 no fuse 15A0287 000 US $1,940.00
|
![]() NIB EDISON LCL6000 FUSE KRPC6000 KLU6000 A4BY6000 US $1,912.30
|
![]() Ferrari 250 GTE fuse panel fuse box Ceam US $1,900.00
|
![]() NIB COOPER BUSSMANN JCY 125E FUSE JCY125E 125E AMP US $1,875.00
|
![]() Reliance Rectifier Fuse RFL 2700 US $1,870.00
|
![]() TRIBAND 800 1900 700 LTE WILSON CELL PHONE SIGNAL BOOSTER 801700 W FUSE US $1,859.99
|
![]() Westinghouse 608B072G01E Pack of 10 Fuse 50 Amp NEW US $1,684.55
|
![]() GE 9F60MCB518 18R FUSE 254KV 1800A Double Barrel US $1,599.99
|
![]() Ferraz Shawmut A70P600 4 650 700V 600A Fuse US $1,590.00
|
![]() Cutler Hammer High Voltage Fuse 5CLE 1100E US $1,567.50
|
![]() Bussmann Current Limiting Fuse LAA L2 US $1,530.00
|
![]() GE THFP366 600amp 600v panel switch with fuses hardware warranty disconnect US $1,500.00
|
![]() STANLEY VIDMAR 11 DRAWER 59 X 27 1 2 X 30 CABINET w LARGE QUANITY OF FUSES US $1,500.00
|
![]() 2 SMD 2B Fuse Unit 125E PN 466125R4 US $3,000.00
|
![]() FIVE LITTELFUSE KLLU 2000 FUSES US $1,500.00
|
![]() GE TH4326 Disconnect 600A 240v w fuses used US $1,500.00
|
![]() ITE K 3000 FUSE ELEMENT MODEL 02 SERIAL 82282A 01791 US $1,500.00
|
![]() 1000 REGULATED 9VDC 1 AMP WITH FUSE AND LED INDICATOR US $1,500.00
|
![]() 100x 3A 5A 13 Amp 250V Mains Power Shaver Plug Fuse Kit US $1,430.60
|
![]() Westinghouse 5980C01G03 4000 Amp DSL Truck Fuse E4000 US $1,450.00
|
| Powered by phpBay Pro |


US $6,500.00




















































































