In my previous story I wrote about some of the difficulties of writing a book. Well that book is finally complete and let me say again it’s freaking hard to write a book!
Way Too Much Editing and Re-Editing
The first surprise for me was the amount of editing involved. I wrote my book for Packt. It’s called Full-Stack React, TypeScript and Node, if you’re interested. But without exaggerating, every chapter was revised at least 3 times and some chapters way more than that. Since this book has 17 chapters this was exhausting.
In addition to the language and grammar edits. The team at Packt has a very specific format for writing tech books. Certain things need to be included in the title of each chapter. Each subsection requires an introduction paragraph as well as a close. And certain formatting rules apply for code, pictures, and other types of text. …
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
The first thing you need to know is that these keywords only apply for reference types and not value types like structs or enums. In Swift, when setting a reference to any object, it is done as a strong reference by default, which means that the reference count is incremented for each strong reference.
Ok, seems pretty obvious but so what? Well when we use either weak or unowned the reference count is not affected at all. Let me say this another way, by using weak and unowned, what we are doing is we are interfering with the normal process of reference counting. But this seems like it would be the source of issues, not a fix for potential memory leaks. …
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
In most programming languages you have the idea of a contract. A development tool that allows you to create a set of rules, but with no code implementation. In Swift it’s called Protocols but in most other programming languages it’s known as an Interface.
Regardless of what it’s called GraphQL has a similar capability and it’s also called Interfaces. And Interfaces, along with the ability to inherit from them, allows us greater flexibility around how we design and create our GraphQL schema. We can therefore create a more expressive schema with logical hierarchies that make sense for our application domain. …
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
If you’re just getting started with GraphQL it can be a bit daunting. There are a lot of different vendor frameworks to choose from and a ton of nomenclature. But at its root, it’s actually not complex at all. In reality, there’s more complexity in vendor implementations than there is in the actual standard.
So to prove my point, in this short article I’m going to do a GraphQL query into an Apollo GraphQL Express server raw. I won’t use any client software at all. …
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
@State, @StateObject, @ObservedObject, @Binding, @EnvironmentObject, @Environment, @AppStorage. Yeah it’s definitely non-trivial so I go through each one and explain its usage.
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
GraphQL is obviously very hot right now with many companies converting their api to use GraphQL. So I wanted to take all the technologies in a Fullstack app and integrate them with GraphQL.
GraphQL is a Facebook developed standard for defining data types that will be used in web API's. This means that it is interoperable across vendor implementations. For example in my sample app I am using Apollo GraphQL in my React app and graphql-java in my Kotlin Vert.x server. …
Vert.x is one of the top performing server frameworks on Techempower. It’s usually very close in performance to Rust Actix, especially in data related tasks. It is also orders of magnitude faster than Node and Python related frameworks. On top of all this performance goodness, Vert.x is Polyglot. Since Vert.x uses the GraalVM runtime it supports the use of multiple languages including JavaScript, Kotlin, Scala, Java, Groovy, and Ruby.
If you prefer video learning
Let’s start at a high level in understanding Vert.x. Vert.x at its core is not a server framework. It’s more like a set of components for building event driven high performance applications. In other words Vert.x provides base level components that allow you to go off and build almost anything that requires very high performance. …
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
To kick things off what is an alternative way of writing the field b?
class A {
a: number;
b?: number;
}
That’s right, use a union b: number | undefined. You get the same effect. Which leads me to my next example. What if you have something like this? Will this code compile?
interface Car { wheels: number; carry();}interface Truck { wheels: number; payload();}
function getVehicle(): Car | Truck…
I’ve written a book on web development. It is an end to end complete book on modern development practices. Here’s a coupon code to save 20% on Amazon 20FULLS.
Having static types in JavaScript is enormously valuable, but knowing how to use them appropriately can also be difficult. I think you might be surprised by some of the details of these types.
Null and Undefined Types Are More Than You Think
In JavaScript running typeof on null returns ‘object’. Some devs might have thought its type is null, since undefined’s type is undefined. Now to make things more confusing however, in TypeScript null’s type is null. Don’t believe me? …