j8typz 发表于 2024-6-29 16:59:44

前端苦HTML+CSS久已


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">背景</span></strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">当下,构建交互式应用程序的主流技术是 Web 技术,其中<span style="color: black;">包含</span> HTML、CSS 与 Java。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在过去的 10 年,Web 技术生态<span style="color: black;">出现</span>了翻天覆地的变化,<span style="color: black;">包含</span>层出不穷的<span style="color: black;">研发</span>框架,诸如 React、Vue、Svelte,<span style="color: black;">亦</span><span style="color: black;">包含</span>日新月异的前端工程化<span style="color: black;">工具</span>,<span style="color: black;">例如</span> Webpack、esbuild、Vite 等等。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">但归根结底,<span style="color: black;">她们</span>都逃不开 HTML、CSS、Java 三剑客的范畴。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Web 技术生态成熟、稳定,然而却存在一个致命的问题:<span style="color: black;">运用</span> Web 技术去构建跨平台应用程序并不是一件简单的事情。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这<span style="color: black;">亦</span>是<span style="color: black;">为何</span>许多平台特定的框架(platform-specific frameworks)与跨平台框架(cross-platform frameworks)依然受到欢迎的<span style="color: black;">原由</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">例如</span>其</span><span style="color: black;">中最著名的跨平台框架 Flutter,它部分基于浏览器引擎的技术,实现了「</span><span style="color: black;"><strong style="color: blue;">编写一次,全平台运行</strong></span><span style="color: black;">」的<span style="color: black;">目的</span>。<span style="color: black;">况且</span>这些框架,<span style="color: black;">亦</span>基本不<span style="color: black;">运用</span> HTML、CSS 这些 Web 技术。这是<span style="color: black;">为何</span>呢?</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">苦 HTML+CSS 久已</span></strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">由于</span> HTML 诞生的目的问题,以及 HTML 与 CSS 的<span style="color: black;">研发</span>体验问题。</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">HTML 即超文本标记语言,最初是三十年前为了制作可链接的文档而发明的,而不是为了做应用程序。它<span style="color: black;">更加多</span></span><span style="color: black;"><span style="color: black;">是一种标记而不是一种语言。</span><span style="color: black;">大<span style="color: black;">都数</span>人<span style="color: black;">乃至</span>都不将编写 HTML 视为编程,<span style="color: black;">由于</span>它<span style="color: black;">基本</span>不是一种编程语言。</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">直到<span style="color: black;">显现</span> HTML5 (<span style="color: black;">一般</span>被<span style="color: black;">叫作</span>为 H5)、CSS3 和 ES5 版本之后的 Java,人们才<span style="color: black;">逐步</span><span style="color: black;">起始</span>用这些技术制作 Web 应用程序。在那之前,HTML 只是用于完成他最<span style="color: black;">起始</span>的目的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://q0.itc.cn/q_70/images03/20240513/6a38ed908dde444796ead88b2d52e1cd.png" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">但做成 Web 应用的可行性,最大还是来自于 Java 性能的<span style="color: black;">提高</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上面是 Lin Clark 介绍 Java 性能历史的一张图。从2008年<span style="color: black;">起始</span>,Java 性能就<span style="color: black;">起始</span>飞速<span style="color: black;">提高</span>。</span><span style="color: black;">这<span style="color: black;">针对</span>应用程序的<span style="color: black;">最后</span>用户<span style="color: black;">来讲</span>有巨大的好处,<span style="color: black;">由于</span>做出来的应用程序<span style="color: black;">最终</span>不卡了,<span style="color: black;">乃至</span><span style="color: black;">能够</span>对性能有所期待了。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">然则</span>,<span style="color: black;">针对</span><span style="color: black;">研发</span>者<span style="color: black;">来讲</span>,<span style="color: black;">仍然</span>逃不开编写 HTML+CSS。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">就算<span style="color: black;">运用</span><span style="color: black;">有些</span>前沿的前端框架,如 React、Vue、Angular 等,<span style="color: black;">咱们</span>仍然<span style="color: black;">必须</span>编写类似 HTML 的代码,并仔细<span style="color: black;">调节</span> CSS <span style="color: black;">或</span> CSS 预处理器(如 SCSS、Saas)的样式表。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这缓慢、枯燥、<span style="color: black;">况且</span>乏味。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">太多的人力、时间被浪费在实现图形用户界面的细节上,<span style="color: black;">运用</span><span style="color: black;">有些</span>并不是一<span style="color: black;">起始</span>就为了 UI 而设计的技术。这<span style="color: black;">引起</span><span style="color: black;">研发</span>者经常要来回<span style="color: black;">调节</span>样式、处理浏览器兼容性问题、应用奇怪的 CSS 技巧、避开性能陷阱等等。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">另一</span>,还<span style="color: black;">必须</span>在过度发展的 NPM 生态系统中,<span style="color: black;">运用</span><span style="color: black;">哪些</span><span style="color: black;">繁杂</span>的前端工程<span style="color: black;">工具</span>来进行应用程序的构建。这个过程效率<span style="color: black;">亦</span>非常低下,<span style="color: black;">研发</span>体验非常痛苦。</span><span style="color: black;"><span style="color: black;">更不要说 Web 应用在跨平台需求中会遇到<span style="color: black;">更加多</span>的陷阱,<span style="color: black;">例如</span>平台兼容性、体积<span style="color: black;">体积</span>、性能问题,等等。</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">此刻,<span style="color: black;"><span style="color: black;">咱们</span>质疑,<span style="color: black;">保持</span><span style="color: black;">运用</span> HTML 和 CSS 的理由到底是什么?</span></span></span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">其他非 Web 框架</span></strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span><span style="color: black;">咱们</span>再回过头来<span style="color: black;">瞧瞧</span>其他的非 Web 框架。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">Ele</span></strong></span><span style="color: black;"><strong style="color: blue;"><span style="color: black;">ctron </span></strong></span><span style="color: black;"><span style="color: black;">首要</span>被<span style="color: black;">咱们</span>排除。虽然微软用它做出了 <span style="color: black;">VS</span><span style="color: black;">Code <span style="color: black;">这般</span>成熟的跨平台应用程序,但</span><span style="color: black;">亦</span>投入了巨大的成本,并且<span style="color: black;">通常</span><span style="color: black;">研发</span>者可<span style="color: black;">无</span>这么<span style="color: black;">浑厚</span>的财力。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">但最<span style="color: black;">重要</span></span><span style="color: black;">的是,VSCode 其实是用 Web 技术做出来的,Electron 只是<span style="color: black;">帮忙</span>它做<span style="color: black;">成为了</span>跨平台应用而已。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">瞧瞧</span><span style="color: black;">咱们</span>还有什么其他<span style="color: black;">选取</span>:</span></p>有<span style="color: black;">有些</span>是自计算机黄金时代<span style="color: black;">起始</span>就存在的特定平台的框架,例如 Windows 的 MFC,macOS 的 Cocoa,以及 UNIX/Linux 的 GTK。其他<span style="color: black;">有些</span>则是更现代的移动端框架,如专门为 iOS、Android 或其他移动操作系统专门服务的<span style="color: black;">研发</span>框架。
    而在跨平台框架中,值得<span style="color: black;">重视</span>的是广泛采用的 Qt 框架。但它<span style="color: black;">重点</span>用于桌面软件<span style="color: black;">研发</span>。<span style="color: black;">这儿</span>的跨平台<span style="color: black;">重点</span><span style="color: black;">指的是</span>跨越<span style="color: black;">区别</span>的桌面操作系统,如 Windows/Linux/macOS,但这几年 Qt <span style="color: black;">亦</span><span style="color: black;">逐步</span>在往移动端与 Web 端在<span style="color: black;">奋斗</span>,虽然<span style="color: black;">无</span>取得什么成就。
    第三种<span style="color: black;">便是</span>这几年<span style="color: black;">起始</span>流行的全新跨端<span style="color: black;">方法</span>,如 Flutter,它是一个以移动端为主的跨平台框架,但在 Web 端和桌面端<span style="color: black;">亦</span>有所<span style="color: black;">做为</span>。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">随着近年来 Web 应用的比例<span style="color: black;">持续</span><span style="color: black;">增多</span>,桌面端应用<span style="color: black;">逐步</span>式微。但正是<span style="color: black;">由于</span> Web 应用在跨端上的致命问题,这些非 Web 框架仍有一席之地,并且看上去<span style="color: black;">亦</span><span style="color: black;">拥有</span>不可替代性。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">当然,其中的某些年代过于久远的<span style="color: black;">研发</span>框架,<span style="color: black;">研发</span>人员的体验<span style="color: black;">乃至</span>比编写 HTML 更糟糕,<span style="color: black;">由于</span>他</span><span style="color: black;">们可能被迫编写类似于<span style="color: black;">这般</span>的</span><strong style="color: blue;"><span style="color: black;">命令式和面向对象</span></strong><span style="color: black;">的代码。</span></p>

    <span style="color: black;"><span style="color: black;">var</span>count = <span style="color: black;">0</span></span>
    <span style="color: black;"><span style="color: black;">let</span>stack = <span style="color: black;">new</span>VStack</span>
    <span style="color: black;"><span style="color: black;">let</span>text = <span style="color: black;">new</span>Text(<span style="color: black;">"Count: \(count)"</span>)</span>
    <span style="color: black;">stack.add_child(text)</span>
    <span style="color: black;"><span style="color: black;">let</span>button = <span style="color: black;">new</span>Button(<span style="color: black;">"Increment"</span>)</span>
    <span style="color: black;">button.set_onclick(||</span>
    <span style="color: black;">count += <span style="color: black;">1</span></span>
    <span style="color: black;">text.set_text(<span style="color: black;">"Count: \(count)"</span>)</span>
    <span style="color: black;">)</span>
    <span style="color: black;">stack.add_child(button)</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">不是编写</span><span style="color: black;"><strong style="color: blue;">声明式</strong></span><span style="color: black;">且响应式的代码,就像<span style="color: black;">程序员<span style="color: black;">始终</span>梦寐以求的</span><span style="color: black;">这般</span>:</span></p>

    <span style="color: black;"><span style="color: black;"><span style="color: black;">struct</span><span style="color: black;">AppState</span></span>{</span>
    <span style="color: black;"><span style="color: black;">count</span>: i32</span>
    <span style="color: black;">}</span>
    <span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">VStack</span>{</span><span style="color: black;"><span style="color: black;">Text</span>(<span style="color: black;">"count: \(state.count)"</span>)</span><span style="color: black;"><span style="color: black;">Button</span>(<span style="color: black;">"Increment"</span>) {</span><span style="color: black;">state.<span style="color: black;">count</span>+= <span style="color: black;">1</span></span><span style="color: black;">}</span><span style="color: black;">}</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这<span style="color: black;">便是</span><span style="color: black;">为何</span> Flutter 看起来像是<span style="color: black;">研发</span>应用程序的灵丹妙药:</span></p>Flutter 是声明式且响应式的。
      Flutter 真正实现了跨平台,<span style="color: black;">能够</span>制作所有桌面、移动和 Web 应用程序。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">不外</span><span style="color: black;">亦</span>还是有<span style="color: black;">研发</span>者不<span style="color: black;">爱好</span> Flutter,<span style="color: black;">由于</span>它引入了另一种新的、陌生的语言 Dart,以及额外的虚拟机<span style="color: black;">包袱</span>。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Flutter 真正的问题在于与现有生态系统的兼容性,<span style="color: black;">由于</span>人们倾向于更<span style="color: black;">爱好</span>重用已<span style="color: black;">创立</span>的资源和<span style="color: black;">守护</span>成熟的应用程序。编程语言<span style="color: black;">亦</span>是出于<span style="color: black;">一样</span>的<span style="color: black;">原由</span>。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">为<span style="color: black;">认识</span>决 Flutter 的<span style="color: black;">有些</span>问题,有些优秀<span style="color: black;">研发</span>者们尝试<span style="color: black;">研发</span>了 Flutter 的 Java 版本,虽<span style="color: black;">而后</span>来失败了。<span style="color: black;">由于</span> Flutter 本身正在<span style="color: black;">快速</span>迭代,以至于两者<span style="color: black;">没</span>法融洽。<span style="color: black;">不外</span>这部分的工作<span style="color: black;">引起</span>诞生了 Kraken 框架,它<span style="color: black;">准许</span>编码人员编写 HTML,并<span style="color: black;">运用</span> Flutter 引擎进行跨平台渲染。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">等等...</span><span style="color: black;"><span style="color: black;">出现</span>了什么?</span><span style="color: black;"><strong style="color: blue;">在非 Web 框架中再次编写 HTML?</strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">Design to Code<span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span><span style="color: black;">‍</span></span></strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">不!再<span style="color: black;">亦</span>不想写 HTML 了!</p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">尽管如此,<span style="color: black;">咱们</span>不得不承认,HTML+CSS 是<span style="color: black;">暗示</span> UI 的一个很好的组合,<span style="color: black;">由于</span>:</span></p>

      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">HTML 负责内容的结构,CSS 负责内容的样式。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">结构和样式是解耦的,这对工程<span style="color: black;">来讲</span>是有好处的。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">然则</span>在实践中,UI 的工程有时是<span style="color: black;">无</span><span style="color: black;">道理</span>且不必要的。假设<span style="color: black;">咱们</span><span style="color: black;">已然</span>有了设计师<span style="color: black;">供给</span>的高保真设计原型,编码人员<span style="color: black;">必须</span>做的是:</span></p>

      <span style="color: black;">运用</span>代码重新实现设计原型,这在 99% 的<span style="color: black;">状况</span>下是 HTML+CSS 的事情。
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">为<span style="color: black;">刚才</span>重新实现的 UI 添加业务<span style="color: black;">规律</span>。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">第1</span>部分总是让人头疼的源头:<span style="color: black;">触及</span><span style="color: black;">海量</span>的细节、耗时、<span style="color: black;">必须</span>与设计师进行讨论反复沟通,沟通成本很高,<span style="color: black;">倘若</span>设计更新,代码<span style="color: black;">亦</span><span style="color: black;">必须</span>更新,<span style="color: black;">亦</span>许还<span style="color: black;">必须</span>另一场“昂贵”的讨论。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">更<span style="color: black;">不消</span>说,这种工作<span style="color: black;">一般</span>被视为费时费力没技术含量工作,<span style="color: black;">亦</span><span style="color: black;">因此呢</span>就有了<span style="color: black;">大众</span>听到的前端程序员<span style="color: black;">一般</span>被其他非前端程序员所鄙视。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">有些</span>聪明的<span style="color: black;">研发</span>者想出了<span style="color: black;">运用</span>编译器技术或更<span style="color: black;">详细</span>地说是转换器技术来实现设计到代码的<span style="color: black;">处理</span><span style="color: black;">方法</span>,将<span style="color: black;">全部</span>高保真设计转换为<span style="color: black;">设备</span>生成的 HTML+CSS 代码。这个<span style="color: black;">便是</span><span style="color: black;">所说</span>的 Design to Code。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">但它是为<span style="color: black;">制品</span>经理和设计师量身定制的,而不是为<span style="color: black;">研发</span>人员。这种内在问题<span style="color: black;">包含</span>但不限于:</span></p>生成的代码可读性差,不符合项目中现有的编码风格。
      生成代码的<span style="color: black;">很难</span>集成。<span style="color: black;">倘若</span>它依赖于另一个第三方库怎么办?<span style="color: black;">倘若</span>生成的代码更新了,<span style="color: black;">全部</span>大片的变化在版本<span style="color: black;">掌控</span>系统中<span style="color: black;">表现</span><span style="color: black;">是不是</span><span style="color: black;">恰当</span>?
      像 Sketch 或 Figma <span style="color: black;">这般</span>的设计<span style="color: black;">工具</span>,总是<span style="color: black;">能够</span>设计出比 HTML+CSS <span style="color: black;">能够</span>实现的更高级的视觉效果。<span style="color: black;">她们</span><span style="color: black;">乃至</span><span style="color: black;">能够</span>精确<span style="color: black;">掌控</span>每一个像素。而<span style="color: black;">非常多</span>时候,生成的代码可能<span style="color: black;">没</span>法产生与设计原型完全相同的 UI,绝对<span style="color: black;">必须</span><span style="color: black;">有些</span>补丁。但<span style="color: black;">倘若</span>生成的代码更新了,补丁就<span style="color: black;">没</span>法再应用了怎么办?<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">总之,从<span style="color: black;">研发</span>者的<span style="color: black;">方向</span>来看,Design to Code 不是一个好的技术<span style="color: black;">处理</span><span style="color: black;">方法</span>。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">此刻</span>让我</span><span style="color: black;">们<span style="color: black;">瞧瞧</span>什么是 Design as Code。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">Design as Code</span></strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在 VGG 所倡导的 Design as Code <span style="color: black;">研发</span>流程中,用户<span style="color: black;">能够</span>在某种程度上抛弃 HTML+CSS。</p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因</span><span style="color: black;">为设计稿完全替代了 HTML+CSS 的角色,设计<span style="color: black;">便是</span>代码。请记住 VGG 的</span><strong style="color: blue;"><span style="color: black;"><span style="color: black;">第1</span>性原则:<span style="color: black;">经过</span>消除冗余的<span style="color: black;">研发</span>工作来弥合设计与<span style="color: black;">研发</span>两方之间的巨大鸿沟。</span></strong></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://q9.itc.cn/q_70/images03/20240513/787d56aa6bc84bc4aae10900605a3ef9.png" style="width: 50%; margin-bottom: 20px;"></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">很<span style="color: black;">显著</span>的<span style="color: black;">优良</span>:</span><strong style="color: blue;"><span style="color: black;">图形用户界面的设计和<span style="color: black;">研发</span>只<span style="color: black;">必须</span>进行一次,<span style="color: black;">由于</span>两者<span style="color: black;">实质</span>上是一体的。</span></strong><span style="color: black;"><span style="color: black;">因此呢</span>两者的摩擦、讨论会减少,这让双方都更<span style="color: black;">有效</span>。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">针对</span><span style="color: black;">研发</span>人员<span style="color: black;">来讲</span>,</span><strong style="color: blue;"><span style="color: black;"><span style="color: black;">她们</span>能够直接在设计文件上编写业务<span style="color: black;">规律</span></span></strong><span style="color: black;">,<span style="color: black;">而后</span>由 VGG 将其运<span style="color: black;">行径</span>一个交互式图形应用程序。这<span style="color: black;">能够</span>节省<span style="color: black;">海量</span>重复的工作,不仅<span style="color: black;">加强</span>了<span style="color: black;">研发</span>人员的工作效率,<span style="color: black;">亦</span>为<span style="color: black;">全部</span>团队<span style="color: black;">增多</span>了工作效率。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://q5.itc.cn/q_70/images03/20240513/3e573fec03594e35809fe0dc1da77678.png" style="width: 50%; margin-bottom: 20px;"></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Design as Code 的想法很简单,但它实现起来非常困难,<span style="color: black;">例如</span>会遇到来自编译器技术、编程接口抽象和图形渲染方面的工程挑战。</p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">因此呢</span>,为了实现 VGG 的 Design as Code <span style="color: black;">研发</span>流程</span></p>VGG 定义了下一代矢量图形规范 VGG Specs (https://docs.verygoodgraphics.com/specs/overview)
      实现了 VGG runtime 开源引擎 (https://github.com/verygoodgraphics/vgg_runtime)
      <span style="color: black;">供给</span><span style="color: black;">各样</span> VGG 容器,实现了对<span style="color: black;">各样</span>平台和框架的嵌入式支持。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">VGG 天生就有着对<span style="color: black;">研发</span>生态很好的兼容性。相比于低代码,VGG 是一套真正为<span style="color: black;">研发</span>者设计的<span style="color: black;">工具</span>。小结:</span></p>VGG 主打 Design as Code,直接<span style="color: black;">运用</span>设计稿代替 HTML+CSS 去实现用户界面。
      VGG 将设计稿变<span style="color: black;">成为了</span>跨平台的应用,为<span style="color: black;">研发</span>者节约了<span style="color: black;">更加多</span>的时间与成本。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">基于以上两点,VGG 以及它主打的 Design as Code <span style="color: black;">能够</span>为现代交互式应用<span style="color: black;">研发</span>带来巨大的好处。在<span style="color: black;">最后</span>用户对用户界面的<span style="color: black;">实质</span><span style="color: black;">运用</span>效果<span style="color: black;">无</span><span style="color: black;">显著</span>感知差异的前提下,大大<span style="color: black;">提高</span>了应用<span style="color: black;">研发</span>者的<span style="color: black;">研发</span>体验,<span style="color: black;">乃至</span><span style="color: black;">能够</span>让设计师、<span style="color: black;">制品</span>经理来承担一部分的界面<span style="color: black;">研发</span>工作:<span style="color: black;">没</span>非是把现有的设计<span style="color: black;">工具</span>当作一个 UI Builder 来<span style="color: black;">运用</span>罢了。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面引用来自 VGG Github 首页的一张图,来更好地说明 Design as Code 的概念与 VGG 的有机<span style="color: black;">构成</span>:</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://q8.itc.cn/q_70/images03/20240513/485f14fc6128474caa162f3fcc60c98f.png" style="width: 50%; margin-bottom: 20px;"></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">展望</span></strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在这篇<span style="color: black;">文案</span>中,<span style="color: black;">咱们</span>讨论了 Web 技术、特定平台的框架、跨平台框架、Design to Code <span style="color: black;">处理</span><span style="color: black;">方法</span>以及基于 VGG 开源引擎的 Design as Code <span style="color: black;">研发</span>流程。</p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">咱们</span>提出了 Design as Code 的概念,介绍了 VGG <span style="color: black;">做为</span>一个全新的<span style="color: black;">研发</span>交互式图形应用程序的框架。但 VGG 仍然<span style="color: black;">青年</span>,<span style="color: black;">由于</span>还有许多技术挑战<span style="color: black;">必须</span>克服,VGG 运行时引擎现已开源,欢迎<span style="color: black;">大众</span><span style="color: black;">一块</span>参与 VGG 开源社区共建。</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">关于 VGG 的<span style="color: black;">更加多</span>细节将在后续的<span style="color: black;">文案</span>中讨论。<span style="color: black;">倘若</span>您感兴趣,<span style="color: black;">能够</span>继续阅读官方博客和文档</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">https://blog.verygoodgraphics.com/</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">关于VGG</span></strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">VGG(VeryGoodGraphics)是新一代跨平台应用<span style="color: black;">研发</span><span style="color: black;">处理</span><span style="color: black;">方法</span>。VGG 倡导 Design-as-Code 的理念,让<span style="color: black;">研发</span>者可直接基于设计稿编程,快速将设计原型交付为可交互的应用。</span></strong></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">特性一:<span style="color: black;">没</span>代码完美还原设计稿</strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">VGG</span>自研的开源图形引擎能渲染出高保真设计稿中的任意细节,可直接将设计稿<span style="color: black;">做为</span>用户界面,省去前端与客户端<span style="color: black;">研发</span>者<span style="color: black;">运用</span>代码去复原设计稿的<span style="color: black;">研发</span>工作,降低<span style="color: black;">她们</span>与设计师之间的沟通摩擦成本。</strong><span style="color: black;"><strong style="color: blue;">特性二:原生跨平台、嵌入式支持已有<span style="color: black;">研发</span>框架</strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">VGG <span style="color: black;">经过</span>完全<span style="color: black;">或</span>部分嵌入的方式,支持在任意一种已有的 APP <span style="color: black;">基本</span>上进行增量式<span style="color: black;">研发</span>,主持主流平台与框架。</strong></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">特性三:脚本与 WebAssembly 支持</strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">VGG 还<span style="color: black;">同期</span>支持平台<span style="color: black;">没</span>关的 JS 脚本与 WebAssembly 模块,在<span style="color: black;">供给</span>快速业务<span style="color: black;">规律</span><span style="color: black;">研发</span>能力的<span style="color: black;">同期</span>支持高性能计算。</strong></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">特性四:高度的生态兼容性</strong></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">VGG <span style="color: black;">供给</span>的 SaaS 服务<span style="color: black;">日前</span>已实现对主流设计生态的兼容(Figma/Sketch/Adobe Illustrator),并<span style="color: black;">供给</span> Figma 插件<span style="color: black;">帮忙</span>设计稿快速同步。将来还计划为<span style="color: black;">研发</span>者<span style="color: black;">供给</span><span style="color: black;">研发</span>辅助<span style="color: black;">工具</span>,打通从应用 UI 设计到应用<span style="color: black;">开发</span>的完整流程。</strong></p>

      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">GitHub</strong><span style="color: black;">:https://github.com/verygoodgraphics</span></span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><strong style="color: blue;">官网</strong></span></span><span style="color: black;">:</span><span style="color: black;">https://verygoodgraphics.com</span><span style="color: black;">/</span></p>
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><strong style="color: blue;">博客</strong></span></span><span style="color: black;">:</span><span style="color: black;">https://blog.verygoodgraphics.com</span><span style="color: black;">/</span><a style="color: black;"><span style="color: black;">返回<span style="color: black;">外链论坛:http://www.fok120.com/</span>,查看<span style="color: black;">更加多</span></span></a></p>
    </span>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">责任编辑:网友投稿</span></p>




4zhvml8 发表于 2024-11-10 04:59:08

你的见解真是独到,让我受益匪浅。
页: [1]
查看完整版本: 前端苦HTML+CSS久已