Derleek Posted September 21, 2009 Share Posted September 21, 2009 Hi there PHPfreaks... So I am (finally) getting around setting up some general framework stuff in order to avoid monotonous tasks. I am getting hung up on how to separate my code. My long-term goal is to tailor my own extremely light-weight and flexible CMS (essentially). Yes, I am aware there are plenty of pre-made options out there - but I prefer to code something myself in order to better understand... well... everything that web-based programming is about. anyways... First - I seem to have problems structuring projects of mine, does anyone have any good articles or anything archived that I can read up on involving planning projects? Specifically something that has some good flowchart examples Second - how much does including a simple file effect load time? I would like to be able to just include() essential general header info. So i set up a directory in my root dir - '/include/content/head/' and in it the file 'load.html' which would look something like... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="SHORTCUT ICON" href="favicon.ico" /> <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" /> <script type='text/javascript' src='utilities/js/mootools-core.js'></script> So I have the basics down... just have to insert one line of code to cover 4 lines - woot Now what of page-specific header files? (this is where my question comes in) Would it be acceptable to create page-specific includes for stuff like this? Lets say I have some scripts to create some ajax tabs. My initial thought is to create a more specific header include called 'tabs.html' in the directory '/include/content/head/' which would look like... <script type='text/javascript' src='utilities/js/domready.js'></script> <script type='text/javascript' src='utilities/js/Jtabs.js'></script> Now I am guessing that a little 2-line header include won't really make too big of a difference in a users load time - and to say the least a bit superfluous. Either way I am thinking on a much larger scale here. Does this have ANY adverse effects? i'm talkin anything from load-time to really just organization or structural integrity or whatever.... If my question is a bit vague I'm sorry... kind of a general structural question for application desgin... I'm still kinda new to this so feel free to point out anything I may be missing or misunderstanding about web development (which i'm sure I am...) -thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.