Building a React-Based Chat Client With Redux, Part 1: React and ReactDOM

See the original posting on DZone Python

Just two users casually chatting, thanks to React and Redux!
Let’s build a non-trivial app with React and then refactor it to use Redux!

Much of the advice you get regarding the addition of Redux to your React projects is to only do so once they reach a certain size, because of the extra complexity Redux adds. That’s certainly fair. But it will leave you with a bit of technical debt (refactoring to be done later) that you wouldn’t have if you just started out with React and Redux.

Consequently, I thought it might be nice to present an exercise where we do just that: build an app as simply as possible using React and ReactDOM alone (not even JSX since you need more dependencies and a build process to support that), and then refactor to use JSX and Redux.

JavaScript Frameworks: How To Make Your Choice

See the original posting on DZone Python

JavaScript is one of the most commonly used, basic languages of the Internet. According to a survey, JavaScript was the top language among front-end developers, and it doesn’t seem to be losing popularity. That’s why, today, there are so many JavaScript frameworks — and it’s difficult to understand which is most effective.

The more frameworks that appear, the more discussions that surround them. The developer community talks a lot about which frameworks are most efficient for front-end development. Based on our research, we’ve identified the five most-discussed JavaScript frameworks. We also share Yalantis’ experience by showing the JavaScript frameworks what our front-end developers prefer.

How to Define an Interface in TypeScript

See the original posting on DZone Python

An interface in TypeScript contains only the declaration of the methods and properties, but not the implementation. It is the responsibility of the class that implements the interface by providing the implementation for all the members of the interface.

Today, in this TypeScript tutorial, we will learn how to work with interfaces in TypeScript. Continue reading to learn more.

ASP.NET MVC Error

See the original posting on DZone Python

Error when running ASP.NET MVC application from Visual Studio: "It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS." Stop inventing painful hacks, the solution is here.

How to Reproduce This Error

This is what I have to do to get this error in Visual Studio:

Bindings in Angular

See the original posting on DZone Python

What Is Binding?

Binding is the process which forms the connection between the application UI and the data which comes from the business logic. In Angular, it can be called the automatic synchronization of the data and the view.

Before moving to the main section of the article, let’s look at some parentheses we use in Angular.

Hacking GitHub to Build Your Own Wiki

See the original posting on DZone Python

Here at Ably, we have an immense amount of information that needs to be shared among our employees, from the various services we use to the usage of our own system and various company protocols.

Until recently, we’ve been using the GitHub Wiki functionality to do the job but lately, we have had a few issues with this. Firstly, there’s no form of version control for the wiki available through the GitHub interface. Secondly, we wanted the wiki’s content to be easily searchable from the actual page.

What’s New in .NET Core 2.1

See the original posting on DZone Python

.NET Core 2.1 was officially released on May 30. I will summarize what’s new for all its parts – .NET Core itself, Entity Framework Core, and ASP.NET Core. You can also check out our article on the .NET Ecosystem to fully understand your options before you start your next project.

.NET Core 2.1

First, you will need either Visual Studio 2017 15.7 (or higher), Visual Studio Code, or Visual Studio for Mac in order to fully leverage this version. Docker images have been published at the Microsoft Docker repo. It is important that you upgrade since .NET Core 2.0 will reach end of life for Microsoft support in October 2018. There are no breaking changes, only a couple of useful additions.

Angular Component Communication, Day 2

See the original posting on DZone Python

In my last article, we looked at how we can pass data between components using the @Input and @Output directives and using event emitters. Today, let’s see the other two methods, @ViewChild and data services, can be used to pass data between components.

Let’s break up the article into two sections. First, we will look at ViewChild, then move on to data services.

10 JavaScript Animation Libraries to Follow in 2018

See the original posting on DZone Python

The client-side of a modern day website feeds off quality animation, which has lead to a rise in the need for JavaScript animation libraries. Fortunately, the supply seems to have matched the demand and there are a lot of options out there. However, making a choice on which library to go with could cause a lot of headaches. A lot of libraries have the potential to become better over the course of the year and would be the go-to solutions for creating animations.

Let’s take a look at the top ten JavaScript animation libraries.

Basic C# Code to Find Out the Occurrence of Each Character in a String

See the original posting on DZone Python

Recently I went to an interview where the interviewer asked me to write some basic code to find out the occurrence of each character in a string.

I managed to do that using some loop, but it was not an optimal solution. The complexity, O(n), for that code was fairly high. I’ve continued to play with the code since, and have found a lot of options to solve this problem.

Code-First Approach With ASP.NET MVC Framework

See the original posting on DZone Python

Introduction

In this article, we’ll learn how to perform CRUD operations with a code first approach in an MVC application. Here, we will create an MVC structure that will help to change in the Model Class and that change will update it in the database. Microsoft’s Entity Framework (EF) avoids working directly with the database and creates the database per the model classes’ requirements. We will not use visual model designer (EDMX) completely but will create POCO classes first and then create the database from these POCO classes.

Recommended Prerequisites

  • Visual Studio 2010 SP1
  • ASP.NET MVC
  • SQL Server

Step 1

Open Visual Studio and select “File” >> "New". Then click on Project (remember, don’t go with the option ‘File->New->Website’).

Component Communication in Angular, Day 1

See the original posting on DZone Python

Components are the basic building blocks of Angular applications. In a simpler manner, we can say components are UI/ View elements along with the mechanism to show and operate on data.

The Angular Team defines a component as the Patch of the screen that we call a View which declares the reusable building blocks for an application. So, a component is anything which is visible on the screen, which can be reused again and again.

Creating Your Own Validation Attribute In MVC and Web API 2.0

See the original posting on DZone Python

Data validation in an application is one of the major tasks for the developer now-a-days. Data validation is the process of ensuring that the data entered by any users is correct and is useful. It uses routines, often called validation rules, validation constraints or check routines, which check for the correctness, meaningfulness, and security of data, that gets put into a web application. These rules are mainly implemented in UI, business logic, and databases.

If we check in any web application, we will mainly find validations in the UI. As the user interface is the primary source, where the user can enter invalid data in the application, we mainly focus on UI validation.

Angular 6, Part 2: An Overview of Components

See the original posting on DZone Python

If you are new to the Angular framework or just finding out why Angular is popular in the web development, then this series of articles is for you. Through this series of articles, you can learn about every aspect or benefit of Angular, including how to use it in your own development.

Angular is a component-based framework. Components are the main building blocks of the Angular framework. So, as per the definition of a component, it is a basically a class which is defined to be visible in any elements in the screen or browsers. For defining the component in Angular, we need to use the @Component() decorator. In fact, components are a really a unique idea. Because each of the component classes represents an independent unit which is highly reusable and can be maintained without hampering the other components.

Error Monitoring in Golang

See the original posting on DZone Python

Rollbar is proud to announce its error monitoring SDK for the Go language (aka Golang). It’s an open source programming language originally created by Google and is growing in popularity. It’s a low-level language like C, but also offers garbage collection, an easy-to-use package system, and other features.

If you’re used to languages like Java or JavaScript, then Go’s way of handling errors will be new to you. We will give a brief introduction on how error handling works in Go, then cover how you can monitor errors in production apps.
Image title

1 2 3 118