The Web is Good Now

The video of Chris Coyier’s talk at CascadiaJS 2022 is now available. It’s his first in-person talk in more than two years, so it’s great to see our good friend back on stage slinging gems on what makes the web good these days.

Container Queries! WAAPI! Scroll Timelines! offset-path! FLIP! Variable fonts! Fluid type! We really are all-powerful front-end developers these days.

Chris really packs a bunch into a 25-minute slot. It feels good to pause for that brief amount of time to reflect on the great new things for building websites and celebrate the fact that we get to use them.

And there’s nothing better than watching Chris greet the enture room as a bunch of “web nerds”. 🤓

To Shared LinkPermalink on CSS-Tricks


The Web is Good Now originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

GoDaddy Alternatives and Competitors

Our recommendation for most people is Hostinger because it’s an affordable, fast, and reliable web hosting provider. Sign up with Hostinger for as low as $1.99 per month.

With low prices, good speeds, and plenty of user-friendly features, GoDaddy has made a name for itself as one of the biggest all-in-one hosting providers out there. But it has some steep competition, and there are plenty of other hosting providers that cater to different audiences and needs. 

We’ve put together a list of the best GoDaddy alternatives based on performance, features, support, and functionality. Keep reading to compare our favorites and find out which hosting provider is the best match for you. 

The Top 10 Best Web Hosting Providers

The best GoDaddy alternative is Hostinger because of its speed, affordability, and reliability. Sign up with Hostinger for as low as $1.99 per month. For more options, here are our top recommendations for the hosting providers you should be considering. 

  • Hostinger – Best overall 
  • Bluehost – Best for new WordPress websites
  • DreamHost – Best Unbeatable Value On a Month-to-Month Hosting Plan
  • HostGator – Best for simple websites 
  • GreenGeeks – Best eco-friendly Hosting
  • SiteGround – Best WordPress Certified Host For Speed and Security
  • A2 Hosting – Fast & reliable shared hosting
  • InMotion – Best VPS hosting
  • WPEngine – Best managed WordPress hosting
  • Nexcess – Best for eCommerce hosting 
Company logos for our best GoDaddy alternatives and competitors

Hostinger – Best Overall

Company logo for Hostinger, one of our best GoDaddy alternatives

Hostinger is great for multiple reasons, including competitive pricing, easy setup, and intuitive features for users. 

Not only does it have a super clean interface and a dashboard that’s easy to navigate, but it also has a great, detailed onboarding process that makes setting up hosting and a website easy for even the most inexperienced users. 

It also comes with a ton of extra features, like free email management, WordPress integrations, a free SSL certificate, and multiple websites included in some plans. It has some of the lowest pricing of any web hosting provider, and it comes with a server-level cache that automatically improves your site’s speed.

For the cost, it’s hard to find a better hosting provider than Hostinger with as many features, and with as much speed or reliability. Their lowest plan starts at just $1.99 per month, and the highest plan is only $3.99 per month, making it, overall, the best value for money of any hosting provider. 

How Hostinger Compares to GoDaddy

Both Hostinger and GoDaddy offer lots of features at low prices.

Screenshot of Hostinger webpage with headline that says, "Savings to Set Your Website in Motion $2.00/mo"
Hostinger comes with a 30-day money-back guarantee.

When it comes to value for money, they’re about the same. They also both offer most of the essentials with every plan, like SSL certificates and support, and they both have extra features like WordPress integrations. 

Even when it comes to performance, they balance each other out. GoDaddy has slightly faster site speeds and uptime, while Hostinger has slightly more essential features and pricing. GoDaddy has better customer service, according to reviews, and it has an easier overall user experience. 

Both are great picks, and really, you could choose either of them and get similar results.

GoDaddy’s pricing usually starts at $5.99 per month, while Hostinger starts at just $2.99 per month

Want to read our full review? See what else we had to say about Hostinger here

Bluehost – Best for New WordPress Websites

Company logo for Bluehost, one of our best GoDaddy alternatives

Bluehost is a hosting provider that also offers web design and ecommerce services. It comes with WordPress built-in, making it a top choice for WordPress-based Hosting, and it is one of the only brands WordPress endorses. 

Like hosting, each Bluehost plan comes with plenty of features like a free domain, SSL Certificate, 24/7 support, and one-click WordPress install. It also comes with its own analytics and reporting features, its own drag-and-drop builder, and a dashboard that directly integrates with your WordPress dashboard. 

Bluehost often has sales and discounts, meaning their pricing can vary depending on the time of the year. With our special promo, a basic plan goes for as low as $2.75 per month, but when there’s no discount, basic Hosting usually starts at $9.99. 

With its great customer service, one-click install, and choice of prebuilt themes or drag-and-drop builders, Bluehost is a great choice for anyone who specifically wants to use WordPress or who’s new to having a website. 

How Bluehost Compares to GoDaddy

Bluehost and GoDaddy are pretty similar when put side to side. 

In fact, when it came to site uptimes, there was only a 0.01% difference (with Bluehost as the winner.) Both offer users features like a free domain, good site speeds, and excellent customer service. 

Screenshot of Bluehost webpage for WordPress hosting plans
Bluehost has plans that start as low as $2.75 per month.

Both sites also have lots of all-in-one options, like site builders, email management, web design, and online stores. And, as they’re both established names in the business, they both have excellent security. 

One big difference, though, is that Bluehost makes it much easier to integrate, or migrate, WordPress. You can do it with GoDaddy, but it’s a more complicated process, and it takes a lot longer.

When it comes to pricing, though, GoDaddy does have a bit of an edge on Bluehost. GoDaddy’s pricing usually starts at $5.99 per month, while Bluehost usually starts at $2.75 per month.

Want to read our full review? See what else we had to say about Bluehost here

DreamHost – Best Unbeatable Value On a Month-to-Month Hosting Plan

Company logo for DreamHost, one of our best GoDaddy alternatives

DreamHost is a hosting provider that sets itself apart with its affordable starting rates and month-to-month hosting plans. 

Most hosting plans are billed annually, but DreamHost users have a lot more flexibility with monthly billing and subscriptions. This can be great for anyone who’s just starting a business or a blog and wants to change their name or rebrand a few months in.

Like the other hosting providers mentioned on our list, DreamHost has a lot of features included in even the lowest plans, easy integration with WordPress, and great customer support. They also have a super clean, easy-to-use interface and SSL certificates. 

However, it’s important to note that while DreamHost does offer monthly plans, these usually come at a higher price than if you got the same plan billed annually and with fewer features included in your subscription. 

You should also check the small print because often, the advertised rates are promotional and go up to a much higher price after a certain amount of time. (For example, the basic plan monthly plan starts at $4.95 per month but goes up to $7.99 per month after the first month) 

How DreamHost Compares to GoDaddy

DreamHost and GoDaddy are both great for cheaper hosting with a good range of features. 

They’re both simplistic and easy to use, with easy control panels and lots of features even in the basic plans. However, GoDaddy does offer a free web design tool, while DreamHost’s builder is paid. 

Screenshot of DreamHost web hosting landing page
DreamHost has free migrations for WordPress sites.

This makes it a little more complicated for new users to get started with DreamHost over GoDaddy. And, when it comes to customer support, GoDaddy offers 24/7 care, while DreamHost doesn’t. 

However, when it comes to performance, DreamHost is a lot faster than GoDaddy, with high site speeds, slightly better uptime, and faster response times. Plus, DreamHost has much better security included with every plan that GoDaddy does, and it has easier migration options for WordPress. 

GoDaddy’s pricing usually starts at $5.99 per month, while DreamHost starts at just $2.95 per month.

Want to read our full review? See what else we had to say about DreamHost here

HostGator – Best for Simple Websites

Company logo for HostGator, one of our best GoDaddy alternatives

Like most of the other hosting providers on this list, HostGator offers super affordable hosting with a range of plans to choose from. 

