PHP/mySQL Scripts inside Joomla
With Joomla, there are many custom Joomla specific extensions that work fine upon installation and / or modification. In some cases, there are extensions which are bridges. The bridges allow a user to integrate a separate PHP/mySQL script(from another installation) to be used inside Joomla as a component. The bridge is a quick fix, but some need database updates, etc. An example of a bridge would be to use a current phpBB forum installation with Joomla and synchronize the members.
In other cases, php scripts can run inside Joomla by placing them individually or within folders inside the parent Joomla installation directory. If a folder is used, the index.php will show up if the url is mywebsite.com/myfolder. If the databases do not need synchronization, this is the simple approach to adding scripts inside a Joomla installation. The next issue will be css styling. An example of this would be to use a WordPress blog inside a Joomla installation. If the blog was only used by the system administrator, it could use its own database or its database tables dumped into Joomla`s. It would not be a real issue, but the two installation would use different templates. The administrator would need to make them, match. Unlike WordPress, a php framework like Codeigniter could easily modified top use the existing template from Joomla(or any cms for that matter).
Other alternatives are to use a PHP framework inside Joomla, although practically any php/mysql script could be dumped inside the root folder and accessed with an external link from the main menu.
The procedure to use the PHP framework would be similar to using another php script. Frameworks offer so many advantages; such as simple integration, although some scripts in pure php/mysql would integrate faster and easier than converting them to Codeigniter.
A php framework can be used with or without a database. The php framework could simply run off the existing database, thus allowing for unlimited possibilities.
Other PHP / mySQL Scripts into Joomla
With Joomla, you can practically recode any php / mySQL script to be used as a Joomla extension. To do this, you must know how to create and package a Joomla extension as a module, component or plugin using Joomla classes. A rebellious way to say this is `To make a Joomla extension, you must do things with our code!`. Joomla has a system and it is fine to follow its rules for those previous specified extensions.
But, what if I want another alternative to add a php/mySQL script without so much rigidity? For example, I may want to use it for WordPress or Expression Engine and I don`t want to recode for the CMS each time? Then, moving the php/mySQL script into a php framework like Codeigniter or using a stand-alone php/mysql application is a valid solution; unless you want to make extensions available to others or for profit. By using this method, the application could be applied simply to other content management systems. Another positive aspect is speed and raw language coding. Converting a php/mySQL script to Codeigniter application can be done very quickly. The php/mySQL files will use MVC, but the database connectivity can be used within the view files. Basically, one or more controllers could be used to call the view files which will be slightly modified versions of the original php / mysql files.