Maybe we should start brainstorming about the heavy developments that would be welcomed in the core? I'm thinking about introducing some OO, cleaning the SQL-riddled files, etc.
I've been playing with Luna for a while and while a huge lot has been done on improving about anything worth improving, there's still a tremendous work to be done to make it easy to build themes, not to mention the possibility of writing plugins. Currently there's SQL queries in almost every file, maybe a good start would be to develop a small API for content (posts, topics and forums) that would merge recurrent SQL queries or at least group them together instead of puzzling them; then we could achieve a proper state of separation between data and views, limit the proportion of work in templates, and simplifying the theme building process.
Is there any kind of roadmap for this, did you plan some parts, and most of all, do you need any help?
Last edited by CaerCam (27 April 2015 10:42)
Help is always needed! 🙂
And well, there are ideas to do this, but it kind of ends there for now. There is a roadmap through. For Luna 1.2, I planned to rewrite the installer and updater to be more OO and easier to maintain. Luna 2.0 is supposed to be a major revamp of prety much everything else.
You can do anything
introducing some POO
Introduce poo?????? 😋
rewrite the installer to be more OO
Um? Seems OO enough?
Luna 2.0 is supposed to be a major revamp of everything else.
Nice. Do you mean the code, design, or both? 😋
Last edited by ninjagolloyd (27 April 2015 10:29)
It's mainly set to be a major release of both the code and design.
Okay, so I started working on a massive (I should say monstrous) rewriting of Luna's code, a lot of things are going to change. The more I commit, the more it takes the shape of a fork, because it is strongly affected by personal choices as I mostly code things the way I want (need) them for the next version of my 200k posts forum; but still, there surely is some stuff that could profit Luna.
I mainly focus on introducing a somewhat MVC logic, clearly separating code from view. Themes will be absolutely powerful, managing about 95 % of the display, the core providing only very basic views. This comes with a lot of new classes to manipulate data, a very basic controller/templating system and very basic route module. The fact that you clearly separated the backstage from the frontend is close to genius and will allow the development of very different themes without need to handle moderation parts. Really well thought!
Concretely what I've done (or working on) or plan to do:
Not sure to what extend I'll be able to implement hooks and plugin stuff, I guess I'll see when I get there 🙂
Note: don't be afraid by the "fork" mentioned above. I've no intention of releasing anything. My work is public and I'll happily share it, but I've no pretension to launch a concurrent to Luna. This implies that whoever try and use "my" code are on their own; I'm not providing any support, ever. Just use Lnua. It's a great piece of software, my needs are just too specific to rely on the official version, hence the decision to run my own, strongly customized version on parallel.
Last edited by CaerCam (5 August 2015 06:48)
Honestly, I don't care how different it is from the current system. My part we make something that is 100% different, as long as there is an easy migration, it's good. I would love to see the work you've done/you're doing. Sadly, I do not have much time on Luna 2.0 right now, as I'm quiet buzzy with ModernBB 4, and all supported and to be released Luna 1.x.x versions.
It could be a nice base for Luna 2.0, now that you mention it, although there will still be a lot of work: since I'll be building my forum myself I don't plan to adapt the installer, nor will I be migrating from an existing installation of Luna or ModernBB (or FluxBB, for that matter)…
And one thing to consider is PHP version : I'm using PHP 5.6, so there's no way the code will be compatible with obsolete versions. It shouldn't be hard to port to PHP 5.4 or 5.5, but older versions are completely out of question.
That being said, I'm quite happy with what I'm doing. It's not quite ready for even basic testing, but it's promising. Using objects for users, forums, topics, etc. means we can validate data when populate (like using booleans for closed/sticky/soft topics properties), use generic method to use these values:
Etc. Lots and lots of very useful possibilities for themes!
Last edited by CaerCam (6 August 2015 19:00)
Mmmm... In general, I'm good with PHP 5.4+ as supported base. PHP 5.3 will then have to go with Luna 1.x. If a large amount of users can't upgrade due to these kind of things, I'm willing to support Luna 1.x for the future like we're doing now with ModernBB 4.0. So in general, PHP support is not going to be an issue.
Also, something I forgot to ask, are you following any code conventions (not from this project, but from others). The WordPress-ish conventions for example?
Yep, I'm pretty used to the WordPress coding style, that would the convention I'm using for this project for the most part. I try to stick to the Luna conventions when I'm coding directly for Luna, though.
Don't. We're going to adopt the WordPress conventions for Luna 2.0.
Ok. Good choice, clearer code reading :-)