Unlike other providers on this list, though, HostGator focuses on keeping things simple and tailored to each user’s specific needs. You can choose a plan based on what you want your website to achieve, not just on the range of features, for instance. All its plans include a free domain, and you can choose plans that help you design a website or ones that are designed specifically for WordPress. 

Hostinger also excels in giving users a great experience, with a simple, easy-to-use drag-and-drop builder for designing a site, easy one-click integrations, and 24/7 support that includes both in-person calls and live chat. And they offer free site transfers, which can be complicated and expensive with some other providers. 

Their lowest plan of shared Hosting starts at $2.75 per month, while their WordPress hosting starts at $5.99 per month. Like the other providers mentioned on our list, these prices change after a certain amount of time and usually go up after the first year. 

How HostGator Compares to GoDaddy

While both HostGator and GoDaddy focus on making hosting easy for users, they both have strengths in different areas. 

Screenshot of HostGator web hosting landing page
Get a free domain for one year with HostGator.

GoDaddy comes out on top when it comes to features. They have better website building and design features, more options for hosting and domain registration, a bigger dashboard for growing a site, and non-hosting features like a free Microsoft 365 subscription. 

On the other hand, when it comes to performance and support, HostGator slightly outperformed GoDaddy. It has a higher site speed and uptime (though not by much), a better customer support system, and faster WordPress install times. 

GoDaddy’s pricing usually starts at $5.99 per month, while HostGator starts at just $2.75 per month

Want to read our full review? See what else we had to say about HostGator here

GreenGeeks – Best Eco-Friendly Hosting

Company logo for GreenGeeks, one of our best GoDaddy alternatives

GreenGeeks is a hosting provider with a twist. They offer the same features as most of the other providers on this list, like 24/7 support, one-click WordPress install, and a free SSL certificate, but they only use renewable energy to power their hosting services, making them an environmentally conscious provider.

They still have fast hosting, fast performance, and integration options, but each plan also comes with a 300% Green Energy Match, and for every higher-priced pan purchased, a tree gets planted. 

Another great thing about GreenGeeks is the automatic daily backups. Many hosting providers don’t have this, or they charge this as an extra at a premium price. This is useful for newer users or website owners who do a lot of editing and updates. 

And GreenGeeks has one of the highest performance speeds, despite powering their servers on renewable energy. They use really up-to-date technology like PHP7, SSD, and CDN, making them a great option for people who care about the environment but also want their sites to load fast. 

Their pricing for the basic plan is a little more expensive at $10.95 per month, but most of the time, they offer a discount that can bring the price as low as $2.95 per month. 

How GreenGeeks Compares to GoDaddy

One obvious difference between the two hosting providers is that GreenGeeks is more environmentally friendly than GoDaddy. 

Screenshot of GreenGeeks web hosting landing page
GreenGeeks’s Pro hosting plan includes on-demand site backups.

Both providers are pretty similar when it comes to performance, with similar uptime speeds and equally good security. GreenGeeks has slightly faster site and loading speeds. 

Both have good features, but GreenGeeks offers a few more essentials with their basic plan than GoDaddy, and they have much better and more responsive support. 

GoDaddy’s pricing usually starts at $5.99 per month, while GreenGeeks usually starts at $10.95 per month

SiteGround – Best WordPress Certified Host For Speed and Security

Company logo for SiteGround, one of our best GoDaddy alternatives

SiteGround is a well-known hosting provider that is similar to a lot of others on this list—except when it comes to speed and security. 

SiteGround’s USP is that they use built-in security and speed optimizations for ultra-fast performance and low latency rates. They use SSD persistent data storage and Google cloud to help keep their hosting ultra-fast and minimize any lagging or caches for their users. And they run server health checks and attack blocks constantly in the background, which makes them one of the safest hosting providers on the market. 

Interestingly, they also offer a renewable energy match, like GreenGeeks, making them another good choice for environmentally conscious users. And on top of that, SiteGround includes all the basic features a user could want, like an SSL certificate, storage, free email services, and a domain. 

The pricing is quite high when there are no sales on, with the lowest plan starting at $14.99 per month. However, like most hosting providers on this list, they do run frequent discounts and right now, you can get started for just $2.99 per month.

How SiteGround Compares to GoDaddy

It’s a little harder to compare the two providers like for like, as they are designed for different users.

Screenshot of SiteGround webpage with headline that says, "Take Advantage of The Online To Boost Your Offline Business"
The GoGeek plan comes with extra resources and priority support.

SiteGround is designed for bigger operations and larger sites, so it outperforms GoDaddy when it comes to things like site speed, uptime, and loading times. Siteground also has better customer and technical support and a bigger range of features with its basic plan. 

However, GoDaddy is more convenient, easier to use, and comes with easier tools for newer users, like a web builder and email management. GoDaddy is also a lot cheaper than Siteground, making it a better choice for new users or smaller businesses. 

GoDaddy’s pricing usually starts at $5.99 per month, while SiteGround usually starts at $2.99 per month.

Want to read our full review? See what else we had to say about SiteGround here

A2 Hosting – Fast and Reliable Shared Hosting

Company logo for A2 Hosting, one of our best GoDaddy alternatives

A2 Hosting is a hosting provider that relies on shared Hosting to provide users with super fast loading times and low prices. 

With shared Hosting, where performance is based on a maximum number of users per server, A2 Hosting claims to be able to offer users loading speeds of up to 20x the normal rate, meaning they have better chances of getting ranked through SEO and less chance of people bouncing from their site. 

As well as having great speed and low prices to reflect the shared plans, A2 Hosting has great customer service that includes 24/7 support and free help with migrating websites. 

A2 Hosting also offers a 99.9% uptime commitment and promises users high levels of security with dual hosting firewalls and reinforced DDoS protection. Users can also access all the features they need, like SSL certificates, drag-and-drop builders, and different storage options. 

When not on promotion, the lowest hosting plan starts at $10.99/ month. 

How A2 Compares to GoDaddy

Although both are great hosting providers for different reasons, A2 is definitely a better choice when it comes to speed and performance. 

Screenshot of A2 Hosting webpage for shared web hosting, WordPress hosting, and VPS web hosting
Get a Free year of rapid SSL with purchase of a one-year plan.

With better uptime, site speed and loading speeds, and much better security, A2 is a better option for any businesses that use e-commerce and need speed, stability, and secure payment.

They both have similar customer support and a good range of features. GoDaddy comes out a little on top when it comes to extra features like a website builder and an all-in-one website management dashboard. 

GoDaddy’s pricing usually starts at $5.99 per month, while A2 usually starts at $2.99 per month

Want to read our full review? See what else we had to say about A2 here

InMotion Hosting – Best VPS Hosting

Company logo for InMotion Hosting, one of our best GoDaddy alternatives

InMotion Hosting is the best choice for anyone looking for Virtual Private Server Hosting. 

Every plan comes with a resource monitoring dashboard, which gives users a visual breakdown of their server’s RAM, disk bandwidth, and load usage. All plans also come with free website transfers, SSH & DDoS Protection, and server snapshots that back up previous versions of your server. 

InMotion is a great option for anyone looking for more speed or control over their hosting, promising a 20x faster NVMe SSDs & Cpanel. But for those newer to VPS hosting, they also have a huge library of resources and 24/7 support. 

While VPS hosting is definitely a lot more complicated than using a different provider, InMotion makes it easy to get started, and they’re a great option for ecommerce users because they can ride over any traffic spikes and have super high levels of security. 

The lowest plan, when not on sale, starts at $59.99 per month and comes with 2TB of bandwidth, 4GB RAM, and 2vCPU cores. 

How InMotion Compares to GoDaddy

The most obvious difference between InMotion and GoDaddy is that GoDaddy offers website hosting while InMotion offers VPS. 

Screenshot of InMotion pricing plan webpage for shared hosting, WordPress hosting, VPS hosting, and dedicated hosting
Three of the four InMotion hosting plans come with a free domain and unlimited websites.

