forth/forth-app.txt

63 lines
2.2 KiB
Org Mode
Executable File

Forth Application Presentation -*-org-*-
Date: 2011/11/30
How should an application implemented in Forth be presented to users?
I can think of the following formats.
1. Forth Extension: User invokes application with word(s) in the Forth
interpreter.
* Advantages: Most flexible and portable, immediate debugging.
* Disadvantages: Requires user to have access to shell and Forth
interpreter. User must know how to use Forth
interpreter. Text-only interface.
2. Shell Application: User invokes shell script that starts Forth
interpreter and invokes application.
* Advantages: Low impact on implementation, good portability. User
need not know Forth or Forth interpreter.
* Disadvantages: User must have shell access. Text-only
interface. Debugging requires modulization of
application. Dependency on Forth interpreter interface for
argument handling, environment var's, etc.
3. CGI Application: User invokes application from browser via CGI
script.
* Advantages: User can access application from any platform with
web browser. User needs no knowledge of Forth or
shell. Interface can use text styling and graphics.
* Disadvantages: Requires web server running on application
host. Dependency on Forth interpreter interface for environment
var's, etc. Application must wrap output in HTML. Must finesse
dictionary, stack persistence.
4. GUI Application: Aplication packaged as GUI program invoked on
user's PC.
* Advantages: Easiest access for user. Greatest options for
interface media.
* Disadvantages: Highly dependent on user's platform. Depends on
linking graphics libraries with Forth modules. Requires user to
install application on own PC.
Currently, I don't possess the knowledge to implement pattern 4., and
it has so many disadvantages I doubt it would be worthwhile even if I
could.
Pattern 2. does not offer much meaningful advantage over
pattern 1. (Users who can use the shell are able to learn enough
Forth to invoke the application.)
Therefore, I expect to do initial development as a
pattern 1. application, then make a pattern 3. wrapper for
appropriate aplications.