Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby JavaScript Classes

Reply
Thread Tools

Ruby JavaScript Classes

 
 
Mike Stephens
Guest
Posts: n/a
 
      09-02-2009
Rails has JavascriptHelper but can you recommend other packages that
make it easy for the Ruby programmer to create JavaScript on web pages?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Brian Candler
Guest
Posts: n/a
 
      09-02-2009
Mike Stephens wrote:
> Rails has JavascriptHelper but can you recommend other packages that
> make it easy for the Ruby programmer to create JavaScript on web pages?


I suggest you write native Javascript using jQuery - you'll be glad you
did. jQuery lets you work at the level of CSS selectors, e.g.

$('.someclass').hide(); // hide all elements with class someclass

The half-way house: install jRails and then the Rails helpers will
output jQuery instead of Prototype.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
RĂ¼diger Bahns
Guest
Posts: n/a
 
      09-02-2009
Brian Candler schrieb:
> I suggest you write native Javascript using jQuery - you'll be glad you
> did. jQuery lets you work at the level of CSS selectors, e.g.
>
> $('.someclass').hide(); // hide all elements with class someclass


The same with Prototype looks like this:

$$('.someclass').invoke('hide');

jQuery is not as much better than Prototype as many people believe that
just don't know Prototype.

In the german JS-newsgroup the one and only answer to the question
'which JS-framework should I use?' is 'write your own. The existing ones
are all bullshit'...

R.
 
Reply With Quote
 
Fabian Streitel
Guest
Posts: n/a
 
      09-03-2009
[Note: parts of this message were removed to make it a legal post.]

I can recommend Prototype as well.

Also, there's this great talk by a person who KNOWS about JS:
http://www.youtube.com/watch?v=hQVTIJBZook
(I know it's an hour long, but I really took some lessons out of it. I think
it's worth the time investment)

and his great tool:
http://www.jslint.com
that helped me remove a lot of errors from my javascript stuff...


In the german JS-newsgroup the one and only answer to the question 'which
> JS-framework should I use?' is 'write your own. The existing ones are all
> bullshit'...
>


I like that one

There are tons of frameworks out there, just pick one that has the kind of
syntactic sugar you favor...
Greetz!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mixing C extension classes with ruby classes snacktime Ruby 1 09-20-2006 02:27 PM
#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1... anne001 Ruby 1 04-23-2006 03:02 PM
C++ Design Principles for Ruby - Classes of Classes. John Carter Ruby 1 08-03-2005 02:02 PM
Classes within classes David ASP .Net 2 07-22-2005 07:13 PM
Possible training classes for Ruby programming and for Ruby on Rails Curt Hibbs Ruby 0 05-31-2005 06:39 PM



Advertisments