How to Create Your First Angular Element

See the original posting on DZone Python

Angular Elements allow us to create reusable Angular components, which can be used outside of the Angular application. You can use an Angular Element in any other application, built with HTML, React, etc. Essentially, Angular Elements are normal components, which are packaged as Custom Elements. You can learn more about Custom Elements here.

Angular Elements are reusable components, which can be used outside Angular. 

Functional Programming Unit Testing in Node (Part 4)

See the original posting on DZone Python

Welcome to Part 4 where we show how to do concurrency which is a lot easier to get "for free" using pure functions, we compose both async and synchronous functions, and we utilize a test coverage report to known where to next focus our refactoring and testing efforts.


This is a six-part series on refactoring imperative code in Node to a functional programming style with unit tests. You are currently on Part 4.

Thoughts on Importing npm Modules to the Web as JavaScript Modules

See the original posting on DZone Python

I’ve got thoughts on the post I did about ES Modules.

"I needed a quick way import a simple module get-urls into my project. The module is well tested and it does what I needed … ignore the fact that it’s pretty easy to implement in a couple of lines of JavaScript. The problem I had is that my project is built in ES6, uses modules, and I didn’t want to have to bundle up using CommonJS (require).

How to Add Ignite UI to an Existing Angular Project

See the original posting on DZone Python

Let’s say that you’re already working on an existing Angular project, and you wish to add the Ignite UI for Angular library into the project. In this blog post, we will follow a step-by-step approach to add Ignite UI Angular library into an existing Angular project.

Step 1: Add Ignite UI for Angular library

Begin by adding the Ignite UI Angular library in the project. We can use npm to do this. So, run the command shown below to install Ignite UI for Angular.

Vue Example: Creating a TODO App using Vue.js 2, Vuex, and Codemix [Video]

See the original posting on DZone Python

Looking for an efficient way to create web apps? Look no further – CodeMix is here to give you an entirely new experience. The following video shows you how to create a Vue example app, created in Eclipse and powered up by CodeMix. CodeMix is an Eclipse plugin that unlocks a wide array of technologies from VS Code and add-on extensions built for Code OSS. The Vue extension pack included with CodeMix includes everything you need for a superior coding experience as you follow along with the Vue example app in the video.

To create this application, you will be working with .vue, .js, and .html files. As you progress through your setup, you will create several components for the app using CodeMix’s powerful Vue.js support. Here’s a little taste of what you get when you use CodeMix:

The Best Web Development Podcasts

See the original posting on DZone Python

Podcasts seem to be everywhere this year. They’re the perfect medium for tuning out from the world, and also for tuning in a little closer to your industry and learning something along the way.

Recently, we’ve come across (and been featured on) some incredible podcasts in our industry including The Ruby on Rails Podcast and Giant Robots Smashing Into Other Giant Robots.

Practical Guide to Storybook-Driven Development

See the original posting on DZone Python

So a few weeks ago, while having a discussion with my team about the approach to developing self-contained React components, I came across this awesome tool: Storybook. To my surprise, I had seen this before, in the example of react-dates.

Storybook is basically a playground for developing your components and their behavior. It also serves as documentation for your component library. You can showcase your components and their different alterations that are linked to props. After playing a bit with Storybook and watching this talk on Storybook Driven Development, I decided to make a practical guide on how to get you started.

Hoisting in JavaScript

See the original posting on DZone Python

Two weeks ago I gave a lightning talk at Caphyon on hoisting in JavaScript. Putting aside all the common jokes about the JS language, people really seemed to like it. It was kind of a challenge to talk about JS while having an audience of C++ and Java colleagues.

Now getting back to the talk, that was lightning fast and it didn’t covered that much as I would’ve liked to. So I’ll try to write a bit more on JavaScript scoping and hoisting below.

Functional Programming Unit Testing in Node (Part 3)

See the original posting on DZone Python

Welcome to Part 3 where we’ll show you how to navigate class based code using FP, go over composing all these asynchronous functions we wrote, and continuing to define our dependencies in curried functions to make them easier to test.


This is a six-part series on refactoring imperative code in Node to a functional programming style with unit tests. You are currently on Part 3.

Writing Multitenant ASP.NET Core Applications

See the original posting on DZone Python

A multitenant web application is one that responds differently depending on how it is addressed – the tenant. This kind of architecture has become very popular, because a single code base and deployment can serve many different tenants. In this post, I will present some of the concepts and challenges behind multitenant ASP.NET Core apps. Let’s consider what it takes to write a multitenant ASP.NET Core app. For the sake of simplicity, let’s consider two imaginary tenants, ABC and XYZ. We won’t go into all that is involved in writing a multitenant app, but we will get a glimpse of all the relevant stuff that is involved in it.

What Is a Tenant?

A tenant has a specific identity, and an application that responds to a particular tenant behaves differently from another tenant. Specifically, one or more of these may change:

