Articles

Sass – the extended arm of CSS; the power factor that brings elegance to your code.

With Sass, it is all about variables, nesting, mixins, functions, partials, imports, inheritance, and control directives. Sass makes your code more maintainable and reusable.

And now, I will show you how to make your code more structured and organized.

The organization of files and folders is crucial when projects expand. Modularizing the directory is necessary as the file structure increases significantly. This means structuring is in order. Here is a way to do it.

  • Divide the stylesheets into separate files by using Partials
  • Import the partials into the master stylesheet – which is typically the main.sass file.
  • Create a layout folder for the layout specific files

Types of Sass Structures

There are a few different structures you can use. I prefer using two structures — a simple one and a more complex one. Let’s have a look.

Simple Structure

The simple structure is convenient for a small project like a single web page. For that purpose, you need to create a very minimal structure. Here is an example:

  • _base.sass — contains all the resets, variables, mixins, and utility classes
  • _layout.sass — all the Sass code handling the layout, which is the container and grid systems
  • _components.sass — everything that is reusable – buttons, navbars, cards, and so on
  • _main.sass — the main partial should contain only the imports of the already mentioned files

Another example of the same simple structure is the following:

  • _core.sass — contains variables, resets, mixins, and other similar styles
  • _layout.sass — there are the styles for the header, footer, the grid system, etc
  • _components.sass — styles for every component necessary for that project, including buttons, modals, etc.
  • _app.sass — imports

This is the one I usually use for smaller projects. And when it comes to making a decision of what kind of structure to be used, the size of the project is often the deciding factor.

Why Use This Structure?

There are several advantages why you should use this organisational structure. First of all, the CSS files cache and in doing so, the need to download a new file for every new page visit is decreased. In this way, the HTTP requests decrease as well.

Secondly, this structure is much easier to maintain since there is only one file.

Thirdly, the CSS files can be compressed and thus decrease their size. For a better outcome, it is recommended to use Sass/Less and then do concatenation and minification of the files.

In case files become disorganized, you would need to expand the structure. In such a case, you can add a folder for the components and break it further into individual files. If the project broadens and there is a need for restructuring the whole Sass structure, consider the next, more complex pattern.

The 7-1 Patterned Structure

The name of this structure comes from 7 folders, 1 file. This structure is used by many, as it is considered to be a good basis for projects of larger sizes. All you need to do is organize the partials in 7 different folders, and one single file (app.sass) should sit at the root level handling the imports. Here is an example:

sass/
|
|- abstracts/
| |- _mixins // Sass Mixins Folder
| |- _variables.scss // Sass Variables
|
|- core/
| |- _reset.scss // Reset
| |- _typography.scss // Typography Rules
|
|- components/
| |- _buttons.scss // Buttons
| |- _carousel.scss // Carousel
| |- _slider.scss // Slider
|
|- layout/
| |- _navigation.scss // Navigation
| |- _header.scss // Header
| |- _footer.scss // Footer
| |- _sidebar.scss // Sidebar
| |- _grid.scss // Grid
|
|- pages/
| |- _home.scss // Home styles
| |- _about.scss // About styles
|
|- sections/ (or blocks/)
| |- _hero.scss // Hero section
| |- _cta.scss // CTA section
|
|- vendors/ (if needed)
| |- _bootstrap.scss // Bootstrap
|
- app.scss // Main Sass file

In the Abstract partial, there is a file with all the variables, mixins, and similar components.

The Core partial contains files like typography, resets, and boilerplate code, used across the whole website. Once you write this code, there is no further overwriting.

The Components partial contains styles for all components that are to be created for one website, including buttons, carousels, tabs, modals, and the like.

The Layout partial has all styles necessary for the layout of the site, i.e., header, footer.

The Pages partial contains the styles for every individual page. Almost every page needs to have specific styles that are to be used only for that particular page.

For every section to be reusable and the sass code to be easily accessible, there is the Section/Blocks partial. Also, it is important to have this partial so that you don’t need to search whether particular code is in the home.sass or about.sass files in the Pages partial.

It is a good idea to put each section in a separate .sass file. Thus, if you have two different hero sections, put the code in the same file to know that there you can find the code for the two sections. And if you follow this pattern, you will have the majority of files in this folder.

The Vendors partial is intended for bootstrap frameworks so, if you use one in your project, create this partial.

I recommend you use app.sass as the main folder. Here is how it should look:

