Best Practices for Using Maybes and Creating Default Values

See the original posting on DZone Python


You’ve learned that using Maybes allows you to get rid of null pointer exceptions (i.e. “undefined is not a function”). However, now your application fails and gives no indication as to why. Errors would have left a stack trace that could have provided a hint as to where the problem originated, but, clearly here, you don’t have that to rely on. What should you be doing instead?

Null Pointers in Python vs. Ruby, Lua, and JavaScript

Let’s define what we mean by null pointers and how you usually encounter them. Most null pointers you’ll run into are from either accessing a property of an object to show on the screen or calling a method on an object.

How to Use a Vue Pivot Grid UI Component in Your Web App

See the original posting on DZone Python

In this post, we will review the PivotGrid component. Unlike a typical grid, a PivotGrid lets you change the way the data is presented. For example, you may have a data set with inventory items that include the number in stock, category, store, and quarter. You can create a PivotGrid to analyze the total inventory in stock by store and by quarter. Or, you can view the inventory in stock by category and by store. These different perspectives can be viewed in the same grid just by selecting which fields to use for the row and column of the grid. In a regular grid, you could only create one static view. 

Getting Started

We will need the PivotGrid, the PivotConfigurator, and the PivotDataSource components. The PivotGrid displays our summarized data. The PivotConfigurator helps us build the PivotGrid. And the PivotDataSource is an extension of the DataSource component used to bind our data to the PivotGrid and PivotConfigurator. First, we will initialize our project using the Vue webpack-simple template. Then, we will install Kendo UI, a theme, the PivotGrid package, and the DataSource package.

Seven Easy Steps to Install MiniProfiler on an ASP.NET MVC Website

See the original posting on DZone Python


Today, I wanted to add MiniProfiler to an ASP.NET MVC web application (not .NET Core), but unfortunately, the NuGet package doesn’t set up things correctly. The documentation is a bit lacking, and their sample project doesn’t work. So what was supposedly a simple task, took almost a full day of research to finally complete.

Pyleri Tutorial: Parsing with Ease

See the original posting on DZone Python

You can find the source code in the companion

Welcome to a tutorial on Pyleri, a.k.a. the Python Left-Right Parser, a simple parsing tool used you need something more robust than a regular expression but less dense than a full-parser generator. In this tutorial, we are going to show you how to use the tool to quickly parse through your text files.

Why Learn Pyleri?

We chose Pyleri because of its ease of use and its overall effectiveness. It makes creating parsers easy. It can also quickly support features like auto-completion. In addition, the same grammar can also generate parsers for multiple languages: JavaScript, C, Python, Go and Java. It is also well-tested given that it was designed to be used with SiriDB, a highly-scalable and fast time-series database.

A Developer’s Perspective: Responding to the Call

See the original posting on DZone Python

If you feel like existing processes can keep major issues from reaching the user base, you’ll want to read this article — which provides an expose on how a reported issue was not addressed for several months only after the application was deployed.

My friend Greg has been a professor for most of his career. One thing he has conveyed to me is, "to think of an IT organization as a fire department," where you drive by and notice firefighters tending to periodic tasks or simply enjoying a peaceful day. In every case, they are ready to respond to an unexpected emergency. The theory is that everyone is glad that they are there but happier when they are not fighting constant emergencies.

Three Ways to Deploy a WinForms or WPF .NET Core Application

See the original posting on DZone Python

This post will help you deploy and bring your finished app to your users. .NET Core 3 gives us three ways to deploy an app, and each has its benefits.

I know that the real fun is while an app is being developed, and we as developers are focused mainly on this part of creating an application. However, the real purpose of every app is to get to its end-users. 

Comparing Native Blazor Components to Wrapped JavaScript Components

See the original posting on DZone Python

Should we rewrite native UI components or reuse existing JavaScript UI components? We compare native Blazor components to wrapped JavaScript components by understanding how Blazor works, including what native vs. interop means and more.

Blazor is a new Single Page Application (SPA) framework that utilizes WebAssembly to run .NET application code in the browser. This future-forward framework allows developers to leverage their existing .NET code and skills to create web applications that can run completely client-side without the need for browser plugins. As with any new web framework, we’re presented with a challenging decision of bringing along assets from previous works into the new system.

Deploy a Clojure Web Application to AWS Using Terraform

See the original posting on DZone Python

This is the third blog post in a three-part series about building, testing, and deploying a Clojure web application. You can find information on setting up previously mentioned applications like CircleCI in the first post here and the second here.