This made it a little harder to compare the two, but one place where InMotion easily came out on top was customer support. The agents are highly knowledgeable, and the support is fast and responsive. InMotion also offers better security than GoDaddy. 

But GoDaddy definitely wins when it comes to ease of use. InMotion, because it offers VPS hosting, is a lot more complicated, has a less user-friendly dashboard, and costs a lot more than GoDaddy. 

GoDaddy’s pricing usually starts at $5.99 per month, while the lowest InMotion plan for shared hosting usually starts at $2.99 per month.

Want to read our full review? See what else we had to say about InMotion here

WP Engine – Best Managed WordPress Hosting

Company logo for WP Engine, one of our best GoDaddy alternatives

WP Engine is a hosting provider specifically designed to support WordPress users.

This means it has a ton of features specifically designed for WordPress, and users can access features and themes for free that they would have to pay a lot of money for separately. 

WP Engine is super easy to set up and optimize for WordPress sites like blogs, and it’s also great for WordPress stores and WooCommerce. Because it’s only for WordPress users, WP Engine has almost unbeatable site speed and loading speed, and things like updates and maintenance are fast and frequent. 

You also get access to daily backups, 24/7 phone support, and free SSL and SSH with every plan. 

The downside, though, is that it costs a lot more than other hosting providers, thanks to the speed and the extra features. The cheapest plan starts at $23 per month, so this is only really a good choice for WordPress users who need lots of speed and automation. 

How WP Engine Compares to GoDaddy

It’s no surprise that when comparing the WordPress features between the two, WP Engine won. 

Screenshot of WP Engine webpage with headline that says, "Power your website on the #1 hosting platform for WordPress"
Get four months free with an annual subscription.

When it comes to speed, WP Engine outperformed GoDaddy on both uptime and loading and site speeds. WP Engine also has a lot more WordPress features and offers more security options, more functionality, and extra add-ons like the Genesis theme or Studio Press. 

WP Engine also has better customer support with a live 24/7 chat box and better security for users than GoDaddy. For WordPress users, WP Engine makes the most sense, but when it comes to smaller users, the price is a big factor, especially as you can install and use WordPress, albeit with fewer features, through GoDaddy. 

WP Engine has better features and functionality, but it is a lot more expensive than GoDaddy.

GoDaddy’s pricing usually starts at $5.99 per month, while WP Engine managed WordPress hosting starts at $20 per month

Want to read our full review? See what else we had to say about WP Engine here

Nexcess – Best for Ecommerce Hosting

Company logo for Nexcess, one of our best GoDaddy alternatives

Nexcess is a hosting provider that offers managed ecommerce hosting with platforms like Magento, WooCommerce, and WordPress. 

With their hosting, Nexcess basically takes the learning curve out of ecommerce hosting with features like performance testing, advanced caching, and nightly backups.

They also have built-in performance tools that improve both the speed and security of your site, including firewalls, malware detection, and integrated CDN. 

One of the key features of Nexcess is that because it focuses on ecommerce, and therefore payment and high traffic volume, it has built-in features to support this on your website. They provide cloud auto-scaling to avoid traffic surges, and advance security like daily malware runs and backups. 

Their different plans change depending on which platform you need managed hosting for. Their WordPress hosting starts at $9.50 a month, while their Magento plan starts all the way up at $29.50 a month. 

How Nexcess Compares to GoDaddy

Both providers are obviously different in the fact that GoDaddy caters more to smaller websites, and Nexcess caters more to eCommerce sites. 

Screenshot of Nexcess webpage with headline that says, "With Fully Managed WordPress from Nexcess, Better is Built-in"
Get developer tools and daily backups with Nexcess’s managed WordPress hosting.

If you’re an online store, then Nexcess will be a better option, with better security, more of a range of features, and better integrations. When it comes to site speed, Nexcess was also a tiny bit faster with better loading times, better features for overcoming traffic surges, and more reliable uptime. 

For a smaller business or sites, though, the pricing for Nexcess managed hosting might be too expensive, and the features won’t be relevant to you. For users who need a simple website that’s easy to use with responsive customer service, GoDaddy, and its pricing, make a lot more sense. GoDaddy’s pricing usually starts at $5.99 per month, while Nexcess usually starts at $19 per month

Fixing Obscure Bugs: Apache, GZip, ETags, and Edge Compute

I was recently introduced to an obscure performance bug with Apache’s GZip module and a clever solution using EdgeWorkers. So, I made a video and a small blog post to cover it.

One thing I love about my job is when I get to work with people that are way smarter than me at things that I never had the interest in or the opportunity of working on.

PublishPress Acquires MetaSlider Plugin and MetaSlider Lightbox

PublishPress, a company that develops free and commercial publishing and permissions plugins for WordPress, has acquired MetaSlider from Extendify. The plugin is used on more than 700,000 sites to build sliders, slideshows, carousels, and galleries. The company’s mission is to help publishers succeed, so this is a curious acquisition as sliders seem to have fallen out of favor on the web over the past seven years, due to problems with SEO, performance, and poor engagement.

“A traditional slider isn’t a good fit for a news website for a couple of reasons,” PublishPress founder Steve Burge said. “First, publishers want a display that they can update easily. Second, they can be worried about the performance slowdown from a slider.

“We aim to tackle those problems head-on. To solve the first issue, we plan to expand dynamic content features of MetaSlider so you can easily pull in fresh content. And secondly, we’ll focus on the speed of MetaSlider, so you don’t have to worry about a slow site.”

Burge said PublishPress will use MetaSlider as a platform for building a suite of image tools. As part of the sale, the company has also acquired MetaSlider Lightbox, which has 10,000 active installs, and a photo gallery that’s in a beta version.

“There will be more [tools] to come,” Burge said. “Most of my favorite publishers also have beautiful photography with their stories. From big WordPress publishers such as Outside Magazine to small start-ups such as TheNarwhal, the photos often add as much as the text. We hope to build tools to help publishers showcase their images.”

Burge said the sale of MetaSlider started with a Twitter DM. He had never spoken with the Extendify team before but said the process was “quick and easy” because all the data was “clean and professionally organized.”

“The MetaSlider plugin is almost 10 years old, and in the last few years it was maintained by a couple of companies,” Burge said. “It was previously owned by the team behind UpdraftPlus and WP-Optimize. You can still see similarities in the orange color scheme between MetaSlider, UpdraftPlus, and WP-Optimize.” 

Extendify took on the plugin as a side project but it was never a core product for their company.

“They were excited about our desire to invest in MetaSlider to ensure that it remains a great plugin for WordPress users,” Burge said. “After some recent high-profile handovers went badly, we’ve seen sellers do careful due diligence on who they sell to.”

Burge could not share any financial details of the acquisition but said the sale price was based strictly on revenue even though the MetaSlider plugin has nearly a million users.

“In most sales, the number of active installs is a bonus rather than a driving factor,” Burge said. “It’s not uncommon, particularly for older plugins, for 1% or less of active installs to convert to paying customers.”

MetaSlider has a Pro version that PublishPress will continue sell and the plugins will remain as a standalone brand focused on images. They will not be included in the PublishPress plugin bundle. Burge said users can expect MetaSlider to continue at the same price but with more features.

“The business model won’t change and the Pro version will support future development on the plugin,” he said. “At the moment, there’s only a single Pro version based on the number of sites. That won’t change in at least the next few months as we focus on adding more features and giving users more value for their money.”

Strategies for Governing Data Quality, Accuracy, and Consistency

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

For more:


Read the Report

Introduction

In 2006, mathematician and entrepreneur Clive Humby coined the phrase, "Data is the new oil." The primary point of this comparison is to highlight that, while extremely useful, data must be extracted, processed, and refined before its full value can be realized. Now over fifteen years later, it is easier than ever to accumulate data, but many businesses still face challenges ensuring that the data captured is both complete and correct.

Mobile Database Essentials

Relational, NoSQL, cloud-based, embedded, multi-model — the database options are endless. When selecting the right database, it is important to explore essential components like local data storage, synchronization, security, and more. In this Refcard, assess critical data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

