# Classes

Additionally to your own class implementations, Cherrycake provides core classes for entities that are used throughout the engine and that you can use or extend in your application, like the [Result](https://cherrycake.tin.cat/version-1.x-beta/reference/core-classes/result) class, which represents the result of an operation of any kind, or the [Color](https://cherrycake.tin.cat/version-1.x-beta/reference/core-classes/color) class, which simply represents a color.

> A more complex example of core classes is the [Item](https://cherrycake.tin.cat/version-1.x-beta/reference/core-classes/item) class, which provides many useful methods to work with abstractions of objects, or the [Items](https://cherrycake.tin.cat/version-1.x-beta/reference/core-classes/items) class, which provides methods to work with lists of [Item](https://cherrycake.tin.cat/version-1.x-beta/reference/core-classes/item) objects.

### Auto-loading

Classes are automatically loaded whenever they're needed, meaning you don't need to predict which classes you'll be using.

### What's the difference between a class and a module?

Modules are intended to pack **process-specific** functionality, can be triggered with actions (see [Lifecycle](https://cherrycake.tin.cat/version-1.x-beta/architecture/lifecycle)), can have configuration files and can even depend on other modules. Classes are intended to pack **object-specific** functionality,  cannot be triggered with actions and don't get configuration files.

{% hint style="info" %}

#### Example

If you're creating a social networking web application, the code to show the user profile page would go in a **module** you might want to call *ProfilePage*. In the other hand, you might want to have a *User* **class** to hold the information and the logic for that specific user.

In your architecture, the *ProfilePage* module will query the [Database](https://cherrycake.tin.cat/version-1.x-beta/reference/core-modules/database) module for a specific user, and you'll get a *User* object in return. The *ProfilePage* module will then take care of building and showing the profile page using that *User* object, most probably using the [Patterns](https://cherrycake.tin.cat/version-1.x-beta/reference/core-modules/patterns) module.
{% endhint %}
