DV1512 / frontend

0 stars 0 forks source link

Discuss workflow #5

Closed retrokiller543 closed 1 month ago

retrokiller543 commented 2 months ago

Basic Outline

You need to discuss how you are going to work with the code and come to an agreement on what each of you should do. For example one of you focus on the login page while the other person makes the landing page.

Coding Conventions

When coding in a team its really important that everyone follows a common set of coding conventions, this makes it easier to work with other peoples code. A good starting ground is to see what are the conventions of the language used, for javascript its common to use camelCase as the naming convention.

Try to setup some OCD guidelines that everyone can agree on, for example should everything be as compact as possible or can it be more spaced out for better readability.

EmEhPa commented 1 month ago

Project Coding Conventions

File Structure

Example Directory Structure

frontend/

src/

components/

Button.vue

views/

Home.vue AboutUs.vue

stores/

userStore.js

router/

index.js

assets/

images/ fonts/

Code Structure

Naming Conventions

General Guidelines

HTML

JavaScript

Components

CSS

Components:

Variables, Classes, Functions:

Valid Values for Props:

Code Formatting

Imports

Relative paths for components within the same folder. Absolute paths (using aliases) for imports from different directories. Example:

import Button from '@/components/Button.vue';

Summary

File Structure: Organize Vue files logically. Code Structure: Follow the order of HTML, JavaScript, and CSS. Naming Conventions: Use distinct naming conventions for different elements to avoid confusion. Formatting: Ensure code style consistency using ESLint and Prettier.