Skip to content · ⁨Перейти к содержанию⁩
Subjects · ⁨Предметы⁩

GAC Computing · ⁨GAC Інформатика⁩

Tips · ⁨Советы⁩

GAC Computing is a three-step ladder. GAC005 is about using computers for academic work, which means search literacy, collaborative writing, project management, presentations and video. GAC011 builds and publishes a real website with HTML, CSS and JavaScript. GAC017 goes behind it, into back-end programming, databases, SQL and a first look at data science.

Nothing here is answered on paper. Each module is judged on artefacts you produce, a set of slides, a website, a database with several tables, an analysis of a real dataset, so the work is done at a computer and submitted as files.

The three modules are cumulative in a literal sense. The site you design in GAC011 is the thing GAC017 gives a back end and a database, so a weak storyboard early costs time much later.

Presentation counts as much as code. Both design outcomes and communication outcomes are named in the modules, and marks are lost for a working page that nobody can navigate.

You can run the HTML, CSS, JavaScript and SQL exercises directly in this site's code playground, then take the same techniques into your own assessed project.

Train all vocabulary · ⁨Тренировать всю лексику⁩
  • 1

    GAC005 Computing I: Introduction to Computing for Academic Study · ⁨GAC005 Компьютерные науки I: Введение в информатику для академического обучения⁩

    1.1

    What this module is, and how it is marked

    GAC005 is not a programming course. It is about using a computer to do academic work well: finding sources you can trust, writing with other people, running a small project, and presenting the result.

    Everything is assessed on what you produce. A typical set is a search and writing task, a group project 小组项目 with a presentation, a video 视频, and ongoing coursework 平时作业. There is no written examination, so the files you submit are the whole mark.

    • Work is judged on the artefact and on the process. Keep drafts and notes; a group project is marked partly on your contribution to it.
    • ⚠ Academic integrity 学术诚信 applies to media as much as to text. An image, a chart or a clip taken from the web needs a source, and a licence that allows the use.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    group project/ɡruːp ˈprɒdʒekt/ Групповой проект
    video/ˈvɪdɪəʊ/ Видео
    coursework/ˈkɔːsjuːɜːk/ Практическая работа
    Academic integrity/ˌækəˈdemɪk ɪnˈteɡrɪti/ Академическая честность
    1.1

    Search literacy

    Syllabus · ⁨Программа⁩
    English

    Unit 1 of 6 in GAC005 Computing I: Introduction to Computing for Academic Study (Level I). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    Module purpose: On completion of this module, students should be able to confidently and ethically use information technologies for individual and collaborative formal writing; and use the Internet effectively for academic study. More specifically, students will be able to access, navigate and download information from the Internet in order to enhance academic research, writing and presentation skills.

    The module outcomes this unit works towards:

    Learning Objective GAC005.1: Understand, evaluate and discriminate between available and emerging technologies to use, store and protect information.

    Learning Objective GAC005.2: Use the Internet to research, interpret and interactively and ethically manage academic projects.

    Русский

    Раздел 1 из 6 в курсе GAC005 Компьютеризация I: Введение в информатику для академической учебы (Уровень I). Модуль изучается в течение примерно 40 академических часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра под контролем ACT — внешнего экзамена нет.

    Цель модуля: По завершении данного модуля студенты должны уметь уверенно и этично использовать информационные технологии для индивидуального и совместного написания официальных текстов; а также эффективно использовать Интернет для академической учебы. Более конкретно, студенты будут уметь получать, просматривать и скачивать информацию из Интернета для улучшения навыков академического исследования, написания работ и презентаций.

    Результаты обучения, к которым работает этот раздел:

    Обучающая цель GAC005.1: Понимать, оценивать и различать доступные и перспективные технологии для использования, хранения и защиты информации.

    Обучающая цель GAC005.2: Использовать Интернет для поиска, интерпретации и этического управления академическими проектами в интерактивном режиме.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    Anyone can find a page. The skill being assessed is finding a source you can defend.

    • Search with keywords 关键词, not sentences. Pick the nouns that must appear in a good answer and drop everything else.
    • Operators 运算符 narrow a search: quotation marks force an exact phrase, a minus sign excludes a word, and site: restricts results to one domain.
    • Judge a source before you use it. Authority 权威性 asks who wrote it and what they know; currency 时效性 asks how old it is; bias 偏见 asks what the author wants you to think.
    • A primary source 一手资料 is original material, such as the report of an experiment. A secondary source 二手资料 describes or interprets it, such as a news article about that report.
    • Search results are ranked, not verified — position on the page says nothing about accuracy.

    Worked example. The question is whether electric cars produce less carbon dioxide overall than petrol cars. A search for the sentence returns opinion pages. A search for the keywords lifecycle emissions electric vehicle comparison returns studies, and adding site:gov narrows it to government reports whose authors and methods are stated. The second search is not cleverer, it is more specific about what a usable answer looks like.

    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    keywords/ˈkiːwɜːdz/ ключевые слова
    Operators/ˈɒpəreɪtəz/ Операторы
    Authority/əˈθɒrɪti/ Авторитет
    currency/ˈkʌrənsi/ валюте
    bias/ˈbaɪəs/ предвзятость
    primary source/ˈpraɪməri sɔːs/ первичный источник
    secondary source/ˈsekəndəri sɔːs/ вторичный источник
    1.2

    Collaborative writing

    Syllabus · ⁨Программа⁩
    English

    Unit 2 of 6 in GAC005 Computing I: Introduction to Computing for Academic Study (Level I). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC005.3: Create, revise and publish academic documents using a word processing program.

    Learning Objective GAC005.5: Use open source platforms to collaboratively create and share academic documents.

    Русский

    Раздел 2 из 6 в курсе GAC005 Компьютеризация I: Введение в информатику для академической учебы (Уровень I). Модуль изучается в течение примерно 40 академических часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра под контролем ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Обучающая цель GAC005.3: Создавать, редактировать и публиковать академические документы с использованием текстового процессора.

    Обучающая цель GAC005.5: Использовать открытые платформы для совместного создания и обмена академическими документами.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    Writing together is a normal way to work, and the module assesses how you do it.

    • A cloud document 云端文档 holds one live copy that everyone edits, which removes the "final_v3_really_final" problem entirely.
    • Version history 版本历史 records who changed what and when. It protects you: your contribution is visible even when a file looks like one voice.
    • Comments 批注 propose a change without making it; suggestions 建议模式 make a change the owner can accept or reject. Use them instead of overwriting someone's paragraph.
    • Agree the structure 结构 before anyone writes. Splitting a document by section works; splitting it by sentence does not.
    • Keep one style 文体: decide on person, tense and spelling at the start, and give one person the final read.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    cloud document/klaʊd ˈdɒkjuːmənt/ облачный документ
    Version history/ˈvɜːʃn ˈhɪstəri/ История версий
    Comments/ˈkɒments/ Комментарии
    suggestions/səˈdʒestʃnz/ предложения
    structure/ˈstrʌktʃə/ Структура
    style/staɪl/ пестиком
    1.3

    Project management

    Syllabus · ⁨Программа⁩
    English

    Unit 3 of 6 in GAC005 Computing I: Introduction to Computing for Academic Study (Level I). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC005.2: Use the Internet to research, interpret and interactively and ethically manage academic projects.

    Learning Objective GAC005.5: Use open source platforms to collaboratively create and share academic documents.

    Русский

    Раздел 3 из 6 в курсе GAC005 Компьютеризация I: Введение в информатику для академической учебы (Уровень I). Модуль изучается в течение примерно 40 академических часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра под контролем ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Обучающая цель GAC005.2: Использовать Интернет для поиска, интерпретации и этического управления академическими проектами в интерактивном режиме.

    Обучающая цель GAC005.5: Использовать открытые платформы для совместного создания и обмена академическими документами.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    A group project fails on organisation far more often than on ability.

    • A scope 范围 statement says what the project will and will not do. Most overrun starts as an unwritten extra.
    • Milestones 里程碑 are checkpoints with dates. They convert "we have three weeks" into something you can be behind on early enough to fix.
    • Assign roles 分工 to people, not tasks to the group. A task owned by everyone is owned by nobody.
    • A team contract 团队协议 records how the group will meet, decide, and handle a member who does not deliver. Writing it while everyone is friendly is the point.
    • Track dependencies 依赖关系: the slide deck cannot be finished before the data is collected, so the data has the earlier deadline.

    Worked example. A four-person project to survey and present student transport habits, due in week 6. Working backwards: rehearse in week 6, build slides in week 5, analyse in week 4, collect responses in weeks 2 to 3, write the questions in week 1. The questions are the riskiest item because everything downstream depends on them, so they get reviewed by the whole group and nothing else in week 1 does.

    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    scope/skəʊp/ область применения
    Milestones/ˈmaɪlstəʊnz/ Вехи
    roles/rəʊlz/ роли
    team contract/tiːm ˈkɒntrækt/ Командный договор
    dependencies/dɪˈpendənsiz/ зависимости
    1.4

    Creating effective presentations

    Syllabus · ⁨Программа⁩
    English

    Unit 4 of 6 in GAC005 Computing I: Introduction to Computing for Academic Study (Level I). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC005.4: Create an academic oral presentation using a presentation software program.

    Русский

    Раздел 4 из 6 в курсе GAC005 Компьютеризация I: Введение в информатику для академической учебы (Уровень I). Модуль изучается в течение примерно 40 академических часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра под контролем ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC005.4: Создать академическую устную презентацию с использованием программы для создания презентаций.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    A presentation is judged on whether the audience understands, not on how much is on screen.

    • One message 信息 per slide. If a slide needs two sentences to summarise, it is two slides.
    • Slides support the speaker. Bullet points 要点 are prompts, not a script, and reading them aloud is the most common way to lose marks.
    • Contrast 对比度 and size decide whether the back row can read it: dark text on light, at least 24 point, and a sans-serif 无衬线 typeface.
    • Use a chart 图表 when the shape of the data is the point, and a table 表格 when exact values are. A chart needs axis labels and units, always.
    • Cite sources on the slide where the material appears, and keep a full reference list 参考文献列表 at the end.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    message/ˈmesɪdʒ/ Сообщение
    Bullet points/ˈbʊlɪt pɔɪnts/ Маркированные списки
    Contrast/ˈkɒntræst/ Контраст
    sans-serif/sænz ˈserɪf/ шрифт без засечек
    chart/tʃɑːt/ схемой
    table/ˈteɪbl/ таблица
    reference list/ˈrefrəns lɪst/ список литературы
    1.5

    Enhancing your presentation

    Syllabus · ⁨Программа⁩
    English

    Unit 5 of 6 in GAC005 Computing I: Introduction to Computing for Academic Study (Level I). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC005.4: Create an academic oral presentation using a presentation software program.

    Русский

    Раздел 5 из 6 в GAC005 Компьютерные науки I: Введение в компьютерные науки для академической учебы (Уровень I). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC005.4: Создать академическую устную презентацию с использованием программы для создания презентаций.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    Once the content is right, delivery is what remains.

    • Rehearse aloud 出声, standing, with a timer. Reading silently hides every sentence you cannot actually say.
    • Signposting 提示语 tells the audience where they are: "first", "the reason for this", "to sum up". In a second language it does more work than any slide animation.
    • Eye contact 眼神交流 and pace matter more than vocabulary. Slower is almost always better.
    • Prepare for questions 提问 by listing the three you would least like to be asked, and answering them.
    • Animation 动画 has one legitimate use: revealing a complex diagram one part at a time. Everything else distracts.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    aloud/əˈlaʊd/ Вслух
    Signposting/ˈsaɪnpəʊstɪŋ/ Разметка (Signposting)
    Eye contact/aɪ ˈkɒntækt/ Зрительный контакт
    questions/ˈkwestʃnz/ вопросов
    Animation/ˌænɪˈmeɪʃn/ Анимация
    1.6

    The making of a video

    Syllabus · ⁨Программа⁩
    English

    Unit 6 of 6 in GAC005 Computing I: Introduction to Computing for Academic Study (Level I). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC005.1: Understand, evaluate and discriminate between available and emerging technologies to use, store and protect information.

    Learning Objective GAC005.4: Create an academic oral presentation using a presentation software program.

    Русский

    Раздел 6 из 6 в GAC005 Компьютерные науки I: Введение в компьютерные науки для академической учебы (Уровень I). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Обучающая цель GAC005.1: Понимать, оценивать и различать доступные и перспективные технологии для использования, хранения и защиты информации.

    Учебная цель GAC005.4: Создать академическую устную презентацию с использованием программы для создания презентаций.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    A short video is assessed like any other academic product: planned, sourced and edited.

    • A storyboard 分镜脚本 plans each shot before recording: what is on screen, what is said, how long it lasts. It is the difference between an hour of editing and five.
    • A script 脚本 keeps a two-minute video to two minutes. Speaking unscripted takes three times as long and says less.
    • Audio quality 音质 matters more than picture quality. A quiet room beats an expensive camera, every time.
    • Use licensed 授权 material only: images and music released under a licence that permits reuse, credited on screen or in the description.
    • Export 导出 to a common format at a sensible size, and check that it plays on a machine that is not yours before you submit it.

    Worked example. A two-minute explainer on plastic recycling. The storyboard has eight shots of about fifteen seconds. Shot 3 is a chart of what a city actually recycles, on screen for twelve seconds with one spoken sentence, credited to the source in the corner. Because the storyboard fixed the length first, the script was written to fit the time, rather than the video being cut to fit a script that was already too long.

    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    storyboard/ˈstɔːribɔːd/ раскадровка
    script/skrɪpt/ сценарий
    Audio quality/ˈɔːdɪəʊ ˈkwɒlɪti/ Качество звука
    licensed/ˈlaɪsənst/ Лицензированный
    Export/ˈekspɔːt/ Экспорт
    Additional notes PDF

    Choose tools for the actual academic task

    Your group researches school transport. One member uses a phone. Another works offline. A third needs large text. The newest app may not suit them.

    These additional notes teach practical GAC005 skills. Keep the original handout beside them. Follow your centre's current task, required software and submission rules.

    A word processor 文字处理软件 helps you create and revise a formatted document. A shared editor can support joint writing. Presentation software organises visual support for a talk. Video software combines recorded sound and images. Choose tools by the task, rather than using one tool for everything.

    Compare access, formats, cost, privacy, offline use and helpful reading features. Test headings, tables and comments on the actual devices, including after conversion.

    For a new or emerging technology 新兴技术, first test a small, non-sensitive task. Check who runs it, what information it stores and what you can export. Keep a usable copy outside the tool. A fluent-looking automatic answer still needs source checking. Follow the centre's rules on permitted assistance and acknowledgement.

    Store, protect and recover your information

    Put related files in a clearly named project folder. Separate sources, working drafts and submission copies. Names such as transport_report_2026-10-02.odt are clearer than new_final_final.doc. Use the same naming system throughout the group.

    Access permission 访问权限 controls who can read or change information. Give editing access only to people who need it. A public link can reach people outside the group. Check the sharing list before sending a file. Store participant details separately from a report, under the centre's rules. Do not collect identifying information just because a form allows it.

    Use a strong, unique password and multi-factor authentication 多因素认证 where available. This uses more than one kind of evidence to confirm your identity. A password and a code from another device are one example. Do not share sign-in details to share a document. Verify an unexpected message before opening its sign-in link. Update supported software and lock a device when you leave it.

    Synchronisation 同步 keeps copies aligned. A backup 备份 gives a separate recovery copy. They are different: synchronisation may copy an accidental deletion too. Keep a separate, permitted backup and test that you can restore a harmless sample file. Version history may help recover changes, but its retention and detail depend on the service.

    Worked case. Mei deletes a paragraph, and the change reaches everyone's device. Repeatedly downloading the current document keeps the deletion. The group checks version history, restores the correct paragraph and verifies the result. If that history is unavailable, a separate earlier backup may help. Neither method excuses checking the final file.

    Create and revise an academic document

    Start with the centre's report structure. For this practice task, use a title, research question, method, findings, discussion and references. Create a short outline before adding paragraphs. Keep a source record while researching: author, title, date, location and the claim it supports.

    A paragraph style 段落样式 applies a named set of formatting choices. Use Heading 1 for main sections and Heading 2 for subsections. Use the normal text style for paragraphs. Large bold text alone may look like a heading without being recognised as one. Do not skip heading levels just to get a smaller font.

    For example, LibreOffice Writer offers paragraph styles. Place the cursor in a heading paragraph and apply its named heading style. Change the style when you want every heading of that level to change. Page styles control page layout, including margins, headers and footers. Menu names may differ by version or language; use the installed program's Help.

    Add a small table through the table tool. Give each column a clear heading and include units where needed. Enter data in cells, rather than aligning it with repeated spaces. Put a figure close to the text that explains it. Add a meaningful caption and its source where required. A table does not need a chart unless the chart helps explain the data.

    Use page breaks when a new section must start on a new page. Do not press Enter repeatedly to push text down. Add page numbers using the program's page-number field. If the brief needs a contents list, create it from heading styles and update it after editing.

    Revise meaning before appearance. Check whether each claim has evidence, whether the methods answer the question and whether limits are clear. Then check spelling, names, units and references. An automatic spelling suggestion can change a technical term incorrectly. Read the corrected sentence yourself.

    Collaborate on an open-source platform

    Open source 开源 means the software's source code is available under a licence allowing specified use, study and changes. It does not mean every hosted service is free, private or open to everyone. An online tool is not automatically open source.

    LibreOffice Writer is an open-source desktop word processor. It is useful for individual document work. For joint browser editing, a centre can provide a suitably configured Nextcloud service with an office editor. Nextcloud's documentation describes collaborative office editing and the required document-server integration. Use the editor actually enabled by your centre; do not assume any Nextcloud installation includes it.

    Practise with non-sensitive sample text. Each group member signs in with their own account. The owner creates one shared working document and gives the group suitable permissions. Agree an outline, roles and dates. Add a comment explaining a proposed change. Another member responds. Use a review or suggestion feature if the installed editor supports it; otherwise record proposals in comments.

    Review the content together before accepting changes. Check the current document, comments and available history. Keep a short decision record: what changed, why, who checked it and what remains unfinished. History helps show activity, but the group must still explain each member's actual work.

    If offline edits create two copies, do not silently choose the newest file. Compare the changed sections and merge the intended work. Confirm that no member's paragraph or source record disappeared. Then agree which shared copy is current.

    Export, check and share a submission copy

    Keep an editable file 可编辑文件 for future corrections. A PDF 便携式文档格式 is often useful for sharing a stable page layout. Exporting a PDF does not replace the editable source. Use the formats required by the centre.

    Check headings, font size, contrast, table headings and useful image descriptions. Run an accessibility check where available, then read the document yourself.

    Export a sample PDF and open that exported file. Check every page: missing text, broken characters, empty pages, clipped tables and correct page numbers. Search for an expected sentence to test that text is present. Ask a group member to open the submission copy on their device. A file that works only on your computer is not ready.

    Share the correct submission copy with the intended audience. Check access using the actual recipient's permitted account or the centre's approved procedure. Keep private drafts separate. Record the submitted filename and date. Correcting the source later does not change a PDF already sent.

    Practise a complete academic workflow

    Original practice brief. Prepare a short group report and a three-minute talk on school transport. Use approved existing information, or gather new responses only with the required permission. This practice brief is not an official assessment.

    1. Define the question and group you can study. Record sources and their limits.
    2. Test tools, headings, tables and shared comments. Set suitable permissions.
    3. Agree roles and dates. Draft a report with headings, evidence and references.
    4. Revise together and record decisions. Keep the editable file and test recovery.
    5. Build slides with clear messages. Explain evidence and limits aloud.
    6. Rehearse with a timer. If video is required, check shots, sound and media permissions.
    7. Inspect exports on another device. Submit the required files and preserve the group record.

    Finishing the notes is preparation, not evidence that you have completed these practical tasks. Keep the actual files and revision evidence required by your centre.

    Practice and explained answers

    Questions. 1. A phone-only member cannot edit the format. What should you test? 2. Why is synchronisation insufficient recovery protection? 3. Why use heading styles? 4. Does online editing prove open-source software? 5. Two offline drafts contain different new paragraphs. What should happen? 6. Does fixing the source change a PDF already sent? 7. What evidence shows a completed workflow?

    Explained answers. 1. Test editing, conversion and sharing on the actual device. 2. Deletions may spread; use a separate permitted backup and test recovery. 3. Named styles give recognised structure and consistent revision; they can support navigation and a contents list. 4. No; check the licence and source availability. 5. Compare and merge intended changes, then agree the current copy. The latest timestamp alone is insufficient. 6. No; export and check a corrected PDF, then follow the correction procedure. 7. Show the source record, editable report, revisions, access check, tested recovery copy, final exports and rehearsed presentation.

  • 2

    GAC011 Computing II: Web Development · ⁨GAC011 Компьютерные науки II: Веб-разработка⁩

    2.1

    What this module is, and how it is marked · ⁨Что представляет собой этот модуль и как он оценивается⁩

    English

    GAC011 is where you build and publish a real website. Six units take you from a design on paper through HTML, CSS and JavaScript to a launched site and a plan for promoting it.

    Everything is assessed on what you produce: a storyboard 分镜脚本 and design, the site itself, and a social media strategy 社交媒体策略, plus coursework. There is no written exam.

    • Design counts as much as code. The module's outcomes name aesthetics, layout, navigation and usability alongside the scripting.
    • ⚠ The site you design here is the thing GAC017 gives a back end and a database. A weak plan now costs time in the next module.

    You can run every example in this module in the site's own code playground, and the HTML, CSS and JavaScript references there go deeper than these notes do.

    Русский

    GAC011 — это этап, на котором вы создаёте и публикуете настоящий сайт. Шесть модулей проведут вас от эскиза на бумаге через HTML, CSS и JavaScript до запущенного ресурса и плана его продвижения.

    Всё оценивается по результату работы: сториборд и дизайн, сам сайт и стратегия социальных сетей, а также курсовые задания. Письменного экзамена нет.

    • Дизайн так же важен, как и код. Цели модуля включают эстетику, верстку, навигацию и удобство использования наряду с программированием.
    • ⚠ Сайт, который вы проектируете здесь, станет основой для GAC017, где будет добавлен бэкенд и база данных. Слабый план сейчас потребует времени в следующем модуле.

    Вы можете запускать каждый пример из этого модуля в игровой среде кода сайта, а ссылки на HTML, CSS и JavaScript там раскрывают тему глубже, чем эти заметки.

    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    storyboard/ˈstɔːribɔːd/ раскадровка
    social media strategy/ˈsəʊʃl ˈmiːdiːə ˈstrætədʒi/ Стратегия социальных сетей
    wireframe/ˈwaɪəfreɪm/ каркас (wireframe)
    Information architecture/ˌɪnfəˈmeɪʃn ˈɑːkɪtektʃə/ Архитектура информации
    Visual hierarchy/ˈvɪʒuːəl ˈhaɪərɑːki/ Визуальная иерархия
    HTML/ˌeɪtʃ tiː em ˈel/ HTML
    element/ˈelɪmənt/ элемента
    attribute/ˈætrɪbjuːt/ атрибут
    Semantic elements/səˈmæntɪk ˈelɪmənts/ Семантические элементы
    alt text/ɒlt tekst/ Alt-текст
    CSS/ˌsiː es ˈes/ CSS
    selector/sɪˈlektə/ селектор
    declaration/ˌdekləˈreɪʃn/ объявление
    2.1

    Designing a website · ⁨Проектирование веб-сайта⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 1 of 6 in GAC011 Computing II: Web Development (Level II). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    Module purpose: On completion of this module, students should be able to design and create a basic website by applying knowledge of website development languages. They will also start coding to create basic dynamic content in a website. Furthermore, they will create a strategy to promote their website with social media.

    The module outcomes this unit works towards:

    Learning Objective GAC011.1: Design effective websites using aesthetics and formal concepts of layout and organization to communicate effectively using visual components.

    Learning Objective GAC011.3: Incorporate best practices in navigation, usability, and written content to design websites that give users easy access to the information they seek.

    Русский

    Раздел 1 из 6 в GAC011 Компьютерные науки II: Веб-разработка (Уровень II). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Цель модуля: По завершении этого модуля студенты должны уметь проектировать и создавать базовый веб-сайт, применяя знания языков разработки веб-сайтов. Они также начнут писать код для создания простого динамического контента на сайте. Кроме того, они разработают стратегию продвижения своего веб-сайта через социальные сети.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC011.1: Создавать эффективные веб-сайты, используя эстетические и формальные концепции макета и организации для эффективной коммуникации с помощью визуальных компонентов.

    Учебная цель GAC011.3: Внедрять лучшие практики навигации, удобства использования и текстового содержания для создания веб-сайтов, обеспечивающих пользователям легкий доступ к искомой информации.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • Start on paper. A wireframe 线框图 shows structure without colour, which is the only way to argue about structure.
    • Information architecture 信息架构 is what goes where: the pages, and the path a visitor takes between them.
    • Visual hierarchy 视觉层次 tells the eye what matters — through size, weight, spacing and contrast, not through decoration.
    • Design for the audience, and say who they are before you choose anything.
    Русский
    • Блочная модель (box model) объясняет верстку: контент, затем отступы (padding), затем рамка (border), затем маржины (margin). спорят о структуре.
    • Информационная архитектура определяет, что находится где: страницы и путь, который проходит посетитель между ними.
    • Визуальная иерархия указывает глазу на главное — с помощью размера, жирности, отступов и контраст, а не через декоративные элементы.
    • JavaScript выполняется в браузере и изменяет страницу после её загрузки.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    box model/bɒks ˈmɒdl/ Блочная модель (box model)
    Responsive design/rɪˈspɒnsɪv dɪˈzaɪn/ Адаптивный дизайн
    media query/ˈmiːdiːə ˈkwɪərɪ/ медиа-запрос
    2.2

    Creating a website using HTML · ⁨Создание веб-сайта с помощью HTML⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 2 of 6 in GAC011 Computing II: Web Development (Level II). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC011.2: Create and publish a website using scripting languages to add interactive components.

    Русский

    Раздел 2 из 6 в GAC011 Компьютерные науки II: Веб-разработка (Уровень II). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC011.2: Создавать и публиковать веб-сайт, используя скриптовые языки для добавления интерактивных компонентов.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • HTML 超文本标记语言 marks up meaning, not appearance. A heading is <h1> because it is a heading.
    • An element 元素 has an opening tag, content and a closing tag; an attribute 属性 goes in the opening tag.
    • Semantic elements 语义化元素 — <header>, <nav>, <main>, <article>, <footer> — tell a browser, a search engine and a screen reader what a region is.
    • Every image needs alt text 替代文本. It is what a blind visitor hears and what a search engine reads.
    Русский
    • HTML маркирует смысл, а не внешний вид. Заголовок является <h1>, потому что он является заголовком.
    • Элемент содержит открывающий тег, содержимое и закрывающий тег; атрибут размещается в открывающем теге.
    • Семантические элементы — <header>, <nav>, <main>, <article>, <footer> — сообщают браузеру, поисковой системе и скринридеру, чем является данный регион.
    • ⚠ Проверьте, что разрешено публиковать. Изображение или шрифт на вашем сайте требуют лицензии, разрешающей их использование, точно так же, как цитата в эссе требует указания источника. система читает.
    2.3

    Using CSS to enhance your website · ⁨Использование CSS для улучшения вашего веб-сайта⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 3 of 6 in GAC011 Computing II: Web Development (Level II). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC011.1: Design effective websites using aesthetics and formal concepts of layout and organization to communicate effectively using visual components.

    Learning Objective GAC011.2: Create and publish a website using scripting languages to add interactive components.

    Русский

    Раздел 3 из 6 в GAC011 Компьютерные науки II: Веб-разработка (Уровень II). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC011.1: Создавать эффективные веб-сайты, используя эстетические и формальные концепции макета и организации для эффективной коммуникации с помощью визуальных компонентов.

    Учебная цель GAC011.2: Создавать и публиковать веб-сайт, используя скриптовые языки для добавления интерактивных компонентов.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • CSS 层叠样式表 controls appearance, and keeping it out of the HTML is the whole point of the separation.
    • A selector 选择器 chooses elements; a declaration 声明 sets a property to a value.
    • The box model 盒模型 explains layout: content, then padding, then border, then margin.
    • Responsive design 响应式设计 makes one page work on a phone and a laptop, usually with flexible widths and a media query 媒体查询.

    Worked example. A card that is too wide on a phone.

    The fix is not a fixed pixel width. Set max-width so the card never exceeds the screen, let it shrink below that, and add a media query only for the change that a smaller screen genuinely needs, such as stacking two columns into one.

    Designing the flexible case first, and treating the media query as the exception, is what "responsive" means.

    Русский
    • Метрики должны быть привязаны к цели: охват, вовлечённость и клики на ваш сайт — это разные вещи, и только одна из них является трафиком. разделение.
    • Селектор выбирает элементы; объявление задает свойство равным значению.
    • Блочная модель объясняет верстку: контент, затем отступы (padding), затем рамка (border), затем внешние отступы (margin).
    • Адаптивный дизайн позволяет одной странице корректно отображаться на телефоне и ноутбуке, обычно используя гибкие широты и медиазапрос.

    Разбор примера. Карточка, которая слишком широка на телефоне.

    Решение — не фиксированная ширина в пикселях. Установите max-width так, чтобы карточка никогда не выходила за пределы экрана, разрешите ей уменьшаться меньше этого значения и добавьте медиазапрос только для того изменения, которое действительно необходимо меньшему экрану, например, преобразование двух колонок в одну. сужается, и добавьте медиазапрос только для того изменения, которое действительно необходимо меньшему экрану, например, объединение двух колонок в одну. нужен, например, объединение двух колонок в одну.

    Проектирование гибкого варианта сначала и рассмотрение медиазапроса как исключения — это именно то, "responsive" означает.

    2.4

    Adding interactivity with JavaScript · ⁨Добавление интерактивности с помощью JavaScript⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 4 of 6 in GAC011 Computing II: Web Development (Level II). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC011.2: Create and publish a website using scripting languages to add interactive components.

    Русский

    Раздел 4 из 6 в GAC011 Компьютерные науки II: Веб-разработка (Уровень II). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC011.2: Создавать и публиковать веб-сайт, используя скриптовые языки для добавления интерактивных компонентов.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • JavaScript runs in the browser and changes the page after it has loaded.
    • The DOM 文档对象模型 is the page as a tree of objects your code can read and change.
    • An event 事件 — a click, a submit, a key press — triggers a function 函数 you wrote.
    • Keep it small at this level: validate a form, toggle a menu, filter a list. A site that fails when JavaScript fails is a design error, not a coding one.
    Русский
    • JavaScript выполняется в браузере и изменяет страницу после её загрузки.
    • DOM — это страница в виде дерева объектов, которые ваш код может читать и изменять.
    • Событие — клик, отправка формы, нажатие клавиши — запускает функцию, которую вы написали.
    • На этом уровне делайте всё компактно: проверяйте форму, переключайте меню, фильтруйте список. Сайт, который не работает, когда отключается JavaScript, — это ошибка проектирования, а не программирования.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    DOM/dɒm/ DOM
    event/ɪˈvent/ события
    function/ˈfʌŋkʃn/ функцией
    Hosting/ˈhəʊstɪŋ/ Хостинг
    domain name/dəˈmeɪn neɪm/ доменное имя
    2.5

    Launching your website · ⁨Запуск вашего веб-сайта⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 5 of 6 in GAC011 Computing II: Web Development (Level II). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC011.3: Incorporate best practices in navigation, usability, and written content to design websites that give users easy access to the information they seek.

    Learning Objective GAC011.4: Use the website to complement academic work conducted in other media.

    Русский

    Раздел 5 из 6 в GAC011 Компьютерные науки II: Веб-разработка (Уровень II). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC011.3: Внедрять лучшие практики навигации, удобства использования и текстового содержания для создания веб-сайтов, обеспечивающих пользователям легкий доступ к искомой информации.

    Учебная цель GAC011.4: Использовать веб-сайт для дополнения академической работы, проводимой в других форматах.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • Hosting 托管 puts your files on a server; a domain name 域名 points visitors at them.
    • Test before you launch: every link, on a phone, on a browser that is not yours.
    • Accessibility 无障碍 is not optional — contrast, alt text, keyboard navigation, and text that resizes.
    • ⚠ Check what you are allowed to publish. An image or a font on your site needs a licence that permits it, exactly as a quotation in an essay needs a citation.
    Русский
    • Хостинг размещает ваши файлы на сервере; доменное имя направляет посетителей к ним.
    • Проверяйте перед запуском: каждую ссылку, с мобильного телефона, в браузере, отличном от вашего.
    • Доступность (Accessibility) — это не опция: контраст, alt-текст, навигация с клавиатуры и текст, который масштабируется.
    • ⚠ Проверьте, что разрешено публиковать. Изображение или шрифт на вашем сайте требуют лицензии, позволяющей их использование, точно так же, как цитата в эссе требует ссылки на источник.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    Accessibility/ækˌsesəˈbɪlɪti/ Доступность
    content plan/ˈkɒntent plæn/ контент-план
    Metrics/ˈmetrɪks/ Метрики
    2.6

    Social media marketing · ⁨Маркетинг в социальных сетях⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 6 of 6 in GAC011 Computing II: Web Development (Level II). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC011.5: Use social media to promote or find a website.

    Русский

    Раздел 6 из 6 в GAC011 Компьютерные науки II: Веб-разработка (Уровень II). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC011.5: Использовать социальные сети для продвижения или поиска веб-сайта.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • Decide the audience and the objective before choosing a platform. "Be on social media" is not an objective.
    • A content plan 内容计划 says what you will post, how often, and who writes it.
    • Metrics 指标 must connect to the objective: reach, engagement, and click-through to your site are different things, and only one of them is traffic.
    • Measure, then change one thing. Changing everything at once teaches you nothing about which change worked.
    Русский
    • Определите аудиторию и цель перед выбором платформы. «Быть в социальных сетях» не является целью.
    • План контента определяет, что вы будете публиковать, как часто и кто будет это писать.
    • Метрики должны быть привязаны к цели: охват, вовлечённость и переход по клику на ваш сайт — это разные вещи, и только одна из них является трафиком.
    • Измеряйте, затем меняйте одну вещь. Изменение всего сразу ничего не учит вас о том, изменения внесены.
    Additional notes PDF

    A website should help its intended reader

    A school-transport report may contain detailed methods and tables. Its website can give classmates a short overview. The page should help them find the main result, inspect the method and reach the approved full report.

    These separate notes add practical GAC011 work. Preserve the original handout beside them. Follow your current centre brief for required tools, depth and submission evidence.

    Original practice brief. Build one readable page for classmates using invented transport counts. Add navigation, a table and a category filter. Plan how the page supports a report and a short talk. No real responses are collected. Local preview is practice; it is not public publication.

    Draw a wireframe with a title, introduction, section links, findings, method and footer. Give each area a clear purpose. Visitors should not have to guess whether a button changes the page or opens another document. Use meaningful text such as “Method and limits”, rather than “Click here”.

    Build a complete HTML page

    Character encoding 字符编码 tells the browser how to read the file's text. UTF-8 supports many writing systems. The viewport setting helps mobile browsers use the device width. A descriptive title helps people identify the page in a tab.

    Save the following complete example as transport.html. Open that file in a browser. It works without a library, account or network request. The built-in style block keeps this first exercise in one file. A later project can move those styles into a separate CSS file and link it from the head.

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>School transport: practice report</title>
    <style>
    :root { --page: #ffffff; --text: #172033; --line: #637083; --link: #164db2; }
    body.dark { --page: #080d17; --text: #e9eef7; --line: #8392a8; --link: #a8d2ff; }
    * { box-sizing: border-box; }
    body { margin: 0; background: var(--page); color: var(--text); font: 1.1rem/1.6 sans-serif; }
    header, main, footer { max-width: 48rem; margin: auto; padding: 1rem; }
    a { color: var(--link); }
    nav { display: flex; flex-wrap: wrap; gap: 1rem; }
    section { margin-block: 2rem; padding-block: 1rem; border-top: 1px solid var(--line); }
    button, select { font: inherit; padding: .4rem; background: var(--page); color: var(--text); border: 1px solid var(--line); }
    :focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
    table { width: 100%; border-collapse: collapse; }
    caption { text-align: left; margin-block: .5rem; }
    th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); }
    [hidden] { display: none !important; }
    </style>
    </head>
    <body>
    <header>
    <h1>School transport</h1>
    <p>An original practice example. All counts are invented.</p>
    <nav aria-label="Report sections">
    <a href="#findings">Findings</a>
    <a href="#method">Method and limits</a>
    </nav>
    <div id="controls" hidden>
    <button id="theme" type="button">Use dark theme</button>
    <label for="mode">Show transport category</label>
    <select id="mode">
    <option value="all">All categories</option>
    <option value="walk">Walking</option>
    <option value="bus">Bus</option>
    <option value="cycle">Cycling</option>
    </select>
    </div>
    </header>
    <main>
    <section id="findings" aria-labelledby="findings-title">
    <h2 id="findings-title">Findings</h2>
    <p>In this invented group of 36 responses, bus travel has the largest count.</p>
    <table>
    <caption>Practice counts, not research findings</caption>
    <thead><tr><th scope="col">Main mode</th><th scope="col">Responses</th></tr></thead>
    <tbody>
    <tr data-mode="walk"><th scope="row">Walking</th><td>12</td></tr>
    <tr data-mode="bus"><th scope="row">Bus</th><td>18</td></tr>
    <tr data-mode="cycle"><th scope="row">Cycling</th><td>6</td></tr>
    </tbody>
    </table>
    <p id="status" role="status">3 transport categories shown.</p>
    </section>
    <section id="method" aria-labelledby="method-title">
    <h2 id="method-title">Method and limits</h2>
    <p>Each invented response has one main mode. The counts sum to 36.</p>
    <p>The table does not explain choices, travel distance or the whole school's habits.</p>
    <p>This page is a short companion to a report and oral presentation. An actual project should link its approved report and sources here.</p>
    </section>
    </main>
    <footer><p>GAC011 practice: no responses are collected or sent.</p></footer>
    <script>
    const controls = document.querySelector("#controls");
    const mode = document.querySelector("#mode");
    const rows = [...document.querySelectorAll("tbody tr")];
    const status = document.querySelector("#status");
    const theme = document.querySelector("#theme");
    mode.addEventListener("change", () => {
      let shown = 0;
      rows.forEach(row => {
        row.hidden = mode.value !== "all" && row.dataset.mode !== mode.value;
        if (!row.hidden) shown += 1;
      });
      status.textContent = `${shown} transport ${shown === 1 ? "category" : "categories"} shown.`;
    });
    theme.addEventListener("click", () => {
      const dark = document.body.classList.toggle("dark");
      theme.textContent = dark ? "Use light theme" : "Use dark theme";
    });
    controls.hidden = false;
    </script>
    </body>
    </html>
    

    The HTML provides readable content before JavaScript runs. The href="#method" link points to the element with id="method". IDs must be unique on the page. A wrong ID breaks that link even if the label looks correct.

    The table's caption states what its numbers mean. Column and row headings describe the cells. The invented values are 12, 18 and 6, giving 36 responses. Bus has the largest count. Those counts do not tell us why people choose a mode.

    Explain and adapt the CSS

    A CSS custom property 自定义属性 stores a reusable value, such as a colour. The example uses shared page, text, border and link colours. The dark class changes those values together. Text areas and controls use the same page colour in dark mode. Borders and space separate sections.

    The universal box-sizing rule makes specified sizes include padding and borders. The reading area grows with the window but stops at 48rem. The navigation can wrap when space is limited. A flexible width often solves the first layout problem without a media query.

    The :focus-visible outline helps keyboard users find the current control. Do not remove it just because it is visible. Links retain underlines. Table headings and sufficient contrast help readers understand the data. An actual image needs text suited to its purpose: meaningful information needs a useful description; a purely decorative image can use empty alt text.

    Adaptation. Change the page title and introduction for another approved academic topic. Keep a clear heading order. Try a narrow window and enlarged text. If you later add two columns, decide where they should stack and test a suitable media query. Do not add a fixed width that makes the phone scroll sideways.

    Trace the JavaScript interaction

    An event listener 事件监听器 runs code when its event occurs. The example listens for a changed selection. mode.value gives the selected value. Each row's data-mode attribute becomes row.dataset.mode in JavaScript.

    A row is hidden when a specific category is selected and the row does not match. Selecting all makes every row visible. The counter starts at zero for each change. It increases once for each visible category, not once per response. Therefore selecting Bus shows one category, not eighteen categories.

    Trace. Select Bus. Walking and Cycling become hidden. Bus remains visible and the status says “1 transport category shown.” Select All categories. The hidden condition is false for every row, so the status returns to three categories.

    The theme button adds or removes the dark class. Its label describes the next action. Updating textContent changes text; it does not treat that text as HTML. The status region can announce the changed count to assistive software. Check actual behaviour with the tools available at your centre.

    Progressive enhancement 渐进增强 means that useful basic content works before extra features are added. The example keeps interactive controls hidden until their listeners are attached. Without JavaScript, the full table, methods and section links still work. A filter changes the view, not the underlying counts or study limits.

    Check, publish and maintain the site

    Before any authorised launch, record results of practical checks. Open every link, use the keyboard, enlarge text and try phone-sized layouts. Check both themes and a second browser or device. Verify the complete content still works if the optional script is unavailable. Read errors rather than hiding them.

    Relative path 相对路径 means a file location described from another location. For an approved report saved beside your page as report.pdf, an HTML link can use href="report.pdf". Use a meaningful label and identify the PDF. Add the actual report only when you have it; do not leave a broken sample link. Check filenames and upper/lower case on the host.

    A static site 静态网站 can serve stored HTML, CSS, scripts and images. The browser can still run interactive JavaScript. A domain name 域名 is an address people use; hosting provides the service that delivers files. A domain alone does not upload your site.

    Use your centre's approved publishing process. Check media permission and remove private drafts or participant information. Upload the required files together. Open the actual public URL and verify paths, display and controls there. A successful local preview is not proof of a successful launch.

    Keep editable source files and a known working copy. When you revise, check the change and its affected links. Record the version and date. Correcting your local file does not update a hosted copy until the approved publishing process delivers it.

    Connect the website to academic work and promotion

    The website should complement your report and talk. Its overview gives a clear question, one useful result and the study's limits. The full report carries detailed evidence and references. A slide in the talk can show the page address or an approved QR code. Check that the link reaches the intended version. Do not claim that the practice counts are real findings.

    For promotion, define an audience and objective first. For example: help classmates find the approved report during project week. Plan a permitted post with a short accurate description, meaningful link text and a named owner. Follow centre rules and platform requirements. Planning a post does not show that promotion actually happened.

    Impressions 展示次数 count displays under the platform's definition. Reach usually refers to distinct accounts under its definition. Neither is automatically the number of people who read the report. Click-through rate 点击率 needs a stated numerator and denominator.

    Invented example. Post A receives 400 impressions and 20 link clicks. Post B receives 250 impressions and 25 link clicks. Using link clicks divided by impressions, A has $20/400=5\%$ and B has $25/250=10\%$. B has more link clicks despite fewer impressions.

    These numbers do not prove B's wording caused the difference. Timing, audience and repeated clicks may differ. Link clicks also do not prove the report loaded or was read. Choose a change, record its context and compare a measure that matches the objective. Keep unnecessary personal tracking out of the task.

    Practice and explained answers

    Questions. 1. Which element does the Method link reach? 2. What should the filter display for Cycling? 3. Does filtering change the original total of 36? 4. What remains usable without JavaScript? 5. Why is a domain purchase insufficient for launch? 6. Post C has 600 impressions and 24 link clicks. Find its rate. 7. Does B's higher rate prove its wording is better? 8. Name evidence of a completed website task.

    Explained answers. 1. The element whose ID is method; the fragment and ID must match. 2. Only Cycling's row, with six responses and one category shown. 3. No; it changes visible rows, not the original dataset. 4. The text, full table, method and section links; optional controls remain hidden. 5. Files still need approved hosting and delivery, then checks at the actual URL. 6. $24/600=4\%$. 7. No; other differences and measurement limits remain. 8. Show your plan, sources, working page, checks and required publishing, academic and promotion evidence.

  • 3

    GAC017 Computing III: Data Science and Web Apps · ⁨GAC017 Компьютерные науки III: Наука о данных и веб-приложения⁩

    3.1

    What this module is, and how it is marked · ⁨Что представляет собой этот модуль и как он оценивается⁩

    English

    GAC017 is the Level III computing module: what sits behind a website. Six units cover back-end JavaScript, databases, SQL, connecting the two, and a first look at data science.

    Assessment is entirely practical — a database 数据库 you design and build, a web app 网络应用 that talks to it, a data analysis project 数据分析项目, and coursework — usually spread across most of the semester rather than concentrated at the end.

    • The work is judged on whether it runs and answers a question, not on how much code there is.
    • ⚠ Design the database before you write a query. Almost every problem later is a table problem wearing a query's clothes.

    Every SQL example here runs in the site's own code playground, and the SQL reference there is the fuller version of these notes.

    Русский

    GAC017 — это модуль по вычислениям уровня III: то, что находится «за кулисами» веб-сайта. Шесть разделов охватывают бэкенд JavaScript, базы данных, SQL, связывание этих двух элементов и первое знакомство с наукой о данных.

    Оценка проводится исключительно на практике — база данных, которую вы разрабатываете и создаете, веб-приложение, которое взаимодействует с ней, проект анализа данных и курсовая работа — обычно распространены на протяжении всего семестра, а не сосредоточены в его конце.

    • Работа оценивается по тому, выполняет ли она запрос и отвечает ли на вопрос, а не по объему кода.
    • ⚠ Проектируйте базу данных до написания запроса. Почти каждая последующая проблема — это проблема с таблицами. надевает одежду запроса.

    Каждый пример SQL здесь запускается в собственной песочнице кода сайта, а справочник по SQL там — полная версия этих заметок.

    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    SQL/ˌes kjuː ˈel/ SQL
    3.1

    JavaScript for a web app's back end · ⁨JavaScript для бэкенда веб-приложения⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 1 of 6 in GAC017 Computing III: Data Science and Web Apps (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    Module purpose: On completion of this module, students should be able to create a web app. Students will learn about back- end programming and how to create a dynamic website. They will be able to use SQL to analyze data from multiple tables in order to make informed decisions.

    The module outcomes this unit works towards:

    Learning Objective GAC017.1: Understand the basic components of a Web Application.

    Русский

    Раздел 1 из 6 в GAC017 Компьютерные науки III: Научные данные и веб-приложения (Уровень III). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Цель модуля: По завершении этого модуля студенты должны уметь создавать веб-приложение. Студенты узнают о программировании бэкенда и том, как создать динамический веб-сайт. Они смогут использовать SQL для анализа данных из нескольких таблиц, чтобы принимать обоснованные решения.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC017.1: Понимать основные компоненты веб-приложения.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • The front end 前端 runs in the browser; the back end 后端 runs on a server and holds what the browser must not.
    • A server 服务器 receives a request 请求 and returns a response 响应. That loop is the whole architecture.
    • An API 应用程序接口 is the agreed shape of those requests and responses.
    • ⚠ Anything secret — a password, a key — belongs on the back end only. Code in a browser is readable by everyone who visits.
    Русский
    • Фронтенд работает в браузере; бэкенд работает на сервере и хранит то, что браузер не должен видеть.
    • Сервер получает запрос и возвращает ответ. Этот цикл — вся архитектура.
    • API — это согласованная форма этих запросов и ответов.
    • Все секретные данные — пароли, ключи — должны находиться только на бэкенде. Код в браузере доступен каждому посетителю.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    database/ˈdeɪtəbeɪs/ база данных
    web app/web æp/ Веб-приложение
    data analysis project/ˈdeɪtə əˈnæləsɪs ˈprɒdʒekt/ Проект анализа данных
    front end/frʌnt end/ фронтенд
    back end/bæk end/ бэкенд
    server/ˈsɜːvə/ сервер
    request/rɪˈkwest/ просьба
    response/rɪˈspɒns/ ответ
    API/ˌeɪ piː ˈaɪ/ API (программный интерфейс приложений)
    3.2

    Back-end programming · ⁨Программирование бэкенда⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 2 of 6 in GAC017 Computing III: Data Science and Web Apps (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC017.2: Adapt a back-end application using scripting languages to interact with databases.

    Русский

    Раздел 2 из 6 в GAC017 Компьютерные науки III: Научные данные и веб-приложения (Уровень III). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC017.2: Адаптировать приложение бэкенда с использованием скриптовых языков для взаимодействия с базами данных.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • A route 路由 maps a URL to code that runs when that URL is requested.
    • Validate input 校验输入 on the server. Checking in the browser is a convenience for honest users, not a defence.
    • Never build a query by joining strings with user input. That is how SQL injection SQL 注入 happens, and it is the security failure this unit exists to prevent.
    • Return an honest status: 200 for success, 400 for a bad request, 404 for something that is not there.
    Русский
    • Маршрут (route) сопоставляет URL с кодом, который выполняется при обращении к этому URL.
    • Валидируйте входные данные на сервере. Проверка в браузере удобна для честных пользователей, но не является защитой.
    • Никогда не собирайте запрос путем склеивания строк с пользовательским вводом. Именно так происходит SQL-инъекция SQL, и именно эту уязвимость безопасности призван предотвратить этот модуль.
    • Возвращайте честный статус: 200 за успех, 400 за неверный запрос, 404 за отсутствующий ресурс. нет ничего.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    route/ruːt/ путь
    Validate input/ˈvælɪdeɪt ˈɪnpʊt/ Валидация ввода
    SQL injection/ˌes kjuː ˈel ɪnˈdʒekʃn/ SQL-инъекция
    relational database/rɪˈleɪʃənl ˈdeɪtəbeɪs/ реляционная база данных
    tables/ˈteɪblz/ таблицы
    primary key/ˈpraɪməri kiː/ первичный ключ
    foreign key/ˈfɒrən kiː/ внешний ключ
    Normalisation/ˌnɔːməlaɪˈzeɪʃn/ Нормализация
    entities/ˈentɪtiz/ сущности
    3.3

    Introduction to databases · ⁨Введение в базы данных⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 3 of 6 in GAC017 Computing III: Data Science and Web Apps (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC017.3: Create a database with multiple tables.

    Русский

    Раздел 3 из 6 в GAC017 Компьютерные науки III: Научные данные и веб-приложения (Уровень III). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC017.3: Создать базу данных с несколькими таблицами.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • A relational database 关系数据库 stores data in tables 表 of rows and columns.
    • A primary key 主键 identifies a row uniquely. A foreign key 外键 points at another table's primary key, and that pointer is the relationship.
    • Normalisation 规范化 removes duplicated data so one fact lives in one place.
    • Design by asking what the entities 实体 are, then what connects them.

    Worked example. A school wants to store students, courses and who takes what.

    Two tables cannot do it: a student takes many courses and a course has many students. The many-to-many needs a third table — enrolments — whose rows are (student, course) pairs.

    Recognising that this third table is required is the single most useful database idea in the module, and it is where most first designs go wrong.

    Русский
    • Реляционная база данных хранит данные в таблицах, состоящих из строк и столбцов.
    • Первичный ключ однозначно идентифицирует строку. Внешний ключ ссылается на первичный ключ другой таблицы, и эта ссылка и есть связь.
    • Нормализация устраняет дублирование данных, чтобы каждый факт хранился в одном месте.
    • Проектируйте, задавая вопросы о том, каковы сущности, а затем что их связывает.

    Разобранный пример. Школе нужно хранить информацию о студентах, курсах и том, кто на какой записан.

    Две таблицы не справятся: один студент может быть записан на многие курсы, а на курсе много студентов. Связь «многие-ко-многим» требует третьей таблицы — записи на обучение — строки которой представляют пары (студент, курс). Осознание необходимости этой третьей таблицы — самая полезная идея в базе данных в этом

    модуле, и именно здесь чаще всего допускают ошибки при первом проектировании. раздел, и именно здесь чаще всего допускаются ошибки в первоначальных проектах.

    3.4

    SQL for back-end programming · ⁨SQL для программирования бэкенда⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 4 of 6 in GAC017 Computing III: Data Science and Web Apps (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC017.4: Analyze data using SQL in order to make decisions.

    Русский

    Раздел 4 из 6 в GAC017 Компьютерные науки III: Научные данные и веб-приложения (Уровень III). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC017.4: Анализировать данные с помощью SQL для принятия решений.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • SQL 结构化查询语言 asks a database questions. SELECT … FROM … WHERE … is the core.
    • JOIN 连接 combines rows from two tables on a matching key.
    • GROUP BY 分组 with COUNT, SUM or AVG answers "how many per…" questions.
    • ⚠ WHERE filters rows before grouping; HAVING filters groups after. Using the wrong one is the classic SQL error, and it usually returns a plausible wrong answer.

    Worked example. Which courses have more than 20 students?

    The count is a property of the group, so the filter is HAVING. Written with WHERE it does not run — and when a similar mistake does run, it silently answers a different question.

    Русский
    • SQL задает вопросы базе данных. SELECT … FROM … WHERE … является основой.
    • JOIN объединяет строки из двух таблиц по совпадающему ключу.
    • GROUP BY вместе со COUNT, SUM или AVG отвечает на вопросы типа «сколько на…».
    • ⚠ WHERE фильтрует строки до группировки; HAVING фильтрует группы после. Использование неверного оператора — классическая ошибка SQL, которая обычно возвращает правдоподобный, но неправильный ответ.

    Разобранная задача. Какие курсы имеют более 20 студентов?

    SELECT c.title, COUNT(*) AS students
    FROM enrolments e
    JOIN courses c ON c.id = e.course_id
    GROUP BY c.title
    HAVING COUNT(*) > 20;
    

    Счетчик является свойством группы, поэтому фильтр должен быть HAVING. Запись с использованием WHERE не выполнится — а когда подобная ошибка все же выполняется, она молча дает ответ на другой вопрос. запуск — и когда подобная ошибка запускается снова, она молча отвечает на другой вопрос.

    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    JOIN/dʒɔɪn/ JOIN
    GROUP BY/ɡruːp baɪ/ GROUP BY
    parameterised query/ˌpærəˈmetəraɪzd ˈkwɪərɪ/ параметризованный запрос
    3.5

    Connecting JavaScript with SQL · ⁨Связывание JavaScript с SQL⁩

    Syllabus · ⁨Программа⁩
    English

    Unit 5 of 6 in GAC017 Computing III: Data Science and Web Apps (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC017.2: Adapt a back-end application using scripting languages to interact with databases.

    Learning Objective GAC017.4: Analyze data using SQL in order to make decisions.

    Русский

    Раздел 5 из 6 в GAC017 Компьютерные науки III: Научные данные и веб-приложения (Уровень III). Модуль изучается в течение примерно 40 аудиторных часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Учебная цель GAC017.2: Адаптировать приложение бэкенда с использованием скриптовых языков для взаимодействия с базами данных.

    Учебная цель GAC017.4: Анализировать данные с помощью SQL для принятия решений.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • The back end takes a request, runs a parameterised query 参数化查询, and returns the rows as data, usually JSON 数据交换格式.
    • Parameterised means the values travel separately from the query text. That is what makes injection impossible rather than unlikely.
    • Handle the empty case. A query that returns no rows is normal, and a page that breaks on it is not finished.
    Русский
    • Бэкенд принимает запрос, выполняет параметризованный запрос и возвращает строки как данные, обычно в формате JSON.
    • Параметризация означает, что значения передаются отдельно от текста запроса. Именно это делает инъекцию невозможной, а не маловероятной.
    • Обработайте пустой случай. Запрос, не возвращающий строк, является нормальным явлением, а страница, которая «ломается» при его получении, является незавершённой.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    JSON/ˈdʒeɪsn/ JSON
    3.6

    Data science

    Syllabus · ⁨Программа⁩
    English

    Unit 6 of 6 in GAC017 Computing III: Data Science and Web Apps (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

    The module outcomes this unit works towards:

    Learning Objective GAC017.5: Applying Data Science to other academic areas.

    Русский

    Раздел 6 из 6 в GAC017 Компьютерные науки III: Наука о данных и веб-приложения (Уровень III). Модуль читается примерно 40 академических часов плюс 20 часов самостоятельной работы, оценивается на базе учебного центра и проходит модерацию со стороны ACT — внешнего экзамена нет.

    Результаты обучения, к которым работает этот раздел:

    Цель обучения GAC017.5: Применение науки о данных к другим учебным дисциплинам.

    Source: Cambridge International syllabus · ⁨Источник: Программа Cambridge International⁩

    English
    • Data science 数据科学 turns data into a decision, and most of the work is before the analysis: cleaning, joining, and checking what the data can support.
    • Descriptive statistics 描述性统计 summarise; a visualisation 可视化 shows shape; neither proves a cause.
    • Correlation is not causation 相关不等于因果 — the sentence every data project needs and most omit.
    • State the limitations of your dataset. A project that names what its data cannot show scores above one that quietly overclaims.
    Русский
    • Data science превращает данные в решение, и большая часть работы выполняется до анализа: очистка, объединение и проверка того, что данные могут поддержать.
    • Описательная статистика обобщает; визуализация показывает форму; ни одно из этого не доказывает причинно-следственную связь.
    • Корреляция не означает каузальность — фраза, необходимая каждому проекту по данным, которую большинство упускают.
    • Укажите ограничения вашего набора данных. Проект, который называет то, что его данные не могут показать, Вы слышите изменение в графике встреч клуба, объясняете план одноклассникам или помогаете группе выбрать комнату. В каждой ситуации полезный английский связывает сообщение с действием. Слушателю нужны правильные детали. Диктору нужна четкая мысль и возможность проверить понимание.
    Vocabulary · ⁨Словарь⁩ Train · ⁨Тренировать⁩
    English Русский
    Data science/ˈdeɪtə ˈsaɪəns/ Аналитика данных
    Descriptive statistics/dɪˈskrɪptɪv stəˈtɪstɪks/ Описательная статистика
    visualisation/ˌvɪʒuːəlaɪˈzeɪʃn/ визуализация
    Correlation is not causation/ˌkɒrɪˈleɪʃn ɪz nɒt kɔːˈseɪʃn/ Корреляция не означает причинно-следственную связь
    Additional notes PDF

    Follow one request from browser to database

    A teacher asks which clubs have places left. A spreadsheet can answer once. A web app lets a reader ask again with a different filter.

    Our example has four students, four classes and five enrolments. All records are invented. It is a learning project, not a school booking service.

    The three parts have different jobs:

    Part Job in the example Runs where?
    Browser page Collect a minimum and show a table The reader's browser
    JavaScript server Check the request and run the query The local server
    SQLite database Store related records and calculate course totals Inside this server process

    An HTTP request 请求信息 asks for a resource. An HTTP response 响应信息 contains a status and content. The browser sends GET /api/courses?min=2. The server checks the number, then asks SQLite for course totals. It returns a JSON object 数据对象. The browser reads that object and creates table cells. The database does not send HTML to the browser. The browser does not run our server's SQL.

    Start the supplied three-file example with node server.mjs. Open the address it prints. Use Node.js 22.13 or newer with the built-in SQLite module available. Keep server.mjs, index.html and courses.sql together in your own working copy. No account or package download is needed. Stop your own server with Ctrl-C.

    Get the complete example files from the site's static teaching folder:

    • /static/teaching/gac_computing/database-app/server.mjs
    • /static/teaching/gac_computing/database-app/courses.sql
    • /static/teaching/gac_computing/database-app/index.html.txt
    • /static/teaching/gac_computing/database-app/README.txt

    Save the first two with their shown names. Save index.html.txt as index.html. The last file has the full run and adaptation instructions. Use these paths after the site's address. The page file is supplied as text for downloading. It must run through your local example server to reach the matching API.

    This example uses an in-memory database 内存数据库. Restarting creates the original records again. A file database could keep changes after restart. That needs a different storage choice.

    Design relationships before writing queries

    Each student has one row in students. Each class has one row in courses. An enrolment links a student to a class. A student may join several classes. A class may contain several students. This is a many-to-many relationship 多对多关系. The third table stores one student–class pair per row.

    Student 1 joins courses 10 and 20. Course 10 contains students 1, 2 and 3. The same student name need not be repeated in each enrolment row. To change Mei's name, change one student record. This avoids conflicting copies.

    The following two blocks form one complete script. Run them in order in a new empty practice database. Do not run it against an existing project database.

    PRAGMA foreign_keys = ON;
    CREATE TABLE students (
      id INTEGER PRIMARY KEY,
      name TEXT NOT NULL
    );
    CREATE TABLE courses (
      id INTEGER PRIMARY KEY,
      title TEXT NOT NULL,
      capacity INTEGER NOT NULL CHECK (capacity >= 0)
    );
    CREATE TABLE enrolments (
      student_id INTEGER NOT NULL REFERENCES students(id),
      course_id INTEGER NOT NULL REFERENCES courses(id),
      PRIMARY KEY (student_id, course_id)
    );
    

    The tables now exist. Add the fictional records, then query totals for each class.

    INSERT INTO students VALUES
      (1, 'Mei'), (2, 'Kai'), (3, 'Lin'), (4, 'Jia');
    INSERT INTO courses VALUES
      (10, 'Coding', 3), (20, 'Coding', 2),
      (30, 'Art', 2), (40, 'Music', 3);
    INSERT INTO enrolments VALUES
      (1, 10), (2, 10), (3, 10), (1, 20), (4, 30);
    SELECT c.id, c.title, c.capacity,
           COUNT(e.student_id) AS enrolled
    FROM courses c
    LEFT JOIN enrolments e ON c.id = e.course_id
    GROUP BY c.id, c.title, c.capacity
    ORDER BY enrolled DESC, c.id;
    

    A constraint 约束 rejects data that breaks a rule. NOT NULL requires a value. CHECK (capacity >= 0) rejects negative capacity. The paired primary key rejects a repeated enrolment, such as (1,10) twice. Either ID may appear in many pairs. The pair itself must be unique.

    Foreign keys reject missing students or classes when foreign-key checking is enabled. The script enables that checking explicitly. A foreign key does not create the missing row. These rules do not prevent every error. For example, capacity 3 does not itself limit enrolments to 3. A real booking operation would need a capacity check and safe handling of simultaneous bookings.

    Count classes without losing empty ones

    Courses 10 and 20 both have the title Coding. They are different classes. Group by the course ID as well as its title and capacity. Grouping only by title would merge their enrolments and answer the wrong question.

    LEFT JOIN keeps every course, including Music with no enrolments. The unmatched course has an empty enrolment side. COUNT(e.student_id) counts matched student IDs and gives zero for Music. COUNT(*) counts the joined row, including that unmatched row, and would give Music one.

    ID Course Capacity Enrolled Places left
    10 Coding 3 3 0
    20 Coding 2 1 1
    30 Art 2 1 1
    40 Music 3 0 3

    The browser calculates places left as capacity minus enrolled. There are five enrolments but only four students. Mei appears in two enrolment rows. Do not label five as the number of unique students.

    To keep classes with at least two enrolments, add this line after GROUP BY:

    HAVING COUNT(e.student_id) >= 2
    

    This is a query fragment, added to the complete query. It returns course 10 only. HAVING checks each group total. WHERE checks individual rows before totals are calculated. For example, WHERE c.id = 20 selects one class before grouping; it does not test its total.

    Validate and bind the backend input

    The route /api/courses accepts a minimum from 0 to 99. The browser number control helps users enter it. Direct requests can skip that control. The server therefore checks the input again.

    It rejects negative numbers, decimals, 100, repeated minimum parameters and text. Missing min means zero. A successful query with no courses is still a valid request.

    Request Status Meaning
    GET /api/courses?min=2 200 One course found
    GET /api/courses?min=4 200 Valid query; empty list
    GET /api/courses?min=-1 400 Invalid input
    GET /missing 404 Route does not exist
    POST /api/courses 405 This read-only route accepts GET

    A prepared statement 预编译语句 keeps the SQL structure separate from a value. The server prepares its total-by-course query with >= ?, then calls courses.all(minimum). The bound number fills the value position. It is not joined into the SQL text.

    Binding values protects this query from injection through that value. It does not prove that every route or operation is secure. SQL keywords and column names cannot be supplied as ordinary bound values. Keep the query structure fixed or choose it from permitted server-owned choices.

    The server sends public course totals only. Student names stay out of this response. Real records would also need access rules and permission to use them. An invented example needs no real student information.

    Handle loading, empty results and failures

    The browser uses fetch to request the data. It must check the response status. A completed network request may still return 400 or 500. The browser's response.ok distinguishes successful HTTP responses from those errors.

    The page clears old rows before loading. Otherwise a failed request could leave old results looking current. It displays a loading message and disables the load button during the request. It then shows the result, an empty message, or a failure message. The button becomes available again so the reader can retry.

    Each displayed value goes into textContent, not into HTML built from a data string. A course title becomes text inside a cell. It is not treated as page markup.

    The sample uses a request number to ignore an older response after a newer request starts. This protects the page from a late response replacing the newest result. It does not change database records or make bookings safe.

    Try minimum 0, 2 and 4 in that order. Expect four courses, one course and no courses. Then stop the server and try loading again. The page should explain the failure and allow a retry. Restart the server and load again. The original fictional dataset should return.

    Turn results into a supported academic decision

    Begin with a question: which classes currently have spare places? State your unit of analysis 分析单位: one class, identified by course ID. Check missing values, repeated enrolment pairs, valid IDs and non-negative capacities before analysis. Name the data date in a real report, because enrolments can change.

    The current answer is Coding 20, Art 30 and Music 40. Music has three spare places; the other two have one each. A teacher could first check whether those places are still available before announcing them.

    A bar chart could compare enrolled and capacity for each course ID. Keep the two Coding classes separate and label them with their IDs. Show zero enrolments for Music. Do not hide it because its bar is short.

    Explain the limitation 局限 of this decision. These records describe four invented classes at one time. They do not measure teaching quality, future demand or why students chose a class. More enrolments do not prove that a class caused better learning. Avoid using a descriptive count as evidence for a causal claim.

    A short report can use five parts: question, data and checks, method, result, limits and next action. Include the query or name the calculation so another reader can reproduce the result. Keep student and enrolment counts separate.

    Practise with changes and explain your answers

    1. Sketch the three tables. Which keys link them, and why is the third table needed?
    2. Predict minimum 1 and minimum 3 before running either request.
    3. Replace COUNT(e.student_id) with COUNT(*). Which original result becomes wrong, and why?
    4. Group only by title. What happens to the two Coding classes?
    5. Add course 50, Drama, with capacity 2 and no enrolments. Predict its total and free places.
    6. Add enrolment (2,20). What should minimum 2 now return?
    7. Try duplicate pair (1,10) and missing student pair (99,10). Explain each rejection.
    8. Why must the server check a minimum that the browser already checks?
    9. Explain why an empty array gets 200, while a negative minimum gets 400.
    10. Write a two-sentence recommendation and one limitation using the original data.

    Explained answers

    1. Student ID and course ID link the paired enrolment table to their parent tables. The third table represents many students in many classes without repeating names or course facts.
    2. Minimum 1 returns 10, 20 and 30. Minimum 3 returns 10 only. Both filters include equality.
    3. Music becomes one instead of zero. COUNT(*) counts the preserved unmatched course row.
    4. Coding totals combine to four. This describes a title group, not either individual class.
    5. Drama has zero enrolments and two places left. A left join keeps it at minimum 0.
    6. Coding 20 now has two enrolments. Minimum 2 returns IDs 10 and 20, with totals three and two.
    7. The paired primary key rejects the duplicate. The enabled foreign key rejects student 99, who does not exist.
    8. A caller can send a request without using the page. Browser checks cannot protect the server by themselves.
    9. No matching rows is a successful query. A negative minimum breaks the API's input rule.
    10. Check remaining places in Coding 20, Art 30 and Music 40 before offering them. Music has most spare places in this example. Invented totals cannot predict actual student demand.

Log in or create account · ⁨Войти или создать аккаунт⁩

IGCSE, A-Level & AP