// Abstract files
@import "abscracts/all"; // Vendor Files
@import "vendor/bootstrap.scss"; // Core files
@import "core/all"; // Components
@import "components/all"; // Layout
@import "layout/all"; // Sections
@import "sections/all"; // Pages
@import "pages/all";

Instead of having a lot of imports in the file, create an all.sass file in every folder. Each all.sass file should contain all the imports for that folder — and to make it more visible and understandable, create a main file.

Organisation

The biggest benefit of this structure is organisation.You always know where to check if you need to change something specific. For example, if you want to change the spacing on a Section/Block you go directly to the Sections/Blocks folder. That way, you don’t need to search in the folder to find the class in a file.

Facilitation

When the code is structured, the processes are promptly facilitated. They are streamlined and every segment of the code has their own place.

Final Words

Organizing code is essential for developers and together with all other skills, it is the most effective way to improve the functioning of the site. And even though there are multiple ways of organisation and different strategies, opting for simplicity helps you avoid the dangerous pitfalls. And finally, there is no right or wrong choice since everything depends on the developer’s work strategies.

 

Featured image via Reshot.

Source


Source de l’article sur Webdesignerdepot

While doing some work with Kubernetes (K8s) and studying for the CKAD exam, I came across a page on Matthew Palmer’s website entitled “Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification” and which contains five practice questions, which I’ll go over here. If you see a problem with anything I’ve done below, including inefficient solutions, please let me know in the comments.

We will focus on not just showing a possible solution to each problem but also verifying our work.

Source de l’article sur DZONE

As a consistent user and developer on the OpenShift platform over the years, I’ve tried helping users by sharing my application development content as we’ve journeyed from cartridges all the way to container base development.

With container based development we’ve also transitioned from using templates to define how to deploy our tooling and applications, to operators. There are many examples of how to work with the templated versions of our applications around decision management and process automation found on Red Hat Demo Central and JBoss Demo Central.

Source de l’article sur DZONE

Container registries serve as libraries to store and access third-party container images required during the build phase of the SDLC and the images produced for deployment to test, staging, and production environments. While public container registries are accessible and convenient, private registries can better integrate into existing CI/CD workflows, offer greater control over access and security, as well as help ensure build repeatability and reliability. This Refcard covers key container concepts and terminology; common use cases; and guidelines for container registry configuration, operation, security, and storage.
Source de l’article sur DZONE

Today, great design isn’t just about conveying the right amount of information in a certain number of pages. 

There’s more to creating the perfect website than experimenting with visuals and sound. Designers need to think carefully about how each element of their site impacts the overall user experience. 

After all, with billions of websites available to explore, it takes something truly immersive to convince your client’s audience that they should stay on their pages. The more convenient and attractive your websites are, the more likely it is that visitors will want to stick around. 

Minimalism, one of the more popular styles of web design from the last few years, can sometimes assist designers in making attractive and effective websites more functional.

The less clutter and confusion there is on a page, the easier it is to navigate. 

So, how do you embrace the benefits of functional minimalism?

Understanding Functional Minimalism

Many webs designers are convinced that minimalism is all about aesthetics. 

They see a website like Hugeinc.com and assume that the minimalist appearance is all about making the website as attractive as possible.

However, the underlying ideas of minimalism in web design go much deeper than this.  The history of minimalist design begins with Japanese culture. Japan has long focused on balancing simplicity and beauty with its architecture, interior design, and even graphic design. In the Western world, minimalism got its day in the sun in the web design environment, after customers endured years of cluttered and complicated web pages with difficult navigation, overwhelming information and clashing graphics. 

Designers began to experiment with the idea that less really could be more — particularly when it came to the digital landscape. 

The Functional Rules of Minimalist Web Design

For a while, minimalism was the most popular style for a website. During 2018, in particular, minimalist web design soared to the top of the designer demand list, as companies fell in love with a combination of white space, simple navigation and bold text. 

While now, there are other design trends stepping into the industry, designers can still benefit from exploring some of the essential rules of functional minimalism. After all, visual complexity has been proven to damage a person’s perception of a website

Additionally, a study conducted by the EyeQuant group found that a clean and simple design can lead to a lower bounce rate. Minimalism gives viewers less to contend with on a page, which can allow for a simpler and more straightforward experience. Additionally, a clean website can also drive additional benefits, including faster loading times, better responsivity between screen sizes and more.

