Forum OpenACS Q&A: How about a port of ACS to PHP or python?

Hi all,
I'm new to openACS. I'm really excited about using and building on
ACS. However, I don't know tcl, although the learning curve shouldn't
be too bad. Nevertheless, I would like to ask the forum two questions:

1. Are you perfectly happy scripting in tcl, and if so, what are the
relative merits of tcl in comparison to environments such as PHP and
python.

2. Has anyone toyed with the idea of porting ACS to another scripting
environment such as PHP or python, and what was is the opinion, in
particular regarding the complexity of the task?

I mention python because it seems to be an extremely elegant
language. I mention PHP because of its speed, convenience,
popularity, the large quantity of existing applications, and because
I'm familiar with it. 😉

Thanks in advance for your input,

-Carlo Moneti

I, for one, am perfectly happy with Tcl. I've not used php or python so I can't make specific comparisons. The nice thing about Tcl is that it's simple to learn (since you obviously know at least one other language, you should be able to pick up Tcl in an hour or two). Tcl's introspection capabilities are incredible, and it is very easy to extend. Spend some time over at the Tcl'ers Wiki to appreciate how extensible and powerful Tcl really is.

As to your second question, ArsDigita is currently porting ACS 4 to Java, which undoubtedly will be more buzzword compliant than the pure Tcl version, and will probably open doors in corporate IT depts, etc. that would otherwise remain closed due to Tcl ignorance or bigotry. Others from time to time have asked about ports to other scripting languages (here and at ArsDigita.com). The standard answer has been that no one (yet) has felt there was enough to be gained to take the time. (Folks want to make the existing wheel better rather than stop & re-invent it.) That being said there's nothing stoping anyone from doing it. That's the beauty of open-source: if you have an itch, you can scratch it.

Collapse
Posted by Roberto Mello on
1) Tcl works fine for web development in AOLserver. It has its shortcomings, but all languages do. The plus is that it's been tuned to work with AOLserver.

Python is indeed elegant and you can use Python with AOLserver these days. I don't know how PyWX compares with just using Tcl performance-wise though.

PHP has problems with threading AFAIK.

2) This has come up many times. It would be too big of a task and the benefits would be minimal if any. Neither PHP or Tcl are in high demand in corporate environments, whereas Java is (but I don't want to develop web apps in Java personally).

PHP because of its speed? I don't know if PHP is faster than anything else. Besides, most PHP applications out there are for MySQL, which means they are worthless without some porting effort to a real database system.

Collapse
Posted by Cynthia Kiser on
Titus hasn't ported all of the ACS to Python but if you are looking for a fellow enthusiast, check out
http://www.idyll.org/~t/www-tools/ and download his Python module for AOLserver.
Collapse
Posted by Carlo Moneti on
Thank you for the responses. Regarding PHP, many of the mature applications use PHPLib, which offers database abstraction for mysql or postgresql. I must say, a better way of forming the porting question would have been: What would it take to port ACS to PHP? But, this is a question most appropriate for the PHP community.

Back to practical matters, some news of interest. TCL Pro IDE has just gone GPL:
http://dev.scriptics.com/software/tclpro/

A port for Perl on AOLserver ACS is in the works:
http://sourceforge.net/forum/forum.php?forum_id=44367

Regards,

Collapse
Posted by Nathan Reeves on
<blockquote>> What would it take to port Openacs to PHP?
</blockquote>

Lots, and lots of time that most people would see as wasted effort given the efforts necessary to bring ACS 4.0 to PG.

If I say too much here its only going to be going over previous threads which thrash out this subject en mass.  I for one would like to see (Open)ACS written in PHP given the larger install base of Apache,  but given you can now get mod_aolserver its starting to discount this line.  Many man hours(years?) have been put into ACS and starting the whole process over again would be painful.

And yep,  threading has been an issue (apparently being worked on) and still causes problems when you try and use it with aolserver or IIS.

Collapse
Posted by Roberto Mello on
The perl-aol project is not a project to port the ACS to perl, but to make perl a loadable module for AOLserver, just like PHP4 is. This will allow programmers to use Perl in AOLserver much the same way as Tcl.
Collapse
Posted by Carlo Moneti on
Correct. The perl-aol project is not a project to port the ACS to perl. I wasn't clear. I meant to point out that the perl-aol author specifically mentioned ACS and the desire to use it with perl. Apparently, ACS is gaining attention.
Collapse
Posted by Don Baccus on
A future direction which might be interesting would be to expose the ACS 4.0 core's API to the AOLserver PHP, Python and (when available) Perl modules, so one could use the ACS 4.0 APM (package manager) to mount packages written in those languages.

Then authors who want to write modules for the ACS but don't care to learn Tcl could use their favorite language du jour.

Something like this is likely to get far more support within our OpenACS group than attempts to rewrite the entire thing in Perl, PHP, Python etc.

I also have no idea at this point as to whether or not it is a practical option...