Vimium, a Browser for Hackers

See the original posting on DZone Python

How I Learned About Vimium

So, I am a regular Reddit user and it’s one of my favorite online communities. While browsing through subreddit posts, there is a feature in the Reddit web app where you have keyboard shortcuts for browsing: N for next post, P for previous post, and so on. I found it very convenient and easy to use, especially because you don’t have to take your hands off the keyboard. So, I started searching for any plugins for browsers where you could navigate and do stuff using shortcuts. There are a lot of fancy terminal-based browsers, but we all know that they offer far less utility value when we actually want to accomplish something. I even posted about it under the ‘productivity’ subreddit. That’s when I learned about Vimium.


Vimium strives to provide vim like capabilities to a browser. If used properly (though it has steep learning curve) Vim is one of the most efficient text editors with a myriad of capabilities. It is well known for how easy, efficient, and configurable it is when used properly. For people working on remote servers (you don’t have graphical server access in order to use fancy IDEs), when the files being dealt are huge (gigabytes of text data – try opening that in your IDE…), when system resources are low (say you are inside a VM with limited memory, or are inside a Docker container and don’t want to bloat it with heavy memory consumptive applications) Vim comes to the rescue. Emacs stands as a comparable editor with useful features too!

HTTP/2 Server Push

See the original posting on DZone Python

The new version of the HTTP protocol, HTTP/2 lets the server to push content to the client before the client requests the particular content. There are many other modifications in the protocol if we compare the previous version 1.1 with the new version 2, but, in this article, I will focus on the push functionality. I will discuss briefly how it can be used in a servlet, and I will also discuss a bit about how to test and see that it really works at all or not. Before writing this article my original intention was to create a demonstration of HTTP/2 showing how much faster the sample page load is with the push than it is without. It is going to be one chapter in my video tutorial that is published by PACKT. During the development of the sample application I faced several problems, I have read some tutorials and debugged the sample code a bit using what I gathered during this experience. In this article, I share this experience with you. That way this article is a bit more than just a simple introductory tutorial. Nevertheless, it is also a bit longer, so TLDR; if you are impatient.

HTTP Versions

HTTP/2 is a new version of the HTTP protocol. The protocol had three versions prior to 2. They were 0.9, 1.0, and 1.1. The first one was only an experiment starting in 1991. The first real version was 1.0 released in 1996. This was the version that you probably met if you were using the internet at that time and you still remember the Mosaic browser. This version was soon followed by version 1.1 in 1997. The major difference between 1.0 and 1.1 was the Host header field that made it possible to operate several websites on one machine, one server, one IP address, and one port.

JavaScript Menus for Native-Looking Applications

See the original posting on DZone Python

Using web technologies for the GUI of a desktop application makes a lot of sense: they’re portable, familiar, and powerful. A popular option is to use a comprehensive framework such as Electron. However, you might want the option of using a regular desktop browser —maybe you want to be able to access your application remotely, or you might prefer a lighter-weight embedded browser such as webview.

For a native-looking application you probably want menus: a top menubar as well as a pop-up (context) menu. While the various embedded platforms (such as Electron) each have their own APIs for menus, there is no standard JavaScript API. The DomTerm terminal emulator can be run with a small Electron wrapper (in which case it uses Electron menus), but it can also run in a plain browser like Firefox or Chrome. So I looked around for a lightweight menu library that would work in a desktop browser, but I didn’t find anything I liked: They were unmaintained, or too big, or depended on some other library (such as jQuery), or were incomplete (popup menus but no menubar support, or missing keyboard navigation), or had an API too different from Electron’s relatively simple one.

My Best Practices for Deploying a Web Application in Alibaba Cloud

See the original posting on DZone Python

Through this article, I want to share the best practices I use when deploying some web applications on the cloud. I work as a freelancer and recently one of my clients asked me to setup SuiteCRM for his small organization. Since I frequently write tutorials for Alibaba Cloud, I recommended the client use the same cloud platform. For nearly a 100 users and at least 30 concurrent users, here’s the configuration I recommended.

  1. ECS instance of 2 vCPUs and 4GB RAM to install Nginx with PHP-FPM.
  2. ApsaraDB for RDS instance for MySQL with 1GB core, 1 GB RAM, and 10 GB storage.
  3. Direct Mail for sending emails.

The steps I followed are very simple and can be adopted for nearly all PHP-based applications.

What Is JSX? [Snippet]

See the original posting on DZone Python

JSX stands for JavaScript XML. It is used with React to describe what the UI should look like. JSX produces React “elements” in a familiar and easy manner. React doesn’t require using JSX, but you can find it helpful as a visual aid when working with UI inside the JavaScript code. It also allows React to show more useful error and warning messages. If you want to create a React element without JSX you need to write something like this:

var temp = React.createElement( ‘h1’,  null,  ‘test’ );

By using JSX, the above code is reduced to the following:

1 2 3 4 5 124