Intro
Let's explore the world of geajs code!
This document, published by the Geastack Community—an unofficial geajs community—outlines good practices for developing applications and libraries with geajs. (We use the term "good practices" rather than "best practices" because we cannot definitively state that these are the most excellent approaches.)
geajs does not use a React-style syntax; instead, it builds web applications primarily using classes, which are a standard feature of JavaScript. This suggests that there are various ways to achieve a single goal. That is precisely why, if there are good practices in place, these kinds of questions become easier to answer:
- How can we write code that is simple and reliable?
- How do we decide where a
Storebelongs, and how shouldStores talk to each other? - How can we develop without causing memory leaks?
- How should errors be handled when there's no built-in error boundary?
That is why this document was created.
What's Covered
- Plugin Optimization — how the compiler decides what it can optimize, and why.
- Application Architecture — organizing files and directories as a project grows.
- Functionality Enhancements — writing and consuming mixins.
- Memory & Performance — writing code that stays fast, and catching leaks before they ship.
- Testing & Maintainability — structuring tests and fixtures.
- Store Design — sizing
Stores, and how they should communicate. - Error Handling — what actually happens when something throws, and how to plan for it.
See also our legal / about page for details on our relationship with the official Gea project.