الأسبوع 3 · الوحدة ١ «أساسيات تصميم موقع الويب» (٣) «تخطيط مشروع موقع قاموس مصطلحات الكمبيوتر المصور»: الهدف والأهمية، قائمة المهام، الصفحة الرئيسية، خيارات الاستضافة، المجلدات والمراحل الثلاث · 3 دروس
3
Folders, hosting choices and the three stages
ICT Secondary 2 Term 1, Unit 1, Topic 2: pp. 20–28
GoalChoose a place for the files, organise them in folders and name them well, and describe the three stages of production.
New words
project folder · the one folder that holds every file of the sitesub-folder · a folder inside the project folder for one kind of filethe three stages · database first, then static pages, then dynamic pageshosting choice · where the site files live: a paid host, a free host or localhost
Explanation
Where will the files of the site live? There are three choices: a paid host, a free host, or localhost on your own computer. This project chooses localhost, because it is free and good for testing. Whatever you choose, keep all the files in one project folder, here a folder named dictionary inside the server’s public folder. Inside it, make a sub-folder for each kind of file: pictures of terms, banner images, videos. Give files short English names with no spaces and no Arabic letters, such as add_term.php. The work then goes in three stages. Stage one: create the database that will keep the terms. Stage two: build the static pages in HTML, by typing the code or with a visual editor. Stage three: turn the static pages into dynamic ones by adding PHP, so they can read and change the database.
Worked examples
File
Kind
Sub-folder
router.webp
picture of a term
pic
banner.webp
banner image
images
intro.mp4
video
video
Mona’s folder has the files router.webp (a picture of a term), banner.webp (the banner) and intro.mp4 (a short video). She places each one in the sub-folder that matches its kind.
File name
Good?
Reason
My Page 1.php
no
spaces, capital letters
صفحة.php
no
Arabic letters
add_term.php
yes
short, English, no spaces
Youssef checks three file names. “My Page 1.php” has spaces and capital letters, “صفحة.php” has Arabic letters, and “add_term.php” is short, English and has no spaces. Only the last is a good name. Note that some servers care about capital letters, so lowercase is safest.
Class activity
Draw the folder tree for your own dictionary subject on paper. Name the project folder and three sub-folders, and write five file names (two pages, one picture, one banner, one video) that follow the naming rules.
Practice
1
List the three hosting choices.
A paid host, a free host and localhost.
2
Put the three stages in order.
Create the database; build static pages in HTML; turn them into dynamic pages with PHP.
3
Is “Term Page.php” a good file name? Explain.
No: it has a space and capital letters. Better: term_page.php.
4
Why keep all the site’s files in one project folder?
So the pages can find each other and the whole site can be moved or published together.