Zhang sufang-EE308FZ Extreme Programming-AddressBook

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

EE308FZ Extreme Programming — AddressBook: Frontend Development and Team Collaboration

Assignment Information

ItemContent
Course for This AssignmentSoftware Engineering (FZU–MU)
Team NameGenius Programmer
Assignment RequirementsExtreme Programming — November 17, 2026
Objectives of This AssignmentBuild an address book with favorites, multiple contact methods, Excel import/export, and a usable interface; practice Git collaboration, testing, and deployment.
Other ReferencesGitHub Repository, Coding Standards, API Specification
AuthorZhang Sufang — MUID: 24126519; FZUID: 83240226
TeammateYe Jiahui — MUID: 24125474; FZUID: 83240225

This post is written from the frontend developer's point of view. It covers the project links, commit statistics,
implementation ideas, running screenshots and demo video, division of labour, contribution evaluation,
cooperation difficulties, and the PSP tables for both team members.

Table of Contents

  1. Project Address and Links
  2. Division of Labour · Contribution ratio
  3. Commit History and Contribution Statistics
  4. Functional Implementation Ideas (Frontend)
  5. Screenshots of the Running System
  6. Demo Video
  7. PSP Tables
  8. Cooperation Difficulties and How We Resolved Them
  9. Reflections
  10. Appendix

ItemLink
GitHub repositoryhttps://github.com/JiahuiYe-FZU/EE308FZ-AddressBook
Live frontend (demo)https://ee308fz-addressbook-web.onrender.com/
Live backend APIhttps://ee308fz-addressbook.onrender.com/api/v1/contacts
API contractdocs/API.md
Coding standardsdocs/CODING_STANDARDS.md
Deployment guidedocs/DEPLOY_RENDER.md
Frontend modulefrontend/
Backend modulebackend/

The application is a decoupled address book. The frontend is a Vue 3 SPA
served by a Render Static Site; the backend is a Flask REST service running under gunicorn on a Render
Web Service. Both are built from the same repository but from different branches (frontend / backend)
and later merged into main through pull requests.


2. Division of Labour

MemberRoleMain responsibilities
Zhang SufangFrontend developerUI/UX implementation (4 design phases), Vue 3 component architecture, state store, API client + Mock layer, Excel import/export UI, responsive layout, form validation & error mapping, frontend build and Render Static Site deployment, acceptance checklist
Ye JiahuiBackend developerAPI contract (docs/API.md), Flask application factory, SQLite schema and data access, request validation, Excel import/export service (openpyxl), pytest suite (60 tests), WSGI/gunicorn production entry, CORS and environment configuration, Render Web Service deployment
BothIntegrationBranch strategy and PR review, end-to-end debugging (CORS, cold starts, ephemeral storage), README and deployment documentation

Interface-first collaboration: the API contract was written and merged before the UI integration, so the
frontend could be developed against a mock layer and swapped to the real Flask service without rewriting
components.

2.1 Contribution ratio (total = 100)

MemberContributionBasis of evaluation
Zhang Sufang5033 frontend source files (views, 15 components, store, API + mock layer, utils, styles), four UI design phases, responsive layouts, Excel import/export UI, validation-error mapping, frontend build and Static Site deployment
Ye Jiahui50API contract, Flask app factory and routes, SQLite schema and data access, Excel service, 60 automated tests, WSGI/gunicorn and environment configuration, Web Service deployment
Total100Feature sets are complementary (UI vs. API); each side owns roughly half of the graded features (favourites, multi-attribute contacts, import/export) end to end

3. Commit History and Contribution Statistics

3.1 Commit history

img

Figure 1 — Commit history of the frontend branch. The frontend source was imported in a single feature
commit, then integrated with the backend branch through pull requests.

3.2 Contributor statistics

img

Figure 2 — GitHub Insights → Contributors (commits to main, merge commits excluded).

