r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Terry
5-Jan-2010
[7191x2]
... CSS, database access, acting as a proxy to servers, JQuery, Google 
map integration, Amazon S3, OpenID, AtomAPI and other RSS integration, 
Delicious... man, i HATE that stuff.
... integrating Processing... 
http://processingjs.org/exhibition
Graham
5-Jan-2010
[7193]
And hacking of php ... yep
Kaj
5-Jan-2010
[7194]
Web chat it will be
Terry
5-Jan-2010
[7195x2]
I have a hotkey javascript library I'll hook up.
and some sound js lib as well
Graham
5-Jan-2010
[7197]
I'd ask Terry to write it for Cheyenne... but I suspect that we'll 
never be able to reach it because of dns issues!
BrianH
5-Jan-2010
[7198x4]
It's funny, Terry, but I keep agreeing with your sarcastic list once 
I filter out the stuff that I can do easier without a web browser, 
or that aren't necessary at all when you aren't using one.
I like some of the stuff on that list, but I like doing it better 
without HTML/JS/CSS.
Must be just me, I guess.,
Server-side web stuff is fun though.
Terry
5-Jan-2010
[7202x2]
Brian, I'm comparing with Altme only.. Desktop vs client/server is 
a whole other argument.
Graham, did you shut off the Chrome dns prefetching?
Graham
5-Jan-2010
[7204]
Terry .. I gave up
Terry
6-Jan-2010
[7205x2]
Hmm, maybe programming isn't your forte.
You don't say that to your patients as well, i hope ;)
Dockimbel
6-Jan-2010
[7207]
Turning off DNS prefetching is explained here : http://jackkonblog.blogspot.com/2009/03/turn-off-dns-pre-fetching-in-google.html
Terry
6-Jan-2010
[7208x3]
Chrome has a great JS debugging tool.. In the icon on the top left 
that looks like a page, open developer -> Javascript console
Add this to the $(document).ready(function(){  ... } in chat to submit 
chats using the enter key;

			$("input").keypress(function (e) {
				if (e.which == 13 ) {
					   ws.send('m' + user + ': ' + $("[name=post]").val());
					   $("[name=post]").val('');
					   $("[name=post]").focus();
				}
			});
Updated version of Doc's chat example.. 
- Enter key support for login and posting chats
- Cookie mgmt for user name
- various "tweaks" to the JQuery 

chat2.html:  http://pastebin.com/m66a38d50
Dockimbel
6-Jan-2010
[7211]
Thanks Terry, I've upgraded the chat demo with most of your changes. 
I've also included an alert message for non-compliant web browsers.
Terry
6-Jan-2010
[7212x2]
Need to fix the 'signout' updates to other ports.. it's not sending 
the "bob leaves" message, and it's not updating the user list <div>
No cookies? I like cookies.
Dockimbel
7-Jan-2010
[7214x3]
I've opened 2 Chrome windows logged in the online chat demo from 
both of them and I receive correctly in the first window the quit 
message from the second one. How can I reproduce your issue?
Cookies: well, it would be a nice addition to a real chat app, but 
the point in this demo is to show web socket usage, not to build 
a full-featured chat app. If you want to build a full chat app, you're 
free to take my demo code and extend it as far as you wish.
Btw, you may need to Shift+Reload in Chrome to get the latest chat 
code.
Pekr
7-Jan-2010
[7217]
Shift + Reload (I am used to it) = F5 btw ....
Dockimbel
7-Jan-2010
[7218]
I'm not sure for Chrome, isn't F5 a simple page reload (without clearing 
the cache)?
Terry
7-Jan-2010
[7219x2]
Ahh.. shift-reload to clear cache, and nice debugging/developer tools.. 
Chrome is well thought out.
Doc, i was referring to my modified chat.html regarding the 'signout' 
issue.
Pekr
7-Jan-2010
[7221]
Does Chrome have anything like FireBug or WebDeveloper extension 
in FF?
Terry
7-Jan-2010
[7222x3]
That chat.html I made was a quick hack of yours. Need to build proper 
cookie mgmt functions.. deal with sessions etc.
Yeah, in Chrome, hit CTRL-SHIFT- i
All in all doc, cheyenne sockets are very impressive. 
Couple of suggestions.. 

- Have a folder specifically for socket-apps that automatically get 
loaded into the http.conf file.. 

- Create a connection through PHP (if possible.. otherwise can just 
proxy, but adds lag)
Dockimbel
7-Jan-2010
[7225x2]
Socket apps folder automatic loading : you still need to specify 
the mapping between URL and socket app, no ?
PHP connection: it should be possible with minimal modifications, 
but why would you want that? Is there any  significant PHP socket 
app yet ready to use? My goal in adding web sockets early in Cheyenne 
is to push developers to make nice apps in REBOL, not PHP.
Kaj
7-Jan-2010
[7227x2]
To that end, any chance you could extend your WebSocket framework 
with a somewhat similar Comet-like functionality for older browsers, 
that only uses Ajax?
Doesn't have to be perfect, just facilitate a migration period for 
older browsers
Dockimbel
7-Jan-2010
[7229]
That may be possible, but would be more complicated to support than 
web sockets as the server can't send data without getting a request. 
It will be hard to extend the web socket application framework without 
bloating it. Maybe a separated mod-comet would be a cleaner approach 
(but might duplicate a Iot of code in mod-socket). I will give it 
a look anyway, at least to estimate the time required to support 
it.
Terry
7-Jan-2010
[7230x4]
I plan on making my apps in Rebol, but 99.99999% of the developer 
world won't be so 'inspired'. You may get away with it if you can 
build a killer app, which may very well happen now.
Otherwise, it will be a hobby, like Rebol.
Ruby on Rails looks interesting, but not interesting enough for me 
to spend more than an hour 'playing' with it. BUT.. if RoR built 
some killer app that let me config it, I would take the time.
Now all you need to do is come up with the killer app :)
Überchat
Dockimbel
7-Jan-2010
[7234]
Terry, the point is that if you want to make PHP apps, you should 
better stick with another web server more adequate to PHP like Apache 
or Lightttpd. Cheyenne's PHP support has been done mainly to be able 
to integrate existing PHP apps in REBOL powered web sites, not build 
new ones.
Terry
7-Jan-2010
[7235]
The other option is to build a higher level dialect of some sort. 
Even developers would switch if the switch was dead simple.
Dockimbel
7-Jan-2010
[7236]
It's not a matter for me to favor REBOL against PHP for builting 
apps (everyone is free to choose), but just that there are better 
tools to run PHP code than Cheyenne. OTOH, I'm not sure there's better 
choice currently than Cheyenne to run REBOL web apps.
Terry
7-Jan-2010
[7237]
In my books, Rebol should change it's name to Cheyenne.
Dockimbel
7-Jan-2010
[7238]
From a purely marketing POV, that might make sense. ;-)
Terry
7-Jan-2010
[7239]
The desktop is dead, unless you're building a better browser, or 
games.. and even that distinction is blurring. I'll bet people play 
more online browser based games than desktop.. Folks have moved from 
desktop to console.
Dockimbel
7-Jan-2010
[7240]
Cheyenne Scripting Language
, sounds good. ;-)