User Tools

Site Tools


Sidebar

Chapter 1: Internet, Networks and TCP/IP

Chapter 2: The LINUX operating system - Setting up a Linux Web Server

Chapter 3: Your first webpage, Learning HTML and CSS

Chapter 4: Building Dynamic Websites with PHP in progress

Chapter 5: Web forms under construction

Chapter 6: Developing your first Bioinformatics web application under construction

Chapter 7: The PHP programming language: strings, arrays, functions, cycles, conditional statements, regular expressions under construction

Chapter 8: Sample Bioinformatics Web Applications under construction

chapter_4_-_building_dynamic_websites_with_php:start

Chapter 4: Building Dynamic Websites with PHP

Introduction

We could define a web site as a number of web pages located on the same domain or host that link one another in some kind of hierarchical scheme.

In the simplest scenario all the pages are “on the same level” and each page links to all the others through a navigation menu. In more complex scenarios, groups of pages are organized in sections or categories. Sections could have subsections. Multiple navigation menus might be present, for example a top horizontal menu present across all the pages of the site could list the main sections, while within each section, a lateral menu could link each page to the other pages of the same section.

Usually though, there is more to a web site than just a bunch of interlinked pages. These pages usually “look the same”, at least broadly.

On browsing the results of a Google search, a quick look at the page is enough to tell you are on the Google web site. The Google “style” is immediately recognizable. Google is an heavily articulated site. Not all the sections of the google site have the exact same layout. Quite on the contrary, each Google service, such as the search site or the G-mail service, has a distinct layout or maybe several layouts to serve the functionality of the various pages within a service. Still, an easy to spot Google style is present across all google sites and services.

Pages in web sites usually have some common elements, across the site, such as for instance the navigation menu, the logo, the page style (CSS).

Sharing a CSS between several pages is a very good idea, and is one of the key points in generating pages with an homogeneous “look and feel”. Doing it is easy: just link the same stylesheet to all the pages, in the head section, that's all it takes.

Let's now imagine a basic scenario in which all the pages in a site have the following elements:

  • header
  • navigation sidebar
  • main contents box
  • footer

In a simple website, without sections and subsections (and therefore with the very same navigation menu on all pages), the only part of the pages that change from one page to the next is the main contents box. Header, navigation sidebar and footer will be the same on all the pages.

In a more complex site, the navigation elements in the sidebar could change and accomodate different contents according to the section or subsection the page is located in.

Work in progress

Discussion

Enter your comment. Wiki syntax is allowed:
FSLKU
 
chapter_4_-_building_dynamic_websites_with_php/start.txt · Last modified: 2013/03/17 10:03 by cellbiol