MUnit Testing With Mule 4

MUnit is a Mule Application Testing Framework that allows you to easily build automated tests for your Integration and APIs. It provides a full suite of integration and unit test capabilities, and it is fully integrated with Maven.

MUnit is fully integrated with Anypoint Studio and allows you to create, design, and test your MUnit tests just like you would Mule Applications.

How Data Sharding Works in a Distributed SQL Database

Enterprises of all sizes are embracing the rapid modernization of user-facing applications as part of their broader digital transformation strategy. The relational database (RDBMS) infrastructure that such applications rely on suddenly needs to support much larger data sizes and transaction volumes. However, a monolithic RDBMS tends to quickly get overloaded in such scenarios. One of the most common architectures to get more performance and scalability in an RDBMS is to “shard” the data. In this blog, we will learn what sharding is and how it can be used to scale a database. We will also review the pros and cons of common sharding architectures, plus explore how sharding is implemented in distributed SQL-based RDBMS like YugaByte DB.

What Is Data Sharding?

Sharding is the process of breaking up large tables into smaller chunks called shards that are spread across multiple servers. A shard is essentially a horizontal data partition that contains a subset of the total data set, and hence is responsible for serving a portion of the overall workload. The idea is to distribute data that can’t fit on a single node onto a cluster of database nodes. Sharding is also referred to as horizontal partitioning. The distinction between horizontal and vertical comes from the traditional tabular view of a database. A database can be split vertically — storing different table columns in a separate database, or horizontally — storing rows of the same table in multiple database nodes.

Position Sticky and Table Headers

You can't position: sticky; a <thead>. Nor a <tr>. But you can sticky a <th>, which means you can make sticky headers inside a regular ol' <table>. This is tricky stuff, because if you didn't know this weird quirk, it would be hard to blame you. It makes way more sense to sticky a parent element like the table header rather than each individiaul element in a row.

The issue boils down to the fact that stickiness requires position: relative to work and that doesn't apply to <thead> and <tr> in the CSS 2.1 spec.

There are two very extreme reactions to this, should you need to implement sticky table headers and not be aware of the <th> workaround.

  • Don't use table markup at all. Instead, use different elements (<div>s and whatnot) and other CSS layout methods to replicate the style of a table, but not locked out of using position: relative and creating position: sticky parent elements.
  • Use table elements, but totally remove all their styling defaults with new display values.

The first is dangerous because you aren't using semantic and accessible elements for the content to be read and navigated. The second is almost the same. You can go that route, but need to be really careful to re-apply semantic roles.

Anyway, none of that matters if you just stick (get it?!) to using a sticky value on those <th> elements.

See the Pen
Sticky Table Headers with CSS
by Chris Coyier (@chriscoyier)
on CodePen.

It's probably a bit weird to have table headers as a row in the middle of a table, but it's just illustrating the idea. I was imagining colored header bars separating players on different sports teams or something.

Anytime I think about data tables, I also think about how tricky it can be to make them responsive. Fortunately, there are a variety of ways, all depending on the best way to group and explore the data in them.

The post Position Sticky and Table Headers appeared first on CSS-Tricks.

Dialogflow vs. Lex vs. Watson vs. Wit vs. Azure Bot

Chatbots are a revolution in customer communication. Nowadays, companies are relying heavily on chatbots to automate and reduce the workload of humans.

At Kommunicate, we evaluated many chatbot building platforms for various use cases such as customer support and service. Below is the list of chatbot platforms that got our attention.

In Case You Missed It – Issue 28

In Case You Missed It Featured Image
photo credit: Night Moves(license)

There’s a lot of great WordPress content published in the community but not all of it is featured on the Tavern. This post is an assortment of items related to WordPress that caught my eye but didn’t make it into a full post.

Changes to WordPress PHP Coding Standards

Based on changes that were proposed back in March, the PHP Coding Standards for WordPress have been altered. Note that these changes apply to WordPress core only and Gary Pendergast recommends that developers can and should choose practices that best suit your needs for plugins and themes.

Excluding Remote Employee Job Applicants Based on the State They Live In