ContributorRoleCommitsLines addedLines deleted
Ye Jiahui (JiahuiYe-FZU)Backend + integration93,5431,148
Zhang Sufang (KleinZhang168)Frontend49,550254

Repository totals: main contains both modules and the merge commits of three pull requests; four branches
exist (main, frontend, backend, fix/backend-deployment). The commit counts in the table above are the
non-merge commits reported by GitHub Insights.

Note on commit granularity: the 41-file frontend module was originally delivered as one large commit
(feat(frontend): add complete Vue 3 frontend source and deployment config). Follow-up work — the cold-start
timeout fix, deployment links in the README, and this article — is committed separately, which makes the
per-contributor history a better reflection of the ongoing work. This was one of the process lessons of the
project (see Section 8).


4. Functional Implementation Ideas (Frontend)

4.1 Technical stack and architecture

  • Vue 3 (Composition API, <script setup>) + Vite 7 + Element Plus + Vue Router + Axios.
  • Three-layer structure: views (ContactListView, SettingsView) → components (layout, list, detail,
    dialogs, common widgets) → api / stores / utils.
  • A single reactive store (stores/contactStore.js) owns list data, filters, pagination, selection and detail
    state. Views stay declarative; components receive props and emit events.

4.2 API layer that survives both Mock and real backend

api/request.js creates one Axios instance:

  • baseURL = import.meta.env.VITE_API_BASE_URL || '/api/v1' — relative path in development (Vite proxy),
    absolute URL on the deployed Static Site.
  • A response interceptor unwraps the contract envelope { code, message, data }, so every component works with
    plain data objects.
  • Errors are normalised once: error.code, error.errorCode, error.details, plus a single toast. Blob
    responses (Excel export) bypass the unwrapping so the file can be downloaded directly.
  • api/contacts.js switches between api/mock.js and the real endpoints with VITE_USE_MOCK. Production
    builds default to the real API, so a deployed build can never silently fall back to demo data.

This Mock layer was the key to parallel development: the UI was fully usable before the backend existed, and the
same components later ran against Flask without changes.

4.3 List, search, filtering and pagination

  • Debounced search (300 ms) over name, notes, phone numbers and emails; previous requests are cancelled with
    AbortController so slow responses cannot overwrite newer results.
  • Group filter with live count badges, favourites-only switch, page sizes 10/20/50, and client-side sorting of
    the current page.
  • Optimistic favourite toggling (PATCH /contacts/{id}/favorite) with rollback and an error toast if the
    request fails.

4.4 Contact editor and field-level validation

  • Create/edit dialog with dynamic rows for phones, emails, social accounts and addresses, label presets that can
    be searched and created, and mutually exclusive primary marks.
  • The backend returns 400 VALIDATION_ERROR with a details object; the dialog maps each entry back to the
    exact field/row, so a bad phone number highlights that row instead of showing a generic error.
  • Dirty-state check before closing, Esc to dismiss, and focus restoration for accessibility.

4.5 Excel import / export

  • Export downloads the filtered set as .xlsx (blob + Content-Disposition filename parsing).
  • Import provides drag-and-drop, .xlsx and 10 MB checks, upload progress, cancellation, and a result panel
    with success/failure counts; failed rows can be exported as a CSV.
  • The import template is shipped in public/templates/ so the download works on the deployed site.

4.6 Responsive layout and UX details

  • ≥ 1280 px: three columns (sidebar, list, persistent detail panel).
  • 1024–1279 px: detail becomes a right-side drawer.
  • 768–1023 px: icon-only sidebar, condensed 5-column table, overflow menu.
  • Skeleton screens on first load, empty/error states with retry, keyboard shortcuts (Ctrl/⌘ + K, Esc,
    Enter), and design tokens (styles/tokens.css) with Element Plus overrides.

