Welcome to Kuba, the JavaScript framework that revolutionizes web application development. Are you tired of grappling with complex problems and convoluted code? With Kuba, we believe that simplicity is the key to scalable, beautiful, and efficient front-end development.
Kuba was born out of the desire to simplify web application development without sacrificing code quality or efficiency. We leverage modern JavaScript concepts, including the use of decorators to manage component lifecycle, to empower developers with an intuitive and streamlined development experience.
Our philosophy centers around simplicity and ease of use. We firmly believe that clean, organized code is the foundation for maintaining and evolving successful software projects. With Kuba, you can build web applications that embody these principles.
At Kuba, we have a manifesto that guides our development process:
- Simplicity is the key to scalability: By embracing simplicity, we unlock the potential for scalable and maintainable applications.
- Small is beautiful: We embrace the elegance and power of small, focused components that work harmoniously together.
- Imperfect is human: We understand that perfection is unattainable, and we value progress over perfection. We embrace imperfections as opportunities to learn and grow.
The Kuba is composed of several key units that work harmoniously to accomplish a task. This approach is based on Event Storming, a collaborative workshop technique for exploring and designing complex business domains.
- View: The View component is responsible for rendering the user interface, ensuring the correct display of the state associated with the Root Aggregate. It utilizes the JSX syntax to facilitate the creation of interface elements and components.
- Root Aggregate: The Root Aggregate class models the application's domain, defining its core functionality and data structure. It can be composed of other entities and is responsible for coordinating the interaction between them. The Root Aggregate encapsulates the business logic and provides methods and properties to manipulate and retrieve domain information. It consists of two vital parts:
- Action: The methods of the Root Aggregate class, known as Actions, handle interactions from external agents, trigger events, and perform actions that modify the state of the Root Aggregate. They represent the available operations in the domain and allow external agents to interact with the application.
- State: The getters of the Root Aggregate class, known as State, represent the current state of the Root Aggregate. They provide access to the data and information necessary for the application's functioning. Getters enable other components, such as the View, to retrieve the necessary data for rendering the user interface.
- Police: Decorators, also known as Advice, play an important role in managing cross-cutting concerns in the application. They handle tasks such as logging, metrics, security, data updates, and formatting. By adding decorators to the methods of the Root Aggregate, it is possible to apply additional behaviors to these methods, promoting code reuse and an aspect-oriented approach in programming.
By dividing responsibilities into these constructive units, Kuba promotes a clear separation of concerns, facilitating the development of sustainable and scalable architectures for your web applications. Feel free to explore each component in more detail and leverage Kuba's modular structure to create well-organized and easily maintainable web applications.
Kuba provides a comprehensive set of resources and functionalities to simplify the application creation process. Our framework offers a simple and efficient architecture, allowing developers to focus on implementing business logic without getting bogged down by technical details.
Kuba's architecture is based on the innovative concept of "Island Architecture" by Katie Sylor-Miller. It empowers you to maintain JavaScript control within your web application, even when faced with static elements such as navigation links or images with text.
The island architecture renders HTML pages on the server while injecting placeholders into dynamic areas. These placeholders are then filled with independent components on the client, reusing the initial HTML generated by the server.
By leveraging the power of island architecture, Kuba simplifies web application development, emphasizing simplicity and efficiency. It enables the server to handle static content, while JavaScript is loaded only for interactive components.
Experience better performance as the majority of your site transforms into static HTML. Moreover, the island architecture prioritizes important content and ensures your pages are search engine optimized (SEO).
Please note that while the island architecture brings significant benefits, it may not be suitable for highly interactive applications.
To install Kuba, follow these steps:
-
Make sure you have Node.js installed on your system. You can download it from the official website: Node.js.
-
Clone the Kuba project repository from GitHub:
git clone https://github.com/deMGoncalves/kuba.io.git
- Navigate to the project directory:
cd kuba.io
- Install the project dependencies using your preferred package manager. In this case, we'll use Yarn:
yarn install
To run the Kuba project, follow these steps:
- Start the local development server:
yarn start
This command will start the Kuba development server using Wrangler.
- Access the running application.
Once the server is up and running, you can access the application by visiting the provided local URL, typically http://localhost:5000 or as specified by the development server.
You can now begin developing your web application using Kuba!
To deploy your Kuba project to a live environment, follow these steps:
- Deploy the project:
yarn deploy
This command will publish your project using Wrangler and make it available in the specified deployment environment.
Note: Make sure you have configured the deployment settings and environment variables as needed in the Wrangler configuration file.
Congratulations! You have successfully installed and executed the Kuba project. Now you can develop and deploy web applications with ease using Kuba.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository for this package.
This package is licensed under the MIT License.