Like Brad, the topic of not hiring job applicants for a remote company based on the state they live in because of tax laws is not something I’ve seen discussed.

In certain situations, companies that go the extra mile to hire a remote worker can also turn that person into an advocate.

If you’re involved in the hiring process for a remote company, I’d love to hear your thoughts on this topic in the comments.

Would You Like to See A Product Hunt for WordPress Products?

Once you create something awesome in the WordPress ecosystem, it’s tough to get the word out. Ben from LyrWP wants to know if anyone is interested in a Product Hunt website for Themes, Plugins, and Services.

I think it’s a great idea and something I’d like to see become a reality. There are probably a ton of great products in the WordPress space that go unseen because there’s no easy way to reach a large mass of people outside of sites like the Tavern.

However, Mario Peshev is concerned that such a site may end up posting infrequently or promote mediocre products.

If Peshev’s concern became a reality, there wouldn’t be much of a point to continue with the site and developers would be back to square one.

Speaking of learning about new products, who remembers the Plugin Release posts on WeblogToolsCollection.com?

Early Look at What A Block Directory in WP-Admin Could Look Like

Mel Choyce has shared a collection of concept images that depict what a Block Directory could look like inside of WP-Admin. She describes the inspiration for each image and how each screen would work.

What I find interesting is that users will be able to try out new blocks before installing them. “Inside the modal, you’d also be able to demo a block before installing. @ck3lee has figured out how to make this possible,” Choyce said.

It’s also great to see that the tech behind Shiny Updates will be used for quickly installing and activating new blocks. If you have feedback regarding the conceptual designs, please leave a comment on her post.

Notes From Lead Developer Conference

More than 20 Automatticians are attending the Lead Developer Conference in London, England, and are publishing notes from each day. You can check out Day 1 here.

WPCampus 2019 Will Be LiveStreamed

Thanks to Pantheon, all sessions excluding workshops at WPCampus will be livestreamed with captioning and available to watch for free. Simply visit the livestream page on Friday, July 26 and Saturday, July 27.

Apply for a DonateWC WordCamp Sponsorship

DonateWC is looking for applicants for its sponsorship program. DonateWC provides underrepresented and minority groups within the WordPress community with the means to attend a WordCamp.

That’s it for issue twenty-eight. If you recently discovered a cool resource or post related to WordPress, please share it with us in the comments.

Filtering Data Using DataWeave in Mule 4 Batch

DataWeave is a MuleSoft expression language for accessing, querying, and transforming data that flows through the Mule application. It is tightly integrated with the Mule runtime engine, which reads the script and expression in our application. It is a powerful template engine that transforms data to and from any kind of format like CSV, JSON, XML, MAP, POJO's, etc.

Dataweave now() function is used to return the current date and time when used inside our application. 

How to QA Test Software That Uses AI and Machine Learning

Smartphones, smart speakers, smart cars, smart coffee makers...the list goes on. It seems like everything around us is coming to life and becoming intelligent. And though the sci-fi genre thrives on our ever-present fear of a hostile robot takeover, smart devices are anything but dystopian — they’re actually here to make our lives easier so we can spend more time on the important stuff instead of tedious busywork.

Tech companies know that increased automation is the way of the future, just like it was when Ford pioneered the assembly line. Advanced technology like artificial intelligence (AI) and machine learning (ML) is fueling the most exciting innovations in recent history — think self-driving cars, virtual and augmented reality, automated investing, improved medical imaging, and more. The benefits of this technology are becoming more and more obvious, and companies are rushing toward adoption and racing to build it into their products.

Best PHP Frameworks (2019)

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


The Good and the Bad of Ionic Mobile Development

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.

DataTables Template That Simplifies the Work

This article is dedicated to how nopCommerce, the most popular e-commerce platform on .Net Core, has switched to using the DataTables library on jQuery. With the help of a wrapper template for DataTablese, we tried to simplify for ourselves and third-party developers such a painstaking and tedious task as declaring the tables used in a project.

Why We Decided to Move Away From Kendo UI to DataTables

In nopCommerce up to the last 4.20 version we used quite popular UI framework by Telerik - Kendo UI. This client framework, based on jQuery, allows users to render visual controls such as tables, input fields, drop-down lists, etc.

