Recent

Author Topic: MVP made easier.  (Read 6655 times)

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
MVP made easier.
« on: July 28, 2024, 06:31:45 pm »
Hi Y'all
New featured binary release out now - 10.26.08.2024 - get it from gitlab.
I've been working on a small utility, for making programming after the MVP-doctrine, a lot easier ...and now it's done.
It simply sets up a project directory structure, as well as providing and connecting the most basic 'boiler-plate' code and units, into a compilable project for you to work on...
As the title says: MVP made easier  8-)
For people running Linux with Qt5, here is the release:
- 10.26.08.2024 binary + en-file & i18n.cfg
For everyone, here is the source release:
- 10.26.08.2024 source code release -> Robuster & i18n

For that, I've setup a releases section on my gitlab,
where you can find the executable & ini-file, right here: mvp-setup
I've released the source-code, because I think it's  finished. Please comment here, let me know what you think  :D
edit: This little app, runs *only* in user-space and writable areas, no 'su' needed. It only writes in the directory you point it at and in 'GetTempDir' for a log-file.
Have fun  ;)
Regards Benny
« Last Edit: August 27, 2024, 02:39:54 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Hansvb

  • Hero Member
  • *****
  • Posts: 710
Re: MVP made easy. Help needed for testing...
« Reply #1 on: July 29, 2024, 12:33:19 pm »
Hi Does this mean that I don't have to make a setup tool anymore? I had started but I haven't gone far yet. Will be testing your tool soon.

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easy. Help needed for testing...
« Reply #2 on: July 29, 2024, 02:09:13 pm »
Hi Hans
Welcome back from holiday  :)
I was making the demo app and one thing led to another...  ::) You know, the ideas kept popping up...
Was waiting to hear, how your efforts are coming along, because I don't want to trample all over your code, as it were...  :-[
So therefore that binary upload, good thing too, 'cause I downloaded the zip myself and fired it up, works flawlessly here  O:-) Started developing a small test-app with some streams on the skeleton ...and lo-and-behold: I found 3 minor oversights in the 'boiler-plate' code, they only show, when you're trying to setup the /new/ 'Self-Committing' transactions -> 1 missing SGUID and 2 'uses' relocations.
So far so good  :D
So what do you say, wanna see the code?!? (disclaimer: it's a right mess, rigth now) If so, I'll prepare a preliminary zip and post in /our/ other thread...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Hansvb

  • Hero Member
  • *****
  • Posts: 710
Re: MVP made easy. Help needed for testing...
« Reply #3 on: July 29, 2024, 02:50:52 pm »
Hi,
I do not mind. I already had an idea to revive my own app and I gained some vague ideas for new things during the holidays. So still plenty of things to make.  :D
After the holidays I haven't really opened Lazarus much yet. too busy with other things, that's why I hadn't made myself heard yet. :-[

I'm certainly curious about the code you have so far.

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easy. Help needed for testing...
« Reply #4 on: July 29, 2024, 03:21:11 pm »
Hi
Okidoki, I'll fix the bugs and then prepare a zip...  8-)
I'll post it in the other long thread, 'cause it belongs there, spirit-wise  %) :D
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Hansvb

  • Hero Member
  • *****
  • Posts: 710
Re: MVP made easy. Help needed for testing...
« Reply #5 on: July 29, 2024, 03:42:28 pm »
Cool. I will see it there.

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easy.
« Reply #6 on: August 04, 2024, 12:10:56 pm »
Hi
New binary version out now, please see the 1.st post in this thread...
I'm working on "gitlab'in" the source-code release, stay tuned...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easy.
« Reply #7 on: August 04, 2024, 03:15:43 pm »
Hi
That's it folks, source released on GitLab Have fun  8-)
Regards Benny
« Last Edit: August 04, 2024, 03:19:21 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Hansvb

  • Hero Member
  • *****
  • Posts: 710
