Image board engine, Danbooru-style.
Find a file
Marcin Kurczewski 902aed7278 Introducing API
Right now there's a lot of messy code in controllers. Furthermore, there
is no way to interact with szurubooru via vanilla HTTP, since API is
next to non-existent. So, basing upon my experiences from another
project, I plan to:

- Create actual API. It is going to consist of well-defined "jobs" that
  do things currently done by controllers. Benefits of such approach are
  as follows:
  - defining them in their own classes allows to clean up code a lot,
  - it allows to abstract from input method (POST data, part of URL,
	whatever), and leave processing of these to controllers,
  - it allows to make proxy controller, whose purpose would be to let
	users interact with API (jobs) directly in well-documented and
	consistent way.
- Make controllers responsible only for mediating between views and API.
  Behavior of these may remain inconsistent, since views they're talking
  to are also messy to begin with. Such controllers might be removed
  altogether in the future in favor of making views talk to API directly
  through previously mentioned ApiController.
- Organize all sorts of privilege checking and possibly other stuff into
  methods within jobs.
- Actually distinguish POST from GET requests.
- Leave POST-only controller methods as Actions, but rename GET-only
  methods to Views. Example: editAction for editing comments, but
  listView for showing comment list. The choice of these suffixes might
  be subject to changes in future.
- Get rid of ?json and $context->transport. They now look like disease
  to me.

This commit introduces job system and converts CommentController to use
the new API.
2014-05-01 23:35:05 +02:00
data Tag relations don't suggest tags already used 2014-03-10 16:16:25 +01:00
lib Newest chibi-core 2014-04-29 21:35:29 +02:00
public_html Introducing API 2014-05-01 23:35:05 +02:00
scripts Newest chibi-core 2014-04-29 21:35:29 +02:00
src Introducing API 2014-05-01 23:35:05 +02:00
.gitmodules Text case conversion moved to gist 2014-04-12 16:25:07 +02:00
init.php Newest chibi-core 2014-04-29 21:35:29 +02:00
LICENSE Initial commit 2013-09-30 22:26:47 -07:00
README.md update readme file with installation instructions link 2013-10-09 15:24:53 +02:00
upgrade.php Newest chibi-core 2014-04-29 21:35:29 +02:00

szurubooru

Szurubooru is a Danbooru-style board, a gallery where users can upload, browse, tag and comment images, video clips and flash animations.

Szurubooru is powered by chibi, a lightweight PHP framework.

Installation instructions

For installation instructions, please see the Quick Start Guide on our wiki pages.