Kotlin logo

Kotlin

A concise multiplatform language developed by JetBrains

News

Exposed 未来计划

Exposed 几年前在 JetBrains 推出,是使用 Kotlin 编写的轻量 ORM/DAO。 它已在 JetBrains 的许多关键产品内部使用,尽管在 GitHub 上被归类为团队项目,但它已经吸引了大量的外部用户。 

项目的主要负责人一直在提供支持和推动其发展,我们也认为现在应该投入更多资源。 因此,我们聘请了全职开发者和技术主管,力争将 Exposed 打造为一流产品。 

今天,我们想分享我们的未来计划。 

产品 

1.0 的统一 API

Exposed 的好处之一是它提供了类似于 SQL 的静态类型化语言,允许您轻松查询数据库,而没有在代码中使用 SQL 字符串的缺点。 这里的关键字是类似。 在某些情况下,与 SQL 存在显著偏差。

我们希望使语法尽可能接近 SQL,并消除 Exposed 的 DAO 与 DSL 方式之间的不一致。 

这将带来重大变化,但我们相信这可以为 Exposed 的未来奠定坚实基础。 

减少样板代码

就像对 Kotlin 一样,我们的目标是减少使用 Exposed 时需要编写的样板代码量。 目前,情况并非如此。 当然,我们可以在某些领域减少编写可重复代码的开销。 

虽然我们可以像 Ktor 一样引入注解,但我们希望避免魔法。 对于开发者来说,了解具体发生的情况以及相关流程非常重要。 我们正在寻找满足这些标准的方式。 

长期存在的问题

除了一些较大更改之外,还有一些长期存在的问题需要解决。 我们希望在未来几个月内尽可能多地解决这些问题。 需要重大更改的问题将被推迟到 1.0 或更高版本。 

发布流程

类似于 Ktor,我们将把 Exposed 转向语义版本控制。 我们希望在解决一些 API 相关问题后尽快发布 1.0。 当前时间范围是 2024 年第一季度。 不过,我们将改为每月发布,确保解决问题后可供使用。 

文档和示例

Exposed 的主要痛点之一是缺乏广泛的文档。 为此,我们正在审查现有文档,进行重组和增强,并在新的 Exposed 网站上发布(网站也在筹备中)。 此外,我们希望提供更多易于遵循和学习的独立示例。

转向 YouTrack

作为实施流程的一部分,我们正在将问题报告转移到 YouTrack。 这将带来更好的问题跟踪、分类和处理。 根据我们之前的 Ktor 经验,GitHub 上的现有问题不会迁移,避免失去评论的作者。 此外,GitHub 上还有许多陈旧过时的问题,我们将进行审查和移除。 但是,新问题应记录在 YouTrack 中。

Exposed 可以为开发者提供众多可能,我们也希望继续以这个库为基础进行构建,为用户提供最佳体验。 您可以在 Kotlin Slack 的 Exposed 频道上联系团队成员获得支持。 如果您尚未加入,可以使用表单注册。

谢谢

Exposed 团队

本博文英文原作者:

Discover more

News

Exposed moving forward

Exposed started out a few years back at JetBrains, as a lightweight ORM/DAO written in Kotlin. It has since been used internally on a number of critical products at JetBrains, and despite being classified as a Team project on GitHub, it has garnered a large number of external users. 

While the main person on the project was doing his best to provide support and move it forward, we decided it was time to dedicate more resources to it. As a consequence, we hired full-time developers, a technical lead, and we’re working on making Exposed a first-class product. 

Today, we’d like to share our plans moving forward. 

Product 

A uniform API for 1.0

One of the benefits of Exposed is that it provides a statically-typed language which is similar to SQL, allowing you to easily query databases without the downside of using SQL strings in your code. The keyword here however is similar. There are cases when there is a significant deviation from SQL.

We want to try and bring the syntax as close as possible to SQL as well as remove some inconsistencies between the DAO and DSL approaches of Exposed. 

While this will introduce breaking changes, we believe that it is the right thing to do to set a strong foundation for Exposed moving forward. 

Reducing boilerplate

Much like with Kotlin, our goal is to reduce the amount of boilerplate code that needs to be written when working with Exposed. Currently this is not the case. There are definitely areas where we could reduce the overhead of having to write repeatable code. 

While we could certainly introduce annotations, much like Ktor, we want to avoid magic. It’s important for developers to know what exactly is happening, and how it’s taking place. We’re looking at approaches to meet these criteria. 

Long-standing issues

In addition to some bigger changes, there are a number of long-standing issues that need to be addressed. Our goal is to get to as many of these as possible over the coming months. Those that require breaking changes will be postponed to 1.0 or after. 

Release Process

Similar to what we did with Ktor, we’ll be moving Exposed to Semantic Versioning. We want to release 1.0 as soon as we have addressed some concerns around the API. The current timeframe is August 2024. Independently though, we’ll be moving to monthly releases to make sure that as issues are resolved, they are made available to you. 

Documentation and Samples

One of the main pain-points of Exposed is the lack of extensive documentation. To this end, we’re in the process of reviewing the existing documentation, restructuring and enhancing it, and we’ll be publishing it on the new Exposed website (which is also in the works). In addition we want to provide more self-contained samples that are easy to follow and learn from.

Moving to YouTrack

As part of processes being put in place, we’re moving the issue reporting to YouTrack. This will provide us with better ability to track, classify, and attend to issues. Existing issues on GitHub won’t be migrated as per our previous experience doing this with Ktor, we lose the author of the comments. In addition, there are a bunch of stale and outdated issues on GitHub that we’ll review and remove. New issues however should be logged in YouTrack.

We’re very excited about the many possibilities that Exposed can offer developers, and eager to continue to build on this library and provide the best user experience to you, our users. Remember that you can reach out to members of the team, as well as get support, on the Exposed channel on the Kotlin Slack. If you’re not on there, you can sign up using the form.

Thank you

The Exposed Team

Discover more