
Show HN: Stratum – build WordPress-supported applications - rafark
https://neblabs.com/stratum
======
rafark
I have finally released the framework I've initially designed in 2015-2016.
It's been a massive work. Let me know what you think.

~~~
kawera
Congrats, looks nice! Is it compatible with v5 and how does it interact with
Gutenberg?

~~~
rafark
Thanks, Stratum only works on non-admin sections (the front-end). Currently,
you have to add compatibility to some features yourself. I've not dug deep on
Gutenberg but I do keep an eye on its development.

------
simplify
Ran into some styling bugs on the website (notice the content is cut off with
no horizontal scrollbar)
[https://imgur.com/a/J1jqu](https://imgur.com/a/J1jqu)

~~~
rafark
Fixed, thanks for the feedback.

------
yodon
Multiple spelling errors in the first sentence of your homepage doesn’t
inspire confidence. I realize it has nothing to do with code quality, but it
has everything to do with perception of code and product quality.

~~~
rafark
Thanks for the feedback, I fully agree with that.

------
lostmsu
You know stratum is a well-known protocol name?

~~~
rafark
I know Stratum is 'layer' in Latin.

~~~
grzm
AIUI, generally the -um suffix would be singular, while an -a suffix would be
plural. For example, datum and data. So, strata would be the plural, and
stratum the singular. Looks like Merriam-Webster agrees:

[https://www.merriam-webster.com/dictionary/strata](https://www.merriam-
webster.com/dictionary/strata)

~~~
rafark
You're completely correct, that's how it is. A dumb moment, I cannot deny I'm
a bit nervous.

------
ibdf
I have been using Twig with WP and it's a nice code clean up. How do you say
this compares to Twig?

~~~
rafark
Stratum is a full-featured framework, it is not a stand-alone templating
engine; it can be used to build websites without ever using WordPress APIs
(which are supported if you require them).

For example, a great use case is to use WordPress as a backend for saving
content to the database and Stratum for displaying that content without having
to load the whole WordPress app. But as I said earlier, you can write
"regular" WordPress themes as well.

As for the templating engine comparing to Twig, you cannot call procedural
functions because it doesn't support PHP or expressions other than object and
array member access because I designed the templating engine so that the logic
is performed on PHP rather than on the views. The syntax of the views has been
designed to resemble the original HTML/XML syntax. Twig filters in Stratum are
Formatters. Twig/PHP includes are somehow similar to Components.

You can read the syntax here (unfinished):
[https://neblabs.com/documentation/views](https://neblabs.com/documentation/views)

------
benbristow
With the comparison the original code would be half the size if you just
removed the comments.

~~~
rafark
Thanks for pointing that out! I did debate myself over leaving or removing
them but at the end I decided to keep them because it shows exactly one the
main points of the templating engine, you won't needs comments at all.

Very often WordPress templates grow so much to the point comments are really
needed.

