Remote Collaboration

The world can remotely collaborate over the internet using amazing and often free tools. With the rise of Covid-19 we are using these tools more frequently in the Information Technology sector.

Meeting Tools

Jamboard is virtual sticky notes!

Slido is useful to bring up all company questions, vote for them to be discussed on an open forum.

AWW APP is a virtual white board

Instant Messaging

Virtual meetings with Hangouts (previously known as G-Talk), this can also be used to stream meetings with only the exec creating the stream and the rest of the company tuning into the stream.

Slack is a collaboration hub that can replace email to help you and your team work together seamlessly.

Skype for business is a communication tool built for businesses to connect anywhere, anytime.

Manage Workflows

Redmine is a flexible project management web application.

Jira has evolved into a powerful work management tool for all kinds of use cases

Trello lets you work more collaboratively and get more done.

Single Sign On

The World Has Changed. Agility is Now Required. Okta is Modern Single Sign On (SSO).

Other big names like Facebook and Google offer similar services for you to allow your staff to authenticate to things they need to power your business.

Status Badges

Status badges live at the top of repository README.md files providing information about builds, version ect

travis ci

Individual CI/CD providers often provide build status badges directly such as Travis CI

Shields IO

I couldnt see how to do this for docker so used shields.io, which can do lots of badge types, including Docker Hub pulls, and build status for lots of popular CI/CD providers.

For example:

1
[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/carlpaton/vulnuscloud?logoColor=brightgreen)](https://hub.docker.com/r/carlpaton/vulnuscloud)

This then displays here. Sweet.

References

DI in .Net Core

Transient

Transient objects are always different; a new instance is provided to every controller and every service.

1
2
3
4
5
services.AddTransient<IOssIndexRepository, OssIndexRepository>();

// with parameters
var projectRepository = new ProjectRepository(connectionString);
services.AddTransient<IProjectRepository>(s => projectRepository);

Scoped

Scoped objects are the same within a request, but different across different requests.

1
services.AddScoped<IOperationScoped, Operation>();

Singleton

Singleton objects are the same for every object and every request.

1
2
var ossIndexRepository = new OssIndexRepository(connectionString);
services.AddSingleton<IOssIndexRepository>(ossIndexRepository);

References

Sessions in .Net Core

Sessions will not work out of the box, you need to do some setup:

  1. Add the nuget package Microsoft.AspNetCore.Session

  2. In Startup.cs add to ConfigureServices

    1
    2
    3
    services.AddSession(options => {
    options.IdleTimeout = TimeSpan.FromMinutes(15);
    });
  3. In Startup.cs add to Configure

    1
    app.UseSession();
  4. Then in your controllers you can get and set values, would be best to have ProjectName set in a constants file.

    1
    2
    3
    HttpContext.Session.SetString("ProjectName", project.ProjectName);

    var projectName = HttpContext.Session.GetString("ProjectName");

Microsoft.AspNetCore.Http

These are the methods available for use in the controller (Version=2.2.0.0)

1
2
3
4
5
public static byte[] Get(this ISession session, string key);
public static int? GetInt32(this ISession session, string key);
public static string GetString(this ISession session, string key);
public static void SetInt32(this ISession session, string key, int value);
public static void SetString(this ISession session, string key, string value);

References

Factory Pattern

Definition

There are 2 factory patterns as described by the Gang of Four which are the factory method and abstract factory the main difference is the factory method is a single method and an abstract factory is an object.

  • The factory method is just a method, it can be overridden in a subclass, whereas the abstract factory is an object that has multiple factory methods on it.
  • The Factory Method pattern uses inheritance and relies on a subclass to handle the desired object instantiation

Factory Method

The factory pattern is used to replace class constructors, abstracting the process of object generation so that the type of the object instantiated can be determined at run-time.

Abstract Factory

The abstract factory pattern is used to provide a client with a set of related or dependent objects. The “family” of objects created by the factory are determined at run-time.

References