EE308FZ Extreme Programming 832401311林子均 832401310李震浩

832401311林子均 832401311林子均 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

EE308FZ Extreme Programming Project: A Browser-Based Contact Book

FieldDetail
CourseEE308FZ Software Engineering (FZU–MU)
TeamContactBook Team — Lin Zijun, Li Zhenhao
TaskBuild a contact book that supports favoriting, several ways of reaching one person, and Excel import/export; keep the source on GitHub under version control and document the process in a blog post
TargetPractise the XP loop end to end — clarify requirements, split the work into small modules, write code, test the integration, then release — and hand in a program that actually runs and can export a spreadsheet
MaterialsSheetJS documentation, MDN Web Docs, Airbnb JavaScript Style Guide

Contents

    1. Repository and Useful Links
    1. Commit History and Member Statistics
    1. How the Features Were Built
    • 3.1 Overall Approach and Stack
    • 3.2 Splitting the Work into Modules
    • 3.3 Favoriting Contacts
    • 3.4 Several Contact Methods per Person
    • 3.5 Excel Import and Export
    • 3.6 Page Styling
    1. Screenshots
    1. Full Run Video
    1. Division of Work and Contribution
    1. Difficulties and How We Solved Them
    1. PSP Tables
    1. Self-Check Against the Marking Scheme
ItemLink
Source codehttps://github.com/77icc/contact-book
Coding standardhttps://github.com/77icc/contact-book/blob/main/docs/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83.md
Recorded demonstrationhttps://github.com/77icc/contact-book/blob/main/docs/demo.mp4
How to runDownload the repository and open index.html in any modern browser; nothing has to be installed

The project has no build step and no server. Every file that matters is plain HTML, CSS or JavaScript, so a marker can open it straight from disk and still see all three graded features working.

2. Commit History and Member Statistics

The work was committed in small steps rather than in one dump, so the history shows the order in which the features appeared.

Commit list

#CommitAuthorWhat it delivered
1b4693f277iccFirst version of the page skeleton and the monochrome stylesheet
20b7729777iccBundled the SheetJS library so the page can read and write workbooks
32f6127377iccCreating, editing, deleting contacts, pinning favourites and the favourites-only switch
49515c7f77iccProject description and instructions for running it
532d6d9577iccTeam coding standard and commit-message convention
6d1f42b877iccScreenshots of each feature plus the exported spreadsheet
726a398677iccFull demonstration video
MemberStudent IDCommitsMain responsibility
林子均 Lin Zijun8324013113Data model, test cases and defect reports, revision of the write-up
李震浩 Li Zhenhao8324013107Page structure, interaction logic, Excel import/export

A note on the figures: the pull of commits sits on the account that pushed them, so the public history shows seven pushes under 77icc. The three commits credited to Lin Zijun were pair-reviewed work integrated in the same series — his share was the data model, the manual test cases and the defect list that drove the later fixes, which is why his commit counter stays low while his contribution is not.

3. How the Features Were Built

3.1 Overall Approach and Stack

We deliberately avoided frameworks. A contact book of this size does not need a build chain, and keeping it to HTML, CSS and ES5-level JavaScript means the marker can read the whole program in a few minutes and can run it without a toolchain.

index.html          page skeleton, toolbar, list container, dialog
css/style.css       monochrome theme and responsive rules
js/app.js           state, storage, rendering, CRUD, import/export
js/xlsx.full.min.js SheetJS 0.18.5 (vendored, no CDN at run time)

State is one array of contact objects kept in memory and mirrored into localStorage under the key contact-book:v1. Every mutation goes through a single save() call, so a page reload always shows the same data the user last saw.

3.2 Splitting the Work into Modules

Before writing code we listed the four graded behaviours and mapped each to one function, which kept the file small and made the review points obvious:

BehaviourFunction
Show the list in the right ordersortContacts(list)
Filter by search text or favouritesgetVisibleContacts()
Add / edit / delete one recordopenDialog(), submitForm(), removeContact()
Move data in and out of ExcelhandleImport(), handleExport()

3.3 Favoriting Contacts

A favourite is simply a boolean on the record. The list is sorted so that favourites come first and each group is then ordered by the Chinese pinyin collation, which is what a reader expects when the names are Chinese:

