The WordPress.org Pattern Creator Now Open to the Public

Screenshot of the WordPress pattern directory. Displays a hero area with title, search, and demo images. Patterns are in a 3x3 grid below.

The WordPress pattern directory finally opened its gates to the entire community today. Anyone with a WordPress.org account can log in, go to the pattern creator, and start designing.

For some of us, this has felt like an unbearably long wait. In reality, it took the development team less than a year since the directory launch to put this together. It was no small feat to make it work and put in all the guardrails for such a system in that amount of time.

Some community members have already got a head start. Ana Segota of Anariel Design announced via Twitter that three of her patterns had already landed. “More coming soon,” she said.

Showcase of a specific author's block patterns from the block-pattern directory.  Displays three patterns in a grid.
Patterns by Anariel Design.

The pattern directory has the potential to be an onramp for creators who want to contribute to the WordPress project but do not know where to start. The barrier to entry is one of the lowest in the community. There is no requirement to write code or understand all the intricacies of theme design. It is nowhere near as complex as plugin development. It is simply a visual builder that allows sharing art with the world.

I have no idea where this thing is going. I hope to see 1,000s of patterns in the directory a year from now.

I played a small role in building two of the initial patterns from last year. I was excited about the potential for the directory and happy to contribute in any way. However, I was not entirely satisfied with the process because I did not have the creative freedom I wanted.

For example, my vision for an “about me” columns pattern had morphed into something entirely different:

Final about me cards pattern.

By the time it was added to the directory, there was hardly any of myself in it. The first designs that launched were tightly curated, and that was OK. It was more about getting production-ready patterns out to users at the time, and I knew that WordPress.org would eventually open it up.

Today, I started work anew, rebuilding my original “about me” pattern. I have made some alterations because we now have new spacing controls. And the built-in, Openverse-powered search did not seem to locate some of my early images, despite being available via the Openverse site. Nevertheless, it is a work in progress:

Inside of the WordPress pattern creator. The content canvas shows three columns with about, contact, and follow sections.
Building with the new pattern creator.

Users can save draft patterns, too. So, if you want to try your hand at designing one but are unsure if you can finish it in one sitting or do not have a fully-fleshed-out idea, there is no need to worry about losing work. You can save it and pull it up later from your patterns page.

The pattern creator runs Twenty Twenty-One under the hood. The classic theme has a few quirks, CSS that often overrules the core WordPress styles. I would rather have seen Twenty Twenty-Two because it sticks much more closely to the global styles standard. At least people who want to try designing off-site will be able to test with a similar setup.

Patterns should, ideally, be theme-agnostic. However, in practice, the theme that showcases those patterns — Twenty Twenty-One in this case — can make or break a design. Creators should not design specifically for it, but they should at least check its output.

Using the pattern creator is straightforward. It is merely an instance of the block editor with some modifications specific to the directory. It also provides a quick welcome screen:

Welcome popup over the pattern editor on WordPress.org.  It teaches what the creator is.
Welcome screen to the pattern creator.

Overall, my experience with it went reasonably well for a Day 1 launch. Most of the hiccups that I encountered were with the image search. It timed out on occasion, and filtering images was not a perfect experience. Despite being powered by Openverse, it does not offer the same filtering tools.

I hope that the pattern creator will eventually tie into the WordPress photo directory. The built-in search is a neat tool, but you sometimes have to wade through dozens or hundreds of outdated images to find something worth using. The photo directory feels fresh and modern. Plus, we should be prioritizing the work of those contributing to WordPress.

There are still many open tickets for the pattern directory, and it will undoubtedly evolve based on feedback and usage. However, this is a solid launch of the pattern creator. Well done to all the folks who made this happen.

How To Enable CI/CD To Boost the Potential of DevOps

This is an article from DZone's 2022 DevOps Trend Report.

For more:


Read the Report

DevOps is a hot topic that is quickly becoming the way of software development. It aims to promote development speed and reduce costs while increasing productivity and efficiency in your organization. DevOps is powered by automating your entire development, delivery, and operations processes. With continuous integration (CI) and continuous delivery (CD), you can do more with less, so it is beneficial to start implementing these concepts into your company as early as possible.

5 Threat Intelligence Trends

We’re living in a world where technology advances at a breathtaking pace, and cybercriminals are always looking for the latest ways to target organizations and individuals alike. In such a turbulent digital transformation, security experts need to keep up with the latest trends and address the latest potential threats in innovative ways.

