Information Technology Reference
In-Depth Information
For this sitemap, I used a graphic design tool to create the mockup for this topic;
butwhenever I am working on a project for personal use, or when I am sitting down with
a client that wants to see something quickly, I will sketch the sitemap and wireframes
out on a napkin or piece of notebook paper.
Use whatever you have available to create your sitemap. No matter how it is created, the
important thing is that yousit down and thinkthrough how your pages are organized to
make building and developing easier on your end.
The last thing any developer wants to do is get 80% through working on a project, only
to have to go back and do something over again because a mistake was made due to a
lack of proper planning!
Now that we know how the app looks and how the content is organized, we can begin
coding. Let's spend the last few pages of this chapter discussing how best to structure
our development environment for maximum productivity.
Structuring Your Development
With the high - level information set, you'll also want to consider good practical rules for
development that can keep you organized and efficient while writing your app.
Following, we'll discuss some ideas for structuring your code and the directories in
which it will be kept.
Code Structure
Now that you have your wireframes completed and you have a rough idea of where you
want all the elements on your page to go, it's time to start figuring out how you are going
to structure your code so you are not doing more work than is needed when building
your applications.
You're probably scratching your head right now thinking,“How difficult can it be? I'm just
writing text to a page.”You would be right. However, let's say you have ten different
pages in your application. You push out an update to your web application and realize
that you have a problem with something in your footer.
If not properly prepared, our hapless developer may have copy and pasted the same
footer throughout ten different HTML pages that make up the application. Now that it is
time to update that code, our fictional developer has to update ten different HTML files
with the new footer information.
An easier way to properly structure this code would have been to take the footer
information, which is the same throughout the entire site, and create a separate file for it.
Then in your code you can include that file into your page templates and display it on
every page as before. If you ever have to change that code in the future, with this
method all you have to do is change the code in one file, making your life a lot easier.
Let's take a look at the sample following. In Listing 4-1 we have a very sparse page that
is using PHP to pull in that extra page code that we would like to have on each page.
 
Search WWH ::




Custom Search