I recently had to parse some markdown using the marked npm package and convert it into JSON objects for a project I’m working on. When I parsed the markdown I’d get back an array of tokens that would look something like the following: I started out the “normal” way by doing a for…of loop to iterate through the tokens in the array. This worked, but tracking the start and end of a token meant adding extra variables which ultimately complicated the code. For example, how do you know if you’re in a list? You track it with an inList variable […]
About a year ago I was browsing the web and came across a site called Scrimba.com. It provided a unique way to learn about web technologies through a live code editor combined with audio that syncs with the code – something you have to actually try out to realize the full potential. Since I do a lot of training for companies the Scrimba tool really caught my eye. I was so impressed with the features Scrimba provided that I decided to contact the creators (Per Harald Borgen and Sindre Aarsaether) to let them know that I thought the tool they had […]
I’ve always been a fan of convention-based routing so I converted a local route generation script I’ve been using with Node.js/Express applications into an npm package called express-convention-routes. The package can be used to automate the creation of Express routes based on a directory structure. What’s a convention-based Express route? It’s a route that is dynamically generated and associated with a “controller” function without having to explicitly code the route yourself (i.e. you don’t write code such as app.use(‘/foo’, router)). express-convention-routes creates routes automatically by parsing a convention-based folder structure such as the one below when the server first starts. […]
I’m excited to announce the release of my new course on Pluralsight titled Integrating Angular with ASP.NET Core RESTful Services! This course follows up my previous course which focused on Angular and Node.js. The code in this new class covers ASP.NET Core 2.0 or higher and Angular 4 or higher. As with my previous course, I’ll walk you through the process of using Angular to call into RESTful services and perform CRUD (Create, Read, Update and Delete) operations in an application to allow a user to view and modify data. However, in this course the services are built using C# and […]
Over the past few months, I’ve been asked the same general question about Angular multiple times in onsite training classes, while helping customers with their architecture, or when talking with company leaders about the direction web technologies are heading. Here’s the general question: “What are the key benefits that Angular and TypeScript can offer our development teams?” It’s a great question and one that should be asked before jumping into any new technology or framework. Most of the people asking are technology managers or directors interested in understanding the benefits that Angular can offer their teams (both technical and non-technical). […]
Edition #2 of the Code with Dan Web Development Newsletter is now out including a new video walk-through! Topics in this edition: Node.js API authentication Microservices with Node.js and Express D3 graphics and charting TypeScript and Angular projects to learn from A minimalistic CSS library (when you want something smaller than Bootstrap) Watch my video walk-through of the content covered in this newsletter here: Not subscribed to the newsletter yet? Sign-up below!
I’ve had several people over the years ask about my workflow as I create video courses for Pluralsight and other sites so I thought I’d provide some details. Since I’m starting a brand new course for Pluralsight (Integrating Angular with ASP.NET Core RESTful Services) I filmed a few details about my equipment setup and also did a live recording (with bloopers!) of one of the video clips that will be used in the course. I know a lot of people are either interested in getting into video or simply want to know what really happens behind the scenes so I hope […]