The world of cyber security is an incredibly fast-moving sector, with both security providers and hackers trying to constantly outsmart each other. Simply put, it’s a constant cycle of coming up with new attack strategies and threats while trying to find new and innovative ways to combat them or eradicate them before they gain more ground.

Decoding the Merits of MEAN Tech Stack for Your Organization

This decade has witnessed numerous shifts in the technological domain resulting in quick and sustainable advancement. One of such advancements in the arena of technology is the MEAN tech stack which resonates with a pioneering version of web development. 

Being an abbreviation of MongoDB, Express.js, AngularJS, and Node.js, MEAN stack stands to synergize these components and make them easy to use for developers. Many of the brands or companies that we know today have used MEAN stack for seamless development, quick speed, user convenience, and performance enhancement. A few of such names are Gmail, Netflix, Forbes, YouTube, LinkedIn, PayPal, and The Weather Channel. 

DevSecOps: Best Practices for CI/CD Pipeline Security

CI/CD pipeline refers to a series of sequential practices comprising Continuous Integration (CI) and Continuous Deployment and/or Continuous Deployment (CD). Commonly utilized by DevOps teams, the CI/CD pipeline is one of the most efficient methods to build, test and deploy code, largely via automation tools.

Leveraging CI/CD pipeline has been reliably provided to facilitate the construction and deployment of more updates (and better ones) to software. This is largely because successful CI/CD pipelines require consistent collaboration and honest implementation of Agile and DevOps principles.

Kubernetes Hardening Tutorial Part 3: Logging and Auditing

In the first two parts of this tutorial, we discussed:

As the third and final part of this tutorial we are going over the authentication, authorization, logging, and auditing of a Kubernetes cluster. Specifically, we will demonstrate some of the best practices in AWS EKS. After reading this tutorial, you will be able to:

Configure, Secure, and Access Mule Application Properties

In this article, you will see a different way in which we can configure and secure Mule application properties.

Creating and Accessing Mule Properties

Let's start with directly configuring the properties in the connector. Here we are simply hardcoding the value in the configuration section. Let's see this in a Database connector configuration as an example.

How to Start Visual Studio Code Extension Development

Most developers have used Visual Studio Code at some point in their careers. It has been voted the most popular IDE of 2021 by respondents of the StackOverflow developer survey, and its appeal is clear as ever. While the base program provides a framework for an IDE, all of the language support and special features are delivered as extensions, which makes it easy to extend and customize your installation. So inevitably, there comes a point where you want to write your own extension. This guide will walk you through the basics of getting started with Visual Studio (VS) Code extension development.

What Is a VS Code Extension?

Before we jump into coding, we should clear up what a VS Code extension is on a technical level. Extensions are basically programs, written in JavaScript or TypeScript, which hook into various parts of VS Code. They provide functions for VS Code to call when certain events happen, and can programmatically interact with (some parts of) VS Code in those functions.

Extensions are distributed as ZIP files with a specific file and folder structure inside. The files contained in this structure are usually very verbose and not friendly for humans to read or write so there’s an official build tool to generate such ZIP files from source code: vsce. Its usage will be explained later on in this post.

5 Things You Probably Didn’t Know About Java Concurrency

Thread is the heart of the Java programming language. When we run a Hello World Java program, we run on the main thread. And then, we can definitely create threads easily as we need to compose our application code to be functional, responsive, and performant at the same time. Think about a web server; it simultaneously handles hundreds of requests at the same time. In Java, we achieve this using multiple threads. While threads are helpful, it is dreadful to many of the developers. That's why in this article, I will share five interesting threading concepts that the beginner and intermediate developers might not know.  

1. The Program Order and The Execution Order Are Not the Same

When we write a code, we assume the code will be executed exactly the way we write it. However, in reality, this is not the case. The Java compiler may change the execution order to optimize it if it can determine that the output won't change in single-threaded code.

Top 6 Steps to Become a Successful Freelance Front-End Developer

Businesses nowadays have started using internet marketing, which will definitely be in long-term demand, and this generates the need for developers who have skills in back-end, front-end, and full-stack development. Also, if we look from the customer point of view, then the customers will not stick to your page if it has a slow loading speed, the interface is not user-friendly, the product and service offerings are noticeably unclear, and other issues. This is one of the reasons why companies are beginning to hire front-end developers — to ensure that they are consistent in the quality they offer. But in some cases, companies do not have regular work, and they divide their tasks into smaller batches for which they do not need a full-time dedicated resource. And so, they look for a front-end development services provider or freelance developers as per their requirement.

