blog.logrocket.com blog.logrocket.com

Overriding dependencies in the Angular injector hierarchy

Introduction The Angular framework makes it straightforward to determine the direction dependency flows through an application, thereby making debugging seamlessly easy. Angular allows dependencies provided through the injector of a parent component to be shared among its child components by injecting them into the constructors of the child components. To understand this better, let’s consider a practical approach to parent-to-child...

blog.logrocket.com blog.logrocket.com

How to build a gRPC server in Dart

In this tutorial, we’ll cover the basics of gRPC, a performant, open-source, universal RPC framework, review a little about the Dart programming language, and demonstrate how to build a gRPC server in Dart. We’ll walk you through the following: What is gRPC? How protocol buffers work Building a gRPC server in Dart Writing service definitions Compiling proto Creating the gRPC server Building a gRPC client Testing the...

blog.logrocket.com blog.logrocket.com

Swift extensions: An overview with examples

In this tutorial, we’ll take you through a basic overview of extensions in Swift. We’ll demonstrate how Swift extensions work by building a simple workout tracking app. We’ll focus on the following: What are Swift extensions? Creating an extension in Swift Type properties Mutating methods Separating code Extension on SwiftUI views Adding initializers to existing types What are Swift extensions? Extensions, well, extend existing...

blog.logrocket.com blog.logrocket.com

Type casting in Swift 

Created by Apple in 2014, Swift is a popular open-source language for building iOS applications that has garnered a strong community of developers and a wealth of third-party content. Like almost every other programming language, Swift has its own rules and syntax. In this guide, we’ll take a look at type casting in Swift, a popular concept in modern object-oriented programming languages. What are types in Swift? A type is, in...