Welcome to curated list of handpicked free online resources related to IT, cloud, Big Data, programming languages, Devops. Fresh news and community maintained list of links updated daily. Like what you see? [ Join our newsletter ]

Six docker compose best practices for dev and prod

Categories

Tags devops app-development web-development containers programming docker

Docker solves the “but it runs on my machine” problem by introducing containerization. However, with a multifaceted code base, you must simultaneously run several containers like the back and front end. Further, this will require you to leverage tools such as Docker Compose. By Regis Wilson.

Docker Compose is a tool for defining and running multi-container Docker applications. It allows you to bring up and link multiple containers into one logical unit. The article then brings these points to your attention:

  • What is docker compose good for?
  • Mount your code as volume to avoid unnecessary rebuilds
  • Use an override file
  • Use YAML anchors
  • Leverage the docker restart policy
  • Correct cleanup order of docker images
  • Setting your containers’ cpu and memory limits

These tips will help you use Docker Compose more effectively in development and production. After trying out the above configuration and optimization, you should be able to build your containers efficiently. Nice one!

[Read More]

Reducing errors with type hinting in PHP

Categories

Tags php app-development web-development programming

In this article, author will explain everything you need to know about type-hinting in PHP, which will help you achieve this goal. We’ll begin by exploring what type-hinting in PHP is, and then author will show you how to start using it in your applications. By Adebayo Adams.

Type-hinting means explicitly stating the expected type of declarations in your code. This allows you to enforce specific types in your code. PHP allows you to type-hint function parameters, return values, and class properties to write more robust code.

Further in the article:

  • Different types in PHP
  • Type-hinting function parameters
  • Strict types
  • Type-hinting function returns
  • Void returns
  • Static returns
  • Nullable types
  • Nullable return types
  • Union types
  • Type-hinting class properties
  • Using the callable type
  • Eliminate type errors

… and more. The PHP version 8 update introduced union types, which allow you to specify more than one type for a single declaration. For example, a function that formats prices should be able to take an int or a float. Type-hinting your code makes it significantly easier to document your code as a solo developer or when working in a team. Excellent read!

[Read More]

Best UX practices for search inputs

Categories

Tags search ux app-development web-development

The search box. Where would we be without it? Search is a powerful tool, and as one of the most common elements that we interact with on a daily basis, search input usability is an important consideration. By Dawson Beggs.

This article discusses how search elements can be designed to provide better experiences:

  • Don’t make users search for the search box
  • Input fields should be visible
  • Use placeholder text
  • Use a magnifying glass icon
  • Provide a button to submit search queries
  • Consider the search icon position

… and more. Autocomplete can improve the experience for users by helping them to type less, avoid spelling mistakes, and decrease the level of overall effort required to reach a result. Excellent advice!

[Read More]

Building microservices using Terraform, Ansible, Docker, Docker Compose, and Github Actions

Categories

Tags devops ansible app-development cloud

This blog post explores the benefits of microservices in building a scalable and maintainable application. By Wamaitha.

Infrastructure as code(IAC) is a methodology for deploying, configuring, and managing servers. Typically when you need to host your application on the internet, you create VMs on hosting providers like Linode, Vultr, DigitalOcean, AWS, or GCP. Once the VMs are up, you either SSH directly into the instance or use a CICD workflow to get your application running on the VM. Using IAC tools, we can automate this process. This guide will cover Terraform, Ansible, Docker, and GitHub Actions to build microservices.

The content of the article covers:

  • Tools used
  • Project Overview
  • Prerequisites
  • Installations
  • Microservices
    • Dad Jokes as a service.
    • Kanye as a service
    • MongoDB as a service
    • My Jokes Microservice
    • React Microservice
    • Run all the microservices
  • Provisioning VM with Terraform
  • Automating deploys with Ansible
  • Using Github Actions as the Controller Machine

The final step runs the ansible playbook, passing the private key stored in the SSH_PRIVATE_KEY secret as an argument to the –private-key flag. This step also reads the secrets stored in the repository and appends them to the .env file in the microservices directory. Finally, the ansible-playbook command is run to execute the playbook. Nice one!

[Read More]

Safety Check! How to keep your iOS devices stalker free

Categories

Tags ios miscellaneous app-development how-to

Perform an emergency safety check to quickly disconnect apps and people from your iPhone. By Shubham Agarwal.

Apple makes it easy for anyone to offer their close friends and family access to their iPhone. You can set people as your emergency contacts, keep them informed of your whereabouts, and more. The same goes for your installed apps, many of which have permission to read a ton of your data and access your sensors like your location, photos, camera, microphone, and contacts.

You will get detailed information about:

  • How to use Safety Check on iOS 16
  • Review people and apps connected to your iPhone
  • Perform an emergency data reset on your iPhone

There are two ways to use Safety Check on your iPhone. You can either review the people and apps connected to your device one by one or reset all of them in a single go with the emergency option. Good read!

[Read More]

The evolution of state transfer

