Bug 21327 - Add a Modular Koha Core design
Summary: Add a Modular Koha Core design
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-10 13:45 UTC by Benjamin Rokseth
Modified: 2018-09-11 06:08 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Add Core::Main Namespace (4.04 KB, patch)
2018-09-10 19:10 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Add Core::Circulation (34.21 KB, patch)
2018-09-10 19:10 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Add crude Core::Community::Circulation (3.45 KB, patch)
2018-09-10 19:10 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Implement Core::Circulation in admin and SIP (14.49 KB, patch)
2018-09-10 19:10 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 21327: Add Core::Main Namespace (4.01 KB, patch)
2018-09-10 21:44 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 21327: Add Core::Circulation (34.40 KB, patch)
2018-09-10 21:44 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 21327: Add Core::Community::Circulation (3.58 KB, patch)
2018-09-10 21:44 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 21327: Implement Core::Circulation in admin and SIP (14.56 KB, patch)
2018-09-10 21:44 UTC, Benjamin Rokseth
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Rokseth 2018-09-10 13:45:38 UTC
This is a demonstration of the possibility to refactor parts of Koha into a modular design. The idea is to make use of class inheritance and method overrides to make it possible for a library to use only the parts of Koha that are relevant.

It is possible to do this whilst maintaining the full compatibility of the community version, and hopefully it could help in refactoring into a more stable, maintanable and pluggable core.
Comment 1 Benjamin Rokseth 2018-09-10 19:10:28 UTC
Created attachment 78544 [details] [review]
Add Core::Main Namespace

- Core::Exceptions
- Core::Prefs

This is the main class of Core, along with siblings
Prefs, to handle sysprefs and overrides, as well as
Exceptions. Also included are the Makefile and koha-conf setup
Comment 2 Benjamin Rokseth 2018-09-10 19:10:34 UTC
Created attachment 78545 [details] [review]
Add Core::Circulation

This is the Circulation child of Core. It is a work in progress, but ideally
all neccessary subfunctions should be overridable, and it should consist of
a bare minimum of functionality for handling circulation.
Comment 3 Benjamin Rokseth 2018-09-10 19:10:39 UTC
Created attachment 78546 [details] [review]
Add crude Core::Community::Circulation

This is the Community subclass of Circulation that should be run as default
to handle the basic Circulation, and should be interchangable with todays
functionality.
Comment 4 Benjamin Rokseth 2018-09-10 19:10:45 UTC
Created attachment 78547 [details] [review]
Implement Core::Circulation in admin and SIP

covered:

C4::SIP::ILS::Transaction::Checkin->do_checkin
C4::SIP::ILS::Transaction::Checkout->do_checkout
C4::SIP::Sip::MsgType->handle_checkout (add branch)
circ/circulation.pl
circ/renew.pl
circ/returns.pl
Comment 5 Benjamin Rokseth 2018-09-10 21:44:18 UTC
Created attachment 78549 [details] [review]
Bug 21327: Add Core::Main Namespace

- Core::Exceptions
- Core::Prefs

This is the main class of Core, along with siblings
Prefs      - to handle sysprefs and overrides, as well as
Exceptions - Also included are the Makefile and koha-conf setup
Comment 6 Benjamin Rokseth 2018-09-10 21:44:28 UTC
Created attachment 78550 [details] [review]
Bug 21327: Add Core::Circulation

This is the Circulation subclass of Core. It is a work in progress, but ideally
all neccessary subfunctions should be overridable, and it should consist of
a bare minimum of functionality for handling circulation.
It is a rewrite of C4::Circulation.

To use, add this in the config section in koha-conf.xml and restart plack:

<core_modules>
  <circulation>Core::Circulation</circulation>
</core_modules>
Comment 7 Benjamin Rokseth 2018-09-10 21:44:39 UTC
Created attachment 78551 [details] [review]
Bug 21327: Add Core::Community::Circulation

This is the Community subclass of Circulation that should be run as default
to handle the basic Circulation, and should be interchangable with today's functionality.
It also adds SIP integration.

to use, add the following in the config section of koha-conf.xml:
 <core_modules>
   <circulation>Core::Community::Circulation</circulation>
   <sip>Core::Community::Circulation::SIP</sip>
 </core_modules>

This is also the default if not set.
Comment 8 Benjamin Rokseth 2018-09-10 21:44:51 UTC
Created attachment 78552 [details] [review]
Bug 21327: Implement Core::Circulation in admin and SIP

covered:

C4::SIP::ILS::Transaction::Checkin->do_checkin
C4::SIP::ILS::Transaction::Checkout->do_checkout
C4::SIP::Sip::MsgType->handle_checkout (add branch)
circ/circulation.pl
circ/renew.pl
circ/returns.pl