Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/exoad/poprock

Portable and performant self enclosed framework for building desktop apps
https://github.com/exoad/poprock

Last synced: about 7 hours ago
JSON representation

Portable and performant self enclosed framework for building desktop apps

Awesome Lists containing this project

README

        






Poprock


> [!WARNING]
> Currently, this is a work in progress!

**Poprock** is a resilient and lightweight framework designed to harness the extensive Java ecosystem for the swift and efficient development of desktop applications. Beyond constructing basic GUIs, the Poprock framework seamlessly extends its utility to creating straightforward games, music players, and other applications. In addition to desktop applications, Poprock can function as a standalone library for diverse tasks such as mathematical computations, audio processing, image processing, and more.

Furthermore, it is licensed under the free-to-use `BSD-4` license.

## Features

* **Graphics Toolkit** with hardware (OpenGL) & software rendering
* **Native Audio engine** using ALSA, Jack, Pulse
* **Tailwind** - real-time signal processing (WIP)
* Fast **Linear Algebra** lib
* Thread safe caching libraries
* **Image Processing**
* **Property management** paradigm through pools and registries
* **Prismix** - color & Theme Processor
* **Txfyr** - a simple texture atlas library
* Seamless native SYS calls for Windows, OSX, and Linux*
* Lua SPI integrations
* Uses **Constructive** semantics to create always readable code

... and more to come

## Design

This section documents quirks and other features that are used in the "code" of Poprock

### "Named Construction / Factory"

Named construction leverages *method chaining* to produce objects that need much information (parameters) to be computed. Here is a look at the differences between traditional Setters (imperative) and using Named Construction (as adopted in Poprock):


Imperative (set-)
Named (with-)


```java
JFrame jf=new JFrame();
jf.setTitle("Foo");
jf.setIconImage(ImageIO.read("icon.png"));
Dimension dim=new Dimension(300,400);
jf.setSize(dim);
jf.setPreferredSize(dim);
jf.setMaximumSize(dim);
jf.setLocationRelativeTo(null);
jf.pack();
jf.setVisible(true)
```


```java
UIWindow.make()
.withTitle("Foo")
.withIcon(
AssetsService.fetchImage("icon.png")
.as(ImageRasterizer.Type.BUFFERED_IMAGE)
)
.withDim(300,400)
.withMaxDim(300,400)
.withLocation(Alignment.CENTER)
.run();
```


> [!NOTE]
> The formatting is also part of the "Named" Construction pattern and is critical to making the code much more readable.