The TASVideos website is open source and contributions are encouraged. However, certain coding standards should be followed. This page documents the guidelines around code style, architecture, and approach the site code uses.
Code should be warning free. Stylecop is integrated and many style requirements are enforced through its use of warnings. For the most part, the site follows the same conventions as the dot net team with one important deviation, use tabs and not spaces.
While not a comprehensive list, here are some are some style guidelines:
- method parameters should be camelCase, properties should be ProperCased, and private field variables should beging with an underscore and _camelCased
- dependencies should be interfaces where feasible, and interfaces names should always begin with I
- use tabs, not spaces
- The site utilizes Razor Pages and server side rendering
- We use Entity Framework for data access. Sql implementation specific technologies (include straight sql queries) should be avoided where possible (the one notable exception is the search utilizes postgres full-text search capabilities)
- Since pages are scoped already, it's okay to have an EF context directly in the page model. However, where there is opportunity to abstract or reuse logic, a class and interface in the Core library is favored.
- Simplicity is the key. Site contributions are from hobbyists and volunteers, and should be understandable by such
- Wiki modules are implemented using View Components