Understanding Ruby Metaprogramming and DSLs

A DSL, or Domain Specific Language, is a language that has a specific purpose rather than a general purpose, like C or Java. One of the most popular DSLs is SQL because it’s the standard for querying a relational database and its syntax is specific to activities such as sorting, filtering, and displaying data.
SQL falls under the category of external DSLs, which means it requires its own parser and implementation of all of the necessary components. Other examples of external DSLs are Gherkin, for writing feature files, Make Files, for building C and C++ applications, and HTML, for declaring webpages).

Link: https://dzone.com/articles/understanding-ruby-metaprogramming-and-dsls?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

CSS Containment Modules

One of the new hidden gems in the new CSS modules, which is supposed to drop in new browser versions in the future, is CSS containment. In this short post, I’ll explain what is the new contain property and why you will want to use it.

CSS Containment Module
The CSS containment module defines a new indication, using the contain property, that an element’s subtree is independent of the rest of the page. This will enable browsers to optimize the performance of rendering/painting.

Link: https://dzone.com/articles/css-containment-modules?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Easy JavaScript: What Are Template Literals?

In ES6, two types of literals were introduced:

Template Literals for string concatenation and expression embedding in a string
Tagged Template Literals to tag the Template Literal in a function so the literal can be evaluated in the function

Let’s assume that you need to do the string concatenation with a dynamic expression or with the value of a variable. Take a look at the following code:

Link: https://dzone.com/articles/easy-javascript-part-9-what-are-template-literals?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Advanced RxJS With Angular and Web Speech (Part 2)

This is Part 2 of our 2-part tutorial. RxJS Advanced Tutorial With Angular and Web Speech: Part 1 covered the following:

Introduction to reactive programming with Rx* and observables
Setting up our Angular app
Integrating the Annyang library for speech recognition support
Implementing a form component allowing users to speak or type words to use in the madlib story

In Part 2, we will cover:

Link: https://dzone.com/articles/advanced-rxjs-with-angular-and-web-speech-part-2?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Create Spring Beans in Your Site With Crafter CMS

Crafter CMS supports scripting in Groovy. It’s awesome. It’s lightweight. It’s fast. It’s easy. That said, when solutions start to become more sophisticated, developers need ways to manage the complexity. Spring bean factory is an inversion-of-control implementation that has become a standard for wiring components of a system together. Crafter CMS lets you create classes in Groovy and wire them together as Spring beans that can be used by other scripts in the system.
Step 1: Create Your Classes
Put your classes under scripts/classes/groovy. For example, you could put them under scripts/classes/groovy/mysite/AddressBook.groovy.

Link: https://dzone.com/articles/create-spring-beans-in-your-site-with-crafter-cms?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Developing a Basic Web Application Using Python

There are a few things we need to explain before getting into the thick of things. Let’s focus on the overall picture with a few analogies:

The internet is a network of computers. Its goal is to enable communication between them.
A network is composed of nodes and edges. Visually, it is a set of dots and connections. The London tube map is an example.
Your family, friends, colleagues, and acquaintances can be thought of as a network of people. (This is how social networks model our relationships.)
To communicate, we must have a means by which our messages reach the intended destination.
On one hand, we need something physical to connect the computers. These are the wires.
On the other hand, we need some conventions (software) to ensure messages reach their destinations.
One way this is done over the internet is called TCP/IP.
TCP ensures the messages arrive safely with nothing missing. Every computer has an IP which is a unique address.
You can think of TCP as an envelope and IP as the address on it.

HTTP and the Request/Response Cycle
To communicate effectively, the elements of a network need to agree on some protocol. That protocol for humans can be English, but there are other protocols (Chinese, for example).

Link: https://dzone.com/articles/bounty-tutorial-developing-a-basic-web-application

Node.js Performance Monitoring (Part 3): Debugging the Event Loop

In Part 1 and Part 2 of this series on Node.js Performance Monitoring, we covered the basic metrics to monitor and how to do this with N|Solid. In this article, we’re going to dig a bit deeper into how to diagnose and resolve common Node.js bottlenecks in the event loop by understanding some of the key metrics around the event loop.

Link: https://dzone.com/articles/nodejs-performance-monitoring-part-3-debugging-the?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Advanced RxJS With Angular and Web Speech (Part 1)

This is Part 1 of our 2-part tutorial. Part 1 will cover the following:

Introduction to reactive programming with Rx* and observables
Setting up our Angular app
Integrating the Annyang library for speech recognition support
Implementing a form component allowing users to speak or type words to use in the madlib story

In Part 2, we will cover:

Link: https://dzone.com/articles/advanced-rxjs-with-angular-and-web-speech-part-1?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Parsing HTML: Selecting the Right Library (Part 2)

Last time, we looked over the various HTML parsers you can consider when working with Java. This time, we’ll examine a couple of popular C# libraries worth considering as we examine their features, benefits, and drawbacks when processing HTML.

The ultimate angle brackets parser library parsing HTML5, MathML, SVG and CSS to construct a DOM based on the official W3C specifications.

Link: https://dzone.com/articles/parsing-html-selecting-the-right-library-part-2?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Parsing HTML: Selecting the Right Library (Part 1)

HTML is a markup language with a simple structure. It would be quite easy to build a parser for HTML with a parser generator. Actually, you may not even need to do that if you choose a popular parser generator, like ANTLR. That is because there are already available grammars ready to be used.
HTML is so popular that there is even a better option: using a library. It is easier to use and usually provides more features, such as a way to create an HTML document or support easy navigation through the parsed document. For example, usually, it comes with a CSS/jQuery-like selector to find nodes according to their position in the hierarchy.

Link: https://dzone.com/articles/parsing-html-selecting-the-right-library?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev