Government of British ColumbiaGovernment of British Columbia

DevHub

beta

Journey

Beginner Guide to Developing on the Platform

A Guide to Developing for Gov What Is Openshift? ExchangeLab Course: Openshift 101 ExchangeLab Course: Openshift 201 Leveraging Rocket.Chat Best Practices for Building Apps on Openshift Where to find helpful resources as a developer Best Practices for Publishing npm Packages Considerations for App Security in the Public Sector

Best Practices For Building Apps on Openshift

This isn't a definitive guide on 'how to create an app' but rather a set of guidelines, principals, and troubleshooting tips that will help you and your team find its way to success.

Developing Cloud Native Apps

As you know, all Web Apps are deployed on Openshift which is a kubernetes platform. In order for you app to operate well in this platform, there are a few principles that should be followed. These principles will help your app respond to modern demands on IT infrastructure; scalability, fault tolerance, and quick recovery can more easily be achieved.

A fundamental guide for developing apps to be Cloud Native is the 12 Factor App.

Leverage the Design System

The BC Gov Design System is an ongoing project that aims to unify BC Gov UI web components. This is the place to go to find out more about implementing common web components such as headers, footers, buttons etc. You can find the design system live on the Devhub

Use BC Sans As Your Web Font

BC Sans is an opensource font that should be used for all web front ends. It can be leveraged as a npm package as well as a static set of files. More info can be found on it here

Developing Performant Front End Applications

It is no surprise that more than 50% of all web traffic is now through mobile devices.

https://www.statista.com/statistics/241462/global-mobile-phone-website-traffic-share/

Besides ensuring that your app looks and feels well on small viewports it is important for them to performant, and in some cases behave like a native mobile app.

There has been a term coined for web apps that meet these expectations: Progressive Web Apps.

Here is a primer on PWA's.

Key Takeaway

Regardless if your web app needs to operate well on mobile phones or not. One way you can greatly improve site performance is by enabling text compression.

If you are using Caddy Web Server you can immediately gain to benefit from text compression by enabling on the fly gzip.

Use Rocket.Chat and the Devhub

Rocket.Chat's devops-how-to channel is an amazing resource to get help, provide help, and learn about what teams are using in their day to day work. If you have had a problem, chances are someone else has had it too.

The Devhub aims to be a central repository for all things digital in gov. Guides just like this one are being produced to help teams succeed with their projects.

@bcgov npm organization

BC Government has a npm organization where open source npm packages are authored and distributed. One of the key packages that has been developed for npm is bc-sans (as described above).

Packages that are apart of @bcgov can be found here.

  • Create an Issue