Search code examples
phplaravel-5frameworkslithiummodular

Approach and recommendations to implement a modular web application in php


I'm looking at implementing a hospital application in php with a couple of sub applications within it as modules. The application will have modules like pharmacy for handling issues of stocking, dispensing and sale of drugs; laboratory for handling issues of laboratory enquiry; ambulatory for handling issues relating to ambulatory services; all within a single programming ecosystem with common resources like authentication, authorization, role management, patient registration and management etc.

Naturally an hmvc approach would have been sufficient but I noticed it is no longer being favored and a lot of php frameworks no longer support it out of the box e.g. Laravel and when they do documentation is not readily available e.g. kohana.

So I would love recommendations as to what best approach to use for the above scenario, what possible design pattern to adopt as well as ideas regarding possible php frameworks that implement them so I don't end up re-inventing an already functional "wheel".

Thanks


Solution

  • I think Laravel could be a good idea for such kind of project, you'll have almost all you need out of the box without "reinventing the wheel" using just few addons.

    To get the ecosystem you like ecosystem with common resources like authentication, authorization, role management, patient registration and management etc. you could use laravel sparks (99$) or laracogs (free) (which use a hadfuld View <- Controller -> Service -> Repository -> Model patterns)

    For the sub applications you could choose the approach you prefer, manage it in application (with ACL) or create them as a package managed via composer