Categories

Tags oop web-development app-development apis restful

State transfer is fundamental to online applications. Web apps are architected around the network, with the separation of front-end from back-end and protocols like AJAX and REST. However, newer protocols like GraphQL and frameworks like Remix are increasingly abstracting state transfer away from application code. By James Arthur.

Local-first software is a new paradigm that fully abstracts state transfer out of the application domain. It’s the endgame for the evolution of state transfer and the vision we’re building towards with ElectricSQL.

Evolution of state transfer

Source: https://electric-sql.com/blog/2022/12/16/evolution-state-transfer

Further explained are:

  • Forms to GraphQL
  • Invention of AJAX
  • Standardising on REST
  • Enter GraphQL
  • Local-first
  • Optimal placement and movement of data

With local-first, developers code directly against a local, embedded database. Reads and writes are instant. Users can still share data and collaborate but the state transfer happens in the background, with reads and writes made against the local database and then synced in the background to the server. Web development has been progressing through an evolution of state transfer from manual, imperative data transfer towards automated, declarative systems. Hybrid local-first architecture is the natural endgame for this progression. Nice read!

[Read More]

Entity to DTO – how-to

Categories

Tags database oop web-development app-development java

DTO is probably the most straightforward pattern in object-oriented programming. What could be the motives for using DTOs in our applications? By Andrey Belyaev.

In this guide you will find information about:

  • Introduction: what is DTO?
  • Where do we need DTOs?
  • DTOs for API layer
  • Entities vs. DTOs on the business layer
  • No-DTO approach
  • How to map an entity to DTO?
  • POJOs and Hibernate
  • POJOs and mappers
  • Spring Data JPA Projections

It is hard to avoid DTOs in modern business applications. The most common reason to use them – stabilize the application’s external API and hide some information from the data transferred via this API. Nice one!

[Read More]

What is JAMstack - introduction

Categories

Tags open-source cloud web-development javascript

At its core, the JAMstack is a web development approach that focuses on using client-side JavaScript, reusable APIs, and prebuilt Markup to create web applications. This architecture allows for faster and more secure web development by using prebuilt and pre-rendered pages, which are then delivered to the user via a content delivery network (CDN). By Martin.

The article deals with:

  • What is JAMstack?
  • What does JAMstack mean?
  • Why should you start using JAMstack?
  • SEO - Google favors JAM
  • Popular frameworks

In short, the JAMstack is a powerful and efficient web development architecture that is ideal for frontend developers looking to build modern, fast, and secure web applications. With its focus on client-side JavaScript, reusable APIs, and prebuilt Markup, the JAMstack offers a range of benefits that make it an attractive option for frontend developers looking to create engaging and dynamic user experiences. Good read!

[Read More]

Building a CI pipeline for Kotlin Multiplatform Mobile using GitHub actions

Categories

Tags kotlin devops open-source cloud cicd

When evaluating a Kotlin Multiplatform solution, it was very important to our team that we understand how we could build a CI/CD pipeline for the project. It needed to be easy for our team to push changes and build a new version of the project. By Nate Ebel, Android Engineer.

Both our iOS and Android applications use GitHub Actions for our CI needs. So, in this post, we’ll walkthrough how to setup a GitHub Actions workflow for building a Kotlin Multiplatform Mobile project.

The article covers:

  • Creating a GitHub actions workflow for Kotlin Multiplatform Mobile
  • Setting up our workflow environment
  • Configuring a job to build a Kotlin Multiplatform Mobile Project
  • Checking out Kotlin Multiplatform and Swift package repos
  • Setting up Java and Xcode tooling
  • Extracting project version for Git tagging
  • Building the artifacts
  • Publishing the JVM artifacts
  • Reviewing a PR workflow solution

… and more.

These workflows have worked well for us in the past 1.5 years. Authors publishing model for their Swift Package is evolving, but the workflow itself has worked great. Nice one!

[Read More]

Building more efficient data infrastructure for machine learning

Categories

Tags cio open-source big-data data-science machine-learning

The current influx of data — structured, semi-structured, and unstructured — being driven by an array of data sources is fueling opportunities to leverage machine learning to extract insights and accelerate innovations that can transform businesses and industries. As these data volumes continue to rise, companies are struggling with the complicated task of managing this data and figuring out how to harness it for analytics and AI. By Vedant Jain, Denny Lee.

The article explains:

  • What is Delta Lake?
  • What is Amazon SageMaker Studio?
  • Integrate SageMaker Studio with Delta Lake
  • The benefits of connecting SageMaker Studio and Delta Lake

Delta Lake is an open-source storage framework that enables building a Lakehouse architecture with compute engines, including Spark, PrestoDB, Flink, Trino, and Hive, and APIs for Scala, Java, Rust, Ruby, and Python. Delta Lake is a great option for storing data in the AWS Cloud because it reads and writes in open-source Apache Parquet file format. This format makes it easy to write connectors from engines that can process Parquet. Nice one!

[Read More]