4.7 Deployment adaptation (frontend side)

  • Build-time configuration: VITE_API_BASE_URL and VITE_USE_MOCK are injected on Render, so the same source
    builds for local development and production.
  • SPA routing: the Static Site rewrites /* to /index.html, otherwise refreshing /settings returns 404.
  • Cold starts: the free backend instance sleeps and needs 30–60 s to wake up. The Axios timeout was raised to
    60 s with an explicit "service is starting" message, so the first visit on another machine no longer shows an
    empty list.

5. Screenshots of the Running System

Deployed application (real Flask + SQLite backend, not Mock data):

img

*Figure 3 — https://ee308fz-addressbook-web.onrender.com

Feature details (captured during acceptance testing):

Create dialog with dynamic rows

img

Excel import result

img


6. Demo Video


7. PSP Tables

7.1 Zhang Sufang — Frontend

PSP2.1StageTime (h)%
PlanningEstimate0.55
DevelopmentAnalysis (API contract, UI spec)1.2512.5
DevelopmentDesign spec (UI design docs, 3 phases)2.020
DevelopmentDesign review0.55
DevelopmentCoding standard0.257.25
DevelopmentDesign (component tree, tokens)3.030
DevelopmentCoding (33 components / views / utils)2.525
DevelopmentCode review1.010
DevelopmentTest plan (acceptance checklist)0.55
DevelopmentTesting (manual, build, deployment)2.525
Record Time SpentTime log0.55
PostmortemSummary0.51.3
Total10.0100

8. Cooperation Difficulties and How We Resolved Them

  1. Branch strategy disagreement. We first created an integration branch (dev) containing both modules, but
    the team preferred per-module branches with pull requests. Resolution: the frontend work was rebased onto the
    frontend branch, dev was deleted, and integration now happens through PRs (frontend → main,
    backend → main).

  2. The Excel template silently disappeared from the repository. The root .gitignore contained *.xlsx,
    which also excluded frontend/public/templates/contacts-import-template.xlsx; the deployed site would have
    returned 404 for the template download. Resolution: negation rules
    (!frontend/public/templates/*.xlsx) plus a git ls-files check in the release checklist.

  3. Cross-origin calls between two Render services. A Static Site and a Web Service live on different
    domains, so the browser blocked API requests. Resolution: the backend reads allowed origins from the
    CORS_ORIGINS environment variable, and the frontend receives the API base URL at build time via
    VITE_API_BASE_URL.

  4. "My contacts are invisible on my teammate's computer." The free instance sleeps after 15 minutes and needs
    30–60 s to wake up, while the frontend timeout was 15 s, so the first visit on another machine failed and
    showed an empty list. Resolution: timeout raised to 60 s with a clear message; the data itself was always
    shared server-side.

  5. The backend could not start on Render. The original entry point bound 127.0.0.1:5000 and had no WSGI
    target. Resolution: added backend/wsgi.py, added gunicorn to the requirements (non-Windows only), and
    moved the database path and CORS origins to environment variables.

  6. Free-tier storage is ephemeral. Redeploys reset the SQLite file, so demo data disappeared after each
    deployment. Resolution: documented clearly, demo data re-imported before acceptance, and the persistent-disk
    option (paid plan, /var/data) documented in docs/DEPLOY_RENDER.md.

  7. One giant frontend commit. Delivering 41 files in a single commit made the contribution graph look
    lopsided and made review harder. Resolution: follow-up work is now committed incrementally, and the lesson
    is recorded here.

  8. Mock/real parity. Validation messages and edge cases drifted between the mock layer and Flask. Resolution:
    the mock was aligned with the contract (docs/API.md) and a review commit fixed the remaining differences.


9. Reflections

The most valuable part of this assignment was not any single feature but the contract-first workflow: writing
docs/API.md and a mock layer before the backend existed let both of us work in parallel, and integration took
hours instead of days. The deployment step also taught us that "it works on my machine" is a weak claim: free
cloud instances sleep, files disappear, ports must be bound to 0.0.0.0, and cross-origin rules are real. Every
one of those issues is now written down in the deployment guide so the next run is boring — which is exactly what
a deployment should be.


10. Appendix

...全文

相关推荐

CPI01 CIMPC下账异常报告.pptx

CPI01 CIMPC下账异常报告.pptx

2601_94999227

工业旅游基于Python与AIGC的内容生成与营销系统设计:园区知识库构建及游客画像推荐模型实现 项目介绍 基于Python和AIGC的工业旅游园区内容生产与营销辅助系统设计与实现(含模型描述及部

内容概要:本文介绍了一个基于Python和AIGC技术的工业旅游园区内容生产与营销辅助系统的设计与实现。系统通过构建数据采集与治理、园区知识库、内容生成、游客画像与推荐、营销评估五大模型,实现对园区文本资源的统一管理、智能化内容生成与多平台适配、游客群体聚类分析与个性化推荐,并建立从内容发布到转化效果评估的运营闭环。项目利用TF-IDF、余弦相似度、K-Means聚类等算法,结合FastAPI后端服务与数据可视化手段,提升内容生产效率与营销精准度,同时提供完整的代码示例,涵盖文本清洗、关键词提取、行为标准化、推荐算法与审核规则等关键环节。; 适合人群:具备一定Python编程基础,熟悉数据分析与机器学习基础算法的研发人员、数据分析师及工业旅游领域数字化转型从业者,尤其适合工作1-3年希望将AI技术应用于实际业务场景的技术人员。; 使用场景及目标:①解决工业旅游园区资料分散、内容产出慢、风格单一等问题,提升多平台内容生成效率;②通过游客行为数据分析实现客群细分与精准推荐,优化营销策略;③构建可量化、可追溯的营销效果评估体系,支持数据驱动的运营决策; 阅读建议:此资源以实际项目为导向,强调模型应用与代码实践,建议读者结合提供的代码示例进行动手演练,深入理解各模块间的数据流转与系统集成逻辑,并可根据自身园区业务特点进行功能扩展与定制化开发。

nantangyuxi

【ADMM、碳排放】基于分布式ADMM算法的考虑碳排放交易的电力系统优化调度研究【IEEE6节点、IEEE30节点、IEEE118节点】(Matlab代码实现)

内容概要:本文系统研究了基于分布式ADMM算法的考虑碳排放交易机制的电力系统优化调度方法,并提供了在IEEE6节点、IEEE30节点和IEEE118节点标准系统上的Matlab代码实现。研究围绕多区域互联电网环境,构建了融合经济调度与碳排放成本的联合优化模型,采用交替方向乘子法(ADMM)实现问题的分布式求解,有效提升了大规模系统计算效率与区域间协调能力。文中详细阐述了模型建立过程、ADMM算法设计、收敛性分析及仿真验证流程,重点展示了碳交易价格、排放配额等因素对机组出力、碳成本及系统低碳运行的影响,体现了该方法在促进清洁能源消纳和降低系统碳足迹方面的优势。; 适合人群:具备电力系统分析、优化理论基础及Matlab编程能力,从事能源互联网、低碳电力调度、综合能源系统优化等方向的高校研究生、科研机构研究人员及电力行业工程技术开发者。; 使用场景及目标:①应用于含碳约束的多区域电力系统经济-低碳协同调度;②学习和复现基于ADMM的分布式优化算法在能源系统中的建模与实现;③为碳市场机制下电网运行优化、跨区域能源协调与政策仿真提供技术支持与参考方案。; 阅读建议:建议读者结合所提供的Matlab代码逐模块分析算法实现逻辑,重点关注目标函数构建、拉格朗日增广项设计及ADMM迭代更新步骤,建议在不同测试系统中调整碳交易参数进行仿真实验,以深入理解其对调度结果的影响机制与分布式求解的收敛特性。

wlz249

悬臂梁的有限元分析,采用多重网格高斯-赛德尔方法求解(Matlab代码实现)

内容概要:本文系统阐述了悬臂梁的有限元分析方法,采用多重网格高斯-赛德尔迭代法高效求解其力学响应,并配套提供了完整的Matlab代码实现。研究首先建立悬臂梁的有限元模型,通过网格离散化将其力学问题转化为大型稀疏线性方程组;为克服传统迭代法收敛缓慢的缺陷,引入多重网格法作为加速策略,结合高斯-赛德尔迭代在不同网格层级上执行光滑操作,显著提升了求解效率。文中详细剖析了刚度矩阵的数值组装过程、位移边界条件的精确施加方法、以及多层网格间关键的限制(Restriction)与插值(Prolongation)算子的实现机制,完整呈现了从模型构建到数值求解的全流程。最终通过数值仿真,清晰展示了悬臂梁在载荷作用下的位移场与应力场分布云图,验证了该联合算法在保证计算精度的同时,具备优异的收敛性能和计算效率。; 适合人群:具备有限元分析、计算力学及数值线性代数基础知识,并熟悉Matlab编程语言的理工科硕士、博士研究生及科研人员,特别适用于从事结构工程、机械设计或计算物理学等相关领域研究的学者。; 使用场景及目标:①深入掌握有限元法在经典弹性力学问题(如悬臂梁)中的具体建模步骤与实现细节;②透彻理解多重网格法的核心思想及其在加速大规模科学计算中的关键作用;③学习高斯-赛德尔迭代法与多尺度数值技术的有机结合方式,掌握提升大型线性系统求解效率的先进策略。; 阅读建议:建议读者务必结合文中的Matlab代码进行逐行调试与跟踪,重点关注刚度矩阵的构建逻辑、边界条件的处理技巧以及多重网格循环(如V-cycle)的实现过程。为进一步深化理解,可尝试修改模型参数(如网格密度、材料属性或外加载荷),观察其对计算结果、收敛速度和内存消耗的影响,从而全面评估该数值方法的鲁棒性与适用范围。

然哥依旧

【心理健康信息化】基于Python的智能测评与预约系统设计:融合量表计分、风险分层及资源调度模型的高校心理服务管理平台 项目介绍 基于Python的学生心理测评预约与结果管理系统设计与实现(含模型描述

内容概要:本文详细介绍了一个基于Python的学生心理测评预约与结果管理系统的设计与实现,旨在通过技术手段提升高校心理服务的规范化、效率化与安全性。系统集成了学生信息管理、在线心理量表测评(如PHQ9、GAD7、PSS10)、自动计分、风险分层识别、智能预约匹配、咨询状态跟踪及数据安全审计等功能。项目采用模块化架构,涵盖表现层、业务服务层、数据存储与安全监控等多个层次,并引入量表版本控制、规则与概率融合的风险模型、基于匈牙利算法的最小成本时段匹配、预约状态机管理以及敏感字段加密等核心技术。配套提供了完整的模型描述与部分Python代码示例,包括答案校验、计分逻辑、风险预测、资源调度和审计摘要等关键环节的实现。; 适合人群:具备一定Python编程基础,熟悉Web开发或数据分析的高校研究人员、软件开发者、心理健康信息化项目参与者,以及心理学与计算机交叉领域的学生或技术人员。; 使用场景及目标:①用于高校心理中心建设数字化服务平台,优化心理测评与咨询服务流程;②支持心理风险的早期识别与闭环跟踪,提升危机干预响应能力;③为教学科研提供可复现的模拟数据生成方法与系统原型参考,推动心理健康领域的智能化管理实践。; 阅读建议:此资源不仅提供系统设计思路与技术实现细节,还强调隐私保护、伦理合规与专业协作的重要性。建议读者结合代码示例深入理解各模型的工作机制,并在实际应用中注重与心理咨询专业流程的衔接,确保技术服务于人的健康发展。

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