diff --git a/patterns/docs/Coding Patterns & Practices/data.json b/patterns/docs/Coding Patterns & Practices/data.json index c922e6d..8de6773 100644 --- a/patterns/docs/Coding Patterns & Practices/data.json +++ b/patterns/docs/Coding Patterns & Practices/data.json @@ -1 +1 @@ -{"id":"160074735","type":"page","status":"current","title":"Coding Patterns & Practices","body":{"storage":{"value":"
Status

GreenPublished 

Overview

The purpose of this page is to outline some coding practices when developing an application. Practices used by a team should be documented in the repository.

Languages Supported

Currently, most agile teams use one of these 4 languages and it is encouraged to stay within these languages, it may expand in the future. ( Typescript/JavaScript, Java On Native, Python, Go)

Native Deployments

Some Languages are interpreted by their runtime ex:(java on JVM, python, javascript, etc..) whereas some languages are compiled (Golang, Rust).

Use native(static binary) deployments wherever available. for ex: it is a MUST for teams using Java to deploy using GraalVM native image without the overhead of JVM interpreter. 

Focus on the scale-out vs scale-up as deployments are into containers or serverless.

Code Design Patterns and Principles

Folder Structure and Naming Conventions

Secret and Environment Variable Handling

Secure APIs

Error Handling


Code Formatters and Plugins

Infrastructure as Code

Pipeline

Align your CI/CD pipeline with your hosting environment (GitHub Actions for Openshift Silver/Gold, GitHub Actions with ArgoCD for Openshift Emerald, GiHub Actions with Terraform for AWS)

The below was created using the QuickStart OpenShift as a reference. Please refer to the repo for the most up to date information.

trueBranching Strategyfalseautotoptrue10111

GitHub PRs - Commits

PR Review and Practices

Dependency Management

API framework evaluation factors

The below outlines a few key considerations which would help in the decision-making of language/framework to use for API development for containerized environments.

Details around API Design are outlined here(https://developer.gov.bc.ca/Data-and-APIs/BC-Government-API-Guidelines). The below points are on top of the guidelines provided in the link.

  1. Developer friendly, community support and libraries.
  2. Resource Consumption(memory/CPU) the less the better, supports the move towards green computing.
  3. Automated Open API 3 Specification generation, Swagger UI.
  4. Automated DB schema management (flyway/Liquibase or something similar).
  5. ORM integration for Database, ACID, Transaction support, Nested Transactions, Advanced Query with pagination, filter, sorting support.
  6. Supports TDD(Test Driven Development) out of the box, which supports unit and integration testing.
  7. Easiness of testing for pipelines and other automation.
  8. Easiness of OAUTH2 integration.
  9. Easiness of Circuit breaker integration and Resiliency.
  10. API versioning.
  11. Support for REST, GraphQL and gRPC
  12. Asynchronous REST Client.
  13. API Health checks(for liveness/readiness checks in Kubernetes world) out of the box which includes checking DB Connections and Message Broker connection (If present).
  14. Easiness of writing to log files in different formats.
  15. Switching Between Relational Database should be config only.
  16. Easy Concurrency.
  17. Easiness of Integration with Distributed tracing frameworks.




","representation":"storage","_expandable":{"content":"/rest/api/content/160074735"}},"_expandable":{"editor":"","view":"","export_view":"","styled_view":"","anonymous_export_view":""}},"extensions":{"position":9},"_links":{"webui":"/pages/viewpage.action?pageId=160074735","edit":"/pages/resumedraft.action?draftId=160074735","tinyui":"/x/74uKCQ","collection":"/rest/api/content","base":"https://apps.nrs.gov.bc.ca/int/confluence","context":"/int/confluence","self":"https://apps.nrs.gov.bc.ca/int/confluence/rest/api/content/160074735"},"_expandable":{"container":"/rest/api/space/AR","metadata":"","operations":"","children":"/rest/api/content/160074735/child","restrictions":"/rest/api/content/160074735/restriction/byOperation","history":"/rest/api/content/160074735/history","ancestors":"","version":"","descendants":"/rest/api/content/160074735/descendant","space":"/rest/api/space/AR"}} \ No newline at end of file +{"id":"160074735","type":"page","status":"current","title":"Coding Patterns & Practices","body":{"storage":{"value":"
Status

GreenPublished 

Overview

The purpose of this page is to outline some coding practices when developing an application. Practices used by a team should be documented in the repository.

Languages Supported

Currently, most agile teams use one of these 4 languages and it is encouraged to stay within these languages, it may expand in the future. ( Typescript/JavaScript, Java On Native, Python, Go)

Native Deployments

Some Languages are interpreted by their runtime ex:(java on JVM, python, javascript, etc..) whereas some languages are compiled (Golang, Rust).

Use native(static binary) deployments wherever available. for ex: it is a MUST for teams using Java to deploy using GraalVM native image without the overhead of JVM interpreter. 

Focus on the scale-out vs scale-up as deployments are into containers or serverless.

Code Design Patterns and Principles

Folder Structure and Naming Conventions

Secret and Environment Variable Handling

Secure APIs

Error Handling


Code Formatters and Plugins

Infrastructure as Code

Pipeline

Align your CI/CD pipeline with your hosting environment (GitHub Actions for Openshift Silver/Gold, GitHub Actions with ArgoCD for Openshift Emerald, GiHub Actions with Terraform for AWS)

The below was created using the QuickStart OpenShift as a reference. Please refer to the repo for the most up to date information.

trueBranching Strategyfalseautotoptrue10111

GitHub PRs - Commits

PR Review and Practices

Dependency Management

API framework evaluation factors

The below outlines a few key considerations which would help in the decision-making of language/framework to use for API development for containerized environments.

Details around API Design are outlined here(https://developer.gov.bc.ca/Data-and-APIs/BC-Government-API-Guidelines). The below points are on top of the guidelines provided in the link.

  1. Developer friendly, community support and libraries.
  2. Resource Consumption(memory/CPU) the less the better, supports the move towards green computing.
  3. Automated Open API 3 Specification generation, Swagger UI.
  4. Automated DB schema management (flyway/Liquibase or something similar).
  5. ORM integration for Database, ACID, Transaction support, Nested Transactions, Advanced Query with pagination, filter, sorting support.
  6. Supports TDD(Test Driven Development) out of the box, which supports unit and integration testing.
  7. Easiness of testing for pipelines and other automation.
  8. Easiness of OAUTH2 integration.
  9. Easiness of Circuit breaker integration and Resiliency.
  10. API versioning.
  11. Support for REST, GraphQL and gRPC
  12. Asynchronous REST Client.
  13. API Health checks(for liveness/readiness checks in Kubernetes world) out of the box which includes checking DB Connections and Message Broker connection (If present).
  14. Easiness of writing to log files in different formats.
  15. Switching Between Relational Database should be config only.
  16. Easy Concurrency.
  17. Easiness of Integration with Distributed tracing frameworks.




","representation":"storage","_expandable":{"content":"/rest/api/content/160074735"}},"_expandable":{"editor":"","view":"","export_view":"","styled_view":"","anonymous_export_view":""}},"extensions":{"position":8},"_links":{"webui":"/pages/viewpage.action?pageId=160074735","edit":"/pages/resumedraft.action?draftId=160074735","tinyui":"/x/74uKCQ","collection":"/rest/api/content","base":"https://apps.nrs.gov.bc.ca/int/confluence","context":"/int/confluence","self":"https://apps.nrs.gov.bc.ca/int/confluence/rest/api/content/160074735"},"_expandable":{"container":"/rest/api/space/AR","metadata":"","operations":"","children":"/rest/api/content/160074735/child","restrictions":"/rest/api/content/160074735/restriction/byOperation","history":"/rest/api/content/160074735/history","ancestors":"","version":"","descendants":"/rest/api/content/160074735/descendant","space":"/rest/api/space/AR"}} \ No newline at end of file diff --git a/patterns/docs/Source Code Repositories/Java Over Oracle On-Prem JDK And Dependency version recommendations/Java Over Oracle On-Prem JDK And Dependency version recommendations.md b/patterns/docs/Source Code Repositories/Java Over Oracle On-Prem JDK And Dependency version recommendations/Java Over Oracle On-Prem JDK And Dependency version recommendations.md new file mode 100644 index 0000000..3f7b8a3 --- /dev/null +++ b/patterns/docs/Source Code Repositories/Java Over Oracle On-Prem JDK And Dependency version recommendations/Java Over Oracle On-Prem JDK And Dependency version recommendations.md @@ -0,0 +1,6 @@ +--- +sidebar_position: 1 +--- +This page outlines the recommended versions of heavily used web frameworks / ORMs, each application dependencies needs to be analyzed separately for upgrades. + +
Component/LanguageMinimum VersionIdeal VersionLinks
JDK1721
Spring Framework6.16.2 https://spring.io/projects/spring-framework#support
Struts Framework6.06.4https://cwiki.apache.org/confluence/display/WW/Migration+Guide
Hibernate6.4.x6.6.xhttps://hibernate.org/orm/documentation/migrate/
EclipseLink4.x4.x
Tomcat9.0.90(check compatibility if using spring)10.1.26https://tomcat.apache.org/migration.html
\ No newline at end of file diff --git a/patterns/docs/Source Code Repositories/Java Over Oracle On-Prem JDK And Dependency version recommendations/data.json b/patterns/docs/Source Code Repositories/Java Over Oracle On-Prem JDK And Dependency version recommendations/data.json new file mode 100644 index 0000000..f310f09 --- /dev/null +++ b/patterns/docs/Source Code Repositories/Java Over Oracle On-Prem JDK And Dependency version recommendations/data.json @@ -0,0 +1 @@ +{"id":"211816995","type":"page","status":"current","title":"Java Over Oracle On-Prem JDK And Dependency version recommendations","body":{"storage":{"value":"

This page outlines the recommended versions of heavily used web frameworks / ORMs, each application dependencies needs to be analyzed separately for upgrades.


Component/LanguageMinimum VersionIdeal VersionLinks
JDK1721
Spring Framework6.16.2 https://spring.io/projects/spring-framework#support
Struts Framework6.06.4https://cwiki.apache.org/confluence/display/WW/Migration+Guide
Hibernate6.4.x6.6.xhttps://hibernate.org/orm/documentation/migrate/
EclipseLink4.x4.x
Tomcat9.0.90(check compatibility if using spring)10.1.26https://tomcat.apache.org/migration.html
","representation":"storage","_expandable":{"content":"/rest/api/content/211816995"}},"_expandable":{"editor":"","view":"","export_view":"","styled_view":"","anonymous_export_view":""}},"extensions":{"position":"none"},"_links":{"webui":"/display/AR/Java+Over+Oracle+On-Prem+JDK+And+Dependency+version+recommendations","edit":"/pages/resumedraft.action?draftId=211816995","tinyui":"/x/IxKgD","self":"https://apps.nrs.gov.bc.ca/int/confluence/rest/api/content/211816995"},"_expandable":{"container":"/rest/api/space/AR","metadata":"","operations":"","children":"/rest/api/content/211816995/child","restrictions":"/rest/api/content/211816995/restriction/byOperation","history":"/rest/api/content/211816995/history","ancestors":"","version":"","descendants":"/rest/api/content/211816995/descendant","space":"/rest/api/space/AR"}} \ No newline at end of file diff --git a/patterns/docs/Source Code Repositories/data.json b/patterns/docs/Source Code Repositories/data.json index 5f57685..673b7ad 100644 --- a/patterns/docs/Source Code Repositories/data.json +++ b/patterns/docs/Source Code Repositories/data.json @@ -1 +1 @@ -{"id":"115081594","type":"page","status":"current","title":"Source Code Repositories","body":{"storage":{"value":"
Status

GreenPublished

Overview

This page is general awareness, guidance, and recommendations for source code repositories within the NRM

Repository Type Overview

Repository Type

When to Use

Notes

SubversionNeverSubversion is deprecated, do not create any new repositories.
BitBucketClosed, internalManual, complex, (currently) in-house.  Works with RFC/RFD process and JIRA.  Very customizable.
GithubWhenever possible

Ideal for automation, open source.  Industry leader in most significant areas.  Very unconstrained. 

see https://github.com/bcgov/BC-Policy-Framework-For-GitHub

GitHub:

Beginner Guide: https://github.blog/2024-05-27-what-is-git-our-beginners-guide-to-version-control/

For practices on using GitHub see:


BitBucket:


Subversion (SVN):

Source Code Repository Naming


Folder Naming

Diagrams

Source Code Repository Topics

Mono Repo vs Multi Repo?

As a general recommendation, it is preferred to use product based monorepos.

Source Code Repository License & Ownership

","representation":"storage","_expandable":{"content":"/rest/api/content/115081594"}},"_expandable":{"editor":"","view":"","export_view":"","styled_view":"","anonymous_export_view":""}},"extensions":{"position":34},"_links":{"webui":"/display/AR/Source+Code+Repositories","edit":"/pages/resumedraft.action?draftId=115081594","tinyui":"/x/egHcBg","collection":"/rest/api/content","base":"https://apps.nrs.gov.bc.ca/int/confluence","context":"/int/confluence","self":"https://apps.nrs.gov.bc.ca/int/confluence/rest/api/content/115081594"},"_expandable":{"container":"/rest/api/space/AR","metadata":"","operations":"","children":"/rest/api/content/115081594/child","restrictions":"/rest/api/content/115081594/restriction/byOperation","history":"/rest/api/content/115081594/history","ancestors":"","version":"","descendants":"/rest/api/content/115081594/descendant","space":"/rest/api/space/AR"}} \ No newline at end of file +{"id":"115081594","type":"page","status":"current","title":"Source Code Repositories","body":{"storage":{"value":"
Status

GreenPublished

Overview

This page is general awareness, guidance, and recommendations for source code repositories within the NRM

Repository Type Overview

Repository Type

When to Use

Notes

SubversionNeverSubversion is deprecated, do not create any new repositories.
BitBucketClosed, internalManual, complex, (currently) in-house.  Works with RFC/RFD process and JIRA.  Very customizable.
GithubWhenever possible

Ideal for automation, open source.  Industry leader in most significant areas.  Very unconstrained. 

see https://github.com/bcgov/BC-Policy-Framework-For-GitHub

GitHub:

Beginner Guide: https://github.blog/2024-05-27-what-is-git-our-beginners-guide-to-version-control/

For practices on using GitHub see:


BitBucket:


Subversion (SVN):

Source Code Repository Naming


Folder Naming

Diagrams

Source Code Repository Topics

Mono Repo vs Multi Repo?

As a general recommendation, it is preferred to use product based monorepos.

Source Code Repository License & Ownership

","representation":"storage","_expandable":{"content":"/rest/api/content/115081594"}},"_expandable":{"editor":"","view":"","export_view":"","styled_view":"","anonymous_export_view":""}},"extensions":{"position":30},"_links":{"webui":"/display/AR/Source+Code+Repositories","edit":"/pages/resumedraft.action?draftId=115081594","tinyui":"/x/egHcBg","collection":"/rest/api/content","base":"https://apps.nrs.gov.bc.ca/int/confluence","context":"/int/confluence","self":"https://apps.nrs.gov.bc.ca/int/confluence/rest/api/content/115081594"},"_expandable":{"container":"/rest/api/space/AR","metadata":"","operations":"","children":"/rest/api/content/115081594/child","restrictions":"/rest/api/content/115081594/restriction/byOperation","history":"/rest/api/content/115081594/history","ancestors":"","version":"","descendants":"/rest/api/content/115081594/descendant","space":"/rest/api/space/AR"}} \ No newline at end of file