What is Astro and why you should consider using it to build your website

Astro is one of the most notable projects of the year. Astro is a tool to build web sites that load faster because they ship less JavaScript.

Risingstars

How can you build a faster website?

To build a faster website you need to ship less code. Astro is a kind of static site builder that delivers lightning-fast performance with a modern developer experience.

With Astro you can build your site using your own framework like React, Vue or just HTML and JavaScript. Astro then renders the entire page to static HTML, removing all JavaScript from your final build by default.

If there is a real need for some Javscript component, Astro loads it when it’s visible.

It supports all the npm packages, CSS modules etc and is SEO enabled.

How it works?

Astro works like a static site generator which means it will generate a static HTML site for you during build, with almost no Javascript. It’s pretty obvious that this will be much faster compared to a site with Javascript.

When a component, like add to cart or carousel, needs some JavaScript, it loads that component. The rest of your site continues to exist as static, lightweight HTML. This new approach to web architecture is called islands architecture.

Sample project is available at Github – https://github.com/ankur-srivastava/astro-blog

An Engineering Approach to Build Websites

Sunny’s E-Commerce Website

Sunny owns a bookshop, which is doing reasonably well, and he wants to offer his services online via an e-commerce website. He starts to do some research on how to build a website.

After few days of searching and reading blogs he puts down his options.

1. Hire a freelance developer who can create a website for him.
2. Use a website builder and try to create a website on his own with some help from a freelancer, which may cost him less.
3. Learn programming and start building a website from scratch.

In your view which approach makes sense?

Continue reading “An Engineering Approach to Build Websites”