How to Continuously Locate a Device in the Background

Nowadays, apps use device locations to provide a wide variety of services. You may want to see a user's location to show services around them, learn the habits of users in different areas, or perform location-based actions, like a ride-hailing app calculating travel distance and trip fare.

In order to protect user privacy, however, most apps request device location only when they run in the foreground. Once switched to the background, or even with the device screen turned off, apps are usually not allowed to request device location. As a result, they cannot record the GPS track of a device, which negatively affects the user experience of core functions of many apps, such as ride-hailing, trip-sharing, and exercise, all of which need to track location in real time.

The Benefits of Containerization

As a recent technology, containers have emerged as a tool to help your business become more agile in your software development lifecycle. Containers have many benefits that can give you a competitive advantage compared with more traditional software delivery methods.

In this post, I explain what containers are, share the key benefits of containers for software development, and discuss why you might consider adding them to your DevOps processes.

Accelerate Cloud-Native Applications With NVMe

Cloud-native applications have different storage needs from legacy applications or traditional software that’s hosted in the cloud. To work effectively, they require high-performing and low-latency storage. In practice, the recommendation is to use local NVMe® flash, regardless of the orchestration platform. 

A cloud-native application is a software designed to run on a private or public cloud. It is built to leverage the innate capabilities of the cloud computing software delivery model. Often these applications are deployed as virtual machines (VMs) managed by OpenStack, VMware vSphere®, or containers managed by Kubernetes. 

Salesforce Alternatives and Competitors

Our selection for the best Salesforce alternative is HubSpot, as it can successfully fulfill a variety of needs related to CRM (customer relationship management), all at a great price. Click here to try HubSpot for free.

Salesforce is a highly popular CRM package, as more than 150,000 businesses rely on it. The Salesforce suite has an extensive collection of services from which you can select. It tailors its services to match the needs of businesses operating in particular segments, while also offering solutions for each individual department in the business.

Popularity alone doesn’t make Salesforce perfect for everyone, though. Our Quicksprout research team studies the CRM software market extensively, and we compiled our recommendations for several of the best solutions, many of which will work as alternatives to Salesforce.

The 9 Best CRM Software Solutions

Our research shows that HubSpot is the best alternative to Salesforce. It delivers a highly competitive price point while fulfilling a variety of needs that businesses have related to CRM. To see our full list of the best CRM software options, head right over here

  • HubSpot – Best for Varying CRM Needs 
  • Salesflare – Best for Prospect Management
  • Zoho CRM – Best for a Customizable CRM
  • Freshsales – Best for Managing Sales Leads
  • Insightly – Best for Project Management Features
  • Apptivo – Best for Adding Services As You Need Them
  • Pipedrive – Best for Simplifying the Sales Process
  • EngageBay – Best for Automating Customer Service Tasks
  • Salesforce – Best for Integrating Multiple Services 
Company logos for our best Salesforce alternatives and competitors

HubSpot – Best for Varying CRM Needs

Company logo for HubSpot, one of our best Salesforce alternatives

Our favorite aspect of HubSpot is how it delivers a wide range of services for those businesses that need CRM features. Its features are especially impressive considering it is available at a low price, including one tier that remains free to use forever.

When compared to other free CRM software options, HubSpot has an almost hard-to-believe list of features. It is a highly comprehensive free CRM software package, which is great for a small business that needs to begin deploying CRM services.

Should your business need to make an upgrade from HubSpot’s free tier to a paid tier, this is an easy process. Once you begin using a subscription tier in HubSpot, you gain access to a whole set of new, powerful features aimed at meeting the needs of businesses of varying sizes and in a wide range of industries. 

How HubSpot Compares to Salesforce

Both HubSpot and Salesforce are highly popular CRM packages with very recognizable brand names. Both offer a high level of variability in the services they provide, making them usable for many different businesses.

Screenshot of HubSpot sales pipeline dashboard
HubSpot delivers impressive versatility for those who need CRM.

Salesforce offers more customization features than are found with HubSpot. However, this ability to tweak Salesforce to meet certain requirements of your business does add some complexity to using Salesforce.

Pricing is one area where HubSpot has a significant advantage over Salesforce. Beyond its powerful free tier, HubSpot’s subscription tiers also have better price points than typically what you find with Salesforce.

Our HubSpot review highlights the methodology that led to us ranking HubSpot as the best choice for businesses that need varying CRM features.

Salesflare – Best for Prospect Management

Company logo for Salesflare, one of our best Salesforce alternatives

Businesses that struggle to manage their sales prospects often struggle to complete sales too. With the Salesflare CRM software in place, though, managing sales prospects – as well as sales leads and actual customers – becomes a far easier process.

Even better, Salesflare automates much of the process of entering data to help you manage your sales prospects. This CRM software package pulls data from email messages, social media posts and profiles, and other publicly accessible areas of the internet. It then populates the software with this information about each prospect, saving time on data entry for your sales team.

Salesflare tracks how your prospects are interacting with your brand and how they are communicating with you as well, giving you additional valuable information. If the prospect visits your website or opens one of your emails, Salesflare tracks it. The software then ranks each prospect’s position along the sales pipeline, giving your sales team the best idea about how to approach the prospect.

How Salesflare Compares to Salesforce

Salesflare may have a similar name to Salesforce, but the two CRM software packages differ quite a bit. Where Salesflare focuses primarily on the sales pipeline and on tracking prospects, Salesforce offers quite a bit more versatility in terms of CRM features.

Screenshot of Salesflare dashboard showing data collection from potential sales leads
Salesflare automates data collection from potential sales leads. 

Salesflare has some ancillary features that match up with what Salesforce offers. However, its extra features don’t offer the depth of Salesforce’s features. On the other hand, Salesforce doesn’t have quite the depth in terms of managing sales prospects that Salesflare provides.

Salesforce has significantly higher price points than what Salesflare offers. Additionally, Salesforce carries a bit more complexity than Salesflare does.

Zoho CRM – Best for a Customizable CRM

Company logo for Zoho CRM, one of our best Salesforce alternatives

When selecting Zoho CRM, you receive a CRM software package that not only delivers the basics, but also offers extensive customization capabilities. This creates something that truly fits the way your business needs its CRM software to work.

Its customization features are especially nice for small businesses that may not have extensive tech support resources available. You can make any desired changes to Zoho CRM relatively easily and without significant technical know-how. 

Zoho CRM works equally well for large enterprises that want an easy-to-use CRM software package. You will find tools in Zoho CRM related to managing sales leads, projects, and marketing. It also helps with managing your customer service processes more effectively, which is important for any business in any industry.

How Zoho CRM Compares to Salesforce

During our research, we found that Zoho CRM doesn’t quite offer the level of advanced features that you receive with Salesforce. However, for smaller organizations, Zoho CRM is easier to start using successfully on day one than Salesforce.

Screenshot of Zoho CRM dashboard showing graphs of potential sales leads and potentials probability
Zoho CRM delivers the basics successfully, but it is also highly customizable.

Both Zoho CRM and Salesforce boast large customer bases of well over 150,000 users. However, we like the price point found with Zoho CRM versus the cost of Salesforce, especially for small businesses.

As our Zoho CRM review points out, we like the way Zoho strikes a helpful balance between basic features that are easy to begin using immediately and customizable options that give you the functionality you need.

Freshsales – Best for Managing Sales Leads

Company logo for Freshworks, one of our best Salesforce alternatives

Freshsales is a great CRM software option for your business when you need to improve the way you manage your sales leads and prospects. As an added benefit, Freshsales has desirable price points, especially when you are willing to agree to an annual contract. It also has an impressive 21-day free trial period.

Many small and medium-sized businesses may not have significant tech resources to throw at a CRM software package that requires extensive setup and training time. But you’ll be up and running quickly with Freshsales, and its easy-to-use features make managing your sales leads quite a bit simpler than with some other packages.

