Recent

Author Topic: P.I.S.S. a PlugIn-framework / Service-locator Solution  (Read 2605 times)

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #30 on: June 09, 2026, 08:07:36 am »
Hi
Right, got my hedge trimmed around the house and several other chores out of the way... Pheeeww  ;D
I've been preparing a small tool to view the 'log-files' generated by P.I.S.S. in color no less  8) and put it in THIS repo on Gitlab, you can have a look at the "Before" project (fpg-logviewer-no-piss), which is now functional. 8-)
I guess I'll then get on with an article describing the "Retro-fitting-an-existing-app" with the piss-framework & plugins...  :D
Stay tuned...
Regards Benny

ETA: Ohh, forgot to say, it compiles with FPC & Lazarus release-versions  ;)
...At a later date, I'll prolly do a LCL-version with "Pixie" as the viewing component, I just have to familiarize myself with 'Pixie' first  :D
« Last Edit: June 09, 2026, 09:45:06 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #31 on: June 09, 2026, 11:27:35 am »
Hi
In the meantime you could check out the new feature in P.I.S.S. 'per app svc' tailoring -- made easier, it concerns 2 added lines in 'pluginconsts.inc' & 'plugintypes.inc', which if you define '-dappsvc' in Lazarus' custom options will defer the service-lookups to the app repo... 8)
I've implemented this new feature in THIS fpGUI project. Look in the 'utils' subdirectory... 8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #32 on: June 11, 2026, 11:35:42 am »
Helllooooo \ö/
Right, so I've finished the retro-fitting of P.I.S.S. onto THIS "Demo-project", namely the contents of directory 'fpg-logviewer-with-piss'...
I haven't written the article yet, but you should have a 'LookSee' for yourselves, to see if it's even necessary with an article for this  %)
As always, got questions, just ask them here  ;D Otherwise have fun out there 8-)
Regards Benny

edit: Added a screenshot...
« Last Edit: June 11, 2026, 07:52:38 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #33 on: June 20, 2026, 09:15:56 am »
Hi
Right, so here's a little something to all of you patient guys, that use the LCL  ;D
Yesterday I sat down and created a 'lcl_logviewerP' demo-app, featuring "Pixie" as the viewing component, (you don't have to install Pixie in the ide, the app just needs to know where the sources are), as pixie renders html5, I had to put together a new demo-plugin, that parses log-files to exactly that... See attached screenshot... The demo-project resides HERE  :D
I've chosen to add the services to the repo, instead of 'per-app-service', because this is something we all get a use for sooner or later  8)
In the hope you'll find it interesting and useful...  8-)
Regards Benny
« Last Edit: June 20, 2026, 09:18:11 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #34 on: June 21, 2026, 12:40:43 pm »
Hi
Ok, so 'Pixie' doesn't compile in FPC 3.2.2 "out of the box", but luckily there's an easy fix for that:
· Put the following 5 lines of code in 'Pixie.HtmlView.Base.pas' @ line 23:
Code: Pascal  [Select][+][-]
  1. {$IF FPC_FULLVERSION < 30301}
  2. const
  3.   { ADDED 21.06.26 by cdbc -- FOR PIXIE COMPILING in FPC 3.2.2 }
  4.   LM_IM_QUERY = LMessages.LM_IM_COMPOSITION + 1;
  5. {$ENDIF}
Hahaha... Ok, so much for copy/paste, you can ofc. skip my note to self  :D
I've made a post in the 'Pixie'-thread here in the forum, hopefully @Retrofoxed sees it  8-)
Right, that was it... Time for some weekend  8)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #35 on: July 04, 2026, 06:16:01 pm »
Hellllooooo :)
Right, so I'm in the process of updating MVP-Setup, so that it'll be able to utilize P.I.S.S. /Out-of-the-box/, by just flipping a compiler-define, in the generated project/platform  ...Nifty huh \o/\ö/\o/
In my MVP-Setup, there are 2 mandatory building blocks:
· cdbc.istrlist.pas
· obs.prosu.pas
Without which, it'd be a lot harder to bring the mechanisms to life  ;)
The stringlist interface is a 'Built-In' /primary citizen/ of P.I.S.S., but up until now, the 'Observer Engine' was absent... Last night I shared the services & the implementation of the 'libobserver-xxx-26.0703.8.so' plugin, the xxx denotes the compiler that built it, e.g. 331, 324 or 322, trust me, this makes it a lot easier, in the file-explorer, when you are copying plugins to your app  :D Swing by HERE to have a "LookSee"  8)
It's located in "/demoes/demo-plugins/libobserver" & "Services"
This was an important step on the way... Because I've updated 'obs.prosu.pas' to mirror the plugin services.
· IobsProvider
· IobsConsumer
· IPublisher
· ISubscriber
As always, in the hope you may find it useful  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2850
    • http://www.cdbc.dk
Re: P.I.S.S. a PlugIn-framework / Service-locator Solution
« Reply #36 on: July 07, 2026, 03:00:31 am »
Hi
Right, so I've finished the update to MVP-Setup and in the process, made an article on how to recompile the projects to use "Service-Architecture" & plugins  .../not/ rewrite  ;D The article is also available in the p.i.s.s-repo... 8)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

 

TinyPortal © 2005-2018