Skip to content

Source Code Structure

RayCarrot edited this page Sep 18, 2023 · 1 revision

Are you interested in contributing to the project? Or maybe just interested in how it's structured? This page will help document that.

Guidelines

TODO: Write this section

Naming conventions

TODO: Write this section

File structure

TODO: Write this section

Work in process

The Rayman Control Panel project is over 5 years old and initially there wasn't much structure to how the code was written. Since then there have been multiple attempts to clean up the code base and follow modern coding guidelines. As the codebase is rather large though it means not every part of it is currently on the same standard, and some things are still a work in process. Below is a list of all current efforts to refactor and clean up the codebase, and potential ideas for the future.

  • Classes with underscores in their names should be removed to not include those. There are however cases where it will be kept for readability, such as the GameDescriptor classes.
  • Namespaces should follow the folder structure if possible. This can also help write the code in ways where the different parts become less dependant on each other.
  • C# Nullable should be enabled in every file. Any file with #nullable disable should be updated to have it removed.
  • Dependency injection is currently handled in an inconsistent way. In some cases dependencies are injected through the constructor while in other cases they're accessed from the static Services class. The plan is to use constructor injection everywhere.

Here are some ideas for the future:

  • Add unit tests. This helps ensure that updates don't break existing features.
  • Replace PropertyChanged.Fody with using CommunityToolkit.Mvvm when it comes to view models.
  • Migrate away from .NET Framework to modern .NET. There are currently several issues preventing this, such as deployment and certain older libraries.

User Interface

TODO: Write this section

Structure

General

TODO: Write this section

Games

TODO: Write this section

Archive Explorer

TODO: Write this section

Mod Loader

TODO: Write this section

Binary

TODO: Write this section

Updater

TODO: Write this section