What is KFoundation?
KFoundation is a library of essentials for modern programming needs. It is designed based on the concept of universality, both in technological and geographical senses. It is available on most platforms; it has a very small footprint with no dependency on third-party libraries, and it is highly optimized for CPU and memory usage so that it works smoothly on small devices. It natively supports UTF-8 (as opposed to the host platform's string format), and comes with a rich internationalization toolset.
Here is a complete list of existing and planned features of JVM/JS Edition.
- UString — Save memory by storing strings in UTF-8, while saving CPU by avoiding uncessary encoding and decoding done by native
String. Iteration over both octets and code-points is provided alongside all other string operations. Automatic type conversion is available in Scala.
- Universal Serialization — Serialize and deserialize objects to and from virtually any format. Support for JSON, XML, YAML, and K4 provided out of the box, with more can be added via third-party extensions.
- Internationalization (WIP) — Simplest yet most versatile way to internationalize your solution using single
l()function. Customize date and currency format, or use defaults for each locale; define dictionaries in any file format that is compatible with serialization package, or define them directly in the code; plus,
printf()-like functionality with internationalized formatting/translation capability, and post-thrown-translated exceptions.
- DB (TBD) — Any object compatible with serialization package can be read and written to and from a database as well. This package offers utilities to take advantage of the metadata defined for serialization to construct queries that interact with native objects.
- UI (TBD) — Create portable user interfaces that can be rendered on server-side, client-side, or even natively on a mobile or PC app.
The POSIX Edition is more extensive. It is written in C/C++, and made to replace the C++ standard libraries with one that makes devevelopment faster and easier. It has a high-performance reference type to replace pointers, and offers first-class support for UTF-8, plus net I/O, universal serialization, exceptions with stack trace, and more. KFoundation is the platform for development of most of KnoRBA ARE and KnoRBA OS.