2022-06-15
The old page app, part of the uikit.boomla.net package, did too much.
There is a new, simpler, built-in page app (named page-1
).
Its only purpose is being an empty page container, does nothing else.
Page title, language, metadata have been moved to a metadata app, part of the uikit.boomla.net package.
The root page of websites used a special root-page app that worked in a weird way, it's now also the same page app as all others.
If you create an empty project, it is now a no-code friendly, empty page.
The old page app came with a layout providing a main content bucket, a bucket for the footer, a fixed bucket on the top of the page, and a fixed bucket on the bottom of the page. (It was still a completely blank page!)
That's great if this is what you need, not as useful if you need something else. What if you need a sidebar menu instead of a top menu? It's not the end of the world, you could still ignore the original layout and place a different layout into the main content bucket, but that adds clutter.
The old page app was also responsible for setting the page title and language.
The idea was that there will be several page apps that come with different features, like different layouts. This was also a requirement given that one could only set certain parts of the HTML response in the app that serves the request directly, not by contents inside it.
Over time, it became clear that this approach has lots of downsides. If we had just one page app, it would be easier to build pages with or without code. Frankly, I've been using this approach for over a year now with great joy.
So there is a new built-in page app. If you wanted to, you can create a blank page anywhere on your project's filesystem by creating a new file and setting its file type to page-1
. Open its URL in the browser, and voila, there is your blank page.
This page app is super minimal. It does one thing, it serves a response and offers a main bucket where you can place contents. Typically, you would start with adding a page layout, and then place contents onto that layout. It's super fast to work that way.
As the built-in page app does very few things, you will find you won't even be able to set the page title (that appears on browser tabs).
To do this, you will need to add an element to the page that does this for you. The uikit.boomla.net package contains a metadata element that does all of them.
You could even have multiple metadata elements on the page, each defining different things. That's particularly useful when you want to create a page component, that sets the page language and even the title based on the individual page's title property, but you would still want to configure the SEO meta tags individually on those pages. So you would have a metadata element in the component, and one on the individual pages.
The root page of websites used a special root-page app, that allowed you to drop any page inside its main bucket, and it would display it.
The reason for this approach was to allow using components even for your root page. Also, you can't use drag-and-drop to replace your root file, as it's fixed in place. So this trick allowed you to move its child instead.
Even without components, if page apps came with built-in layouts, you would need the ability to somehow replace them. So this solution worked for that as well.
So it worked, but it was a weird edge case that worked differently from all other pages. It needed extra learning. Was just out of place.
The new page app solves the issue differently. Your website's root file is a page like all the other pages (no special root-page app), and it does nothing but provide a container. So now there is no reason to replace it, simply replace the content on it.
The only caveat is with components: now you can't easily use a component as your root page. Which is okay. The main purpose of components is to avoid repetitive work. Having to update 1000 pages individually would clearly be a huge pain. Only needing to update the component, in 1 place, is obviously better. Now you might need to update it in 2 places, if it also affects the root page. That's not the end of the world. Of course, It's very common that the root page of your project has a unique layout, in which case you wouldn't have a component for it anyway.
Until now, creating an empty project meant that you create an empty project as in an empty directory. It had nothing. No packages installed, no file types set, nothing. It was intended for developers and wanna-be developers to create everything from scratch.
Turns out that's not what people expected, even though we tried various ways to highlight it was for writing code. But who reads these days?
Now the empty project comes with the uikit.boomla.net package preinstalled, and the root file set to the new page app, so that you can start throwing things together even without code.
Cheers,