I tested it out, it works great! it's a great "copy and paste"
tutorial. thank you.

One thing I must say however, In the RPM package, the /Clients/
JavaScript.js has a bug which stops APE from loading,

on  line 123 it has:
        iframe.setAttribute('src','http://' + config.frequency + '.' +
config.server + '/?[{"cmd":"script","params":{"domain":"' +
document.domain +'","scripts":["' + config.scripts.join('","') +
'"]}}]');
-it should be-
        iframe.setAttribute('src','http://' + config.frequency + '.'
+config.server + '/?' + escape('[{"cmd":"script","params":
{"domain":"'+ document.domain + '","scripts":["' +
config.scripts.join('","') +'"]}}]'));

notice the escape command.

On May 24, 11:48 pm, Jaimz <[email protected]> wrote:
> Wow that's awesome! I thank you a lot. I never received an email about
> your reply to my post. however, I just happened to look at the docs
> again today and saw your tutorial. Then I came here to post it as a
> reply to my own message. I was surprised to find that you basically
> wrote this tutorial for me (because I asked).
>
> I'm going to go check it out now I'll let you know how it goes.
>
> On May 11, 5:24 am, Nicolas Trani <[email protected]> wrote:
>
>
>
> > Hi,
>
> > thanks for this interesting feedback on APE!
>
> > I tried to write a sample demo that explains more the basics of
> > exchanging data between client and server and how to write a simple
> > server module. You can find it here 
> > :http://www.ape-project.org/wiki/index.php/Tutorial:Color_changer
>
> > English is not my mother tongue so sorry for any english mistake ;)
>
> > Let me know if this helped you, and how we can improve it.
>
> > Regards.
> > On 09/05/2010 23:40, Jaimz wrote:
>
> > > Hi guys.
>
> > > I've been looking at APE alot the past few days because it's a perfect
> > > fit for a project I'm about to start (tomorrow)
>
> > > The process I'm going to be using APE for is basically a clock that
> > > will push out the updated time (sometimes a little bit of other data)
> > > every second.
>
> > > I'm a little confused as to how to do this. Maybe I'm dumb, but the
> > > docs doesn't seem to have an actual tutorial on how to do anything as
> > > far as actually writing a program with APE. There is the hello world
> > > tutorial which kind of explains the process of making a client. Then
> > > there's also the "How to write a server module" but it really doesn't
> > > tell you HOW to do it, rather it seams to just list off all the
> > > commands available to the server side modules, with a completely
> > > uncommented example (which is quite intimidating)
>
> > > I'm kind of fuzzy still about how the whole think works in the first
> > > place.
>
> > > How do I actually send data to a client? How do I actually send data
> > > to the server? Is there something i'm missing?
>
> > > for instance something nice to have would be:
> > > ---------------------------------------------------------------------------------------------------------------------
> > > - here's how you do 'something'
> > > -- server module (/var/ape/<something>/<file.js>)
>
> > > function someFunc(arg1,arg2,agr3) {
> > >      return [{'data':'this function just did something with '+arg1+'
> > > and '+arg2+' and '+agr3+'!'}];
> > > }
>
> > > -- client (<webroot>/ape-jsf/<file.js>)
>
> > > var client = new APE.Client();
>
> > > client.load();
> > > client.addEvent('load',function(){
> > >       console.log('now loaded');
> > >       data.cmd = 'someFunc';
> > >       data.arg1 = '1';
> > >       data.arg2 = '2';
> > >       data.arg3 = '3';
> > >       client.core.send(data);
> > > });
>
> > > client.onRaw(function(response){
> > >       console.log(data);
> > > });
>
> > > -- output (in firebug you'll see:)
>
> > >> now loaded
> > >> this function just did something with 1 and 2 and 3!
>
> > > -------------------------------------------------------------------------------------------------
>
> > > Furthermore, how do I even access the server module once i've created
> > > it? add the JS file to the main.ape.js?
> > > I can't even really find a spot in the docs that explain / lists what
> > > functions are available when and where from.
>
> > > I'm used to the way PHP, Prototype.js and Adobe Flex's docs work. the
> > > APE docs seem to be extremely foreign to me for whatever reason.
>
> > > Can anyone help me out by explaining a little more clearly, or
> > > pointing me to a good catch all tutorial like this?
>
> > > Thanks a bunch
> > > -James
>
> > --
> > Nicolas Trani - Web engineer
> > Weelya - Improve the web
> > 32 rue du faubourg boutonnet
> > 34090 Montpellierhttp://www.weelya.comhttp://www.ape-project.org
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "APE Project" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/ape-project?hl=en
> > ---
> > APE Project (Ajax Push Engine)
> > Official website :http://www.ape-project.org/
> > Git Hub :http://github.com/APE-Project/
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website :http://www.ape-project.org/
> Git Hub :http://github.com/APE-Project/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to