编程与软件工程eugenkiss.github.io
7GUIs:七个 GUI 编程任务
7GUIs
2020 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
7GUIs 是一个 GUI 编程基准,用七个代表性任务(计数器、温度转换、航班预订、计时器、CRUD、画圆、电子表格)来比较不同语言和框架实现交互界面的难易程度。页面列出任务定义与设计目标,尤其关注数据绑定、状态管理等常见难点。
为什么经久不衰:任务小而覆盖面广,能迅速暴露框架在数据绑定和状态管理上的真实设计权衡,所以多年来反复被开发者拿来讨论和比较。
HN 评论精选
温度转换任务揭示了双向数据绑定中“正确性”与可用性之间的设计权衡。
我喜欢温度转换器这个任务,因为它立刻引出实现数据绑定时出现的模糊设计问题和烦人细节。比如:另一侧到底何时更新?用户切换焦点时(焦点去哪?)还是每次按键?如果用户想输入 20°C,却暂时看到 2°C 对应的华氏值,这对用户合理吗?输入非法值(或清空输入框,这经常必须做)会怎样?输入错误值后又往另一个框输入会怎样?等等。我认为“形式上正确”的系统和用起来可用、直觉的系统之间有很多有趣的张力,尤其是在双向数据流中,这些张力很快就显现。
xg15查看英文原文
I like the temperature converter one because it immediately introduces some of the more fuzzy design questions and annoying details that pop up when you implement data binding. Such as: when exactly should the other side update? When the user switches focus (where to?) or on every keystroke? Does it make sense to a user that they temporarily see the Fahrenheit value for 2°C if they really want to type in 20°C? What happens if they type an invalid value (or clear the box, which they often have to do)? What happens if they type an incorrect value and then type something into the other field? Etc etc. I think there are a lot of interesting tensions between a "formally correct" system and one that feels usable and intuitive to use. Especially with bidirectional data flow, they show up quickly.
希望有跨框架实现合集和基准,方便比较框架复杂度;现有 TodoMVC 太简单且有偏向。
我很想看到一个网站或 git 仓库,收录各大框架(桌面+Web)对这 7 个 GUI 的实现,并附上基准测试和端到端测试。这样就能一眼看出使用某个框架会碰到什么样的复杂度。有人知道这样的合集吗?我知道最接近的是 todomvc.com,但它偏向 MV* 框架/库、只面向 Web,而且例子太简单。我最早是在接触各种 statecharts 后了解到 7GUIs 的,xState(JS 的 statecharts 库)实现了一些 7GUIs 任务:https://xstate.js.org/docs/tutorials/7guis/counter.html
diggan查看英文原文
I'd love to see one website/git repository with implementations from every major framework (desktop+web) implementing these 7 GUIs, and have some benchmarks additionally to some E2E tests. Would make it easy to see at a glance what kind of complexity you would get exposed to as a user of that framework. Anyone know any collection? Closest to that that I know about is http://todomvc.com/ but it's biased in a way that it's very trivial example, geared towards MV* frameworks/libraries and only for web. I fist became familiar with 7GUIs after getting into statecharts of the various flavors, and xState (statecharts in JS) has some of the tasks from 7GUIs implemented: https://xstate.js.org/docs/tutorials/7guis/counter.html
作者于2019年去世,项目成为其遗作。
供参考:不幸的是,7GUIs 的作者 Eugen 已经去世。R.I.P. 来源:https://github.com/eugenkiss/7guis/issues/28#issuecomment-518203146
asp_net查看英文原文
JFYI: Unfortunately, Eugen, the author of 7GUIs, has passed away. R.I.P. Edit: Source: https://github.com/eugenkiss/7guis/issues/28#issuecomment-518203146
指出页面遗漏了 Racket 实现并给出链接。
遗憾的是,Racket(网站/GitHub)的实现没有被列出来:https://github.com/mfelleisen/7GUI
spdegabrielle查看英文原文
The Racket (site)[https://racket-lang.org/] / (GitHub)[https://github.com/racket] implementations are not listed sadly: https://github.com/mfelleisen/7GUI
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选