To aid in managing your sales leads, Freshsales provides alerts about contract renewals and other important dates coming up for your clients. The Freshsales dashboard interface contains the most relevant information for managing your sales leads, ensuring your salespeople are focusing on the right things.

Once a sales lead converts to a client, Freshsales moves all the relevant data into the client contact, including links to profiles on social media.

How Freshsales Compares to Salesforce

Salesforce offers a greater depth in its features than what you’ll find with Freshsales. However, our research shows that Freshsales is quite a bit easier to use with very little training time required.

Screenshot of Freshsales dashboard showing sales lead contact information
Freshsales simplifies the process of finding and managing sales leads.

Both Freshsales and Salesforce offer operations in dozens of languages other than English, which can be helpful for a business that sells around the globe.

Freshsales delivers a more advantageous price point than Salesforce, which can be helpful for those businesses that qualify as SMBs, as they may not have huge budgets for CRM software.

Insightly – Best for Project Management Features

Company logo for Insightly, one of our best Salesforce alternatives

Like most CRM packages, Insightly has a host of sales and marketing features, helping you manage customers and sales leads. However, Insightly sets itself apart from competitors by focusing on project management too.

Having a task and project tracking capability within Insightly is helpful for team members who need to be able to communicate about progress on a project. Insightly also allows you to specify tasks that have relationships to each other, keeping your team on top of everything it needs to do to move tasks forward.

Consequently, Insightly probably works best for SMBs who may not want the hassle of running a separate project tracking software package. For those businesses, it becomes easier to manage sales, marketing, and projects within a single software package like Insightly versus using separate packages.

How Insightly Compares to Salesforce

For enterprise-level users who need extensive features and significant customization options, Salesforce is going to be a better choice than Insightly. However, Insightly is far easier to use than Salesforce for those who want to be up and running quickly.

Screenshot of Insightly opportunities dashboard
Teams that need project management features will appreciate Insightly.

Both Insightly and Salesforce have a really useful mobile app. Through the app, team members can have the information they need to manage sales leads and other aspects of customer relationships with them at all times.

Insightly is one of the cheapest CRM packages around, making it far more budget-friendly than Salesforce. It even has a really useful free tier, but this tier only works for one or two users.

Apptivo – Best for Adding Services As You Need Them

Company logo for Apptivo, one of our best Salesforce alternatives

The Apptivo CRM software is a popular selection on its own. But its greatest level of strength lies in the ability to incorporate multiple apps into it. These apps bring services related to customer management into the Apptivo dashboard, giving you one interface from which to operate everything.

Rather than using standalone software for things like online invoicing, expense reports, supply chain management, and other features, Apptivo uses apps to obtain access to these features.

Additionally, Apptivo is able to easily incorporate other types of standalone apps, such as Slack or Office 365. When your CRM software plays nice with all the other apps and software you are already using, your organization and sales team can increase productivity in a hurry.

How Apptivo Compares to Salesforce

The ability to incorporate multiple apps to gain extra features gives both Salesforce and Apptivo some similarities. Salesforce has more apps available than Apptivo, but both pieces of software do a good job of incorporating apps.

Screenshot of Apptivo sales leads dashboard
Apptivo relies on multiple apps to  simplify delivering its various features.

Apptivo’s biggest advantage over Salesforce is its pricing. Apptivo is far less expensive than Salesforce, making it more affordable for an SMB. 

Apptivo also has fewer complexities than Salesforce, which shortens the time required to learn how to use it successfully. Apptivo does provide the ability to customize the various apps that it uses, which gives you some advanced features that come closer to what’s available in Salesforce.

Pipedrive – Best for Simplifying the Sales Process

Company logo for Pipedrive, one of our best Salesforce alternatives

If you find that your sales team is losing prospects and sales because your CRM software is too complicated, Pipedrive is the answer. Pipedrive incorporates nearly every aspect of the sales process into a single software package. This interface ensures that no key information falls through the cracks, which could lead to missed sales opportunities.

Not only does Pipedrive save time with information management, but it also eliminates tasks that waste time. When your team members have more time to spend speaking to clients, while spending less time trying to manage the CRM software package, they are going to improve their closing rates.

The easy-to-use interface found with Pipedrive further shortens the amount of time sales team members must spend entering data. Yet, Pipedrive delivers the information team members need in a timely manner.

How Pipedrive Compares to Salesforce

Salesforce and Pipedrive have comparable price points, although you save a bit with Pipedrive in this comparison when you agree to an annual contract. 

Screenshot of Pipedrive sales leads dashboard
Pipedrive provides an easy-to-learn interface for making use of CRM.

When you would like a CRM software tool that makes the process of managing your sales simpler, Pipedrive outperforms Salesforce. The Salesforce CRM has far more high-end features built into it than Pipedrive, so Salesforce may work better for an enterprise-level sales team.

Where Salesforce provides a number of add-ons and apps that deliver extra features beyond sales lead management, Pipedrive focuses on sales almost exclusively. This singular focus can be a significant benefit if your company doesn’t need all the extras available with Salesforce.

EngageBay – Best for Automating Customer Service Tasks

Company logo for EngageBay, one of our best Salesforce alternatives

When your sales team and customer service team find themselves bogged down with data entry and busy work, the EngageBay CRM software tool can help. EngageBay focuses on organizing the data your sales team needs, while also collecting quite a bit of the data using automated processes.

If you work in an industry where the sales team and the customer service team need to work in tandem, EngageBay simplifies this process. After the sale, you may need to continue interacting with your clients using strong customer service techniques. EngageBay works well for this type of business.

Administrators can set up triggers that cause automated responses. When a salesperson completes one task with a potential client, for example, EngageBay can move the contact along the pipeline, triggering tasks and assignments for other team members. It also automates aspects of managing the customer service process, keeping clients engaged.

How EngageBay Compares to Salesforce

Salesforce has a far larger customer base than EngageBay, so some businesses may trust the Salesforce brand name more than they trust EngageBay.

Screenshot of EngageBay contacts dashboard
When you need better organization, the EngageBay CRM focuses on this area.

However, EngageBay outdoes Salesforce in terms of the price points it offers. You could choose to use the fully free tier with EngageBay if you are a small business or if you have a small sales and customer service team. (However, you need to use the mid-range paid tier to make use of EngageBay’s automation tools.)

Salesforce can provide strong customer service management tools, similar to EngageBay. However, you probably need to access one of Salesforce’s apps to gain the same features as EngageBay in this area.

How I Made an Icon System Out of CSS Custom Properties

SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover and you can even animate the icons with CSS or JavaScript.

There are many ways to include an SVG on a page and each technique has its own advantages and disadvantages. For the last couple of years, I have been using a Sass function to import directly my icons in my CSS and avoid having to mess up my HTML markup.

I have a Sass list with all the source codes of my icons. Each icon is then encoded into a data URI with a Sass function and stored in a custom property on the root of the page.

TL;DR

What I have for you here is a Sass function that creates a SVG icon library directly in your CSS.

The SVG source code is compiled with the Sass function that encodes them in data URI and then stores the icons in CSS custom properties. You can then use any icon anywhere in your CSS like as if it was an external image.

This is an example pulled straight from the code of my personal site:

.c-filters__summary h2:after {
  content: var(--svg-down-arrow);
  position: relative;
  top: 2px;
  margin-left: auto;
  animation: closeSummary .25s ease-out;
}

Demo

Sass structure

/* All the icons source codes */
$svg-icons: (
  burger: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0...'
);

/* Sass function to encode the icons */
@function svg($name) {
  @return url('data:image/svg+xml, #{$encodedSVG} ');
}

/* Store each icon into a custom property */
:root {
  @each $name, $code in $svg-icons {
    --svg-#{$name}: #{svg($name)};
  }
}

/* Append a burger icon in my button */
.menu::after {
  content: var(--svg-burger);
}		

This technique has both pros and cons, so please take them into account before implementing this solution on your project:

