World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 11-Jul-2010 [8497x2] | Terry: tested Sensha (Extjs re-branded), looks good but way too slow even on a Android with latest hardware (1Ghz CPU)...too bad. |
I guess it's only good for desktops with a touch screen, not for mobile devices. | |
Graham 11-Jul-2010 [8499] | So, we could use this to send email instead of RSP script? Just have to upload attachements base 64 encoded still I guess as it is still a text protocol |
Dockimbel 11-Jul-2010 [8500] | Graham: I don't see the relation between websockets and sending emails...what problem are your trying to solve? |
Graham 11-Jul-2010 [8501x3] | I use Cheyenne to send email ... via Rsp |
Sounds like I can forgo the sendmail.rsp script which a user might damage and just use a web socket instead | |
Or am I not understanding this correctly | |
Dockimbel 11-Jul-2010 [8504] | Graham: websocket is just an evolution of the HTTP protocol, it's not TCP, you can't contact a SMTP server from a browser directly if this is what you have in mind. |
Henrik 11-Jul-2010 [8505] | AFAIK, websockets is for replacing AJAX. |
Dockimbel 11-Jul-2010 [8506] | AJAX will remain in use I guess, having a permanent connection is not always required and makes servers less scalable. Websockets will mainly replace all COMET tricks for server-side events. |
Graham 11-Jul-2010 [8507] | Doc, you have a mail server inside Cheyenne .. .that's what I want to use. |
Dockimbel 11-Jul-2010 [8508] | Graham: I don't see any advantages in using websockets rather than classic requests then? Btw, you can't upload files from a browser using websockets AFAIK. |
Graham 11-Jul-2010 [8509x3] | Doc, I have a Rebol app .. that uses Cheyenne as an helper app ... so I would be using it from my Rebol app ... |
I would just have to use an ws:// protocol ... yet to be written | |
The possibly advantage is that I don't need an rsp script on the user's drive that might get damaged or deleted .. | |
Dockimbel 11-Jul-2010 [8512] | If you're using Cheyenne just as a MTA, better strip it down to just UniServe + MTA service, and integrate %Uniserve/libs/email.r in your client app. |
Graham 11-Jul-2010 [8513x3] | I also use it as a web server |
for prefilling Acrobat forms ... | |
If a pdf is loaded into a browser .. it allows one to post the data in an acrobat form ... but if it is loaded into acrobat reader alone, then it can post, but it can't understand any html returned by the web server | |
Dockimbel 11-Jul-2010 [8516] | Graham, are you using Cheyenne's embedded mode or you're just launching Cheyenne's binary? |
Terry 11-Jul-2010 [8517x4] | You could pass a message to C via websockets and have C send it along for you. |
I use websockets for passing javascript and JSON to a static page. The pages start off with a single javascript function, then i use websockets to lazy load. Here's pseudo for an email client using Cy (shorting Cheyenne to Cy from C.. keep confusing myself) - Start with a blank page with the websocket function. No HTML, No css.. link to Jquery only .. this page is under 1k - Send an initial message to Cy with the page name, Cy responds by pushing the necessary HTML (simple email form), CSS and JS (a single function to send back the form results to Cy) to the DOM - User fills out form, and submits.. pushing an array (JSON, string.. whatever) with the message details to Cy - Cy sends the message via rebol mail ... but then .. Cy polls the users pop mail acount on a regular basis, and upon finding a new message, sends <i> sends a javascript function</i> to the page, that gets EVAL 'd . This could do some animation in a canvas tag, push some message to the browser's chrome.. whatever. All using the same tiny webpage. When you look at the source, you see 20 lines of code. | |
JQuery is optional, you can lazy load any library you need, whenever it's needed.. it's possible to mix and match based on the requirements. | |
Doc, re Sencha.. i found it pretty smooth on an iPhone, but slow, what did you mean? I/O or animations? | |
Dockimbel 11-Jul-2010 [8521] | Tested on Android only, any action in Sencha demos seem slow (clicking buttons, sliding, animations) compared to native UI. |
Endo 11-Jul-2010 [8522] | @Graham: you are using web sockets for a wierd job. The shortest explanaiton for web socket is: it is the way to trigger an event on the client side from the server side via already open tcp (http) connection. ofcourse that connection is full duplex, client and server both can send a utf8 encoded (currently no binary) string messages anytime. |
Graham 11-Jul-2010 [8523] | Doc, yes ... launching Cheyenne binary. The other possible advantage may be that the mta might communicate back to me if the mail send fails? Otherwise i have to read that data somewhere? |
Dockimbel 12-Jul-2010 [8524] | You can query Cheyenne's MTA (through RSP scrip) for email sending job status. |
Graham 12-Jul-2010 [8525x2] | Sure .. just wondering if it's easier to do thru web ports and if the server can notify me thru an open port when it succeeds or fails rather than me poll the server |
I wonder if this is a way to ask Cheyenne to unload it self ... I presume 'quit does not work in RSP scripts | |
Dockimbel 12-Jul-2010 [8527] | Notification thru websocket port: sure, you can have that, but you'll need: a ws client for REBOL, a websocket app and a RSP script for that (the websocket app will need a timer to trigger queries on a RSP script to get the email status or hack in local MTA data to get the info to avoid querying a RSP script). |
Terry 12-Jul-2010 [8528x4] | Doc, check out this link http://blog.sproutcore.com/post/531215199/introducing-sproutcore-touch |
fyi html5 has a new file api.. http://dailyjs.com/2009/11/30/html5-file-api/ | |
Since the File API is asynchronous, files could be loaded and processed in the background while the user does other things. This could also be useful for creating web applications that work offline. | |
File Api Demo (requires firefox) http://html5demos.com/file-api | |
Terry 13-Jul-2010 [8532] | If you haven't yet, check out http://lesscss.org/ |
BrianH 13-Jul-2010 [8533x2] | Or look here if you want to code in something other than Ruby, PHP or .NET: http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css/ |
And it's supposed to be 40x faster too, since the processing is done client-side. | |
Terry 13-Jul-2010 [8535x3] | Yeah, was looking for the JS link (not on their main site?) <i>This</i> is the kind of thing I'm talking about when I say "less language, more tools". There's basically ZILCH of this sort of thing in Rebol. |
I mean, if this doesn't have Rebol dialect written all over it, what does? | |
less.watch() is pretty cool | |
Maxim 13-Jul-2010 [8538] | well remark allows you to do this on ther server... and you could cache it so its just processed once. |
Terry 13-Jul-2010 [8539] | http://www.googlefight.com/index.php?lang=en_GB&word1=rebol&word2=less.js |
Maxim 13-Jul-2010 [8540x2] | well, if you search each one individually, you don't get the same results.... |
also note that at some point, the word "less" is used directly.... so this skews the results a lot | |
Terry 13-Jul-2010 [8542x2] | hmm, true |
However, I think any kind of implementation like this should tie in with Cheyenne. | |
Henrik 13-Jul-2010 [8544] | LESS looks interesting in that it could be incorporated into the HTML dialect. |
BrianH 14-Jul-2010 [8545] | Maxim, the reason the client-side processing is faster is not because of processing overhead, it is because the resulting CSS code is much larger than the LESS source code, so it takes longer to transmit over a network connection. |
Maxim 14-Jul-2010 [8546] | ok, but client-side caching should mitigate this difference . |
older newer | first last |