(Hybrid) Static Site Generator - Joomlatools.com "Pages"

This forum is for general questions about extensions for Joomla! 3.x.
Post Reply
Rik Brown
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Wed Oct 15, 2008 9:30 pm
Location: St. Louis, Missouri, USA

(Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by Rik Brown » Tue Oct 20, 2020 12:02 am

I've been searching around for a static site generator for Joomla. Obviously, this is an area where WordPress seems to have an advantage over Joomla.

However, I just watched a 1+ hour [youtube] interview with Johan Janssens about the Joomlatools.com "Pages" package. It looks quite promising and seems to have many useful features.

Has anyone tried it on a large site? If so, what are your thoughts?

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: (Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by annahersh » Tue Oct 20, 2020 7:08 pm

The WP core does not include SSG, those are all third-party extensions. The same is true for Joomla and likely all CMS.

Joomla's core page cache could be somewhat of a SSG because the pages are created, cached and quickly loaded without constant DB query (I think). I haven't looked at the Joomlatools extension, but it may just be a bit redundant. Enable System > Page Cache and see if the results suit you.
page-cache.jpg
You do not have the required permissions to view the files attached to this post.

Rik Brown
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Wed Oct 15, 2008 9:30 pm
Location: St. Louis, Missouri, USA

Re: (Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by Rik Brown » Tue Oct 20, 2020 8:23 pm

Thank you for your reply .

We have 1.8 million pages and expect to boost that by several million more pages next year. Once added, pages do not change often -- which is why we are considering static pages.

The Geek Elasticsearch component gives us instant page results but we still need to display those pages and even with 64 GB ram & 4 core processors, it just is not as quick as we would like (lots of SQL queries involved).

Also, we would like to use a CDN with Elasticsearch included. So static pages would help a lot (we built static pages before Joomla).

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: (Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by annahersh » Tue Oct 20, 2020 9:03 pm

Rik Brown wrote:
Tue Oct 20, 2020 8:23 pm
We have 1.8 million pages and expect to boost that by several million more pages next year. Once added, pages do not change often -- which is why we are considering static pages.
See https://jamstack.org/ for potential methods to develop an SSG for your site.

Rik Brown
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Wed Oct 15, 2008 9:30 pm
Location: St. Louis, Missouri, USA

Re: (Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by Rik Brown » Wed Oct 21, 2020 1:42 am

Jamstack looks interesting. Thanks for the link.

Rik Brown
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Wed Oct 15, 2008 9:30 pm
Location: St. Louis, Missouri, USA

Re: (Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by Rik Brown » Tue Jan 12, 2021 5:38 am

I've taken the dive and am testing "Joomlatools Pages". There is a wiki on Github with quite a few pages of information to get you up and running including directing you to where to get the component from Github.

I also found this 2020 [youtube] video (over 1 hour) with the creator, Johan Janssens, very helpful:

An Interview with Johan Janssens about Joomlatools Pages.

Unfortunately, [youtube] won't let me link to it here. But, in the video, Johan does show how to accomplish quite of a few tasks and delves into various possibilities.

Check it out!

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6570
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: (Hybrid) Static Site Generator - Joomlatools.com "Pages"

Post by Jinx » Tue Feb 23, 2021 12:37 am

Hello Rik,

Great to hear you have taken an interest in Pages. Pages is not a static site generator. I personally don't like the term SSG. It's too often mis-used. I more prefer the originally terms, static web server and dynamic web server.

A static web server, or stack, consists of a computer (hardware) with an HTTP server (software). We call it "static" because the server sends its hosted files as-is to your browser.

A dynamic web server consists of a static web server plus extra software, most commonly an application server and a database. We call it "dynamic" because the application server updates the hosted files before sending content to your browser via the HTTP server.

Joomla is such extra software, originally we simply called it a dynamic web application, before the name CMS became a buzzy-word.

How is Pages different?

When Joomla serves a page it will generate the html from scratch, there is some caching in Joomla to try and make this process as fast as possible, but the page is always dynamically generated.

With Pages that is no longer the case. Pages knows if the data used on the page is still valid and will not re-generate the page again if it doesn't need to. This makes Pages a lot faster out of the gate, you also need a lot less server resources to power a site that uses Pages, and cherry on top it allows Pages to make use of all the wonders of HTTP caching.

Pages does statically generate the html and stores it on disk but not as a flat html file, the cache is storing html, headers, page metadata and page validators. The validators contain the info Pages needs to decide to re-generate the page or to serve it from cache. This process is still dynamic and driven by PHP code. I therefor prefer to call this JIT (just-in-time) page generation.

Can Pages statically serve html?

Yes, with the release of Pages 0.19 I have also created a static cache. The static cache allows Pages to cache the html as a flat file. Example how does looks for our own site.
108403868-78225280-721f-11eb-84d5-c7535f76870b.png
With a few Apache rewrite rules Pages can serve this html statically. This doesn't make Pages a SSG, it makes it a lot smarter! You can configure per page how the cache works: static, dynamic or no cache at all. If there is no static file Apache will just forward the request to Joomla,... and as you can see, this approach is not limited to html only, Pages can server rss, json, etc this way, you can even use it to build web API's, micro-services, you name it, Pages will handle it.

The result of this is a best of all worlds. You get the benefits of a CMS, mixed with the benefits of a SSG. (Not sure we have a buzzy-word for this already? Open to suggestions ... ;) )

How is this different from the Joomla Page cache

The Joomla Page cache plugin I created many moons ago for Joomla 1.5 and it hasn't evolved much since ( also for Joomla 4 the code while refactored works still exactly the same as I wrote it), some events got added to give more external control but that is about it. It's a very crude approach to trying to do HTTP caching in Joomla. I never got the time to finish it and make it work properly before we rolled out 1.5 stable.

HTTP caching and CDN's have also evolved quite a lot in the last few years. The HTTP 1.1 caching spec was revised in 2014. It took a decade, but Pages is me trying to deal with some of those ghosts of the 1.5 days that still haunt me from time to time. Caching is one of them, routing is another...

I think I am coming pretty close to solving caching. Pages implements the complete HTTP/1.1 caching spec. If you unleash it's full power by enabling the http prefetcher Pages can get you 1ms page requests in the browser (yes really, here is proof).
Screenshot 2021-02-23 at 01.21.53.png
In technical terms Pages acts as HTTP middleware. It doesn't just makes things a-whole-lot faster, it changes the whole Joomla ball-game, but thats a story for another time.

Most happy to help you if you have any questions about Pages, feel free to jump onto the Pages discussions board on Github.

Happy coding!
You do not have the required permissions to view the files attached to this post.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work


Post Reply

Return to “Extensions for Joomla! 3.x”