Selenium on Cloud With Sauce Labs

Selenium Grid

Before we start on how to execute a Selenium script on the cloud, we have to understand what is the existing way of test-execution using Selenium. Selenium comes with a powerful feature called Grid.

Selenium Grid is a very important component of Selenium suit. According to the Selenium docs, Grid allows us to execute multiple tests across different browsers, OS and machines in parallel. It is used to reduce the test execution time by configuring multiple machines/mobile devices which can run on different platforms and across various browsers to run tests in parallel. 

How to Use New Relic for Performance Engineering and Load Testing

Performance engineering and load testing are critical parts of any modern software organization's toolset. In fact, it's increasingly common to see companies field dedicated load-testing teams and environments. Many companies that don't have such processes in place are quickly evolving in that direction.

Driven by key performance indicators (KPIs), performance engineering and load testing for software applications have three main goals:

Experimental Block Areas Plugin Allows for Editing Content Sitewide with Gutenberg

WordPress core committer Felix Arntz is working on an experimental Block Areas plugin that would enable users to create and edit content sitewide using the Gutenberg editor. Inspired by a conversation with Morten Rand-Hendriksen at WordCamp Europe, Arntz created the plugin to “explore what the theming of tomorrow could look like already today.”

Block Areas allows users to define specific areas where they want to use the block editor (outside of regular posts). The block areas function similar to widget areas, but are created using a custom post type with a familiar admin UI.

“They are implemented as a post type – with the key aspect that they can’t be accessed in the frontend via a certain URL, but your theme has to render them via a block_areas()->render( $slug ) method that the plugin exposes,” Arntz said. “The slug you pass to the method should match the block area slug (i.e. post slug) of one of the areas you have created in the admin.”

The plugin comes with block areas for site header and footer to provide a starting point. However, adding the block areas to a theme is one technical hurdle that currently limits this experimental plugin to developers.

The concept is reminiscent of the now seemingly abandoned Buckets plugin that aimed to provide an alternative to WordPress widgets. It allows admins to create reusable pieces of content and place them anywhere on their sites. Reusable buckets can be created with the same UI as the legacy post editor and then placed anywhere using a shortcode or via a button in the TinyMCE editor.

In the case of Buckets, the idea was to preserve the users’ ability to create content using the visual editor and media manager. Block Areas seems to have a similar aim – to preserve users’ ability to use the block editor anywhere they want throughout the site. That is part of the general goal of Gutenberg Phase 2, which includes migrating widgets and menus to use the block editor.

Block Areas is just one idea for providing a unified approach to reusable content inside WordPress. It is not an official project and may not be the approach that the Gutenberg team settles on for core. However, it offers a good opportunity for discussion and collaboration about the possibilities of taking the editor sitewide. This will open up a whole new genre of blocks for plugin developers.

“Think about a block that renders the site title, the custom header, a menu, the copyright information – taking Gutenberg to the site level opens up a whole new set of typical blocks that would be required,” Arntz said. “Start thinking about which blocks you would need outside of your post content bubble today.”

The Block Areas plugin is available on GitHub if you want to experiment with it. Check out Arntz’s introduction post for more implementation details.

Why APIs Are Still a Top Cause Of Downtime: 3 Ways to Protect Your Site

We live in a world where all of our gadgets are increasingly becoming interconnected in all sorts of convenient ways. While this is generally a great thing, it's important to think about the risks that all of these interconnections can create. When it comes to managing a site, if you call an external API and that API provider is having a bad day, that can easily degrade the quality of your service. End users could experience critically slowed performance. At worst, your site could be totally unavailable to customers.

Conference Report: Java Day Istanbul 2019

Istanbul is the most beautiful city in the world to me. Aside from its history and unique Bosphorus, Istanbul is also a very valuable place for developers in Turkey because there are many events around software and developers. One of these very valuable events I attended this year was Java Day Istanbul. In this post, I'm going to talk to you a bit about this event and my thoughts.

Talks

I stayed on track 2 (Marmara 2), except for the last talk.