@ -23,4 +23,4 @@ jobs:
|
||||
username: 'aproksha'
|
||||
password: ${{ secrets.password }}
|
||||
localDir: 'public'
|
||||
remoteDir: '/var/www/virtual/aproksha/html/'
|
||||
remoteDir: '/var/www/virtual/aproksha/david.aparoksha.dev/'
|
@ -1,5 +1,5 @@
|
||||
# The Aparoksha Website
|
||||
# David's Website
|
||||
|
||||
This is the source of the [website of the Aparoksha project](https://www.aparoksha.dev).
|
||||
This is the source of [David's website](https://david.aparoksha.dev).
|
||||
|
||||
It is built using [Zola](https://www.getzola.org/) and the [Duckquill theme](https://codeberg.org/daudix/duckquill) and hosted by [Uberspace](https://uberspace.de/en/).
|
||||
It is built using [Zola](https://www.getzola.org/) and the [Duckquill theme](https://codeberg.org/daudix/duckquill) and hosted by [Uberspace](https://uberspace.de/en/).
|
||||
|
28
config.toml
@ -1,8 +1,8 @@
|
||||
# Zola config
|
||||
|
||||
title = "Aparoksha"
|
||||
base_url = "https://www.aparoksha.dev/"
|
||||
description = "One app, fully native on every platform"
|
||||
title = "david-swift"
|
||||
base_url = "https://david.aparoksha.dev/"
|
||||
description = "A student interested in coding. Loves GNOME and Swift!"
|
||||
theme = "duckquill"
|
||||
|
||||
minify_html = true
|
||||
@ -25,10 +25,10 @@ smart_punctuation = true
|
||||
styles = [
|
||||
"custom.css"
|
||||
]
|
||||
accent_color = "#FF2D75"
|
||||
accent_color_dark = "#FF2D75"
|
||||
issues_url = "https://git.aparoksha.dev/aparoksha/aparoksha.dev/issues"
|
||||
source_url = "https://git.aparoksha.dev/aparoksha/aparoksha.dev"
|
||||
accent_color = "#6E7DFB"
|
||||
accent_color_dark = "#6E7DFB"
|
||||
issues_url = "https://git.aparoksha.dev/david-swift/david.aparoksha.dev/issues"
|
||||
source_url = "https://git.aparoksha.dev/david-swift/david.aparoksha.dev"
|
||||
show_copy_button = true
|
||||
show_share_button = true
|
||||
|
||||
@ -36,17 +36,15 @@ show_share_button = true
|
||||
show_copyright = true
|
||||
show_powered_by = true
|
||||
show_source = true
|
||||
links = [
|
||||
{ url = "https://mastodon.de/@david_swift", name = "Fediverse" },
|
||||
{ url = "https://ko-fi.com/david_swift", name = "Donate" }
|
||||
]
|
||||
|
||||
[extra.nav]
|
||||
links = [
|
||||
{ name = "Guides" , menu = [
|
||||
{ url = "@/backends/_index.md", name = "Backends" },
|
||||
{ url = "/tutorials", name = "Tutorials" },
|
||||
{ url = "/hig", name = "Human Interface Guidelines" },
|
||||
{ url = "/docs", name = "Documentation" },
|
||||
]},
|
||||
{ url = "https://forums.aparoksha.dev/", name = "Community" },
|
||||
{ url = "https://git.aparoksha.dev/aparoksha", name = "Code" },
|
||||
{ url = "/blog", name = "Blog" },
|
||||
{ url = "https://www.aparoksha.dev/", name = "Aparoksha" },
|
||||
]
|
||||
|
||||
[search]
|
||||
|
@ -5,86 +5,34 @@
|
||||
{{ image(url="trailer.gif" full_bleed=true) }}
|
||||
--->
|
||||
|
||||
# Native. Cross-platform. <div class="logo"> Aparoksha. </div>
|
||||
# About Me
|
||||
|
||||
<div style="margin-bottom: 2em;">
|
||||
Create your next cross-platform app with Aparoksha to give it a native look on each platform.
|
||||
Aparoksha is easy-to-use, safe, and <i>aparoksha</i>, meaning that its reactive and declarative approach as well as the clean syntax significantly enhance the readability.
|
||||
I'm David, a GNOME 👣 user enjoying the Swift programming language.
|
||||
|
||||
</div>
|
||||
|
||||
<a class="inline-button" href="/tutorials/gettingstarted/">Get Started</a>
|
||||
<a class="inline-button" href="https://mastodon.de/@david_swift">Find Me on the Fediverse</a>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
## Frameworks
|
||||
|
||||
## Start with Simple Views
|
||||
I'm currently working on a declarative cross-platform UI framework,
|
||||
which displays _fully_ native widgets on each supported platform.
|
||||
|
||||
A view is a piece of the user interface.
|
||||
Create your own views, such as `Avatar`, `Post`, and `Timeline`.
|
||||
Combine them into pages, windows, and apps.
|
||||
The platform-specific backends are completely independent projects, providing widgets that are not part of the cross-platform framework.
|
||||
They grow based on your feedback. [Try the frameworks.](https://www.aparoksha.dev)
|
||||
|
||||
<!---
|
||||
<aside>
|
||||
{{ image(url="trailer.gif" transparent=true) }}
|
||||
</aside>
|
||||
--->
|
||||
- [Aparoksha](https://www.aparoksha.dev/) is the cross-platform framework displaying native widgets on each supported platform.
|
||||
- [Adwaita for Swift](https://www.aparoksha.dev/backends/adwaita/) is part of the Aparoksha framework, allowing the creation of native apps for the awesome [GNOME desktop](https://www.gnome.org/).
|
||||
- Simplifying the use of WinUI on Windows, [WinUI for Swift](https://www.aparoksha.dev/backends/winui/) feels like SwiftUI on Windows.
|
||||
- The [TermKitBackend](https://www.aparoksha.dev/backends/termkit/) lets you create Terminal UIs in a declarative way.
|
||||
|
||||
{% crt() %}
|
||||
```
|
||||
struct Timeline: View {
|
||||
Create a declarative framework on top of an imperative API yourself using the [Meta package](https://meta.aparoksha.dev/documentation/meta/).
|
||||
Find projects [here](https://www.aparoksha.dev/backends/) and in the [Aparoksha forums](https://forums.aparoksha.dev/).
|
||||
|
||||
var posts: Posts
|
||||
## Apps
|
||||
|
||||
var view: Body {
|
||||
ForEach(posts) { post in
|
||||
Avatar(user: post.user)
|
||||
Post(post: post)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
{% end %}
|
||||
|
||||
## The Magic of the State
|
||||
|
||||
Each of your views has the ability to store state throughout view updates.
|
||||
Let's create a simple counter view:
|
||||
|
||||
<!---
|
||||
<aside>
|
||||
{{ image(url="trailer.gif" transparent=true) }}
|
||||
</aside>
|
||||
--->
|
||||
|
||||
{% crt() %}
|
||||
```
|
||||
struct SearchView: View {
|
||||
|
||||
@State private var count = 0
|
||||
|
||||
var view: Body {
|
||||
Button(icon: .minus) {
|
||||
count -= 1
|
||||
}
|
||||
Text("\(count)")
|
||||
Button(icon: .plus) {
|
||||
count += 1
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
{% end %}
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
Aparoksha's goal is to enable you to bring your app to as many users as possible on completely different platforms.
|
||||
Therefore, it is built in an open and extensible way.
|
||||
Creating a backend for a new platform is almost as simple as creating an app!
|
||||
|
||||
A list of some backends is available [here](@/backends/_index.md). They can be combined with Aparoksha in a simple way.
|
||||
Aparoksha itself currently supports the three major desktop platforms [GNOME](@/backends/Adwaita/index.md), [Windows](@/backends/WinUI/index.md), and [macOS](@/backends/AppKit/index.md).
|
||||
What makes the Aparoksha project unique is that each backend is a fully independent project, optimized for its platform.
|
||||
In a cross-platform app, you can leverage the full potential of the individual backends by writing platform-specific bits of code.
|
||||
- [Memorize](https://flathub.org/apps/io.github.david_swift.Flashcards) is an open source, native Quizlet alternative. It is only available for GNOME (at the moment 😎).
|
||||
|
Before Width: | Height: | Size: 674 KiB |
Before Width: | Height: | Size: 237 KiB |
Before Width: | Height: | Size: 1.8 MiB |
@ -1,52 +0,0 @@
|
||||
+++
|
||||
title = "Adwaita"
|
||||
description = "Develop beautiful apps following the design guidelines of the GNOME desktop."
|
||||
date = 2023-09-12
|
||||
[taxonomies]
|
||||
tags = ["Linux", "Aparoksha"]
|
||||
[extra]
|
||||
featured = true
|
||||
banner = "Adwaita.png"
|
||||
+++
|
||||
|
||||
Develop beautiful apps following the design guidelines of the GNOME desktop.
|
||||
|
||||
Read the <a class="external" href="https://aparokshaui.github.io/adwaita-swift">documentation</a> to get started or <a class="external" href="https://github.com/AparokshaUI/adwaita-swift">browse the code</a> on GitHub.
|
||||
|
||||
## The Backend
|
||||
|
||||
The Adwaita backend is based on the <a class="external" href="https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/">_libadwaita_</a> C API.
|
||||
libadwaita is used for developing native GNOME apps.
|
||||
|
||||
## The Development Environment
|
||||
|
||||
It is recommended to develop Libadwaita apps on a Linux system.
|
||||
Linux is probably available for your device and can be installed alongside Windows or macOS.
|
||||
I recommend picking a Linux distribution offering a vanilla GNOME experience, such as <a class="external" href="https://fedoraproject.org/de/">Fedora</a> or <a class="external" href="https://vanillaos.org/">VanillaOS</a>.
|
||||
|
||||
Now, install <a class="external" href="https://apps.gnome.org/en/Builder/">GNOME Builder</a> via the GNOME Software application.
|
||||
|
||||
### Flatpak
|
||||
|
||||
<a class="external" href="https://flatpak.org/">Flatpak</a> facilitates the distribution of apps on Linux.
|
||||
If you decide to use Flatpak already when developing the app, you do not have to install any dependencies on your system.
|
||||
Simply clone the <a class="external" href="https://github.com/AparokshaUI/AdwaitaTemplate">template repository</a>, open in GNOME Builder, and run the template app.
|
||||
Follow the instructions in the readme file to create your own app.
|
||||
|
||||
{{ image(url="Environment.png", alt="A native GNOME app called Tuba") }}
|
||||
|
||||
## The Design
|
||||
|
||||
This backend allows the creation of apps following the <a class="external" href="https://developer.gnome.org/hig/">GNOME Human Interface Guidelines</a>.
|
||||
The following screenshot serves as an example for GNOME's design language.
|
||||
|
||||
{{ image(url="App.png", alt="A native GNOME app called Tuba" transparent=true) }}
|
||||
|
||||
## Distribution
|
||||
|
||||
The apps can be distributed using Flatpak. The most popular app store is <a class="external" href="https://flathub.org">Flathub</a>.
|
||||
Read the <a class="external" href="https://aparokshaui.github.io/adwaita-swift/documentation/adwaita/publishingapps">instructions in the official docs</a>.
|
||||
|
||||
## Aparoksha Interoperability
|
||||
This backend is part of the Aparoksha package. If you use default Aparoksha elements, they will render correctly on GNOME.
|
||||
You can call platform-specific widgets for GNOME as well.
|
@ -1,11 +0,0 @@
|
||||
+++
|
||||
title = "AppKit"
|
||||
description = "Build fully native macOS apps."
|
||||
date = 2024-09-13
|
||||
[taxonomies]
|
||||
tags = ["macOS", "Aparoksha"]
|
||||
[extra]
|
||||
featured = true
|
||||
+++
|
||||
|
||||
Hello
|
@ -1,12 +0,0 @@
|
||||
+++
|
||||
title = "TermKit"
|
||||
description = "Create simple user interfaces for terminal applications."
|
||||
date = 2024-07-10
|
||||
authors = ["david-swift"]
|
||||
[taxonomies]
|
||||
tags = ["Linux", "macOS"]
|
||||
[extra]
|
||||
hot = false
|
||||
+++
|
||||
|
||||
Hello
|
@ -1,11 +0,0 @@
|
||||
+++
|
||||
title = "WinUI"
|
||||
description = "Create apps for Microsoft Windows."
|
||||
date = 2024-09-13
|
||||
[taxonomies]
|
||||
tags = ["Windows", "Aparoksha"]
|
||||
[extra]
|
||||
featured = true
|
||||
+++
|
||||
|
||||
Hello
|
@ -1,12 +0,0 @@
|
||||
+++
|
||||
title = "Available Backends"
|
||||
sort_by = "date"
|
||||
template = "article_list.html"
|
||||
page_template = "article.html"
|
||||
+++
|
||||
|
||||
The backends listed here are based on the <a class="external" href="https://github.com/AparokshaUI/Meta">Meta package</a>.
|
||||
They can be used in combination with the Aparoksha package.
|
||||
|
||||
The backends marked with a star are part of the Aparoksha package.
|
||||
This means that all the user interface elements included in the Aparoksha package will automatically render correctly with these backends.
|
BIN
content/blog/NativeCrossPlatform/GNOME.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
content/blog/NativeCrossPlatform/Windows.png
Executable file
After Width: | Height: | Size: 13 KiB |
115
content/blog/NativeCrossPlatform/index.md
Normal file
@ -0,0 +1,115 @@
|
||||
+++
|
||||
title = "Native Cross-Platform Apps"
|
||||
description = "Develop beautiful apps following the design guidelines of the GNOME desktop."
|
||||
date = 2024-09-17
|
||||
[taxonomies]
|
||||
tags = ["Aparoksha", "GNOME", "Swift"]
|
||||
+++
|
||||
|
||||
In March, I had the chance to write about the _Adwaita for Swift_ project <a class="external" href="https://www.swift.org/blog/adwaita-swift/">on the official Swift blog</a>.
|
||||
_Adwaita for Swift_ is a declarative interface on top of the libadwaita and GTK frameworks, allowing the creation of fully native GNOME apps.
|
||||
|
||||
Some months earlier, The Browser Company <a class="external" href="https://substack.com/home/post/p-138384240">published Swift bindings for WinUI 3</a>, the native UI framework on Windows.
|
||||
Officially, Swift offers interoperability with C, C++, and Objective-C, but certain packages, such as <a class="external" href="https://github.com/swiftlang/swift-java">JavaKit</a> or <a class="external" href="https://github.com/pvieito/PythonKit">PythonKit</a>, add support for even more languages.
|
||||
Therefore, it is possible to use a huge range of UI frameworks in Swift code.
|
||||
|
||||
This is an ideal basis for a cross-platform UI framework.
|
||||
|
||||
## Native Apps
|
||||
|
||||
Cross-platform UI frameworks like React Native primarily target mobile phones.
|
||||
While React Native offers support for Windows and macOS, the look does not fully match that of _really_ native apps built using WinUI or SwiftUI.
|
||||
Native Linux UI frameworks like libadwaita and Qt are not supported at all.
|
||||
|
||||
While each platform has its own native look, there are obviously many parallels.
|
||||
As an example, there is a “flat navigation” pattern in each UI framework.
|
||||
Furthermore, it is very common to implement flat navigation with a sidebar or a view switcher.
|
||||
|
||||
My goal is to create a single UI framework around those patterns, allowing the creation of apps that look native on each supported platform.
|
||||
|
||||
{% alert(note=true) %}
|
||||
The following screenshots show a simple user interface built using the Aparoksha framework.
|
||||
Note that the framework is still in an early stage of development and currently supports only two platforms.
|
||||
I'll mention later in this article why I want to share my project already.
|
||||
{% end %}
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
{{ image(url="GNOME.png", alt="A simple native GNOME app." transparent=true) }}
|
||||
</div>
|
||||
<div class="column">
|
||||
{{ image(url="Windows.png", alt="A simple native WinUI app." transparent=true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Especially in an early state as now, but also when the framework is more mature, there are a lot of widgets in the native frameworks that are not implemented as a cross-platform widget (yet).
|
||||
Requesting new widgets is always possible via the <a class="external" href="https://forums.aparoksha.dev/t/ideas">forums</a> or the <a class="external" href="https://git.aparoksha.dev/aparoksha/aparoksha/issues">Gitea issues</a>, but certain widgets might not have an equivalent on other platforms.
|
||||
This fact has influenced the modular architecture of the project.
|
||||
|
||||
## Architecture
|
||||
|
||||
The foundation of the project is the <a class="external" href="https://git.aparoksha.dev/aparoksha/meta">Meta package</a>.
|
||||
It allows “converting” any imperative UI framework into a declarative framework.
|
||||
Find more information about my definition of a declarative design in the <a class="external" href="https://meta.aparoksha.dev/documentation/meta/declarativedesign">Meta documentation</a>.
|
||||
|
||||
A declarative framework based on Meta is a backend. Currently, there are <a class="external" href="https://git.aparoksha.dev/aparoksha/adwaita-swift">adwaita-swift</a> and <a class="external" href="https://git.aparoksha.dev/aparoksha/winui-swift">winui-swift</a>, which are part of the Aparoksha framework, as well as the simple <a class="external" href="https://git.aparoksha.dev/david-swift/term-kit-backend">TermKitBackend</a>.
|
||||
An up-to-date list is available <a class="external" href="https://www.aparoksha.dev/backends/">on the Aparoksha website</a>.
|
||||
|
||||
{% alert(note=true) %}
|
||||
Some of the repositories were previously developed on GitHub.
|
||||
The development will move to the <a class="external" href="https://git.aparoksha.dev/">Gitea instance</a> of the Aparoksha project.
|
||||
|
||||
I'm leaving GitHub because of the points mentioned <a class="external" href="https://sfconservancy.org/GiveUpGitHub/">in this article</a>.
|
||||
{% end %}
|
||||
|
||||
<a class="external" href="https://git.aparoksha.dev/aparoksha/aparoksha">Aparoksha</a> is an umbrella backend, a backend that calls different other backends based on the detected platform or an optional environment variable.
|
||||
|
||||
As the backends are fully independent of the Aparoksha framework, they can provide platform-specific features that Aparoksha does not (yet) support.
|
||||
If one wants to create an app exclusively for one platform, one can directly import and use a backend.
|
||||
|
||||
In the same way, it is possible to define certain views specifically for one platform in apps built using the cross-platform Aparoksha framework.
|
||||
|
||||
## Benefits for _Adwaita for Swift_
|
||||
|
||||
Having a separate package for the “translation” from imperative to declarative code led to numerous improvements for the _Adwaita for Swift_ framework.
|
||||
Previously, it could happen that views were updated that did not actually have to be updated.
|
||||
This has been fixed. The current state of a widget's property is always compared to the previous state before updating, if possible.
|
||||
|
||||
Furthermore, a much more simple and declarative syntax for creating widgets has been introduced.
|
||||
Note that the previous syntax may still be required for very complex or special widgets.
|
||||
The _Adwaita for Swift_ documentation has been updated, find a short article <a class="external" href="https://adwaita-swift.aparoksha.dev/documentation/adwaita/creatingwidgets">here</a>.
|
||||
|
||||
<a class="external" href="https://meta.aparoksha.dev/documentation/meta/model">Models</a> have been introduced for working with other APIs that require classes and should modify state.
|
||||
|
||||
Due to the modular design, it is easy to extend the Meta framework and add custom functionality.
|
||||
A simple example is the <a class="external" href="https://git.aparoksha.dev/aparoksha/meta-sqlite">SQLite for Meta</a> library.
|
||||
|
||||
As already mentioned, backends are fully independent of the Aparoksha framework.
|
||||
Using _Adwaita for Swift_ directly will always be possible.
|
||||
|
||||
## Why I'm Announcing the Framework So Early
|
||||
|
||||
The WinUI for Swift and the Aparoksha frameworks are still in early development.
|
||||
So, why am I announcing those projects already?
|
||||
|
||||
First, I want to encourage users of _Adwaita for Swift_ to update their dependency.
|
||||
The repository is now available <a class="external" href="https://git.aparoksha.dev/aparoksha/adwaita-swift">here</a>, with the documentation being hosted <a class="external" href="https://adwaita-swift.aparoksha.dev/documentation/adwaita/">here</a>.
|
||||
|
||||
Second, I hope to spark the interest of some people with this article.
|
||||
I've decided to start the Aparoksha project with support for GNOME and Windows.
|
||||
I'd love to add support for other platforms as well:
|
||||
|
||||
- KDE (one framework to develop native GNOME and KDE apps - wouldn't that be qt?)
|
||||
- macOS
|
||||
- iOS
|
||||
- Android
|
||||
|
||||
If you have ideas for other platforms, I'm open to suggestions! Discuss them in the <a class="external" href="https://forums.aparoksha.dev/">forums</a>.
|
||||
Creating a declarative UI framework yourself is not too difficult. You can find a guide <a class="external" href="https://meta.aparoksha.dev/documentation/meta/createbackend">here</a>, and I'm happy to answer questions in the forums!
|
||||
|
||||
It would be really cool if people who have the time and inclination to develop or contribute to a backend would take a look at the mentioned platforms.
|
||||
Finding contributors is the main reason I'm publishing this article.
|
||||
|
||||
If you want to use the Aparoksha framework, subscribe to the RSS feed [here](/rss.xml) and wait some months for the introductory article.
|
||||
|
||||
Thanks in advance for any feedback and code! Don't hesitate to share your ideas, concerns, and questions.
|
8
content/blog/_index.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Blog"
|
||||
sort_by = "date"
|
||||
template = "article_list.html"
|
||||
page_template = "article.html"
|
||||
+++
|
||||
|
||||
I announce new projects or major releases, and might write about other stuff here too.
|
@ -1,13 +0,0 @@
|
||||
+++
|
||||
title = "Hi!"
|
||||
+++
|
||||
|
||||
I'm David, the maintainer of the Aparoksha project.
|
||||
You can find me on <a class="external" href="https://mastodon.de/@david_swift">Mastodon</a>,
|
||||
<a class="external" href="https://git.aparoksha.dev/david-swift/">this project's Gitea instance</a>,
|
||||
and on <a class="external" href="https://github.com/david-swift">GitHub</a>.
|
||||
|
||||
If you benefit from this project and have enough money, <a class="external" href="https://ko-fi.com/david_swift">donations</a> are appreciated to compensate the server costs.
|
||||
Thank you!
|
||||
|
||||
Don't forget to share your projects on the Fediverse and in the <a class="external" href="https://forums.aparoksha.dev/t/projects">Aparoksha forums</a> :)
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "Documentation"
|
||||
featured = true
|
||||
[taxonomies]
|
||||
tags = ["Linux", "macOS", "Windows", "Aparoksha"]
|
||||
+++
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "Human Interface Guidelines"
|
||||
featured = true
|
||||
[taxonomies]
|
||||
tags = ["Linux", "macOS", "Windows", "Aparoksha"]
|
||||
+++
|
@ -1,7 +0,0 @@
|
||||
+++
|
||||
title = "Getting Started"
|
||||
description = "Learn Aparoksha following a simple path."
|
||||
date = 2023-09-12
|
||||
[taxonomies]
|
||||
tags = ["Linux", "macOS", "Windows", "Aparoksha"]
|
||||
+++
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "Tutorials"
|
||||
sort_by = "date"
|
||||
template = "article_list.html"
|
||||
page_template = "article.html"
|
||||
+++
|
@ -33,6 +33,14 @@ h6 {
|
||||
font-size: 0.5rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
color: #EE2D75;
|
||||
.column {
|
||||
float: left;
|
||||
padding: 5px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 71 KiB |