Identity in ASP.NET Core

Identity is the main package for managing authentication and authorization in an ASP.NET Core application. This package allows user registration and login, and uses claims to control user access within the application. A new ASP.NET Core application can be initialized with Identity through the Visual Studio project creation wizard. This process provides additional UI elements … Read more

Razor Pages and Entity Framework

Razor Pages provide a simplified approach to front end route handling and view provision. Combined with Entity Framework, the development of ASP.NET Core applications can be streamlined. This example use three models: Enquiries, Media and Reporters. A custom database context, AppDbContext is then defined, with a DbSet<T> declared for each resource collection and additional constraints … Read more

Learning C# and ASP.NET Core

In a bid to break into the enterprise programming space, I have decided to embark on a learning journey through the world of C# and the ASP.NET Core framework. The first application I have developed uses a test-driven development approach and demonstrates the use of some basic services including static files, web and api endpoints, … Read more

Planning a project

When creating a project for your portfolio it is important to not just dive head-first into development. With a little bit of project planning, you can introduce a framework that will help you track your progress, record your decisions and manage the scope of your project. A simple project can be broken down into four … Read more

React Hooks

React Hooks are function calls that allow us to include state in a functional component. State is kept isolated from components to keep the component stateless and pure, and the state reuseable. Hooks allow us to reintroduce statefull logic into components whilst preserving these features.

Styling the elements of a page

A page may contain any number of different elements which each need to be styled relative to one another. It is useful, therefore, to have a single page containing a concise list of common elements such as headings, paragraphs and tables, so that these can be styled all at once. Such a page should contain … Read more

WordPress template hierarchy

WordPress decides which files to use for a page based on a hierarchy of templates that gradually decrease in specificity. 🛈 More information about the WordPress template hierarchy can be found on the official WordPress documentation site. The bottom level, which WordPress will default to if no other template is available, is the index.php file. … Read more

Creating a WordPress theme

🏁 In this series, we will create a WordPress classic theme from scratch, called Domingo. The first step to creating a WordPress theme is to create an empty folder and give it a name. Within the new folder, create two files: The index.php file will be the main template of our WordPress theme, and will … Read more

Prevent the page reloading on a form submission

The prevent the page reloading when you submit a form, call the preventDefault() method on the submit event. A form by default will send a request to a given location. Unless the action attribute is specifed, the form will send a request to the current location. The form will send the request when the submit … Read more