Pros

  • There are no HTTP requests for the SVG files.
  • All of the icons are stored in one place.
  • If you need to update an icon, you don’t have to go over each HTML templates file.
  • The icons are cached along with your CSS.
  • You can manually edit the source code of the icons.
  • It does not pollute your HTML by adding extra markup.
  • You can still change the color or some aspect of the icon with CSS.

Cons

  • You cannot animate or update a specific part of the SVG with CSS.
  • The more icons you have, the heavier your CSS compiled file will be.

I mostly use this technique for icons rather than logos or illustrations. An encoded SVG is always going to be heavier than its original file, so I still load my complex SVG with an external file either with an <img> tag or in my CSS with url(path/to/file.svg).

Encoding SVG into data URI

Encoding your SVG as data URIs is not new. In fact Chris Coyier wrote a post about it over 10 years ago to explain how to use this technique and why you should (or should not) use it.

There are two ways to use an SVG in your CSS with data URI:

  • As an external image (using background-image,border-image,list-style-image,…)
  • As the content of a pseudo element (e.g. ::before or ::after)

Here is a basic example showing how you how to use those two methods:

The main issue with this particular implementation is that you have to convert the SVG manually every time you need a new icon and it is not really pleasant to have this long string of unreadable code in your CSS.

This is where Sass comes to the rescue!

Using a Sass function

By using Sass, we can make our life simpler by copying the source code of our SVG directly in our codebase, letting Sass encode them properly to avoid any browser error.

This solution is mostly inspired by an existing function developed by Threespot Media and available in their repository.

Here are the four steps of this technique:

  • Create a variable with all your SVG icons listed.
  • List all the characters that needs to be skipped for a data URI.
  • Implement a function to encode the SVGs to a data URI format.
  • Use your function in your code.

1. Icons list

/**
* Add all the icons of your project in this Sass list
*/
$svg-icons: (
  burger: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.8 18.92" width="24.8" height="18.92"><path d="M23.8,9.46H1m22.8,8.46H1M23.8,1H1" fill="none" stroke="#000" stroke-linecap="round" stroke-width="2"/></svg>'
);

2. List of escaped characters

/**
* Characters to escape from SVGs
* This list allows you to have inline CSS in your SVG code as well
*/
$fs-escape-chars: (
  ' ': '%20',
  '\'': '%22',
  '"': '%27',
  '#': '%23',
  '/': '%2F',
  ':': '%3A',
  '(': '%28',
  ')': '%29',
  '%': '%25',
  '<': '%3C',
  '>': '%3E',
  '\\': '%5C',
  '^': '%5E',
  '{': '%7B',
  '|': '%7C',
  '}': '%7D',
);

3. Encode function

/**
* You can call this function by using `svg(nameOfTheSVG)`
*/
@function svg($name) {
  // Check if icon exists
  @if not map-has-key($svg-icons, $name) {
    @error 'icon “#{$name}” does not exists in $svg-icons map';
    @return false;
  }

  // Get icon data
  $icon-map: map-get($svg-icons, $name);

  $escaped-string: '';
  $unquote-icon: unquote($icon-map);
  // Loop through each character in string
  @for $i from 1 through str-length($unquote-icon) {
    $char: str-slice($unquote-icon, $i, $i);

    // Check if character is in symbol map
    $char-lookup: map-get($fs-escape-chars, $char);

    // If it is, use escaped version
    @if $char-lookup != null {
        $char: $char-lookup;
    }

    // Append character to escaped string
    $escaped-string: $escaped-string + $char;
  }

  // Return inline SVG data
  @return url('data:image/svg+xml, #{$escaped-string} ');
}		

4. Add an SVG in your page

button {
  &::after {
    /* Import inline SVG */
    content: svg(burger);
  }
}

If you have followed those steps, Sass should compile your code properly and output the following:

button::after {
  content: url("data:image/svg+xml, %3Csvg%20xmlns=%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox=%270%200%2024.8%2018.92%27%20width=%2724.8%27%20height=%2718.92%27%3E%3Cpath%20d=%27M23.8,9.46H1m22.8,8.46H1M23.8,1H1%27%20fill=%27none%27%20stroke=%27%23000%27%20stroke-linecap=%27round%27%20stroke-width=%272%27%2F%3E%3C%2Fsvg%3E ");
}		

Custom properties

The now-implemented Sass svg() function works great. But its biggest flaw is that an icon that is needed in multiple places in your code will be duplicated and could increase your compiled CSS file weight by a lot!

To avoid this, we can store all our icons into CSS variables and use a reference to the variable instead of outputting the encoded URI every time.

We will keep the same code we had before, but this time we will first output all the icons from the Sass list into the root of our webpage:

/**
  * Convert all icons into custom properties
  * They will be available to any HTML tag since they are attached to the :root
  */

:root {
  @each $name, $code in $svg-icons {
    --svg-#{$name}: #{svg($name)};
  }
}

Now, instead of calling the svg() function every time we need an icon, we have to use the variable that was created with the --svg prefix.

button::after {
  /* Import inline SVG */
  content: var(--svg-burger);
}

Optimizing your SVGs

This technique does not provide any optimization on the source code of the SVG you are using. Make sure that you don’t leave unnecessary code; otherwise they will be encoded as well and will increase your CSS file size.

You can check this great list of tools and information on how to optimize properly your SVG. My favorite tool is Jake Archibald’s SVGOMG — simply drag your file in there and copy the outputted code.

Bonus: Updating the icon on hover

With this technique, we cannot select with CSS specific parts of the SVG. For example, there is no way to change the fill color of the icon when the user hovers the button. But there are a few tricks we can use with CSS to still be able to modify the look of our icon.

For example, if you have a black icon and you want to have it white on hover, you can use the invert() CSS filter. We can also play with the hue-rotate() filter.

That’s it!

I hope you find this little helper function handy in your own projects. Let me know what you think of the approach — I’d be interested to know how you’d make this better or tackle it differently!


How I Made an Icon System Out of CSS Custom Properties originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

How to Set Up Trivy Scanner in GitLab CI: The Complete Guide

Containerization is a modern practice used by software development teams as the DevOps culture continues to grow in popularity. Most of these environments benefit from the rich features provided by containerization, such as scalability, portability, and process isolation.

However, it is essential to consider "how secure" a software is before shipping it to your clients. When creating container images as your releases, the heavy use of third-party and outdated libraries means you risk introducing added vulnerabilities to the images you ship. As such, there is a need for a reliable way of scanning container images. This is where Trivy comes in handy.

Data Migration from AWS DocumentDB to Atlas on AWS

AWS Database Migration Service (DMS) provides heterogeneous migrations between different database platforms. The source database remains fully operational during the migration, minimizing downtime to applications that rely on the database. Currently, DMS can use AWS DocumentDB as a database source or target; however, DMS only supports MongoDB as a source endpoint for data replication

Following are the steps to replicate data from DocumentDB to Atlas using the DMS. Please be aware that the twisted configuration may not be supported by AWS.

Using Hazelcast in Spring Boot Running on Kubernetes

Whereas Kubernetes is the target environment of application execution, you will not find here how to declare required services or deployment most optimally. Some basic Kubernetes configurations are just enough for demonstration purposes. Though, you can use the configurations as a starting point and improve them with the help of Kubernetes Documentation.

The theme of Spring's Caching is not fully covered either. So, if you are interested in Cache Abstractions, please refer to the corresponding part of Spring Framework documentation.

Things I Wish I Had Known About Angular When I Started

I’ve been using Angular since version 2, and it has come a long way since those days to what it is right now. I’ve worked on various Angular projects over the years, yet I keep finding new things. It goes to say how massive the framework is. Here are some things I wish I had known about Angular when I started so you don’t have to learn it the hard way.

Modularize Your Application

Angular has detailed documentation outlining the recommended approach to structure your application. Angular also provides a CLI to help scaffold your application that adheres to their recommendations.

