2025年apache sca_带有sca swiftui的应用

apache sca_带有sca swiftui的应用apache sca 应用程式开发 App Development At Bending Spoons we continuously strive to improve our technologies We recently hit one of the ceilings of our current technology stack and

大家好,我是讯享网,很高兴认识大家。

apache sca

应用程式开发(App Development)

At Bending Spoons, we continuously strive to improve our technologies. We recently hit one of the ceilings of our current technology stack, and we decided to explore the surroundings, to understand how we can improve.

在弯曲勺子,我们不断努力改进我们的技术。 最近,我们达到了当前技术栈的最高标准,因此我们决定探索周围的环境,以了解如何改进。

We found a promising approach in the Swift Composable Architecture, developed by pointfree.co. The focus of their architecture is on composability, testability, modularization, and ergonomy. Thus, they:

我们在pointfree.co开发的Swift Composable Architecture中找到了一种有前途的方法。 他们的体系结构的重点是可组合性,可测试性,模块化和人体工程学。 因此,他们:

  • Start from units of reusable code that can be easily composed.

    从易于编写的可重用代码单元开始。
  • Units of code are trivial to test.

    代码单元很容易测试。
  • The architecture provides utilities to compose, scope, and assemble these units, fostering modularization.

    该体系结构提供了用于组合,确定范围和组装这些单元的实用程序,从而促进了模块化。
  • All the APIs of the composable architecture are polished to be extremely easy to use.


    讯享网

    可组合体系结构的所有API都经过精心修饰,以使其非常易于使用。

In this series of episodes, of which this is the first one, I’d like to build an app leveraging this architecture. In today’s article, I’ll tackle the UI.

在这一系列剧集中,这是第一集,我想利用这种架构构建一个应用程序。 在今天的文章中,我将介绍UI。

The composable architecture shines with SwiftUI, the new UI framework birth by Apple, and I’ll use it for the app. A small disclaimer is deserved: this is my first attempt at SwiftUI.

SwiftOS是Apple诞生的新UI框架,可组合的体系结构令人眼前一亮,我将在应用程序中使用它。 一个小小的免责声明是应得的:这是我第一次使用SwiftUI。

最终应用 (The Final App)

The goal of this series of articles is to write a simple Snake app. Snake is a game where the player controls a snake that has to eat some mouses that pops on the screen. Every time the snake swallows a mouse, it grows. The snake moves continuously forward, so the player controls its direction: the game ends when there is no space available for the snake to move.

本系列文章的目的是编写一个简单的Snake应用程序。 蛇是一种游戏,玩家在游戏中控制着一条蛇,该蛇必须吃掉一些弹出屏幕的鼠标。 蛇每吞下一只老鼠,它就会长大。 蛇不断向前移动,因此玩家可以控制蛇的方向:没有足够的空间移动蛇时,游戏结束。

These screens show the final UI of the game and a loss situation:

这些屏幕显示了游戏的最终用户界面和损失情况:

Image for post
小讯
上一篇 2025-01-19 18:22
下一篇 2025-02-17 09:29

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/12848.html