This shows that it is an apt opportunity to build a career as a freelance front-end developer, as this will give you a chance to work on different exciting projects. So, let us understand further how you can develop your career in this field and what your role is.

Making PMOs More Agile Through Citizen Development

Introduction

Citizen development is one the most recent and most exciting developments in project management. It challenges the established approaches to information systems development through its own professional developers or external vendors. Like with any other professional or bespoke service, application and software development can be very expensive and somewhat lengthy. Project Management Office (PMO) that seeks to be agile, effective, and efficient frown upon expensive and lengthy modifiers. To make matters worse, research has found that a large number of organizations and companies have a huge backlog of IT solution requests. With digitization being one of the key drivers of change in PMO functions these days, this is simply untenable. The PMO cannot do its business without being increasingly reliant on technology. Hence, it needs to address the above challenge effectively.

Given the changing and evolving nature of the PMO, it is starting to play a key role in making organizations and companies more agile, i.e., capable of mastering change under continuous, volatile, and unpredictable circumstances to achieve the strategic goals. This is broadly the concept of citizen development. It is an innovative business process that creates space and opportunities for non-IT staff with basic technology skills to use low-code/no-code (LCNC) platforms to develop new business applications. The goal is to make the process both faster and cheaper.

WooCommerce Store API Now Stable, Provides Better Support for Custom Frontends

WooCommerce announced today that its new Store API is now stable after two years in development. It powers the plugin’s new block-based cart and checkout experience as well as all products blocks.

The Store API is a public, unauthenticated API, that provides REST API endpoints for cart, checkout, and product functionality. WooCommerce core developer Mike Jolley explained how the new API is different from the plugin’s REST API:

The main difference between the Store API and WC REST API is that the Store API allows unauthenticated access to store data, for example, products. This makes it suitable for a variety of use-cases, including custom frontends.

This is an unauthenticated API. It does not require API keys or authentication tokens for access.

Another difference is that the Store API has support for Cart data. This allows for cart operations such as adding items to the cart, updating quantities, applying coupons, and submitting orders. Only the current customer’s cart can be accessed.

Data returned from the Store API is always reflective of the current user (cookie-based), whereas the WC REST API allows more extensive access to any data, should you have the correct access rights.

In an interview with HollerWP last year, Jolley said it’s helpful to think of the Store API as for clients and the core REST API as the API for store management.

“Keeping them separate like this makes it clear that one exposes data in a public context,” he said.

Scott Bolinger, co-founder of AppPresser, explained how the Store API fixes a problem with the original WooCommerce REST API.

“It [the WC REST API] was never meant for mobile, headless, or any other front end implementation,” Bolinger said. “It was only meant for back end admin stuff like inventory, adding/removing products, etc.

“The problem is that there was no alternative, so headless/mobile apps used it for displaying products. With the WC REST API, everything requires authentication, which doesn’t make sense, because products are public on your website. You shouldn’t have to authenticate to see someone’s products.”

The new Store API allows developers to get products, attributes, collections, and other data without authentication, and adds a cart API, making it possible to checkout.

“I think most implementations of the WC Rest API that are for the front end should switch to the Store API,” Bolinger said.

The WooCommerce team is still working on making this API suitable for headless and mobile apps. In an ideal world, the best cart API for headless WooCommerce apps would be made by WooCommerce. In the meantime, Bolinger recommended CoCart.

CoCart is a customizable, WordPress REST API for WooCommerce that allows developers to build headless (or decoupled) e-commerce stores using their choice of frameworks.

“I’m not using the Store API and I don’t see that I will,” Co-Cart founder Sébastien Dumont said. “Both API’s are unique for their individual purposes. WooCommerce’s Store API is designed for the Gutenberg blocks, which only requires a fixed format and is still prone to be used on native storefronts.

“I don’t see today’s news affecting CoCart. Most of my users have already known about the Store API while it was still experiential and failed after trying it for headless purposes. It also requires tweaking while CoCart does not”.

Dumont said the Store API is still missing a lot of valuable information that developers require and that using CoCart saves them considerable development time.

“With the WC Rest API, there is no cart or checkout, so it’s cool they added that,” Bolinger said. “Nonces only work when you are on the site though, so for mobile apps or headless WP, you will run into issues. Unfortunately it’s not where it needs to be for headless (yet).