I’ve had my fair share of mistakes when it comes to structuring the application. As you follow tutorials, you’re guided through where you should put your files and which modules the components or services belong to. However, when you venture beyond the tutorial, you sometimes end up with a structure that doesn’t scale well. This could lead to issues down the road.

Below are some mistakes I’ve made that came back and bit me.

Split Your Components Into Modules

The release of Standalone Components in Angular 14 makes NgModules no longer a requirement when creating components. You can choose not to use modules for your components, directives, and pipes. However, you could still follow the folder structure outlined below, omitting the module files.

Initially, I put all the components into the default module you get when creating a new Angular app. As the application grew, I ended up with a lot of components in the same module. They were separate components and didn’t have any need to be in the same module.

Split your components into separate modules, so you can import and load only the required modules. The common approach is to divide your application into the following modules:

  • Core module for singleton services and components that are used once at the app level (example: navigation bar and footer).
  • Feature modules for each feature — code related to the specific functionality of your application. For example, a simple e-commerce application could have a feature module for products, carts, and orders.
  • Shared module for the module that is referenced across different parts of the application. These can include components, directives, and pipes.

Dividing the application into separate modules helps partition your application into smaller, more focused areas. It creates clear boundaries between the different types of modules and each feature module. This separation helps maintain and scale the application as different teams can work on separate parts with a lower risk of breaking another part of the application.

Lazy Load Your Routes

This is a result of my first mistake of putting everything in a single module. Because all the components were in the same module, I couldn’t lazy load the modules. All the modules were imported at the root level, eventually affecting the initial load time. After separating your components into modules, lazy load your routes, so the modules only get loaded when you navigate to the route that requires them.

Single Responsibility

This applies to all types of files in an Angular app. I’ve let my service and component files grow beyond their scope, which made them difficult to work with. The general rule is to keep each component/service/pipe/directive performing a specific set of tasks. If a component is trying to do more than what it was initially made for, it might be worth refactoring and splitting it into several smaller components. This will make testing and maintenance a lot easier.

Use The Angular CLI

You’ve probably used the ng serve command either directly in your command line or through a script in your package.json file. This is one of Angular CLI’s commands. However, the CLI comes with more handy commands that can speed up your development especially when it comes to initializing and scaffolding.

Initially, I did most of these manually as I didn’t understand how to use the CLI except for starting and stopping the local server. I would create component files manually, add the boilerplate code, and add them to the right modules. This was okay for smaller projects but became a tedious task as the project grew. That’s when I learned how to use the CLI and use it to automate most of the manual work I do. For example, instead of creating all the boilerplate for a card component, the following command will create them for you:

ng g c card

You can use the CLI by installing it globally via npm using the command below:

npm install -g @angular/cli

To view the available commands, execute the code below:

ng help

Most projects have custom configurations that are project-specific, and you have to do some modifications to the code generated by the CLI. Angular provides an elegant solution for these scenarios, such as schematics. A schematic is a template-based code generator — a set of instructions to generate or modify code for your project. Similar to Angular CLI, your custom schematics are packaged and can be installed via npm in whichever project needs it.

Path Aliases And Barrel Exports

As I was learning Angular, I tried to keep my project neat by putting all the services into a services folder, models in a models folder, and so on. However, after some time, I end up with a growing list of import statements like this:

import { UserService } from '../../services/user.service';
import { RolesService } from '../../services/roles.service';

Typescript path alias can help simplify your import statements. To setup path aliases, open your tsconfig.json and add the desired path name and its actual path:

{
 "compilerOptions": {
 "paths": {
 "@services/*": ["src/app/services/*"],
 }
 }
}

Now the import statements above can be re-written as:

import { UserService } from '@services/user.service';
import { RolesService } from '@services/roles.service';

An added benefit of using path aliases is that it allows you to move your files around without having to update your imports. You’d have to update them if you were using relative paths.

This can be further simplified by using barrel exports. Barrels are a handy way to export multiple files from a single folder (think of it as a proxy for your files). Add an index.ts in the services folder with the following contents:

export * from './user.service';
export * from './roles.service';

Now, update the tsconfig.json to point to the index.ts file instead of the asterisk (*).

{
 "compilerOptions": {
 "paths": {
 "@services": ["src/app/services/index.ts"],
 }
 }
}

The import statements can now be further simplified into:

import { UserService, RolesService } from '@services';
Embrace Typescript’s Features

I started by learning JavaScript, so I wasn’t used to the type system and the other features that TypeScript offers. My exposure to TypeScript was through Angular, and it was overwhelming to learn both a new language (although it’s a superset of JavaScript, some differences trip me up every time) and a new framework. I often find TypeScript slowing me down instead of helping me with the development. I avoided using TypeScript features and overused the any type in my project.

However, as I got more acquainted with the framework, I began to understand the benefits of TypeScript when used correctly. TypeScript offers a lot of useful features that improve the overall developer experience and make the code you write cleaner. One of the benefits of using TypeScript that I’ve grown accustomed to is the IntelliSense or autocomplete it provides in your IDE. Their type safety and static type checking have also helped catch potential bugs at compile time that could have snuck in.

The nice thing about TypeScript is its flexible configuration. You can toggle their settings easily via their tsconfig.json as per your project’s needs. You can change these settings again if you decide on a different setting. This allows you to set the rules as loose or strict as you’d like.

Improve Performance By Using trackBy

Performance is crucial for applications, and Angular provides various ways to optimize your applications. This is often a problem that you won’t run into at the beginning as you are probably working with small data sets and a limited number of components. However, as your application grows and the number of components being rendered grows and becomes increasingly complex, you’ll start to notice some performance degradation. These performance degradations are usually in the form of slowness in the app: slow to respond, load, or render and stuttering in the UI.

Identifying the source of these problems is an adventure on its own. I’ve found that most of the performance issues I’ve run into in the applications are UI related (this doesn’t mean that other parts of the application don’t affect performance). This is especially prominent when rendering components in a loop and updating an already rendered component. This usually causes a flash in the component when the components are updated.

Under the hood, when a change occurs in these types of components, Angular needs to remove all the DOM elements associated with the data and re-create them with the updated data. That is a lot of DOM manipulations that are expensive.

A solution I’ve found to fix this issue is to use the trackBy function whenever you’re rendering components using the ngFor directive (especially when you’re frequently updating the rendered components).

The ngFor directive needs to uniquely identify items in the iterable to correctly perform DOM updates when items in the iterable are reordered, new items are added, or existing items are removed. For these scenarios, it is desirable only to update the elements affected by the change to make the updates more efficient. The trackBy function lets you pass in a unique identifier to identify each component generated in the loop, allowing Angular to update only the elements affected by the change.

Let’s look at an example of a regular ngFor that creates a new div for each entry in the users array.

@Component({
 selector: 'my-app',
 template: `
 <div *ngFor="let user of users">
 {{ user.name }}
 </div>
 `,
})

export class App {
 users = [
 {id: 1, name: 'Will'},
 {id: 2, name: 'Mike'},
 {id: 3, name: 'John'},
 ]
}

Keeping most of the code the same, we can help Angular keep track of the items in the template by adding the trackBy function and assigning it to a function that returns the unique identifier for each entry in the array (in our case, the user’s id).

@Component({
 selector: 'my-app',
 template: `
 <div *ngFor="let user of users; trackBy: trackByFn">
 {{ user.name }}
 </div>
 `,
})

export class App {
 users = [
 {id: 1, name: 'Will'},
 {id: 2, name: 'Mike'},
 {id: 3, name: 'John'},
 ]
 trackByFn(index, item) {
 return item.id;
 }
}
Use Pipes For Data Transformations

Data transformations are inevitable as you render data in your templates. My initial approach to this was to:

  • Bind the template to a function that accepts the data as the input:
interface User {
 firstName: string,
 middleName: string,
 lastName: string
}
@Component({
 selector: 'my-app',
 template: `
 <h1>{{ formatDisplayName(user) }}</h1>
 `,
})

