[OGo-Developer] noob question on building sope-appserver/samples/HelloForm
Chad Leigh
developer@opengroupware.org
Sat, 18 Nov 2006 12:55:26 -0700
On Nov 18, 2006, at 2:13 AM, Helge Hess wrote:
> On Nov 18, 2006, at 07:22, Chad Leigh wrote:
>> I downloaded a fresh version (4.5.9), unpacked it
>
> Best thing to do is to retrieve it from Svn:
>
> svn co http://svn.opengroupware.org/SOPE/trunk/
>
> This way you get the latest fixes (eg the Xcode fixes done by ZNeK).
ok
>
>> One quick question. I know a readme says I should always go
>> through apache and the adapter, but for testing I am direct
>> connecting on my Mac as I don't have apache set up.
>
> Well, Apache is pre-setup on every MacOS client machine. Just build
> sope-appserver/mod_ngobjweb (I think typing 'make' should be
> sufficient), and copy the 'mod_ngobjweb.so' to /usr/libexec/httpd/.
>
> Then add
> ---snip---
> LoadModule ngobjweb_module /usr/libexec/httpd/mod_ngobjweb.so
> <LocationMatch "^/Test*">
> SetHandler ngobjweb-adaptor
> SetAppPort 20000
> </LocationMatch>
> ---snap---
>
> to your /etc/httpd/httpd.conf and run 'apachectl restart'.
>
> You should really use Apache as a frontend, otherwise its calling
> for trouble because SOPE itself is not really a full HTTP
> implementation and doesn't properly deal with keepalives and such
> (from a HTTP clients perspective).
Sure, the direct connect was just a quick test.
>
>> I am running HelloForm sample and I run it at the commandline so
>>
>> % ./HelloForm
>>
>> It says it is listening on port 20000 so I do http://localhost:20000
>>
>> and up comes a form with an input box and an OK button.
>
> The URL is wrong, you must at least add an application name, eg:
> http://localhost:20000/Test
>
>> I type in something and hit ok. It appears by looking in the
>> Main.m file for the Main.wo component that it should print
>>
>> duration: x.nnn
>>
>> in my browser as part of the appendToResponse call
>
> Why should that appear in the browser? Its just a printf which
> prints on stdout. If you want to put that in the browser, use:
> [_r appendContentHTMLString:
> [NSString stringWithFormat:@"duration %.3f\n", ...]];
>
> But of course you usually wouldn't do it that way in WO. Instead
> you would use a WOString and bind it to some method.
Ah, yes, it is starting to come back. Last night when I was trying
this my WO books were in a room with sleeping kid etc and I couldn't
get them and my mind was confused by some more recent CGI programming
I had done where you did output to stdout...
I'll get my head around this soon. I did do WO stuff a bunch back
around 1999/2000 timeframe :-)
Thanks for your help and patience.
best
Chad