Welcome to Terra Framework!
This documentation will guide you through understanding and using Terra’s front-end framework.
What is the purpose of the framework?
Section titled “What is the purpose of the framework?”In Terra, performance is king and this framework is the way to achieve the best results.
We have a very specific way of working to ensure that libraries and resources are loaded exactly when they are needed and everything is destroyed when it needs to be, so we can avoid traditional issues such as:
- Memory Leaks: Components and event listeners accumulate without proper cleanup
- Large Bundle Sizes: Loading everything upfront slows initial page loads
- Jarring Transitions: Traditional page reloads break user flow
- Inefficient Resource Usage: Components load regardless of visibility or need
- Poor Perceived Performance: Users see loading states instead of smooth experiences
How do we do it?
Section titled “How do we do it?”We make use of a few key files to achieve peak performance:
- Project.js - The entry point
- Main.js - The controller
- Core.js - The foundation
- Manager.js - The module system that organizes our resources
We combine all of this with swup as our SPA library and our transition system.
Although the learning curve might be a little steep, this documentation is here to help you and the result is a seamless, easy-to-work-with code that does most of the job for you and ensures that the final result is the best it can be.