Hacker News new | comments | ask | show | jobs | submit login
Show HN: Stratum – build WordPress-supported applications (neblabs.com)
35 points by rafark 10 months ago | hide | past | web | favorite | 15 comments

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.

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

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.

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

Fixed, thanks for the feedback.

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.

Thanks for the feedback, I fully agree with that.

You know stratum is a well-known protocol name?

I know Stratum is 'layer' in Latin.

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:


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

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

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

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

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.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact