Baikal: Rewrite Baikal to use use a modern PHP framework for its Admin interface.

Created on 15 Mar 2016  路  13Comments  路  Source: sabre-io/Baikal

2018 Update: Silex makes less sense now, as it's no longer maintainced. I renamed this ticket so it can be any modern framework

I would like to move Baikal to the Silex Framework. Currently Baikal is using a home-grown framework called 'Flake' and 'Formal'.

While I honestly do believe these two packages have potential, they also have a pretty large number of problems:

  1. They are currently not developed or used by other projects (as far as I know).
  2. They have a HUGE reliance on global/static scope. There's a very high usage of $GLOBALS and constant definitions which makes it incredibly hard to turn this into testable code. Almost all components actually communicate via global objects instead of dependency injection.
  3. The models speak directly to the database, and instead they should use the sabre/dav backend objects as they don't fully represent the sabre/dav model correctly.
  4. The config system is messy. The worst thing is not the fact that constants are used, but that a custom parser/writer is used to read the config. Config should just become a simple PHP array that's written with var_export().

I strongly feel that before adding new major features, it makes sense to do a move to a new framework. I first tried to actually fix baikal by doing an attempt to remove all constants from the source, but this was nearly impossible to do without also making a mess. I believe it's almost as much work to simply introduce the new framework. This will create a better foundation for the future and has the added benefit that the Baikal source will become a lot smaller and friendlier to new contributors.

This project is currently under way in PR #568

Bountrysource link: https://www.bountysource.com/issues/31927231-rewrite-baikal-to-use-use-a-modern-php-framework-for-its-admin-interface

bounty enhancement

Most helpful comment

@charlycoste have a look at #568

All 13 comments

I dont know Slim but in general it sounds like a good idea to move to something which is used by more apps and has some kind of active development

The nice thing about Slim is that it's a PSR-7-based microframework. Silex is another option, but I feel that Silex and the Symfony ecosystem has stagnated a bit. It's also rather bulky.

Lumen could also be worth a look, but Slim or Silex wouldn't be a bad decision either.

Are there any concrete plans on this? Like a roadmap or so? Would like to contribute in this restructuring if possible.

I actually made a start with this, but Slim 3 is not at all like Slim 2. They've made it a lot harder to do simple stuff. My main goal was to make it very easy for new people to jump into this, so now I want to do this with Silex instead, which _is_ pretty simple still, thankfully.

So if you're also interested in doing this, even if it is Silex, I could definitely help and break down some of the required steps.

Well, never used Silex before. Will check documentation and so.
If you could point out some steps I will try if I find time...

The first thing that would already be tremendously helpful, would be:

  1. Create a branch / fork of Baikal
  2. Install silex and twig
  3. Port the baikal templates to silex

So for now it would be ok if it's just a static version of baikal and the templates. That would give us something to work off, and we can start making the templates dynamic one-by-one...

I would strongly suggest that if you'd like to help with this, you commit often and let me review as early as possible. That way I can make suggestions early in the process and will ensure that things are going reasonably in the correct direction ;)

Let me know if you have more questions. I'd be happy to answer any.

I'd be happy to join in on the rewrite and make a start with Silex, I have some experience with it.

Awesome! Well... same thing goes. Let me know how I can assist in starting =)

@dennisdegreef I will need some time to dive in to Silex and so on...
So just start over and I will join when I can ;)

I started the job... https://github.com/charlycoste/Baikal/commits/silex
Feel free to comment my commits. ;)

@charlycoste have a look at #568

Thank's @mmoll. I don't know why I skipped the link ^^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jvoisin picture jvoisin  路  3Comments

daimaire picture daimaire  路  3Comments

perguth picture perguth  路  7Comments

GrayGhost93 picture GrayGhost93  路  5Comments

Superwallah picture Superwallah  路  8Comments