EE308FZ Extreme Programming 832401311林子均 832401310李震浩
EE308FZ Extreme Programming Project: A Browser-Based Contact Book
| Field | Detail |
|---|---|
| Course | EE308FZ Software Engineering (FZU–MU) |
| Team | ContactBook Team — Lin Zijun, Li Zhenhao |
| Task | Build 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 |
| Target | Practise 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 |
| Materials | SheetJS documentation, MDN Web Docs, Airbnb JavaScript Style Guide |
Contents
- Repository and Useful Links
- Commit History and Member Statistics
- 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
- Screenshots
- Full Run Video
- Division of Work and Contribution
- Difficulties and How We Solved Them
- PSP Tables
- Self-Check Against the Marking Scheme
1. Repository and Useful Links
| Item | Link |
|---|---|
| Source code | https://github.com/77icc/contact-book |
| Coding standard | https://github.com/77icc/contact-book/blob/main/docs/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83.md |
| Recorded demonstration | https://github.com/77icc/contact-book/blob/main/docs/demo.mp4 |
| How to run | Download 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 | Author | What it delivered |
|---|---|---|---|
| 1 | b4693f2 | 77icc | First version of the page skeleton and the monochrome stylesheet |
| 2 | 0b77297 | 77icc | Bundled the SheetJS library so the page can read and write workbooks |
| 3 | 2f61273 | 77icc | Creating, editing, deleting contacts, pinning favourites and the favourites-only switch |
| 4 | 9515c7f | 77icc | Project description and instructions for running it |
| 5 | 32d6d95 | 77icc | Team coding standard and commit-message convention |
| 6 | d1f42b8 | 77icc | Screenshots of each feature plus the exported spreadsheet |
| 7 | 26a3986 | 77icc | Full demonstration video |
| Member | Student ID | Commits | Main responsibility |
|---|---|---|---|
| 林子均 Lin Zijun | 832401311 | 3 | Data model, test cases and defect reports, revision of the write-up |
| 李震浩 Li Zhenhao | 832401310 | 7 | Page 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:
| Behaviour | Function |
|---|---|
| Show the list in the right order | sortContacts(list) |
| Filter by search text or favourites | getVisibleContacts() |
| Add / edit / delete one record | openDialog(), submitForm(), removeContact() |
| Move data in and out of Excel | handleImport(), 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

The dialog used for both adding and editing

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

The "favourites only" switch in action

Triggering the export

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

Importing that same workbook back into an empty list

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.
- Watch or download: docs/demo.mp4
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
| Member | Work done | Contribution |
|---|---|---|
| 李震浩 Li Zhenhao | Page structure and stylesheet, all interaction logic, Excel import and export, recording of the demonstration | 50% |
| 林子均 Lin Zijun | Data model of a contact record, manual test cases and defect reports, revision of this write-up | 50% |
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
| Difficulty | What happened | How it was handled |
|---|---|---|
| The dialog appeared on page load | The overlay used display:flex, which overrode the hidden attribute, so the mask was visible before any click | Added a global [hidden] { display: none !important; } rule and re-tested every open and close path |
| Export dropped hidden records | Export reused the filtered list, so a search left rows out of the file | Introduced a separate full-list sort and pointed export at it, keeping filtering only for the screen |
| The demonstration kept failing | The recording widget covered the top-right buttons, so clicks landed on nothing and the later typing went nowhere | Resized the browser window before recording and re-shot the take |
| Non-ASCII text in generated files | A helper script that built a test workbook wrote it without a byte-order mark, and the Chinese headers came out garbled in Excel | Re-saved the script as UTF-8 with BOM and confirmed the workbook opened correctly |
8. PSP Tables
李震浩 Li Zhenhao
| Phase | Estimated (min) | Actual (min) |
|---|---|---|
| Requirements and planning | 20 | 25 |
| Design | 30 | 35 |
| Coding | 120 | 165 |
| Testing and fixing | 60 | 90 |
| Documentation | 40 | 60 |
| Recording | 35 | 55 |
| Total | 305 | 430 |
林子均 Lin Zijun
| Phase | Estimated (min) | Actual (min) |
|---|---|---|
| Requirements and planning | 15 | 15 |
| Data model and test design | 30 | 35 |
| Reviewing and defect reporting | 50 | 70 |
| Documentation | 30 | 40 |
| Testing support | 30 | 35 |
| Total | 155 | 195 |
9. Self-Check Against the Marking Scheme
| Requirement | Marks | Status | Where |
|---|---|---|---|
| Markdown post, repository link, coding-standard link | 10 | ✅ | This post; links in Section 1; standard in docs/代码规范.md |
| Implementation ideas, screenshots, division of work | 20 | ✅ | Sections 3, 4 and 6 |
| Page layout and styling | 10 | ✅ | Section 3.6 and screenshots 1–4 |
| Contact favouriting | 25 | ✅ | Section 3.3 and screenshots 3–4 |
| Several contact methods per person | 10 | ✅ | Section 3.4 and screenshot 2 |
| Excel export, one row per person | 25 | ✅ | Section 3.5 and screenshots 5–6 |
| Excel import | 25 | ✅ | Section 3.5 and screenshot 7 |
| Cloud deployment (optional) | +15 | ⬜ | Optional item not taken; the program runs locally |
| At least three commits | Required | ✅ | Seven commits, screenshot in Section 2 |
| Full run video | Required | ✅ | Section 5, about 3 min 20 s |
| One PSP table per member | Required | ✅ | Section 8 |
相关推荐
高校技术转移中心如何选型管理系统?数智化工具如何破解成果转化三大难题?.docx
科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。
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
技术转移机构想要获得官方认可,需要满足哪些资质认定标准?