In this post, we will be focusing on how to use HashiCorp Terraform to stand up a fairly complex infrastructure to host our web application Docker containers with a PostgreSQL container and then use CircleCI to deploy to our infrastructure with zero downtime. If you don’t want to go through the laborious task of creating the web application described in the first two posts from scratch, you can get the source by forking this repository and checking out the "part-2" branch.

How to Use a Vue Stock Chart UI Component in Your Web App

See the original posting on DZone Python

In the previous article, we learned how to create an area chart with Kendo UI for Vue. In this article, we will create a candlestick chart.

A candlestick chart shows the open, high, low, and close values for a stock. It has a solid portion that is the body and two wicks extending above and below the body. The body shows the range between the open and close price. The top of the upper wick represents the highest trading price. The bottom of the lower wick is the lowest trading price. Candlestick charts are used to analyze patterns in price movements such as if the price is moving in an upward trend or a downward trend. Up next, we will create our chart using stock data we fetch from an API.

How to Avoid a Distorted Android Camera Preview With ZXing.Net.Mobile

See the original posting on DZone Python

If you need to implement QR-scanning into your Xamarin (Forms) app, chances are high you will be using the ZXing.Net.Mobile library (as it is the most complete solution out there). In one of my recent projects, I wanted to do exactly that. I have used the library already before and thought it might be an easy plan.

Distorted Reality…

Reality hit me hard when I realized that the preview is totally distorted:

The Good and the Bad of Ionic Mobile Development

See the original posting on DZone Python

So, you’re going to build a mobile app. Your thoughts might then turn to develop an app for the two main platforms – Android (using Java or Kotlin) and iOS (using Swift or Objective C) – natively. Native development offers high performance, easy access to hardware controls, API integration, and full functionality. But native app expenses are doubled (or even tripled), depending on how many platforms you want to cover. That means two separate apps, two codebases, two development teams, and expenses for all of it – more than a little daunting. 

Instead, you can create a cross-platform app with the help of tools like Xamarin and React Native. These are close to native in performance and allow for code-sharing between the platforms, thus reducing the overall expenses on development. Still, you will need to hire native developers to do specific tasks in each of the codebases.

Best PHP Frameworks (2019)

See the original posting on DZone Python

In this article, we will be discussing the Best PHP Frameworks along with their pros and cons in great depth so that one might get a clear understanding of which one to chose. Our comprehensive research would include some Latest PHP Frameworks.

Table of Contents

‘Headless’ Is Where the Modern CMS Is Headed

See the original posting on DZone Python

Headless content management systems (CMSs) are what everyone seems to be talking about these days. Let’s explore how the trend started and whether “the headless way” could become the next best practice.

What Is a Headless CMS?

A headless content management system is a back-end onlyCMS built from the ground-up with the cloud-first and API-first approach in mind. It decouples content from its front-end presentation and breaks it into components that can be further called upon by various services over a RESTful communication.

13 Reasons That Suggests React Is Taking the Web Development World by Storm

See the original posting on DZone Python

Though the far-reaching implications of Pete Hunt’s announcement of Facebook’s release of React to the Open Source domain may not have been immediately understood, it was a decision that would usher in a revolution in the world of web development. However, the subsequent popularity of React and its wide adoption by both established frontend developers as well as those grinding it out in the bootcamps clearly underlines its importance in the world of web development.

13 Reasons why React Is Taking the Web Development World by Storm:

1. Using components over templates.
React implemented the idea of breaking up large user component codes into smaller individual components. React developers can wrap up small parts of the larger HTML codebase into individual components and then invoke the HTML-like component.

Idea: A Generic P2P Network Client

See the original posting on DZone Python

Every now and then one has a half-baked idea about some project that they aren’t likely to be able to do because of a lack of time. I’ve written about such random app ideas before, but they were mostly about small apps.

Here I’d like to share an idea for something a bit bigger (and therefore harder to spare time for) — a generic P2P network client. P2P networks are popular in various domains, most notably file sharing and cryptocurrencies. However, in theory, they can be applied to many more problems, like social networks, search engines, ride sharing, distributed AI, etc. All of these examples have been implemented in P2P context, and they even work okay, but they lack popularity.

Using View Models in Blazor

See the original posting on DZone Python

Being new to Blazor (and Razor), the first thing that tripped me up was that the view seemed divorced from the rest of the application. In fact, this is actually quite a nice design, as it forces the use of DI.

For example, say you wanted to create a View Model for your view, you could register that ViewModel in the Startup:

1 2 3 162