So, you want to develop a new website with spiffy apps on Android and iOS, and you want that website and your APIs to run in Node Express. It sounds like a lot of work to write the website in React (or Flutter or whatever the language de jour is), the Android app with Android Studio, and the iOS app with Xcode…
Using Lambda Expressions in Java for Cleaner Code
Ever wondered how you can make your Java code cleaner and easier to maintain? Writing concise, readable code is a challenge for every developer, but Lambda expressions in Java, introduced in Java 8, have transformed the way we approach this. Lambdas aren’t just a minor syntax tweak—they significantly simplify how we handle functional interfaces and anonymous classes. By using Lambdas, …
CSS Grid + CSS Math Expressions = Look Ma No Media Queries
CSS Grid has been the new, cool kid on the block for a few years now. Grid, with its layout algorithm, has given us so many more capabilities in how we can layout and arrange content in our applications.
CSS Grid allows us to define layout patterns in concise and refined ways. That being said, we simply cannot look at CSS Grid by itself without knowing how other key features of modern CSS (like Math expressions) work with CSS Grid. This can allow us to push the boundaries and create more efficient layouts.
These new layout superpowers enable us to start to move past the constraints and limitations that media queries have.
An Antlr4-Based Expression Parser
In this blog, we’ll present a simple arithmetic expression parser implemented through an Antlr4 parser generator. It will be able to take in an input string (such as 2+4+-4+-2*10%9*7) to produce the result (-12.0).
You may be thinking, “Great, but what’s the point?” Well, to answer your question, as simple as this example may seem, the principles involved actually extend to use cases such as DSLs, transpilation, and anything else expressible by grammar rules.
This post has two parts. In part 1, we’ll discuss the background components of a parser. In part 2, we’ll cover building the demo and running it. If you already understand grammar parsing, you could skip part one.
Part 6: Node + Express for a Simple Security Model
Part of the Solid Foundations Learning Series
This is an in-depth learning series focused on a specific application: a JavaScript-based suite of single-page applications optimized for use in a microservice environment. We focus on telling the story of “why” and “how” it was built.
Throughout this series, we have touched on adding navigation, content and single-page applications, but we haven’t touched on the security of the application yet.
In this article, we’re going to add a simple security model to the application which will accept a login, validate a user, redirect to a secure page, enable a logout, and catch any errors which occur during the process. Let’s get started.