A r t i c l e s
Navigation

Note: This site is
a bit older, personal views
may have changed.

M a i n P a g e

D i r e c t o r y

Powerful Web Utils Without Client Compiling


Update:

A web based freepascal compiler is demonstrated and soon users on Mac/Windows computers may use the Powerful Web Utilities package without having a real linux/bsd in their office or home. It also means that one would not have to cross compile or use colinux if they don't want to.

For example one could simply upload their pascal source files from a Windows/Mac PC to a typical $5/month Cpanel/Plesk linux hosting account. I think this real good news for Mac owners too, since Mac owners don't have access to CoLinux while Windows users do.

See here for a short video showing a simple web based compiler in action.

Are there future plans to make web development prototyping quicker with the Powerful Web Utils package, so that it is more like ASP/PHP development?

One problem with a compiler is that it takes more effort (and discipline) to create a program. There are more steps involved in compiling a program than just uploading a script.

To address this problem we have outlined a plan. We have started to implement this plan by first creating a FPC web compiler, and it has proven successful.

There are several ways of making development easier for people who do not want to use a local linux box at home or at the office.

Plan 1:

  • a person on a Windows/Mac upload source files to server
  • IDE or a command line compiler client connects to the web compiler on server through simple HTTP call. HTTP sends signal to compile source on server, and pipe the compiler output back into the ide
Advantage of this system: line nnn syntax errors are piped back to your ide so you can click on them.. no local compiler needed, all is done over the web. When finished compiling you can click your tools menu and execute the web program in browser. No SSH is needed, just HTTP calls.

Disadvantage: still means compiling, not 100 percent like scripting language.

Plan 2:

  • a person on a Windows/Mac machine can upload a source file to their Unix or Windows server without compiling on his computer at home or at office

  • the source file is compiled on the server automatically only when someone first visits the file on the web (http://site.com/cgi-bin/eg/source.pas triggers compilation).

  • optionally the source file can still be compiled manually through a web program or IDE through HTTP piping to the web compiler

  • the program is cached after compiling (saved as PROGRAM.CGI or similar), or it spits an error into web browser if it cannot compile, just like the error one receives if a PHP script is broken.

  • When you visit PROGRAM.PAS it actually makes a call to execute PROGRAM.CGI, or it compiles PROGRAM.PAS if PROGRAM.CGI doesn't exist or source has changed

  • above done via apache handler or through htaccess preprocessor trick

  • the source file is compiled again upon request from a web browser only if the source file has changed or has been reuploaded, otherwise the cached CGI program is used.. making this sort of like a scripting language with all the benefits of compiled executable code
The advantage of this system is that it is more like PHP/ASP style development because when you upload the source files, they are compiled automatically when the first person visits the url, and they act like scripts but are actually a form of clever precompilation (a bit like Just In Time (JIT) but different since we are just creating regular executables - why no one thought of this yet as a scripting alternative?).

The disadvantage of this system is

  • source files are uploaded to the server, and on large projects source files take up much more space than the binaries

  • dealing with typos and compile errors on line NNN is not as easy since the error is in your web browser rather than in your development IDE or editor status bar.

  • remote IDE http communication with the web program could solve above problem above (IDE grabs output from web program and displays it inside IDE status bar)

  • if someone hacks into FTP or someone gains access to your source files they can see passwords for database in the source code, just like in PHP files. However it is rare someone gains full access to source code and this is acting a bit paranoid.

Advanced web hackers will most likely have local server testing equipment and will prefer leaving the source files offline, and just uploading the more secure binary to the development server - but prototypers and newcomers may prefer this above system since it is more like scripting/php/asp.

About
This site is about programming and other things.
_ _ _