export class App {
 user: User = {
 firstName: 'Nick',
 middleName: 'Piberius',
 lastName: 'Wilde'
 }
 formatDisplayName(user: User): string {
 return `${user.firstName} ${user.middleName.substring(0,1)}. ${user.lastName}`; 
 }
}
  • Create a new variable, assign the formatted data to the variable, and bind the new variable in the template:
interface User {
 firstName: string,
 middleName: string,
 lastName: string
}
@Component({
 selector: 'my-app',
 template: `
 <h1>{{ displayName }}</h1>
 `,
})

export class App {
 user: User = {
 firstName: 'Nick',
 middleName: 'Piberius',
 lastName: 'Wilde'
 }
 displayName = `${this.user.firstName} ${this.user.middleName.substring(0,1)}. ${this.user.lastName}`; 
}

Neither approach was clean nor performant and wasn’t what Angular recommends to perform data transformations. For these scenarios, angular recommends using pipes. Pipes are functions specifically designed to be used in templates.

Angular provides built-in pipes for common data transformations such as internationalization, date, currency, decimals, percentage, and upper and lower case strings. In addition, Angular also lets you create custom pipes that can be reused throughout your application.

The data transformation above can be re-written using a pipe as follows:

@Pipe({name: 'displayName'})
export class DisplayNamePipe implements PipeTransform {
 transform(user: User): string {
 return `${user.firstName} ${user.middleName.substring(0,1)}. ${user.lastName}`; 
 }
}

The pipe can then be used in the template by using the pipe (|) character followed by the pipe name.

@Component({
 selector: 'my-app',
 template: `
 <h1>{{ user | displayName }}</h1>
 `,
})

export class App {
 user: User = {
 firstName: 'Nick',
 middleName: 'Piberius',
 lastName: 'Wilde'
 }
}
Improve Performance With OnPush Change Detection

Angular applications are made up of a tree of components that rely on their change detectors to keep the view and their corresponding models in sync. When Angular detects a change in the model, it immediately updates the view by walking down the tree of change detectors to determine if any of them have changed. If the change detector detects the change, it will re-render the component and update the DOM with the latest changes.

There are two change detection strategies provided by Angular:

  • Default
    The change detection cycle runs on every event that occurs inside the component.
  • OnPush
    The change detection cycle only runs when a component’s event handler is triggered, an async pipe is used in the template, a new value is emitted, and when any of the component’s input reference changes.

In addition to the reduced number of change detection cycles and its performance boost, the restrictions imposed by using the OnPush change detection strategy also make you architect your app better by pushing you to create more modular components that utilize one of the three recommended ways mentioned above to update the DOM.

RxJS Is Your Friend

RxJS is a JavaScript library that uses observables for reactive programming. While RxJS isn’t exclusively used in Angular, it plays a big role in the Angular ecosystem. Angular’s core features, such as Routing, HttpClient, and FormControl, leverage observables by default.

RxJS is a part of Angular that has been largely unexplored for me as I was learning the framework. I’ve avoided using it unless I had to. It was a new concept, and I found it quite hard to wrap my head around it. I’ve worked with JavaScript Promises, but observables and streams are a new paradigm for me.

After working for a while with Angular, I eventually took the time to learn and understand RxJS and try to use them in my projects. It wasn’t long before I realized the numerous benefits of RxJS that I’ve been missing out on all this time. RxJS, with its large collection of chainable operators, excels in handling async tasks.

I’ve been using RxJS with Angular for a few years now, and my experience has been nothing less than positive. The set of operators RxJS offers is really handy. They seem to have an operator (or a chain of operators) for every use case. Commonly used operators include:

  • map: passes each source value through a transformation function to get corresponding output values.
  • tap: modify the outside state when the observable emits a new value without altering the stream.
  • switchMap: maps each value to an Observable, then flattens all of these inner Observables.
  • filter: emits a value from the source if it passes a criterion function.
  • combineLatestWith: create an observable that combines the latest values from all passed observables and the source into an array and emits them.
Learn How To Spot And Prevent Memory Leaks

Memory leaks are one of the worst types of issues you run into — hard to find, debug, and often hard to solve. This might not be a concern initially, but it becomes crucial when your application reaches a certain size. Common symptoms of memory leaks are degrading performance the longer the app is being used or the same events being fired multiple times. Two of the most common source of memory leaks I’ve run into are:

1. Subscriptions That Are Not Cleaned Up

Unlike the async pipe, listening to an observable using the subscribe method won’t get cleaned up automatically. You will have to manually clean up the subscriptions by calling unsubscribe on the subscription or using the takeUntil operator.

The example below shows a memory leak introduced by listening to the route params observable. Every new instance of MyComponent creates a new subscription which will continue to run even after the component is destroyed.

export class MyComponent {
 constructor(private route: ActivatedRoute){
 this.route.params.subscribe((params) => {
 // Do something
 });
 }
}

As mentioned above, you can fix the memory leak by either calling unsubscribe or using the takeUntil operator.

  • Fixing the memory leak using the unsubscribe method:
export class MyComponent {
 private routeSubscription;
 constructor(private route: ActivatedRoute){
 this.routeSubscription = this.route.params.subscribe((params) => {
 // Do something
 });

 }
 ngOnDestroy() {
 this.routeSubscription.unsubcribe();
 }
}
  • Fixing the memory leak using the takeUntil operator:
export class MyComponent {
 private componentDestroyed$ = new Subject<boolean>();
 constructor(private route: ActivatedRoute){
 this.route.params.pipe(
 takeUntil(this.componentDestroyed$)
 ).subscribe((params) => {
 // Do something
 });

 }
 ngOnDestroy() {
 this.componentDestroyed$.next(true);
 this.componentDestroyed$.complete();
 }
}

2. Event Listeners That Are Not Cleaned Up

Another common source of memory leaks is event listeners that aren’t unregistered when no longer used. For example, the scroll event listener in the code below gets instantiated on every new instance of MyComponent and continuously runs even after the component is destroyed unless you unregister it.

export class MyComponent {
 constructor(private renderer: Renderer2) {}
 ngOnInit() {
 this.renderer.listen(document.body, 'scroll', () => {
 // Do something
 });
 }
}

To fix this and stop listening to the event after the component is destroyed, assign it to a variable and unregister the listener on the ngOnDestroy lifecycle method.

export class MyComponent {
 private listener;
 constructor(private renderer: Renderer2) {}
 ngOnInit() {
 this.listener = this.renderer.listen(
 document.body,
 ‘scroll’,
 () => {
 // Do something
 });

 }
 ngOnDestroy() {
 this.listener();
 }
}
Consider Using A State Management Library (If Applicable)

State management is another part of the stack that you don’t usually think about until you need it. Most small and simple applications don’t need any external state management library. However, as the project grows and managing your application’s state gets more complicated, it might be time to re-think if the project could benefit from implementing more robust state management.

There is no correct solution for state management as every project’s requirements are different. Luckily, there are a few state management libraries for Angular that offer different features. These are a few of the commonly used state management libraries in the Angular ecosystem:

Wrapping Up

If you’ve just started to learn Angular and it hasn’t quite clicked yet, be patient! It will eventually start to make sense, and you’ll see what the framework has to offer. I hope my personal experience can help you accelerate your learning and avoid the mistakes I’ve made.

Discover The Best 10 Inch Powered Speakers To Buy In 2022

Shopping for a 10 inch powered speakers online, however, can quickly become overwhelming because so many options are available at a wide range of prices. This article breaks down what to look for when shopping for the best 10 inch powered speakers and discusses the key considerations to keep in mind while shopping. Keep reading ... Read more

The Best 10 Inch Midbass Speaker You Can Use

It’s important to know that [replace_keyworrd] doesn’t work the same as others, so choosing the best one is vital for ensuring the best performance and durability. Understanding the technical aspects of these products, differences in specifications and performance, and descriptions of the best 10 inch midbass speaker on the market will help you choose the ... Read more