Built on the shoulders of giants
As detailed in a previous chapter, it's important not to reinvent the wheel. That's why UserFrosting depends on a number of external libraries, called dependencies. Those are written by people and organizations external to UserFrosting, providing the base that UserFrosting works on. These dependencies are not tied to UserFrosting and can be used by anyone. Think of dependencies as the raw materials, like wood and concrete, you get from the hardware store to build a house. We simply "glued" them together to create awesomeness!
While UserFrosting uses dozens of dependencies, here's a rundown of the most important ones:
Slim 4
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Slim is the backbone of UserFrosting. To be more precise, UserFrosting is a Slim Application!
Except for the Bakery system (which uses Symfony Console), UserFrosting uses Slim at every level to perform middleware management, route collections, and everything else needed to actually display a web page.
PHP-DI 7
PHP-DI is a dependency injection container. Dependency injection is one of the fundamental pillars of modern object-oriented software design. It is used extensively throughout UserFrosting to glue all services together while maintaining great flexibility to extend the basics functionalities of UserFrosting to create your own project. We'll explain dependency injection in detail in a later chapter. For now, it's only important to note PHP-DI is the dependency manager used by UserFrosting 5 to handle all dependency injection.
Eloquent (Laravel 10)
Eloquent is part of the Laravel Framework. Eloquent makes it enjoyable to interact with a database. When using Eloquent, each database table has a corresponding "Model" that is used to interact with that table. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well.
Eloquent is one of the most powerful and easy to use tools available to interact with a Database. That is why it's been chosen as the database handler since early versions of UserFrosting.
Note
While UserFrosting uses Eloquent, UserFrosting itself isn't a Laravel application (it's actually a Slim one). While most Eloquent documentation and examples apply to UserFrosting, some key functions are different, such as the use of the artisan command UserFrosting doesn't support.
Twig 3
Twig is a flexible, fast, and secure template engine for PHP. Initially developed for the Symfony framework, Twig is easy to use. Twig provides the necessary tools to use the data generated by PHP and render the HTML page the end user gets to see.
Symfony Console 5
Symfony Console eases the creation of beautiful and testable command line interfaces. This is used to power the Bakery command line interface tool used by UserFrosting.
Vite
Vite is a modern build tool that provides lightning-fast development with Hot Module Replacement (HMR), instant server start, and optimized production builds. Vite is used by UserFrosting to build and serve all frontend assets including CSS, JavaScript, TypeScript, and Vue components.
Vite offers native support for modern web technologies including TypeScript, Vue 3, CSS preprocessors, and ESM modules. It compiles and bundles frontend assets into optimized files that can be included in Twig templates, enabling the use of modern frameworks and tools in your application.
Vue 3
Vue is a progressive JavaScript framework for building user interfaces. Vue is used in UserFrosting to create reactive, interactive components on the frontend. Its component-based architecture makes it easy to build complex user interfaces from small, reusable pieces.
Vue 3 brings improved performance, better TypeScript support, and a more flexible Composition API. UserFrosting uses Vue for dynamic features like the admin panel, user management interfaces, and interactive forms, providing a modern and responsive user experience.
UiKit
UiKit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. UiKit provides the CSS framework and UI components used in UserFrosting's default theme (Pink Cupcake).
UiKit offers a comprehensive collection of HTML, CSS, and JavaScript components that are simple to use and easy to customize. It provides the styling, layout, and interactive components that make UserFrosting's interface both beautiful and functional.