akeeba / fof

Rapid Application Development framework for Joomla!â„¢ 3 and 4
0 stars 0 forks source link

The future of FOF and Joomla 4 #676

Closed mblackritter closed 5 years ago

mblackritter commented 5 years ago

I'm seriously considering FOF for a new extension/component which requires to be integrated into Joomla. I was surprised that Joomla, in all these years, didn't evolve much in the areas of basic modern architectures (ORM, etc., to say the least). So to me, it seems like "FOF to the win", but was surprised of the (seemingly) lack of support from the Joomla community, aside that it was even officially a part of the Joomla core for quite some time.

So for me it would be interesting to know how well FOF will likely play in terms of Joomla 4. I'm currently not already deep enough into FOF to get the whole picture and answer it myself, how deeply FOF integrates into parts which change with Joomla 4, so please excuse my "sincere n00bness". 😊

Btw., while reading your (@nikosdion) last blog post concerning Joomla's future architecture and the comments there (Joomla! 4 and Beyond: architecture and design), I'd the impression that the ideas which FOF follows seem not to get much love on the side of Joomla developers. Much to my surprise, I've to say, because what you outlined there (Already in 2015!), incl. your responses to the comments, seems to would've caught up on what's common nowadays (2018).

nikosdion commented 5 years ago

The short answer is that yes, you can of course use FOF for your project. All my Joomla software uses FOF for reasons of stability and convenience. As long as my company and Joomla exist we'll be updating FOF. At this point I cannot guarantee that there will be no breaking changes when Joomla! 4 comes out. Based on the J4 Alpha releases and the discussions I've had with @wilsonge about the architecture I do not foresee any breaking changes in the future.

Speaking of the articles I wrote in 2015, I did a bit more than that. I got people together at the J and Beyond conference and hashed out an architecture plan for Joomla! 4. This is in large what is being followed right now. There are massive pieces of architecture changes there (like the conversion to namespaces, a necessary step to modernizing the core) which take a long time. Hence the delays.

Joomla! 4 will include several ideas which first appeared in a cohesive way in the Joomla! world in FOF. This includes the ActiveRecord model (I know that we call it "kinda-ORM" but only because Laravel does) and the per-component service locator (which we call "container" because it works like both and "container" lends to an easier analogy to follow for newcomers). So, basically, you'll get "FOF light" right in the core. That's why FOF will no longer be part of Joomla proper. That said, "FOF light" is nowhere near close to what I need for my software so no, I won't be giving up on FOF proper. It will live on for the foreseeable future.

Regarding whether Joomla should include a real ORM, I had said since 2015 that no, it shouldn't. It seems like in 2018 people started losing love for ORMs due to the same concerns I had expressed in the J4 kick-off meeting in Denmark in 2015: inflexibility, slower than hand-tuned SQL, increased memory consumption. ORMs are perfect in certain applications but, IMHO, they do not apply nicely to the bulk of Joomla! software due to the memory and scalability constraints we have to work with -- our software is destined to run inside resource limited shared hosting, not scalable multi-server deployments with distinct microservices/backend/frontend servers and load balancing which can mitigate the negative effects of an ORM at a small expense of spawning an extra server or two.

mblackritter commented 5 years ago

Wow, thanks for the extensive and ensuring response!

I don't mind possible required changes (small or big) when Joomla 4 hits final, it was purely about the outlook for FOF, for which I'm surely satisfied now.

When I said ORM, I just used the term for better database abstraction/handling and generic example of lack of modern concepts in current Joomla. As I read your article thoroughly, I wasn't referring to a full blown "real ORM", so excuse that you'd to waste some time covering this topic (again).

So it all comes along nicely with Joomla and FOF, which was my concern, because it wasn't obvious for bystanders like me and I'm sure this post will help others with the same idea, to build modern Joomla extensions, where "being-ORM-like" is of course just a part of my reasons for FOF.

Thanks again, cheers on, and FOF to the win! 🤩

nikosdion commented 5 years ago

You're welcome :)