Book Image

Dart By Example

By : David Mitchell
Book Image

Dart By Example

By: David Mitchell

Overview of this book

Table of Contents (17 chapters)
Dart By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Static generation


Web hosting facilities vary greatly from provider to provider. The ability to run programs and install software is not universally available. Static generation of websites has become more popular with the ability to run small simple virtual machines on the cloud.

The advantages are very clear, there is not maintenance on software or a database to maintain, making the system very secure and also very fast to serve. It is not suitable for all applications, though. Blogging is one where static generation may make sense.

Freezing the website

In this chapter's project, there is a staticgen.dart file in the bin folder. This is a standalone program that generates a static HTML file of the front page of the blog. Note that the main function is marked with the async keyword and is missing the void keyword.