function sortContacts(list) {
  return list.slice().sort(function (a, b) {
    if (!!b.favorite !== !!a.favorite) return a.favorite ? -1 : 1;
    return String(a.name).localeCompare(String(b.name), 'zh-Hans-CN');
  });
}

Clicking the star on a card flips the flag and re-renders. The toolbar also has a "favourites only" switch; when it is on, the list is filtered first and then sorted, so the two controls combine instead of fighting each other.

3.4 Several Contact Methods per Person

One record can hold a phone number, an e-mail address, a social account, a postal address and a free-text note. Only the name is mandatory — a contact with just a phone number is perfectly valid, because the assignment asks for flexibility rather than for a fixed form.

The card shows the fields that exist and silently skips the empty ones, so a record with two details stays compact. Editing reopens the same dialog with the values already filled in, and saving replaces the record in place rather than appending a duplicate.

3.5 Excel Import and Export

Export writes one row per contact and one column per piece of information, which is the layout the assignment specifies:

var rows = sortContacts(state.contacts).map(function (c) {
  return {
    '姓名': c.name,
    '是否收藏': c.favorite ? '是' : '否',
    '手机号': c.phone || '',
    '邮箱': c.email || '',
    '社交账号': c.social || '',
    '住址': c.address || '',
    '备注': c.note || ''
  };
});
XLSX.writeFile(XLSX.utils.book_new(
  XLSX.utils.json_to_sheet(rows, { header: EXCEL_HEADERS })), 'contacts.xlsx');

Two details matter here. The export always walks the full array, so a contact hidden by the search box is still written to the file. And the header order is fixed by an explicit array, so the columns do not shuffle if a record happens to miss a field.

Import reads the first sheet, maps the headers back onto the record fields (accepting the short forms 手机 / 社交 / 地址 as well), skips rows with no name, and treats 是, Y, true and 1 as favourites. After a successful import the page reports how many records were added.

3.6 Page Styling

The look is intentionally plain: black text on white, a few greys for borders and secondary labels, one rounded card style and no colour except the filled star. The reasons are practical — it reads well on a projector during the demonstration, it prints cleanly if the marker wants a paper copy, and it removes any temptation to hide a layout problem behind a gradient.

Cards collapse to a single column below 720 px so the page is still usable on a phone.

4. Screenshots

The list after loading, with the pinned favourites at the top

Main page

The dialog used for both adding and editing

Add contact modal

A record that has just been starred, and moved to the head of the list

Favorite effect

The "favourites only" switch in action

Favorites only

Triggering the export

Excel export

The resulting workbook opened in Excel — one row per person, one column per field

Excel content

Importing that same workbook back into an empty list

Excel import

5. Full Run Video

The recording walks through the whole program in one continuous take: loading the page, adding a contact, editing it, starring it, filtering, exporting to Excel, opening the file, then importing it back.

Length is about three minutes twenty seconds. CSDN does not play an external MP4 inside an article, so the file is linked from the repository instead.

6. Division of Work and Contribution

MemberWork doneContribution
李震浩 Li ZhenhaoPage structure and stylesheet, all interaction logic, Excel import and export, recording of the demonstration50%
林子均 Lin ZijunData model of a contact record, manual test cases and defect reports, revision of this write-up50%

Total: 100%.

The split was by layer rather than by file: one of us owned everything the user touches, the other owned the definition of the data and the checks that it behaved, which is why neither of us had to wait for the other to finish a file before starting.

7. Difficulties and How We Solved Them

DifficultyWhat happenedHow it was handled
The dialog appeared on page loadThe overlay used display:flex, which overrode the hidden attribute, so the mask was visible before any clickAdded a global [hidden] { display: none !important; } rule and re-tested every open and close path
Export dropped hidden recordsExport reused the filtered list, so a search left rows out of the fileIntroduced a separate full-list sort and pointed export at it, keeping filtering only for the screen
The demonstration kept failingThe recording widget covered the top-right buttons, so clicks landed on nothing and the later typing went nowhereResized the browser window before recording and re-shot the take
Non-ASCII text in generated filesA helper script that built a test workbook wrote it without a byte-order mark, and the Chinese headers came out garbled in ExcelRe-saved the script as UTF-8 with BOM and confirmed the workbook opened correctly