“There is a filter to disable nonce authentication: add_filter( 'woocommerce_store_api_disable_nonce_check', '__return_true' ); Even changing this to use something like JWT won’t fully work for headless, at least in my testing. I hope they will address this in the future.”

This particular issue is still open on the WooCommerce GitHub repository. Maintainers seem open to exploring how core can accommodate this. In the meantime, third-party solutions are available to developers building mobile apps.

For a technical breakdown of what’s currently possible with the new Store API, check out Mike Jolley’s announcement post. He demonstrated how you can go through the entire purchase flow using the Insomnia API client- without even visiting the store. The API’s technical documentation and guide to extensibility is available on GitHub.

QAOps: A Software Testing Trend

Talking about development these days, streamlining the entire software development lifecycle turns out to be an extreme hustle. Especially, when you need to ensure the product developed should meet all the defined guidelines, right from the framed requirements to ensuring early and successful deliveries, quality often takes a backseat on the way to creating sustainable technology.

As per a recent article by Forbes, poor-quality software costs organizations $2.8 trillion in the U.S. alone, according to the Consortium for IT Software Quality (CISQ). This means a product made with sacrifices on the quality aspect often turns out to be a shortsighted delivery strategy that ends up business and developers with the havoc of long-term troubles. Luckily, software testing has always emerged as a sustainable practice that has helped brands across the globe to yield technologies for life.

How to pause script before completion message

Id like to force my code to pause after completion and before displaying a completion message. Ive tried sleep and wait commands but they affect the start of running the code. Ive searched the web for how to do this for two days with no success. The reason for wanting the delay before showing the completion message is that the code processes so quickly that the completion message appears as soon as the page shows on the computer. Id appreciate some help on this. Heres my code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
  <title>Foxclone backup, restore, and cloning utility</title>  
  <meta name="description" content= "FoxClone is a Linux based image backup, restore and clone tool using a simple point and click interface." />

    <link rel="stylesheet" type="text/css" media="screen" href="css/update.css"> 

    <!-- Favicon  -->
    <link rel="apple-touch-icon" sizes="180x180" href="images/favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="images/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="images/favicon/favicon-16x16.png">

    <link rel="mask-icon" href="images/favicon/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#da532c">
    <meta name="theme-color" content="#ffffff">

</head>
<body>

 <div class="container"> 
     <div class="row" style="text-align:center;" >
       <h1>Foxclone Filelist Updating</h1>
     </div>
     <div class="header">
 </div>   
<?php


    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

    $php_scripts = '../php/';
    require $php_scripts . 'PDO_Connection_Select.php';

    if (!$pdo = PDOConnect("foxclone_data"))     {  
        echo( 'Connection Failed');
    }

        $meg = 1048576 ;  // needed to convert filesize bytes to Mb
        $stmt = $pdo->prepare("UPDATE `files` SET `filename` = ?, `md5` = ?, `filesize` = ?,`logtime` = now() WHERE `id` = ?") ;
        $path = 'download/';  
        $id = NULL;
        $filename = '';

        foreach(glob($path.'*.*') as $file) {
          $id = NULL; 
          $filename = basename($file) ;
          $file = new SplFileInfo($file);
          $extension  = $file->getExtension(); 
          $test = substr($filename, 0,12);
            if ($test == 'foxclone_std') {
                $id = 1;
            }

          if (substr($filename, 0,9) == "foxcloneV"){
                $id = 2;
             }

          if ($extension == "deb") {
                 $id = 3;
            }

          if ($extension == "gz") {
                   $id = 4 ;
            }

          if (substr($filename, 0,4) == "news") {
                   $id = 5 ; 
            }

          if (substr($filename, 0,13) == "foxclone_edge") {
                   $id =6;
            }
            $bytes = number_format(filesize($file) / 1048576, 2) ;
            $getdata = (array($filename, md5_file($file),$bytes , $id)) ;

            $count = $stmt->execute ($getdata) ; 
               IF ($count == 0) {
                echo("Failed to update ".$file);
                die;
        }

    }


   ?>
<-- Here's where I want to pause before displaying the successful completion message -->
<div class="row" style="text-align:center;" </div>   
    <h1>Database Update Successful</h1>

7 Approaches To Testing

Originally published on August 17, 2020

This article will be interesting for IT directors, product managers, project managers, and anyone who wants to understand the processes of project quality assurance better.