Skip to content

aau-giraf/visual-tangible-artefacts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual tangible artefacts


Contributing to Visual tangible artefacts

Feature Contributions

Feature Contributions

  • Issue Creation and Branching:
    1. When adding new features, create an issue on GitHub to track the feature or bug fix.

    2. Create a new branch from the issue and use that branch for development.

    3. Once development is complete, submit a pull request and pull it to main*.

    4. If unsure about code validity, assign a code reviewer.

      *It might be easier for you to pull main, into the feature branch, testing it, and then pulling feature to main

      Branching strategy

Database Approach

DB-First Approach

We follow a DB-first approach for this project. This means that the database schema is designed first, and the code is generated based on that schema. Changes to the database structure are reflected in the application via code generation tools (e.g., Entity Framework for C# or other ORM frameworks).

  • Workflow:
    1. Database schema design: Define tables, columns, relationships, and constraints in the database.

    2. Generate models: Use dotnets tools to generate model classes and mappings based on the existing database using dotnet ef dbcontext scaffold "server=[server];port=[port];user=[user];password=[password];database=VTA" Pomelo.EntityFrameworkCore.MySql -o scaffold -f for the entire database.

    3. Migrations: When changes to the schema are required, update the database first, then regenerate the models using dotnet ef dbcontext scaffold "server=[server];port=[port];user=[user];password=[password];database=VTA" Pomelo.EntityFrameworkCore.MySql -o scaffold --table [Table1] --table [Table2] -f for only specific tables.

    4. Code generation: Ensure consistency between the database and the code by regenerating models after every schema update. *These commands are configured to output to the folder scaffold.

      **The autogenerated DBContext contains every single "table" from the DBcontext, this however, can impact concurrency, therefore we split it up, if you are unsure about how to, reffer to the existing DBContexts

Naming Conventions

App Naming Conventions (Dart)

Types

  • Classes, Enums, Typedefs, and Type Parameters: Use PascalCase/UpperCamelCase.
    class SliderMenu { ... }
    typedef Predicate<T> = bool Function(T value);

Extensions

  • Extensions: Use PascalCase/UpperCamelCase.
    extension MyFancyList<T> on List<T> { ... }

Variables, Functions, Parameters

  • Variables, Functions, Parameters, and Named Constants: Use camelCase/lowerCamelCase.
    var itemCount = 3;
    void alignItems(bool clearItems) { ... }

Directories and Files

  • Directories and Files: Use lowercase_with_underscores.
    lib/
    my_widget.dart
    utils/
      string_helpers.dart
    

Import Prefixes

  • Import Prefixes: Use lowercase_with_underscores.

Acronyms and Abbreviations

  • Acronyms and Abbreviations: Capitalize acronyms and abbreviations longer than two letters like words.
    class HttpRequest { ... }
    ``

Formatting your dart code

Use dart format to format your code For other formatting guidlines refer to dart.dev styling guidlines

API Naming Conventions (C#)

Types CSharp

  • Classes, Enums, and Structs: Use PascalCase.
    class MyClass { ... }
    enum Colors { Red, Green, Blue }

Methods, Properties, Events

  • Methods, Properties, and Events: Use PascalCase.
    public void FetchData() { ... }
    public string Name { get; set; }

Variables, Parameters

  • Variables and Parameters: Use camelCase.
    int itemCount = 3;
    void SetItemCount(int itemCount) { ... }

Constants

  • Constants: Use PascalCase with the const modifier.
    const int MaxItems = 10;

Interfaces

  • Interfaces: Prefix with an "I" and use PascalCase.
    public interface IMyInterface { ... }

Namespaces

  • Namespaces: Use PascalCase.
    namespace MyApplication.Data
    {
      // ...
    }

Files

  • Files: Each file should contain a single class, interface, or enum, named after the type it contains. Use PascalCase for file names.
    MyClass.cs
    IMyInterface.cs
    Colors.cs
    

Acronyms

  • Acronyms: Capitalize acronyms. For longer acronyms, use PascalCase.
    class IOHandler { ... }
    class HttpRequest { ... }

Formatting your CSharp code

Document Your CSharp Code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published