Hi guys,
Im building a site from scratch and Im doing it with only me and my friend so far. When i started I was told to learn HTML and CSS first, which i did and then moved onto PHP, some javascript, and then messed around with joomla to understand how CMS worked.
I have a pretty good idea of how coding works as i did COBOL and PASCAL in college, and some C++ on my own.
The thing is that when I looked in some of the Joomla php files I can see that it is coded completly different to what ive seen on tutorials on the web. Id like to know if there is a definete best way to code, and where i could find out the best way to build a site from scratch without creating the site then having to scrap all the code ive worked on in the future to replace it with better coding conventions. As it would save alot of time, I like jumping in the deep end. :-)
Cheers. Jim.
PS. If you look inside the joomla index.php file youll know what i mean...
PHP Code:
<?php
// Set flag that this is a parent file.
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);
if (file_exists(dirname(__FILE__) . '/defines.php')) {
include_once dirname(__FILE__) . '/defines.php';
}
if (!defined('_JDEFINES')) {
define('JPATH_BASE', dirname(__FILE__));
require_once JPATH_BASE.'/includes/defines.php';
}
require_once JPATH_BASE.'/includes/framework.php';
// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;
// Instantiate the application.
$app = JFactory::getApplication('site');
// Initialise the application.
$app->initialise();
// Mark afterIntialise in the profiler.
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
// Route the application.
$app->route();
// Mark afterRoute in the profiler.
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
// Dispatch the application.
$app->dispatch();
// Mark afterDispatch in the profiler.
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
// Render the application.
$app->render();
// Mark afterRender in the profiler.
JDEBUG ? $_PROFILER->mark('afterRender') : null;
// Return the response.
echo $app;