Page MenuHomePhabricator

Investigation: Framework for Grant metrics tool
Closed, ResolvedPublic2 Estimated Story Points

Description

We need to figure out the framework for the grant metrics tool, so we can start writing tickets. This includes:

  • account system
  • program interface
  • event interface
  • permissions
  • general UI

Event Timeline

kaldari set the point value for this task to 2.Sep 12 2017, 11:24 PM
DannyH triaged this task as Medium priority.Sep 12 2017, 11:25 PM
DannyH moved this task from To Be Estimated/Discussed to Estimated on the Community-Tech board.
MusikAnimal added a subscriber: MusikAnimal.

With my work on the new XTools, I've come to be very fond of Symfony, and I think it will work well for this app. The UI and interfaces will have to built from scratch (likely the case with any framework, if it is to look like we want it to), but that's not hard to do and in fact we can adapt code from the Programs Dashboard. We've done a bit of OAuth-level permission stuff in XTools so it should be easy to go off of that as well. Finally, I find Symfony's built-in performance profiling to be superb, and that will be very helpful for us since we'll have some semi-heavy database stuff going on.

So, I vote Symfony :)

If Symfony is to be used, let's develop a Toolforge Bundle for it, that does things like API profiling, OAuth, and maybe some templating/CDN stuff too. Then, it can be reused for any tool, and would make it easier for people to start new tools with a good base.

It might be worthwhile to investigate using https://github.com/wikimedia/wikimedia-slimapp which is already used for a few production deployed PHP apps.

Yeah, I was going to ask about Slimapp, but I thought there was some discussion about how it wasn't recommended any more? Needs updating to Slim 3, I guess.

Is there any info about what frameworks are in use by tools? What the common ones are etc.

Either way, I think Symfony would be great, especially as we've been working with it for the last few months.

Yeah, I was going to ask about Slimapp, but I thought there was some discussion about how it wasn't recommended any more? Needs updating to Slim 3, I guess.

Oh, do you know where that discussion was? I'd be interested in reading it. Not sure how much work needs to be done for upgrading it to Slim 3 but that can be investigated. I know that CopyPatrol, Grants review app and Wikimania scholarships app all use Slimapp.

If Symphony seems like a better choice, we can go with that.

No, I think it was on IRC.

@bd808 do you recommend Slimapp for new tools?

No, I think it was on IRC.

The only discussion I recall was you commenting at some point that Slim3 was available. I don't remember completely, but I think there was some feature of Slim3 that you liked but Slim2 lacked.

@bd808 do you recommend Slimapp for new tools?

I guess I can say that I do not not recommend it. ;) It is a shared base that was factored out of the work done several years ago to create the Wikimania Scholarships and IEG Grant Review projects. It has not received a lot of attention since then, but mostly as a result of "if it is not broken, do not fix it". I used it personally as the base of the SAL and bash tools. CommTech used it as the base of CopyPatrol. Wikimania Scholarships was updated to use it in late 2015. There is still an open task for IEG Review to use the shared library rather than its copy-n-paste version of the original Scholarships code (T114969).

It would really nice to see shared collaboration by multiple tool maintainers to build up a PHP base library that takes care of common boilerplate for using Toolforge. Because slimapp is used in one production hosted Wikimedia application (and hopefully a second by the end of the current Outreachy round) it is likely to be at least nominally maintained in the near future. This could make it a reasonable starting point for such a collaboration. The production use does come with some conditions as well. The main repository needs to use either Gerrit or Diffusion for code review and merge rights need to be limited to trusted contributors. These conditions could be seen as benefits or hindrances depending on the point of view of a particular contributor.

A possible downside of slimapp is that Slim is not a wildly popular PHP framework. This may make it more difficult for the average Toolforge developer to find tutorials and blog posts on using the framework's features to add some new functionality to their tool. I chose Slim as the base for the Wikimania Scholarships rewrite in 2013 because it was a lightweight but fairly full featured application framework. I was looking for something that would be reasonable to have security reviewed in the timeline of that project while avoiding the need to write my own router, session handling, flash message handling, etc. I was looking at the time for a microframework in the spirit of flask rather than a full application ecosystem like Django.

kaldari claimed this task.
kaldari added a subscriber: kaldari.

OK, so it sounds like we're going with Symfony.