Because you’re only using a few images and well-spaced text, you can even experiment with different strategies, like graphics and dynamic fonts. Look at the Manuel Rueda website, for instance, it’s a great example of how a minimalist design can be brimming with activity.

So, how can any designer use the principles of functional minimalism?

1. Focus on the Essentials

First, just like when designing a landing page, designers need to ensure that they’re concentrating only on the elements in the page that really need to be there.

This means removing anything on the website that doesn’t support the end-goals of the specific page that the viewer is using. Any pictures, background noise, buttons, or even navigation features that aren’t going to support the initial experience that the visitor needs, must go. 

Think about what’s going to distract your visitors from the things that are important and concentrate on giving everything a purpose. For instance, the Plus63.org website instantly introduces the visitors to the purpose of the website, then allows users to scroll down to get more information. The data is spread clearly through the home page, pulling the viewer into a story. 

2. Embrace the Positives of Negative Space

Negative space is one of the fundamental components of good minimalist web design. 

Every part of a good website doesn’t need to be filled with noise to make a difference. White, or negative space can help to give your viewer the room they need to fully understand the experience that they’re getting. 

From a functional perspective, it’s the difference between placing someone in an overflowing storage container and asking them to find what they need or placing them in a room where items are carefully spaced out, labelled, and waiting for discovery. 

The Hatchinc.co website uses negative space to ensure that information is easy to consume. You can find the different pages of the site easily, the social media buttons, and the newsletter subscription tool. Plus, you get a chance to see some of the work behind the site.

3. Make it Obvious

One of the biggest problems that consumers have encountered in recent years, is the concept of “choice overload”. 

Whether you’re in a store, or on a website, you’re never sure what to do first. Do you check out the blog posts on the site to learn more about the authority of the company? Do you visit the “About” page, to see where the brand come from? Do you head to their product pages?

As a designer, functional minimalism can help you to make it obvious what your audience should do next. As soon as you arrive on the AYR.com website, you’re not overwhelmed with choice. You can either head to your bag, “shop now”, or check the menu. 

Since the “Shop Now” CTA is the biggest and most compelling, the chances are that most visitors will click that first, increasing the company’s chance of conversions. 

4. Simplify the Navigation (But Don’t Hide It)

The AYR.com example above brings us to another concept of functional minimalism. 

While minimalism and simplicity aren’t always the same thing, they should go hand-in-hand. When you’re designing for functional minimalism, you should be concentrating on helping visitors to accomplish tasks as quickly and easily as possible, without distraction. 

That means that rather than overwhelming your audience with a huge selection of pages that they can visit at the top or side of the screen, it may be worth looking into simpler navigation options. A single menu icon that expands into a full list of items remains a popular design choice – particularly in the era of mobile web design. 

For instance, look at the simple menu on newvision-opticien.com.

With this basic approach, designers can ensure that visitors are more likely to click through to the pages that their clients want their customers to visit. They can still find what they need in the menu, but it’s not taking up space on the page, or distracting them. 

5. Set Great Expectations with the Top of the Screen

Functional minimalism can also help today’s designers to more quickly capture the attention of their visitors from the moment they click into a website. 

The content that’s visible at the top of the page for your visitors is what will encourage them to take the next step in their online experience. Make sure that you’re providing something that keeps your audience interested and gives them the information they need. 

That way, you’ll lower the risk of high bounce rates for your clients, while also taking advantage of minimalism’s ability to deliver quick access to information for your audience. 

At the top of the page, the Kerem.co website instantly introduces the visitor into what the website is all about, and what they should do next. 

You can even deliver more information in one chunk at the top of the page, without cluttering the environment, by using good UI animation. 

Consider implementing a slideshow of pictures that flip from one image to the next, or a font section that dynamically changes as your audience has chance to read each sentence. 

6. Use Functional Minimalism in the Right Spaces

Remember, functional minimalism isn’t just for home pages. 

Depending on what you want to accomplish for your client, you could also embed the components of minimalism into landing pages, portfolios, and squeeze pages too. 

After all, when there’s less clutter and confusion on a page to distract a potential audience, there’s a greater chance that your visitors will scroll to the bottom of the page and complete a conversion. For instance, look at how simple and attractive the Muzzleapp.com landing page is.

The page provides useful information and tells customers exactly what they need to do next. There’s no confusion, no complexity, and nothing to hold visitors back. 

