I wrote a tutorial on using the Orbjson library to create Web applications with XmlHttpRequest + JSON-RPC.
http://orbjson.rubyforge.org/tutorial/
Comments welcome, probably best sent directly to me rather than the list
James Britt
I wrote a tutorial on using the Orbjson library to create Web applications with XmlHttpRequest + JSON-RPC.
http://orbjson.rubyforge.org/tutorial/
Comments welcome, probably best sent directly to me rather than the list
James Britt
I wrote a tutorial on using the Orbjson library to create Web
applications with XmlHttpRequest + JSON-RPC.
http://orbjson.rubyforge.org/tutorial/
Comments welcome, probably best sent directly to me rather than the list
This is great, anything that makes it less painful to use javascript
(or entirely avoid direct contact with it) is greatly appreciated.
cheers,
vruz
vruz wrote:
I wrote a tutorial on using the Orbjson library to create Web
applications with XmlHttpRequest + JSON-RPC.
http://orbjson.rubyforge.org/tutorial/
Comments welcome, probably best sent directly to me rather than the listThis is great, anything that makes it less painful to use javascript
(or entirely avoid direct contact with it) is greatly appreciated.
Thanks. BTW, I *like* JavaScript. It has Rubyesque qualities.
Really.
James
PS
I have to update the gem, as I just realized my tutorial is based on code only available in the devel version (AKA CVS tree). Should happen shortly. Current gem (0.0.3) does not have the asynch JavaScript stuff.
PS
I have to update the gem, as I just realized my tutorial is based on
code only available in the devel version (AKA CVS tree). Should happen
shortly. Current gem (0.0.3) does not have the asynch JavaScript stuff.
how about a unix-friendly tarball, or a windows-friendly zip file, for
the gemless out there ?
![]()
thank you,
vruz
Thanks. BTW, I *like* JavaScript. It has Rubyesque qualities.
Really.
James
I can appreciate prototype-based languages like Self, and to be fair,
Javascript the language as defined originally is not a bad thing by
itself.
I'm probably blinded by the horrible perception provoked by years of
quirky implementations running on a browser tied to varying flavours
of DOM.
It was probably just the pain ![]()
James Britt wrote:
vruz wrote:
>>I wrote a tutorial on using the Orbjson library to create Web
>>applications with XmlHttpRequest + JSON-RPC.
>>http://orbjson.rubyforge.org/tutorial/
>>Comments welcome, probably best sent directly to me rather than the list
>>
>
>
> This is great, anything that makes it less painful to use javascript
> (or entirely avoid direct contact with it) is greatly appreciated.Thanks. BTW, I *like* JavaScript. It has Rubyesque qualities.
Really.
I agree. In fact it was my positive experiences with JavaScript that
attracted me to Ruby. In fact, about 10 years ago I wrote something very
similar to ActiveRecord in JavaScript. JavaScript is very dynamic, but its
just not as elegant as Ruby.
Curt
vruz wrote:
PS
I have to update the gem, as I just realized my tutorial is based on
code only available in the devel version (AKA CVS tree). Should happen
shortly. Current gem (0.0.3) does not have the asynch JavaScript stuff.how about a unix-friendly tarball, or a windows-friendly zip file, for
the gemless out there ?
They are there, along with the gem. I just haven't glommed an installer script for the raw-source versions. The ambitious can probably just copy over the lib files to get things rolling, but there is also a command line script that set up a skeleton app. The gem stuff works its magic on that part, which so sweet my teeth hurt.
Any pointers to writing or stealing a good install.rb are welcome.
James
Hello,
Curt Hibbs wrote:
I agree. In fact it was my positive experiences with JavaScript that
attracted me to Ruby.
I've had positively *painful* experiences with ActionScript (a variety of ECMAscript). The main pain was in the debugging of small errors, often introduced during refactoring. A misspelt variable comes to life like a gremlin and things break mysteriously. Add to this ActionScripts byzantine scoping rules (which Javascript may lack). Tracking it down requires binary-search style debug prints, and wasted so much of my time I was tearing my hair out.
In fact one of the things which worries me a bit about Ruby, as a newcomer, is that instance variables come to life in the same way - no variable declarations.
I'm curious if you liked JavaScript despite that, or if you found a way around it? Likewise, is autovivification an issue in Ruby I should beware of?
Nick
> how about a unix-friendly tarball, or a windows-friendly zip file, for
> the gemless out there ?They are there, along with the gem. I just haven't glommed an installer
script for the raw-source versions.
great, thank you
Any pointers to writing or stealing a good install.rb are welcome.
This helped me to get started:
cheers,
vruz
Hi --
Hello,
Curt Hibbs wrote:
I agree. In fact it was my positive experiences with JavaScript that
attracted me to Ruby.I've had positively *painful* experiences with ActionScript (a variety of ECMAscript). The main pain was in the debugging of small errors, often introduced during refactoring. A misspelt variable comes to life like a gremlin and things break mysteriously. Add to this ActionScripts byzantine scoping rules (which Javascript may lack). Tracking it down requires binary-search style debug prints, and wasted so much of my time I was tearing my hair out.
In fact one of the things which worries me a bit about Ruby, as a newcomer, is that instance variables come to life in the same way - no variable declarations.
I'm curious if you liked JavaScript despite that, or if you found a way around it? Likewise, is autovivification an issue in Ruby I should beware of?
You do have to be careful spelling instance variables, as they default
to nil. Autovivification in the sense that the term is used with
respect to container objects, though, does not happen in Ruby; that
is, if you say:
x[1] = 2
you'll get an error unless x exists already. (There's no way for x to
autovivify here, since variables are untyped [unlike in Perl, say], so
x could be anything with a # method.)
David
On Tue, 15 Mar 2005, Nick Woolley wrote:
--
David A. Black
dblack@wobblini.net
Nick Woolley wrote:
Hello,
Curt Hibbs wrote:
> I agree. In fact it was my positive experiences with JavaScript that
> attracted me to Ruby.I've had positively *painful* experiences with ActionScript (a variety
of ECMAscript). The main pain was in the debugging of small errors,
often introduced during refactoring. A misspelt variable comes to life
like a gremlin and things break mysteriously. Add to this ActionScripts
byzantine scoping rules (which Javascript may lack). Tracking it down
requires binary-search style debug prints, and wasted so much of my time
I was tearing my hair out.
I've had problems with that level of frustration in *every* language I used
(which must be over 15, by now)!
In fact one of the things which worries me a bit about Ruby, as a
newcomer, is that instance variables come to life in the same way - no
variable declarations.I'm curious if you liked JavaScript despite that, or if you found a way
around it? Likewise, is autovivification an issue in Ruby I should
beware of?
Its happened, although for me its been only a minor annoyance in Ruby
because my methods tend to be *very* short and using test-driven development
catches such errors fast.
Curt
vruz wrote:
This helped me to get started:
Ah, yes, thanks!
James