Advanced Server-Side Rendering With Laravel and Vue: Multi-Page App

See the original posting on DZone Python

A few weeks ago I wrote a tutorial on the new Vue server-side rendering capabilities for Laravel. That tutorial mostly focused on the set up of SSR in a Laravel environment and so I only had time to demonstrate a simple "Hello World" app with no significant features.

Now I want to build on that previous tutorial and demonstrate how to server render a Vue app that includes multiple pages with Vue Router since most of your Laravel projects will have more than one page.

A Gentle and Practical Introduction to Progressive Web Apps

See the original posting on DZone Python

Progressive Web Apps

Progressive Web Apps (PWAs) have increasingly become an important topic for web developers. If you’ve ever spent any time looking into the subject, it can be… a bit overwhelming. What I hope to do in this article, and the ones that follow is to gently, and slowly, introduce you to the basics of PWAs, what they mean to me, and give you practical advice on how you can start building PWAs today. In the final installment, I’ll share a simple but complete PWA that you can use as a starting off point for your own applications. I’ll also share plenty of resources along the way that can help you learn more.

PWAs are new to me as well, so please let me know in the comments if you think I’ve made a mistake, or perhaps when you simply have an alternative take on the subject matter. Remember that the end goal of all of this discussion is a "Better Web" for your users. A theme you will see me repeat throughout this series is to take baby steps. You don’t need to convert your site over to a "complete PWA" overnight. Every small step you make in improving your app is a good thing. Never forget that!

VS Code for PHP Development

See the original posting on DZone Python

Although most of my work time is spent on ASP.NET and SharePoint development, I also have some PHP projects. I have my own favorite thin tooling for PHP but I decided to give Visual Studio Code (VS Code) a try with one of the projects. This blog post describes what I have in my dev box and what my first impressions are of using VS Code for PHP development.

Why VS Code?

VS Code is not an IDE like Visual Studio. It is also not a simple code editor with a few commands and syntax highlighting. It sits somewhere in the middle, making it a simple yet powerful tool thanks to the fact that it supports extensions. The main reasons why I considered trying out VS Code for PHP development are:

Comparison of JavaScript Pivot Grids for Developers

See the original posting on DZone Python

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:

Fun With React: A Quick Overview

See the original posting on DZone Python

React in the Real World

Created by Facebook, React was initially released in 2013. React continued to gain momentum until it looked like it was going to hit a snag in 2017 over licensing. The BSD+Patents license that Facebook was insisting on created potential Intellectual Property issues for developers. Fortunately, in September of 2017 Facebook backed down and re-licensed React under the more acceptable MIT license. The current release is 16.2.

Like the other popular frameworks, React is a free, unlicensed library so there are no perfect usage statistics, but there are several places we can look to for a good idea of overall adoption. It has over 88K stars on GitHub, and over 7 million npm downloads per month. Some of this traffic might, of course, be from development machines or mirrors, but these are good quick stats to get an idea of just how popular the library is.

CSS Columns

See the original posting on DZone Python

The text breaking option has not been the most popular text option ever since the advent of magazine layout. Just like in print design, there are columns in web design too. The best and clearest way to use it is the column option in CSS.

It is boring, content and design-wise, for text content to be extended over the full web page, so this is rare to see.

Creating a Chat Application Using React and ASP.NET Core – Part 2

See the original posting on DZone Python

In this blog series, I’m going to create a small chat application using React and ASP.NET Core, to learn more about React and to learn how React behaves in an ASP.NET Core project during development and deployment. This Series is divided into 5 parts, which should cover all relevant topics:

  1. React Chat Part 1: Requirements & Setup
  2. React Chat Part 2: Creating the UI & React Components
  3. React Chat Part 3: Adding Websockets using SignalR
  4. React Chat Part 4: Authentication & Storage
  5. React Chat Part 5: Deployment to Azure

I also set-up a GitHub repository where you can follow the project. Feel free to share your ideas about that topic in the comments below or in issues on GitHub. Because I’m still learning React, please tell me about significant and conceptual errors by dropping a comment or by creating an Issue on GitHub. Thanks.

RSpec Let vs Before

See the original posting on DZone Python

In RSpec, there are two different ways to write DRY tests, by using before or let. Their purpose is to create variables that are common across tests. In this post, we will explore differences between before and let and explain why let is preferred by the Ruby community.


let creates lazily-evaluated local variables. This means that let() is not evaluated until the method that it formed is run for the first time. It DRYs up the spec and makes it more readable.

Separating State Into Angular Modules With Ngrx

See the original posting on DZone Python

In this post, I want to give you an explanation of the state tree of Ngrx if you are working with a state and how to separate it into different modules.

In this blog

  1. One state for your entire application with forRoot(…)
  2. Separating state into modules with forFeature(…)
  3. Conclusion

If you are building smaller or large Angular application, you will sooner or later face the problem of managing the state of your application. It gets influenced by a lot of things around which can be a simple button triggering a service – maybe with an HTTP action – which will set your application in a different state.

A Detailed Study of Flux: The React.js Application Architecture

See the original posting on DZone Python

Flux is a new kind of architecture that Facebook uses when it works with React. React – a popular front-end technology like AngularJS – is a Javascript framework, but it only works with the View layer, which means you have only the V in the MVC – Model-View-Controller – architecture. React gives you the template language and a few function hooks to render HTML. Since it is component based, you can compose an application with React, and just specify how you want your component to look. React will keep it updated; even the underlying data changes. The core principles of React are (1) Flexibility, (2) Efficiency and (3) Declarative code. As React is flexible, you can use it in several projects, create new apps, and even use it within the existing code base, without doing a rewrite.

What Is Flux?

We learned that React takes care of the V, or View, part of the MVC. Now, what about the M, or the Model, part? Flux, a programming pattern, takes care of that. It is the architecture responsible for creating data layers in JavaScript applications and building client-side web applications. Flux complements React’s Composable view components through its unidirectional data flow. You can also say that Flux is more of a pattern than a framework and it has four main components (we will go in depth later):

Pipelines on a Rails Environment With react_on_rails and Webpack

See the original posting on DZone Python

I noticed a bit of a gap when it comes to documentation and setting up Bitbucket Pipelines when you have some modern webpack dependencies with yarn.

If you’ve gone through this process, you may have struggled to find helpful documentation, too. I thought it may be useful to walk through some of the basics of how Bitbucket Pipelines is set up and strategies to help debug your pipeline’s configuration. Read on for my experience of going through the process of setting up Bitbucket Pipelines on a Rails 5.2 environment.

Creating Modals in Rails

See the original posting on DZone Python

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:

Simple Task Scheduler With PHP

See the original posting on DZone Python

During a more or less large project, a situation may arise when the number of scheduled tasks (cron jobs) becomes so large that their support becomes a DevOps nightmare. To solve this problem, I came up with the idea of creating a PHP scheduler implementation, thereby making it a part of the project, allowing the tasks themselves to be part of its configuration. In this case, the necessary and sufficient number of cron jobs will be equal to one.

Some time ago, I was able to develop a module for event planning. It was just a simplified version of Google/Apple Calendar for users of the application. For storing the dates and rules regarding the repetition of events, it was decided to use the iCalendar format (RFC 5545), which allows one line to describe a schedule for repeating an event, while taking into account the days of the week, months, the number of repetitions, and much more. A few examples:

1 2 3 100