Just be careful. While functional minimalism can be very useful, it won’t be right for every website. A lack of elements can be harmful to websites that rely heavily on content. That’s because low information density will force your user to scroll excessively for the content that they need. Using functional minimalism correctly requires a careful evaluation of where this technique will be the most suitable. 

Minimalism Can be Functional

A minimalist design isn’t just an aesthetic choice. The right aspects of minimalism can simplify interfaces on the web by eliminating unnecessary elements and reducing content that doesn’t support an end goal. 

The key is to ensure that you’re focusing on a combination of aesthetics and usability when creating the right design. An easy-to-navigate and beautiful website can be a powerful tool for any business.  

Source


Source de l’article sur Webdesignerdepot

As a cloud-native developer you’ve installed an OpenShift Container Platform development environment on your local machine, but what’s next?

What can you do with the fully stocked container registry provided to you?

Source de l’article sur DZONE


Motivation

In software development one often finds themselves investigating issues. Depending on the type of the application, various sources of informations can be available: 

  • screenshots
  • verbal description of the problem
  • metrics
  • logs (application, framework, container, application server, OS, …)
  • thread and heap dumps

In an ideal world, the exact inputs that caused an issue and the code that failed would be immediately available. In a typical case though, it can take hours of digging through logs and code to understand what happened. Would it not be nice to avoid that?

Source de l’article sur DZONE


Agile 

AI

Big Data

Cloud

Database

DevOps

Integration

  • Mulesoft 4: Continuous Delivery/Deployment With Maven by Ashok S — This article is a great example of what we want every tutorial to look like on DZone. The main aim of this article is to provide a standard mechanism to release project artifacts and deploy to Anypoint Platform, from the local machine or configure in continuous delivery pipelines.
  • Integration With Social Media Platforms Series (Part 1) by Sravan Lingam — This article helps you to build a RESTful API through MuleSoft that integrates with LinkedIn and shares a post on behalf of one’s personal account. I like this article because, in the age of social media, it’s so important for businesses to be connected and integrated!

IoT

Java

Microservices

Open Source

Performance

  • What Is Big O Notation? by Huyen Pham — Aside from a silly name, this article is an example of an in-depth analysis on a little-spoken-about concept. In this article, take a look at a short guide to get to know Big O Notation and its usages.
  • Is Python the Future of Programming? by Shormisthsa Chatterjee — Where is programming going? This article attempts to answer this question in a well-rounded way. The author writes, "Python will be the language of the future. Testers will have to upgrade their skills and learn these languages to tame the AI and ML tools".

Security

Web Dev

  • A Better Way to Learn Python by Manas Dash: There’s so many resources available for learning Python — so many that it’s difficult to find a good and flexible place to start. Check out Manas’ curated list of courses, articles, projects, etc. to get your Python journey started today. 
  • Discovering Rust by Joaquin Caro: I’m a sucker for good Rust content, as there’s still so many gaps in what’s available. Joaquin does a great job of giving readers his perspective of the language’s features in a way that traditional docs just 

Source de l’article sur DZONE

This is the final part of our Kubernetes logging series. In case you missed part 1, you can find it here. In this tutorial, we will learn about configuring Filebeat to run as a DaemonSet in our Kubernetes cluster in order to ship logs to the Elasticsearch backend. We are using Filebeat instead of FluentD or FluentBit because it is an extremely lightweight utility and has a first-class support for Kubernetes. It is best for production-level setups.

Deployment Architecture

Filebeat will run as a DaemonSet in our Kubernetes cluster. It will be:

Source de l’article sur DZONE

Cloud management has come a long way, beginning with physical hardware, and then moving servers to the cloud.  It seems likely that the next logical step is to run code serverless! Without needing to manage hardware or depend on infrastructure providers like Google and Amazon, serverless can run code in a managed service container, completely unaffected by server-level issues. By utilizing this new step, you won’t have to worry about operating systems, web servers, or even updates. 

Although it seems like a no-brainer, there are a number of things you both lose and gain when switching over. The benefits alone should be enough to get you interested; you do the work, create an application, and once your code is uploaded you are promised simplicity, low cost, and automatic scaling. Due to the fact that the service provider is automatically managed, scaling is much faster. In addition to this, you only pay for what you use, cutting back on the normal cost, and saving you or your company money. This situation seems ideal, but there are also drawbacks to serverless that can complicate your decision. 

Source de l’article sur DZONE