Re: MVP made easy.
« Reply #8 on: August 04, 2024, 10:11:42 pm »
Great. Thanks.

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easier.
« Reply #9 on: August 06, 2024, 10:03:28 am »
Hi
Sorry guys, as much as I want to write flawless code, mishaps *does* happen...  :-X
In this little piece of code:
Code: Pascal  [Select][+][-]
  1. function TcsuModelMain.LeftWord(const aStr: string): string;
  2. var li: integer = 1;
  3. begin { pick the left-most word in a string }
  4.   Result:= aStr;
  5.   if Result = '' then exit;
  6. ///////////// below a range check error can happen /////////////////////////
  7.   while ((not (Result[li] in [#9,#13,#10,' '])) and (li <= Length(aStr))) do inc(li);
  8.   SetLength(Result,li-1);
  9. end;
The fix provided by @Hansvb is easy enough:
Code: Pascal  [Select][+][-]
  1. while ((li <= Length(aStr)) and (not (Result[li] in [#9,#13,#10,' ']))) do inc(li);
The bigger problem however, is that this code is also /produced/ by the app, so it had to be fixed in the /blob/ as well...  %)
I's all good and fixed now and a new version of the source-code has been uploaded to Gitlab. I will upload a new version of the binary during the day...
Bugfixed version is 8.06.08.2024
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easier.
« Reply #10 on: August 21, 2024, 11:06:08 am »
Hi
mvp-setup just got a new 'istrlist.pas', so I've refactored 'model.main' to use these new features. It makes no sense to just use it in the app, thus the new 'istrlist.pas' is to be found in its product as well \ö/
Get it while it's hot, version: 9.21.08.2024 is here.
Have fun & regards
Benny
« Last Edit: August 21, 2024, 11:12:19 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easier.
« Reply #11 on: August 22, 2024, 10:25:51 am »
Hi
Right, maybe a small example of what *little* it takes, to make a project, made with 'mvp-setup', support i18n, i.e.: multiple languages, is in order.
Attached is a /20 min/ example, very crude, but hey...
The changes touches 4 units: view.main, presenter.main, model.decl & model.main; and introduces 3 extra files. Makes use of the new features.
In the source, just follow this: "///<- i18n" in the comments
Have fun & regards Benny  :)
« Last Edit: August 22, 2024, 11:17:00 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Zvoni

  • Hero Member
  • *****
  • Posts: 2692
Re: MVP made easier.
« Reply #12 on: August 22, 2024, 10:45:52 am »
Code: Pascal  [Select][+][-]
  1. while ((li <= Length(aStr)) and (not (Result[li] in [#9,#13,#10,' ']))) do inc(li);
Have you thought about using PosSet/PosSetEx instead of iterating through the String?
https://www.freepascal.org/docs-html/rtl/strutils/posset.html
https://www.freepascal.org/docs-html/rtl/strutils/possetex.html
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: MVP made easier.
« Reply #13 on: August 22, 2024, 11:14:12 am »
Hi Zvoni
Frankly no, I didn't know of them till now  :D
They look right for the job, thanks for bringing them to my attention.
I just coded it from first principle and honestly... how would you avoid the iteration, when the code in StrUtils looks like this:
Code: Pascal  [Select][+][-]
  1. while (j<=i) and (not (s[j] in c)) do inc(j);
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Zvoni

  • Hero Member
  • *****
  • Posts: 2692
Re: MVP made easier.
« Reply #14 on: August 22, 2024, 11:45:13 am »
Hi Zvoni
Frankly no, I didn't know of them till now  :D
They look right for the job, thanks for bringing them to my attention.
I just coded it from first principle and honestly... how would you avoid the iteration, when the code in StrUtils looks like this:
Code: Pascal  [Select][+][-]
  1. while (j<=i) and (not (s[j] in c)) do inc(j);
Regards Benny
Huh? Didn't even look at the source of PosSetEx
That said: "Great minds think alike"
... so, Kudos to you for getting it right in the first place (even with the amendment to avoid range-check-error)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018