[ANN] Getting Started with Orbjson tutorial

V

vruz

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
 
J

James Britt

vruz said:
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.


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.
 
V

vruz

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
 
V

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 :)
 
J

James Britt

vruz said:
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
 
C

Curt Hibbs

James said:
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
 
N

Nick Woolley

Hello,

Curt said:
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
 
D

David A. Black

Hi --

Hello,




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
 
C

Curt Hibbs

Nick said:
Hello,




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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,460
Latest member
eibafima

Latest Threads

Top