Comparison of JavaScript Pivot Grids for Developers

In this article, I’d like to consider the most popular JavaScript pivot grid components. During this review, I won’t dive into the coding since each grid has exhaustive and well-written documentation (at least, I hope so). Instead, I’ll focus on the core features of each pivot grid. Since I believe that there are some beginner developers among the readers, I’ll pay particular attention to documentation and demo pages. It’s a pretty convenient way to learn something while having a working example before your eyes. Therefore, demo pages with code examples and detailed descriptions will be a plus.
The principle of pivots selection is simple. I’ll check the most popular of those that can be used as stand-alone components. The reason is that I’m looking for relatively cheap and lightweight options leaving complex solutions for the future articles. So, let’s take a look at the list of JavaScript pivot grids I’m going to review today:


How to Create a Twitter Bot with Node.js

Twitter bots have been in the news over the past few years due to election meddling, not only in the United States but stretching across the globe.  There are, however, good and logical reasons for creating Twitter bots.  In order to see how easy it was to create a Twitter bot, for good or evil, […]
The post How to Create a Twitter Bot with Node.js appeared first on David Walsh Blog.


React JSX: How to Do It the Right Way, Part II

In the previous part of React JSX series, we took a look at how to correctly loop through arrays and objects in React. In this article, we’ll help you learn how to write conditional statements when rendering components.
Everything below applies to React Native as well!


React JSX: How to Do It the Right Way, Part I

Usually, when developing a website, you’ll need some dynamic rendering, like a listing of items, showing some element under a certain condition and so on.
You’re all aware of the standard JS syntax – a for loop, or an if/else – but when you try to write those under a render method in React, you’ll most likely get some weird looking errors.


Creating Modals in Rails

Instead of writing a JavaScript application for working with remote modals in your Rails application, a much simpler approach is to render our views on a server and display them as modals. In this tutorial, we will explain how to implement this by using Bootstrap modals.
Step 1: Initial Setup
Add gem ‘bootstrap’ and gem ‘popperjs’ to your gemfile. Also, in your application.js file, include this in the following order:


Vuebnb: A Full-Stack Vue.js and Laravel App

This year I’ve been writing a new book called Full-Stack Vue Web Development: Vue.js, Vuex, and Laravel. It’ll be published in early 2018 by Packt Publishing.
The book is centered around a case study project, Vuebnb, a simple clone of Airbnb. In this post, I’ll give a high-level overview of how it works so you get a sense of what’s involved in building a full-stack Vue/Laravel app from scratch.


Getting Bootstrap Tabs to Play Nice with Masonry

On the Masonry website, we read that Masonry is …

a JavaScript grid layout library. It works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall.

Bootstrap is one of the most widely adopted, open-source, front-end frameworks. Include Bootstrap in your project, and you’ll be able to whip up responsive web pages in no time.
If you tried using Masonry together with the Tabs widget, one of the many JavaScript components Bootstrap has to offer, chances are you’ve stumbled on some kind of annoying behavior.
I did, and this article highlights what the issue is and what you can do to solve it.
Bootstrap Tabs Explained
Bootstrap’s Tabs component includes two key, related pieces: a tabbed navigation element and a number of content panels. On page load, the first panel has the class .active applied to it. This enables the panel to be visible by default. This class is used via JavaScript to toggle the panel’s visibility via the events triggered by the tabbed navigation links: if .active is present the panel is visible, otherwise the panel is hidden.
If you have some web content that’s best presented in individual chunks, rather than crammed all in one spot, this kind of tabs component might come in handy.
Why Masonry?
In some cases, the content inside each panel is suited to being displayed in a responsive grid layout. For instance, a range of products, services, and portfolio items are types of content that can be displayed in grid format.
However, if grid cells are not of the same height, something like what you see below can happen.

A wide gap separates the two rows of content and the layout appears broken.
Nowadays, Bootstrap solves the equal-width issue with the brand new card component, which is based on Flexbox. Just adding the card-deck class to a group of card components is sufficient to achieve equal-width columns.
If you like your cards to be of uneven length, you could use CSS3 Multi Column Layout. (After all, even though there are some browser support bugs, overall it’s quite good.) This underlies the new card columns option that comes packaged with the card component. However, if you still love the nice animation that the Masonry JavaScript library provides out of the box, and its wide browser compatibility, JavaScript is still a viable option in this case.
Setting Up a Demo Page
Getting a demo page up and running helps to show how integrating Bootstrap’s Tabs with Masonry is not as straightforward as one might expect.
This article’s demo page is based on the starter template, available on the Bootstrap website.
Below is the skeleton of the markup for the tabs component:

React Is Taking Over Front-End Development

Selecting a JavaScript framework for your web application is a tough task. Especially when you have a plethora of convincing frameworks to choose from, including Angular, Backbone, Node, Ember, and the newest addition to the impressive list, Vue.js. You also have React.js – a JavaScript library that witnessed an immense growth in the past few years. Statistics show that front-end developers have wholeheartedly adopted this lightweight framework, forgoing other available options.