Joshfire is focused on easy cross-device application development. Most design decisions are a direct consequence of this focus.
Currently the framework has very good support for "content-based" applications, including text, audio and video browsing. Depending on user need, future releases may focus on form input and other areas.
Joshfire comes bundled with several adapters, one for each supported device. As new devices get released, Joshfire or third-parties will provide additional adapters.
When an application is launched, it must choose an adapter matching the device it is currently running on.
Joshfire has a default App implementation that your application has to inherit from. It provides initialization methods and general glue.
This is one of the most opinionated design decisions. Each app manages two tree structures:
This design has a number of advantages:
Basic UI elements like lists, videos, panels, are abstracted in base classes from which inherit device-specific implementations.
For instance a list may be displayed as :
The UI video element is another good example of UI Element abstraction.
It will be embedded as:
Each adapter supports several input methods like "keyboard", "mouse", "touch", "tvremote", etc.
Each user interaction can be mapped to an event to which any part of the application can react.
Inputs can also be proxies for remote controllers (think Arduinos or even other instances of the same app), with a simple TCP packet firing an event in the app.
Joshfire has built-in publish/subscribe methods on many classes. They are often the primary medium of interaction between components. Using events reduces the coupling between components and allows greater extensibility and modularity.