discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hot Web Topic - SWI - Software Index


From: H. Nikolaus Schaller
Subject: Re: Hot Web Topic - SWI - Software Index
Date: Tue, 30 Jul 2024 18:20:21 +0200

BR,
Nikolaus

> Am 30.07.2024 um 13:31 schrieb lars.sonchocky-helldorf@hamburg.de:
> 
> 
> 
>> Am 30.07.2024 um 13:18 schrieb lars.sonchocky-helldorf@hamburg.de:
>> 
>> Hi Fred,
>> 
>>> Am 30.07.2024 um 08:41 schrieb Fred Kiefer <fredkiefer@gmx.de>:
>>> 
>>> 
>>> 
>>>> Am 27.07.2024 um 22:47 schrieb Ivan Vučica <ivan@vucica.net>:
>>>> 
>>>> On Thu, Jul 25, 2024 at 12:43 PM H. Nikolaus Schaller <hns@goldelico.com> 
>>>> wrote:
>>>> The benefit of SWI would be that it is agnostic to the distribution - 
>>>> which can also be a bad thing if dependencies are not available... So it 
>>>> works for binary .app-Bundle downloads only if there is a 100% stable API 
>>>> and set of Frameworks.
>>>> 
>>>>> what's your point?
>>>> 
>>>> So if nobody cares about SWI any more, Wiki Pages are a better solution 
>>>> than nothing.
>>>> 
>>>> "Nobody cares" is strong: I care mainly from a preservationist point of 
>>>> view -- if I were to get it back up, I'd likely rewrite it in Go since 
>>>> that's what I'm most familiar with nowadays. Alternatively, some slightly 
>>>> more modern PHP, using as much from SWI as possible (but reworking queries 
>>>> themselves a lot).
>>>> 
>>>> GSWeb would be really nice, but I am not familiar with it, and I am not 
>>>> sure if I were to do it, that writing it would be fast enough.
>>>> There's also the option of getting it up and running inside a 
>>>> Docker/Podman container with older PHP, Apache2 etc.
>>>> 
>>>> All in all, I think the concern is "should we duplicate the information 
>>>> longer-term", not so much "nobody cares"...
>>>> 
>>>> So If anyone else feels like rewriting it, for preservation purposes, 
>>>> please go ahead; I'm unlikely to find the time, even though I'd like to. 
>>>> Hosting something with available source code and reviewed by us, 
>>>> especially containerized, is not a problem.
>>> 
>>> I am willing to spend that time for the rewrite. Could you please send me 
>>> the PHP code for the SWI? I think I once had it, but don’t remember where I 
>>> put it. For some strange reasons I had to learn PHP and modern PHP isn’t as 
>>> bad as it used to be.
>> 
>> Well PHP might be a bit better than it was today, but REALLY?

Independent of the language or framework to implement it in, the original 
project and PHP code is also here:

https://projects.goldelico.com/p/swi/
https://mediawiki.gnustep.org/index.php/Software_Index
https://git.goldelico.com/?p=swi.git;a=summary

Generally in my experience it is not extremely difficult to upgrade code from 
PHP 5 (which was likely the code base back 15 years ago) to PHP8. The main 
thing one may stumble upon is $array['not-existing-index'] which is a simple 
empty string in older PHP and a failure in modern. But you will see the report 
in the web browser with file/line/reason.
This can usually be replaced by 
is_set($array[$random_index])?$array[$random_index]:"" or a similar construct.

Another thing are the implode() and explode() functions which are more strict 
in the order of the arguments now than they were back then.

Database may also be an issue since it is MySQL 5. MariaDB (often available by 
WebHosters nowadasys) can read these databases as well. But may need a 
different call in PHP but that is mostly encapsulated in 
include/connect.inc.php and the query() function.

>> 
>> Why not learn WebObjects, er I meant GNUstepWeb? It’s not that difficult, 
>> have a look here:
>> 
>> https://en.wikibooks.org/wiki/WebObjects/Hands_On:_Hello_World_-_Your_First_WebObjects_Application

>> 
>> and
>> 
>> https://developer.apple.com/library/archive/documentation/LegacyTechnologies/WebObjects/WebObjects_5/GettingStartedOnWindows/WOGettingStarted.pdf
> 
> 
> After sending my mail I found this guide:
> 
> https://developer.apple.com/library/archive/documentation/LegacyTechnologies/WebObjects/WebObjects_4.5/System/Documentation/Developer/WebObjects/GettingStarted/GettingStarted.pdf
> 
> Maybe it’s better suited for the purpose since WO 4.5 is closer to GNUstepWeb 
> than 5.0 (which was ported to Java).

So I think it is less work to make the existing PHP code work on modern web 
hosting than writing something from scratch. On the other hand demonstrating 
GNUstepWeb is tempting...

Personally I have my own approach in mySTEP for some private web based apps: 
there is mySTEP.php which implements parts of Foundation/AppKit classes in PHP 
(I have to admit that it sometimes leads to ugly (PHP) constructs but you can 
instantiate NSButtons and set the target and action and a button will appear in 
HTML). Really missing is something to load NIB files or translate ObjC to PHP 
code and hide that implementation detail like the JAVA bytecode interpreter is 
usually invisible :)

BR,
Nikolaus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]