Updated on

The next evolution of JReviews

Alejandro Schmeichler

It's been 15 years since the first release of JReviews back in 2006. That's a lot of years! For a long time now, I've silently faced a bit of a struggle on how to best move forward with the project. I want to renew the code and take advantage of the modern libraries and frameworks, but re-writing the project from scratch is really not an option because it's cost-prohibitive and would entail too many changes for clients to upgrade. The alternative, to just keep building on top of legacy code just doesn't feel right and it's not really something I want to continue doing.

Parallel frameworks and dual routing

After a lot of failed experiments and missteps, I finally landed on a 3rd option. To introduce a parallel framework for new functionality and incremental updates, while keeping the rest of the legacy code intact. This can be implemented through a dual routing system where a request can be identified as being legacy or new and routed to the corresponding framework.

I just want to write less Javascript! Anything that allows me to do that, makes the whole development process more enjoyable and it's a clear win.

I've been working on this approach for several months now. Another thing I want to do moving forward is to simplify all the Javascript code currently in JReviews and eventually remove jQuery and jQuery plugin dependencies. In fact, I just want to write less Javascript! Anything that allows me to do that, makes the whole development process more enjoyable and it's a clear win.

Locality of Behavior

A few months ago I stumbled upon a library called htmx and fell in love with its philosophy and ease of use. htmx embraces Locality of Behavior (LoB), similar to Tailwind CSS and Alpine JS, also tools that will be part of the new JReviews development stack.

Using htmx, I built Yoyo, a full-stack PHP framework to create rich, dynamic interfaces using server-rendered HTML. Yoyo went through several iterations until it became flexible enough for me to integrate it into Joomla and WordPress so I could use it with JReviews. Yoyo makes it extremely easy to implement new functionality that would otherwise be a PITA, like live search, ajax pagination, updating different parts of the page after certain actions, etc.

To test the parallel framework and dual routing concept, together with Yoyo, I set out to completely re-write the MyLists Add-on. I chose MyLIsts because it has its own administration interface and works in different areas of the site. While working on this re-write, I also started laying the foundation for building new features within JReviews. For example, many new templates needed for the add-on, like modals, notifications, form inputs, are part of JReviews itself. I am very happy with the results and excited about the future 🔥

JReviews v4 Alpha to be released soon!

There are no visible changes between JReviews v3 and JReviews v4 alpha. However, under the hood, s2framework v4 supports both legacy and new functionality. JReviews v4 also incorporates a lot of the foundation that will be used going forward for things like code and template overrides, a new hooks system, and more. In addition to that, a completely re-written MyLists Add-on will also be released.

Having a new development platform available opens up a lot of possibilities and I can't wait to start using it on a day to day basis.

When JReviews v4 Alpha drops, it will be available to everyone with a valid subscription for use in, preferably, non-production environments. I look forward to having you join me in making JReviews, the best directory for Joomla and WordPress, even better! 🚀