Implementing API Auto-Discovery for MuleSoft Application Deployed to CloudHub and On-Premise

Introduction

API Auto-Discovery is a mechanism that manages an API from API Manager by pairing the deployed application to an API created on the platform. API Management includes tracking, enforcing policies if you apply any, and reporting API analytics. Critical to the auto-discovery process is identifying the API by providing the API name and version.

Prerequisites

To configure auto-discovery for your Mule application, you need to meet the following requirements:

Beyond Kube-Scheduler, a Need for a K8s Cluster Balancer

Before writing about Kube-scheduler and a premise about a cluster balancer, I think it is mandatory to say a few lines about Kubernetes. Kubernetes' popularity reaches new height every day, and it's becoming a de-facto solution for many usual and unusual distributed-systems problems.

Kubernetes (k8s) is an open-source, distributed-system for automated deployments, scaling the deployments as per traffic and other business availability needs and managing the containerized applications.

Automated Deployment of a Microservice to Kubernetes on IBM Cloud

In this blog post, I want to explain how to automate the deployment of a microservice using a delivery pipeline on IBM Cloud.

Maybe you already know Niklas, Harald, and I made the project called Cloud Native Starter. That project includes a Hands-on workshop that is called “Build a Java Microservice and deploy the Microservice to Kubernetes on IBM Cloud.” In Lab 4, you have to deploy the Authors Microservice to Kubernetes on IBM Cloud. Sometimes we have limited time in workshops. The limited-time is the reason why we want to reduce the manual effort for students in a workshop to a minimum, therefore, we took the IBM Cloud Continuous Delivery, and I created a repeatable way with minimal human interaction. The delivery pipeline contains sequences of stages, which retrieve inputs and run jobs such as builds, and deployments.

Comparing Container Pipelines

Introduction

Containers brought a monumental shift to DevOps by allowing teams to ship code faster than ever before. However, we still have to go through the process of building, packaging, and deploying those containers. That's why we use container pipelines.

However, there are many different choices when it comes to container pipelines. How do we know which one to use? In this article, we'll compare six choices and cover the configuration, benefits, limitations, and pricing of each.

Apache Flink With Kafka – Consumer and Producer

Overview

Apache Flink provides various connectors to integrate with other systems. In this article, I will share an example of consuming records from Kafka through FlinkKafkaConsumer and producing records to Kafka using FlinkKafkaProducer.

Setup

I installed Kafka locally and created two Topics, TOPIC-IN and TOPIC-OUT

JDK 11 HTTP Client API – Handling Request/Response Body Types

This article is a supersonic guide to dealing with request and response body types in an HTTP Client API. Let's start with the request body types.

Handling Request Body Types

Setting a request body can be accomplished using  HttpRequest.Builder.POST()  and PUT()  or by using  method()(for example, method("PATCH", HttpRequest.BodyPublisher)). The POST()  and  PUT()  take an argument of the  HttpRequest.BodyPublisher  type. 

Node-RED: Flow-Based Modelling

Node-RED is a powerful, extensible, graphical programming environment. It’s a flow-based modeling tool, which makes it easy to create event-driven applications.

It's built on top of Node and provides a browser-based editor for wiring flows together. Node-RED development environment is actually a web page running on your pi or it can run in cloud environments making it a very versatile tool.

API Management vs API Gateway: Where Does API Analytics and Monitoring Fit?

For the last few years, there has been an explosion of API-powered businesses. There are revenue-generating APIs, developer platforms, partner marketplaces, and even internal APIs powering single-page apps.

With this explosion, there has also been a large increase in API tooling to help these companies go to market with their API platforms as quickly as possible and out-innovate any competition. Much of this increase in tooling mirrors what we saw in the mobile era. However, with this explosion, there is now an increase in the number of tools and solutions to build and grow APIs and platforms.

Code Ready Containers: Installing Process Automation

For some time now we've been working on updating your experience using Code Ready Containers, a container platform installation for your local machine, by providing interesting developer tooling and project examples.

There is no better way to learn about container technologies, container platforms, and container-based application development than getting hands-on with great open technologies.

Add Reactstrap Components In ReactJS

Introduction 

Reactstrap is a component library for React. It provides inbuilt Bootstrap components that make it easy to create UI with self-contained components that provide flexibility and inbuilt validations. Reactstrap is easy to use and supports Bootstrap 4.

Prerequisites

  • We should have a basic knowledge of HTML and JavaScript.
  • Visual Studio Code should be installed.
  • Node and NPM installed.

First of all, let's check that Node is installed in your system. If not, check out this link: https://nodejs.org/en/download/ 

Learning to Code With Swift Playgrounds

Many years back (well, five or so, but that's an eternity in technical worlds), I used to be the editor of the mobile channel of a developer website. This was when app-building was the hottest thing in town, and well, Objective-C, the default language for building iOS apps, was looking ancient.

Then in 2014, Apple announced, Swift, a new modern option for building apps in the Apple ecosystem, and with an increasing amount of cross-platform, server-side support, it was always a language I had a lot of hope for and kept a keen eye on.

Azure, AWS, and GCP: A Multicloud Service Cheat Sheet

This article will help you to map between Azure, AWS, and Google Cloud solutions. If you are considering a multicloud architecture, it's important to understand the differences between each provider's suites.

Cloud Services Comparison

AI and Machine Learning

SageMaker

Why Do Some HTML Elements Become Deprecated?

The internet has been around for a long while, and over time we’ve changed the way we think about web design. Many old techniques and ways of doing things have gotten phased out as newer and better alternatives have been created, and we say that they have been deprecated.

Deprecated. It’s a word we use and see often. But have you stopped to think about what it means in practice? What are some examples of deprecated web elements, and why don’t we use them any more?

What is deprecation?

In everyday English, to “deprecate” something is to express disapproval of it. For example, you might be inclined to deprecate a news story you don’t like.

When we’re speaking in a technical sense, however, deprecation is the discouragement of use for an old feature. Often, the old feature remains functional in the interests of backward compatibility (so legacy projects don’t break). In essence, this means that you can technically still do things the legacy way. It’ll probably still work, but maybe it’s better to use the new way. 

Another common scenario is when technical elements get deprecated as a prelude to their future removal (which we sometimes call “sunsetting” a feature). This provides everybody time to transition from the old way of working to the new system before the transition happens. If you follow WordPress at all, they recently did this with their radically new Gutenberg editor. They shipped it, but kept an option available to revert to the “classic” editor so users could take time to transition. Someday, the “classic” editor will likely be removed, leaving Gutenberg as the only option for editing posts. In other words, WordPress is sunsetting the “classic” editor.

That’s merely one example. We can also look at HTML features that were once essential staples but became deprecated at some point in time.

Why do HTML elements get deprecated?

Over the years, our way of thinking about HTML has evolved. Originally, it was an all-purpose markup language for displaying and styling content online.

Over time, as external stylesheets became more of a thing, it began to make more sense to think about web development differently — as a separation of concerns where HTML defines the content of a page, and CSS handles the presentation of it.

This separation of style and content brings numerous benefits:

  • Avoiding duplication: Repeating code for every instance of red-colored text on a page is unwieldy and inefficient when you can have a single CSS class to handle all of it at once. 
  • Ease of management: With all of the presentation controlled from a central stylesheet, you can make site-wide changes with little effort.
  • Readability: When viewing a website’s source, it’s a lot easier to understand the code that has been neatly abstracted into separate files for content and style. 
  • Caching: The vast majority of websites have consistent styling across all pages, so why make the browser download those style definitions again and again? Putting the presentation code in a dedicated stylesheet allows for caching and reuse to save bandwidth. 
  • Developer specialization: Big website projects may have multiple designers and developers working on them, each with their individual areas of expertise. Allowing a CSS specialist to work on their part of the project in their own separate files can be a lot easier for everybody involved. 
  • User options: Separating styling from content can allow the developer to easily offer display options to the end user (the increasingly popular ‘night mode’ is a good example of this) or different display modes for accessibility. 
  • Responsiveness and device independence: separating the code for content and visual presentation makes it much easier to build websites that display in very different ways on different screen resolutions.

However, in the early days of HTML there was a fair amount of markup designed to control the look of the page right alongside the content. You might see code like this: 

<center><font face="verdana" color="#2400D3">Hello world!</font></center>

…all of which is now deprecated due to the aforementioned separation of concerns. 

Which HTML elements are now deprecated?

As of the release of HTML5, use of the following elements is discouraged:

  • <acronym> (use <abbr> instead)
  • <applet> (use <object>)
  • <basefont> (use CSS font properties, like font-size, font-family, etc.)
  • <big> (use CSS font-size)
  • <center> (use CSS text-align)
  • <dir> (use <ul>)
  • <font> (use CSS font properties)
  • <frame> (use <iframe>)
  • <frameset> (not needed any more)
  • <isindex> (not needed any more)
  • <noframes> (not needed any more)
  • <s> (use text-decoration: line-through in CSS)
  • <strike> (use text-decoration: line-through in CSS)
  • <tt> (use <code>)

There is also a long list of deprecated attributes, including many elements that continue to be otherwise valid (such as the align attribute used by many elements). The W3C has the full list of deprecated attributes.

Why don’t we use table for layouts any more?

Before CSS became widespread, it was common to see website layouts constructed with the <table> element. While the <table> element is not deprecated, using them for layout is strongly discouraged. In fact, pretty much all HTML table attributes that were used for layouts have been deprecated, such as cellpadding, bgcolor and width

At one time, tables seemed to be a pretty good way to lay out a web page. We could make rows and columns any size we wanted, meaning we could put everything inside. Headers, navigation, footers… you name it!

That would create a lot of website code that looked like this:

<table border="0" cellpadding="0" cellspacing="0" width="720">
  <tr>
    <td colspan="10"><img name="logobar" src="logobar.jpg" width="720" height="69" border="0" alt="Logo"></td>
  </tr>
  <tr>
    <td rowspan="2" colspan="5"><img name="something" src="something.jpg" width="495" height="19" border="0" alt="A picture of something"></td>
    <td>Blah blah blah!</td>
    <td colspan="3"> 
  <tr>
  <!--  and so on -->
</table>

There are numerous problems with this approach:

  • Complicated layouts often end up with tables nested inside other tables, which creates a headache-inducing mess of code. Just look at the source of any email newsletter.
  • Accessibility is problematic, as screen readers tend to get befuddled by the overuse of tables.
  • Tables are slow to render, as the browser waits for the entire table to download before showing it on the screen.
  • Responsible and mobile-friendly layouts are very difficult to create with a table-based layout. We still have not found a silver bullet for responsive tables (though many clever ideas exist).

Continuing the theme of separating content and presentation, CSS is a much more efficient way to create the visual layout without cluttering the code of the main HTML document. 

So, when should we use<table>? Actual tabular data, of course! If you need to display a list of baseball scores, statistics or anything else in that vein, <table> is your friend. 

Why do we still use <b> and <i> tags?

“Hang on just a moment,” you might say. “How come bold and italic HTML tags are still considered OK? Aren’t those forms of visual styling that ought to be handled with CSS?”

It’s a good question, and one that seems difficult to answer when we consider that other tags like <center> and <s> are deprecated. What’s going on here?

The short and simple answer is that <b> and <i> would probably have been deprecated if they weren’t so widespread and useful. CSS alternatives seem somewhat unwieldy by comparison:

<style>
  .emphasis { font-weight:bold }
</style>
    
This is a <span class="emphasis">bold</span> word!

This is a <span style="font-weight:bold">bold</span> word!

This is a <b>bold</b> word!

The long answer is that these tags have now been assigned some semantic meaning, giving them value beyond pure visual presentation and allowing designers to use them to confer additional information about the text they contain.

This is important because it helps screen readers and search crawlers better understand the purpose of the content wrapped in these tags. We might italicize a word for several reasons, like adding emphasis, invoking the title of a creative work, referring to a scientific name, and so on. How does a screen reader know whether to place spoken emphasis on the word or not?

<b> and <i>have companions, including <strong>, <em> and <cite>. Together, these tags make the meaning context of text clearer:

  • <b> is for drawing attention to text without giving it any additional importance. It’s used when we want to draw attention to something without changing the inflection of the text when it is read by a screen reader or without adding any additional weight or meaning to the content for search engines.
  • <strong> is a lot like <b> but signals the importance of something. It’s the same as changing the inflection of your voice when adding emphasis on a certain word.
  • <i> italicizes text without given it any additional meaning or emphasis. It’s perfect for writing out something that is normally italicized, like the scientific name of an animal.
  • <em> is like <i> in that it italicizes text, but it provides adds additional emphasis (hence the tag name) without adding more importance in context. (‘I’m sure I didn’t forget to feed the cat’). 
  • <cite> is what we use to refer to the title of a creative work, say a movie like The Silence of the Lambs. This way, text is styled but doesn’t affect the way the sentence would be read aloud. 

In general, the rule is that <b> and <i> are to be used only as a last resort if you can’t find anything more appropriate for your needs. This semantic meaning allows <b> and <i> to continue to have a place in our modern array of HTML elements and survive the deprecation that has befallen other, similar style tags.

On a related note, <u> — the underline tag — was at one time deprecated, but has since been restored in HTML5 because it has some semantic uses (such as annotating spelling errors).

There are many other HTML elements that might lend styling to content, but primarily serve to provide semantic meaning to content. Mandy Michael has an excellent write-up that covers those and how they can be used (and even combined!) to make the most semantic markup possible.

Undead HTML attributes

Some deprecated elements are still in widespread use around the web today. After all, they still work — they’re just discouraged.

This is sometimes because word hasn’t gotten around that that thing you’ve been using for ages isn’t actually the way it’s done any more. Other times, it’s due to folks who don’t see a compelling reason to change from doing something that works perfectly well. Hey, CSS-Tricks still uses the teletype element for certain reasons.

One such undead HTML relic is the align attribute in otherwise valid tags, especially images. You may see <img> tags with a border attribute, although that attribute has long been deprecated. CSS, of course, is the preferred and modern method for that kind of styling presentation.


Staying up to date with deprecation is key for any web developer. Making sure your code follows the current recommendations while avoiding legacy elements is an essential best practice. It not only ensures that your site will continue to work in the long run, but that it will play nicely with the web of the future.

Questions? Post a comment! You can also find me over at Angle Studios where I work.

The post Why Do Some HTML Elements Become Deprecated? appeared first on CSS-Tricks.

Rethinking Code Comments

Justin Duke asks if treating code comments like footnotes could help us understand the code in a file better. In his mockup, all the comments are hidden by default and require a click to reveal:

What a neat idea! Justin’s design reminds me of the way that Instapaper treated inline footnotes.

Instapaper (circa 2012)

I guess the reason I like this idea so much is that a lot of comments don’t need to be read constantly, — they’re sort of a reminder that, “Hey, this needs work in the future” or “Yikes, this is weird and I’m sorry.” Keeping these comments out of the code makes it much easier to scan the whole file, too.

I do wonder if there could be a toggle that shows every comment, just in case you need to read all the comments in sequence rather than clicking to toggle each one.

Anyway, all this talk about comments reminds me of an absolutely fantastic talk by Sarah Drasner at JSConf this year where she discussed why comments are so dang hard to get right:

Direct Link to ArticlePermalink

The post Rethinking Code Comments appeared first on CSS-Tricks.

Remote Agile (Part 3): Mastering Zoom

In this third post of the Remote Agile series, we address the tool at the heart of working with a distributed team as a Scrum Master, Agile Coach, or Product Owner: Zoom. While Zoom is an excellent video conference application — particularly for larger groups of twelve or more attendees — by all standards, its killer feature is breakout rooms.

You may also like: Suddenly Remote? Here's How to Regain Your Productivity in Record Time

Microservice: Async Rest Client to DynamoDB using Spring Boot

Overview

Starting from Spring framework 5.0 and Spring Boot 2.0, the framework provides support for asynchronous programming, so does AWS SDK starting with 2.0 version.

In this post, I will be exploring using asynchronous DynamoDB API and Spring Webflux by building a simple reactive REST application. Let's say we need to handle HTTP requests for retrieving or storing some Event (id:string, body: string). The event will be stored in DynamoDB.

9 Questions to Ask When Selecting an IoT Cloud Platform

shoes on a street

IoT engineering combines hardware, connectivity, software, and a UI, all with increased data handling requirements. The combination of these factors means that IoT solutions are likely to be more complicated to engineer and more compute-intensive to run, which is why IoT engineering is ideally suited to cloud-native development.

For those new to engineering in the cloud, this can inject a whole new set of variables into an enterprise's delivery efforts, and with that comes potential disruptions and vulnerabilities in the software development and operations environment. That's also why, in addition to working with an IoT cloud platform provider, many enterprises will choose to partner with a digital engineering provider too.

Run Your First Chaos Experiment in 10 Minutes

Chaos Engineering is a way to test a production software system's robustness by simulating unusual or disruptive conditions. For many people, however, the transition from learning Chaos Engineering to practicing it on their own systems is daunting. It sounds like one of those big ideas that require a fully-equipped team to plan ahead. Well, it doesn't have to be. To get started with chaos experimenting, you may be just one suitable platform away.

Chaos Mesh is an easy-to-use, open-source, cloud-native Chaos Engineering platform that orchestrates chaos in Kubernetes environments. This 10-minute tutorial will help you quickly get started with Chaos Engineering and run your first chaos experiment with Chaos Mesh.