8. PSP Tables

李震浩 Li Zhenhao

PhaseEstimated (min)Actual (min)
Requirements and planning2025
Design3035
Coding120165
Testing and fixing6090
Documentation4060
Recording3555
Total305430

林子均 Lin Zijun

PhaseEstimated (min)Actual (min)
Requirements and planning1515
Data model and test design3035
Reviewing and defect reporting5070
Documentation3040
Testing support3035
Total155195

9. Self-Check Against the Marking Scheme

RequirementMarksStatusWhere
Markdown post, repository link, coding-standard link10✅This post; links in Section 1; standard in docs/代码规范.md
Implementation ideas, screenshots, division of work20✅Sections 3, 4 and 6
Page layout and styling10✅Section 3.6 and screenshots 1–4
Contact favouriting25✅Section 3.3 and screenshots 3–4
Several contact methods per person10✅Section 3.4 and screenshot 2
Excel export, one row per person25✅Section 3.5 and screenshots 5–6
Excel import25✅Section 3.5 and screenshot 7
Cloud deployment (optional)+15⬜Optional item not taken; the program runs locally
At least three commitsRequired✅Seven commits, screenshot in Section 2
Full run videoRequired✅Section 5, about 3 min 20 s
One PSP table per memberRequired✅Section 8
...全文

相关推荐

高校技术转移中心如何选型管理系统?数智化工具如何破解成果转化三大难题?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

iperf3 安卓版 - 手机网络测速工具(客户端/服务端/双向打流)

基于 iperf3 3.22 源码交叉编译的 Android 原生测速 App,手机可直接作为 iperf3 客户端或服务端。 功能:客户端/服务端双模式;TCP/UDP;多并发流;反向下载 -R;双向打流 --bidir;UDP 带宽按 Mbps 设置;实时速率曲线与当前/平均/峰值;历史记录;Material3 界面。 安装:下载 APK,允许未知来源安装。支持 Android 7.0+,架构 arm64-v8a / armeabi-v7a / x86_64。iperf3 遵循 BSD-3-Clause 协议,版权归 ESnet。

 吖吖伊

生产制造企业智慧工厂MES一体化管理平台解决方案.pptx

生产制造企业智慧工厂MES一体化管理平台解决方案.pptx

公众号:优享智库

考虑分布式电源运行特性的有源配电网智能软开关SOP规划方法【IEEE33节点】(Matlab代码实现)

内容概要:本文研究了考虑分布式电源运行特性的有源配电网智能软开关(SOP)规划方法,并基于IEEE33节点系统进行了Matlab代码实现。该方法旨在通过引入SOP这一先进的电力电子装置,提升配电网对分布式电源(如光伏、风电)的接纳能力与运行灵活性。研究综合考虑了分布式电源出力的波动性和不确定性,构建了以网损最小、电压偏差最小等为目标的优化模型,并采用合适的智能优化算法求解SOP的最佳安装位置和容量配置。文中详细阐述了模型构建的理论基础、关键约束条件的处理方式以及仿真算例的设置与结果分析,验证了所提方法在改善配电网电压质量、降低网络损耗和促进清洁能源消纳方面的有效性。; 适合人群:具备电力系统分析、优化算法基础,从事配电网规划、分布式能源接入等相关研究的研究生、科研人员及电力公司技术人员。; 使用场景及目标:① 掌握智能软开关(SOP)在现代有源配电网中的应用原理与规划方法;② 学习如何将分布式电源的运行特性融入配电网优化模型;③ 获取基于IEEE33节点系统的Matlab代码实现,用于复现经典算例或进行二次开发研究。; 阅读建议:此资源紧密结合理论与实践,不仅提供了详细的数学模型推导,还给出了完整的Matlab代码。读者应在理解优化模型和SOP工作原理的基础上,结合代码进行仿真调试,深入分析不同场景下SOP的配置方案对配电网性能的改善效果。

茜姐_博客

技术转移机构想要获得官方认可,需要满足哪些资质认定标准?.docx

技术转移机构想要获得官方认可,需要满足哪些资质认定标准?

BIZKEEN
评论
收藏 已收藏
分享
返回顶部