Framing Pages - Standing on the shoulders of components #670
johanjanssens
started this conversation in
General
Replies: 1 comment
-
Great post @johanjanssens. I love the quotes and I have been a big fan of the "Everything is Remix" video series for a long time. This is an outstanding technical overview of what makes the Joomla architecture unique... and uniquely well positioned to address the problems of the internet as it stands today. Performance is key and Joomla can deliver dynamic "data" in way that is unmatched in other solutions. I am hoping that we can communicate these realities effectively and launch a Joomla Renaissance of creativity and enthusiasm. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is the second post in the
Framing Pages
series, you can find the first one here Framing Pages - A just-in-time page generatorMany years ago Linux founder Linus Torvalds borrowed Sir Isaac Newton’s “standing on the shoulders of giants” phrase when discussing his open source work with Linux.
As the latest v0.20 release of Pages shows, modern open source projects depend on thousands of other projects, millions of lines of code written by developers all over the world. In Pages' case we’re standing on the shoulders of thousands of Joomla developers, who built very powerful components for Joomla over the last decade.
Pages is merely pushing the limits of Joomla further, by using the Joomla architecture to its advantage and remixing it with inspirations from many others: Grav, Jekhyll, Gatsbyjs, Statamic... to name just a few.
Pages is a great example of how you can extend and improve Joomla without changing anything in the core. The architecture we created for Joomla 1.5 provides all the flexibility required, all Pages is doing is opening new doors.
Components are powerful applications
In its essence Joomla is a very humble and nimble architecture, the main role is played by the component, because of the way components are dispatched they are full-blown web applications, this is something that sets Joomla apart, and allows you to do some really interesting things.
At its core Joomla uses a front controller pattern through the
JApplication
object, each application (site, administrator, installation) has its own single entry point, through which the specific application front controller is instantiated.The front controller has 5 main tasks:
Pages is intercepting Joomla's flow in each of those 5 stages and depending on the context will handle some of the phases itself, or let Joomla continue its normal flow. Without a single-entry-point front controller architecture, this wouldn't be possible.
The front controller's rendering phase uses as inverted rendering flow, meaning that it renders itself inside out, starting with the component, which is dispatched first, the modules and template are then rendered around that. This inverted flow is the key to allowing Pages to wrap itself around components like a tightly-fitting glove.
Comparing with Wordpress
There is often talk about Wordpress, rarely from an architectural perspective, and this is one of the key differences. Wordpress doesn't have a front controller, and it doesn't use an inverted rendering flow. It's not possible in Wordpress to execute a single plugin directly.
Wordpress was built around the concept of a blog post, while Joomla was built around the concept of a component, the C in CMS in Wordpress stands for
text
while the C in joomla stands fordata
, and that is a key difference. In Joomla terms Wordpress would be a single component, comparable to the core content component, or the many article management components that exist for Joomla.Joomla's build in MVC component architecture provides a separation between data and presentation and makes it possible to execute a specific component, rendering it's content
"data"
using a specific view and layout, which the component provides for.Wordpress doesn't use an MVC for it's plugins, in Joomla terms a Wordpress plugin would be the same as a Joomla content plugin. It merely provides a way to transform the text of the post.
The rendering flow Wordpress uses is much more basic. It's similar to the flow Mambo used in the early days, the inverted flow was introduced in Joomla 1.5. Wordpress renders top to bottom, composing the output starting from the top and dispatching each plugin when a shortcode is found by using the shortcode parameters provided. This flow is a lot less flexible and doing what Pages does now, would be a lot harder to achieve in Wordpress.
Standing on the shoulders of components
Without the power brought to Joomla, by the thousands of components, Pages would not have made sense. Components and the developers who create them are the cornerstones of Joomla's ecosystem, they make Joomla into much more than a "mere" CMS, they make it into a very capable web application platform.
It’s that amazingly broad and deep ecosystem that has almost everything Pages needs. Everything we need to move Joomla forward is out there already, all we have to do is see further by opening new doors to what's possible.
Beta Was this translation helpful? Give feedback.
All reactions