How to convert a simple PHP application to Joomla! 1.5 MVC - Part 1
Written by Sam Moffatt   
Tuesday, 14 April 2009 09:09
Article Index
How to convert a simple PHP application to Joomla! 1.5 MVC - Part 1
The Source
The first pass: Database
The second pass: Using the Joomla! session and user
The third pass: Cleaning up the XSS
The fourth pass: Cleaning up and writing the installer.
All Pages

One of the common things I see on the Joomla! Forums is asking how to convert existing PHP into a Joomla! context. This can be a reasonably complicated endeavour to under take but there is really no resources to educate even at the basic level. In this tutorial we'll cover how to go from a pure PHP application into something that integrates into Joomla! as a first class 1.5 native application.

If you're using a legacy application that doesn't have a database aspect and has its contents hard coded it might be easier to just copy and paste this into Joomla!'s articles and work from there. If you have a database aspect read on about how you can continue that however you might consider converting them to use Joomla!'s content system as well.


Then the other day I started playing a game I hadn't played for ages: Freelancer. Its a Microsoft game from Digital Anvil and it is perhaps one of my favourites of all time. The guys wrote Starlancer previous to it which I never really played much beyond a demo. One of the things I wrote for Freelancer as a bit of a hobby task to help me learn PHP was a web application. It has a few screens in it and I thought that this would be a perfect example. But then I realised that I had something a lot simpler that I could use to demonstrate a few other things before moving onto a slightly more complicated example.

So my simple example is something I use every day: its a quick and nasty portal application I wrote years ago. It is so horrible and ugly now that I look at it now and I think how insecure, poorly built and horribly designed it is - I'm happy its hidden on my desktop out of sight but it is going to serve as such as good example. But for all of the parts that make it ugly provide learning examples and I must admit I've wondered about a good example I could work through to improve as I work towards making it Joomla! compatible.



Last Updated on Monday, 29 March 2010 04:39