今日已更新 267 条资讯 | 累计 35453 条内容
关于我们

标签:#m

找到 10545 篇相关文章

AI 资讯

Building an Entity Component System: Data Oriented Hierarchies

Data Oriented Design is the practice of building code that's optimized for the hardware it runs on. Entity Component Systems help writing DOD-friendly code by laying out otherwise allocation-heavy game data in contiguous arrays. A challenge in gamedev however is that lots of game data is stored and accessed as hierarchies that change frequently, which makes them notoriously difficult to store as contiguous arrays. This article goes over a number of techniques an Entity Component System can use to integrate hierarchies with the core datamodel in a way that improves the performance of the ECS. Written mostly for gamedev, but also applies to other hierarchy-heavy applications, like UI. submitted by /u/ajmmertens [link] [留言]

2026-06-25 原文 →
AI 资讯

The dogma of entity-based Services and Repositories

Every day I see more projects where a layer-per-entity approach is created by default: UserService , UserRepository , OrderService , OrderRepository , and so on. My issue is not with layering itself, but with how these layers are used. In theory, a Service should represent application behavior: something that encapsulates real use cases or meaningful interactions with external systems (payments, emails, APIs, etc.). Something with enough significance to justify being isolated. A Repository , in theory, should exist when there is real complexity in data access: multiple data sources, non-trivial persistence logic, evolving storage mechanisms, etc. However, in practice, they often degrade into something else: services that simply delegate calls repositories that are thin wrappers around an ORM interfaces with no meaningful alternative implementation At that point, the abstraction starts to lose its purpose. Why not use the ORM directly when there is no real complexity to hide? Why do we default to intermediate layers that don’t truly represent either a service or a repository in their original sense? It often feels like they add files, indirection, and noise without improving clarity. I’m not saying these layers are inherently bad. I’m trying to understand why they are so often applied by default, even when they don’t serve their actual purpose. Does this approach really improve clarity, or does it just introduce unnecessary complexity? For example, instead of organizing code around generic services per model, we could structure it around explicit use cases for concrete system actions. These would still live within an application/service layer in the sense described by Fowler, but without forcing a generic ModelService structure for everything. The goal would be to design around intent rather than around structural templates—so the code reflects what the system does , not just how it is layered . submitted by /u/Character-Method-720 [link] [留言]

2026-06-25 原文 →
开发者

EverQuest Legends is a powerful nostalgia machine

I wasn't surprised when I got the call that my dad was dying, even though we'd been estranged for many years. He'd suffered addiction for decades and eventually ran out of time, which also meant he ran out of time to reconcile with me. About 15 years after we stopped talking, my aunt and uncle […]

2026-06-25 原文 →
开发者

Samsung’s new budget phone costs $50 more despite downgrades

The Galaxy A27 has been announced, and at $349.99 it's $50 more than last year's A26. That's understandable in the current economic climate, but a harder sell given that Samsung has also downgraded a few key specs. Compared to last year's phone, the A27 has lower resolution 12-megapixel selfie and 5-megapixel ultrawide cameras, worse IP64 […]

2026-06-25 原文 →
开发者

translateZ()

The translateZ() function moves an element closer to or farther from the user. translateZ() originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.

2026-06-25 原文 →
开发者

translateY()

The translateY() function shifts an element vertically by the specified amount. translateY() originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.

2026-06-25 原文 →
开发者

translateX()

The translateX() function shifts an element horizontally by the specified amount. translateX() originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.

2026-06-25 原文 →
开发者

translate()

The CSS translate() function shifts an element from its default position on a 2-dimensional plane translate() originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.

2026-06-25 原文 →