Ruby
Ruby is an object-oriented programming language. It
combines syntax inspired by Ada and Perl with Smalltalk-like
object-oriented features, and also shares some features with Python,
Lisp and CLU. Ruby is a single-pass interpreted language.
Categories in section: Articles Reviews
| 4D Database (5) | Actionscript (14) | Ajax (30) |
| Apple (25) | ASP (20) | C++ (22) |
| CGI (10) | Coldfusion (22) | Content Management (12) |
| CSS (53) | DHTML (16) | Domain Names (14) |
| Hardware (31) | HTML (39) | Java (31) |
| Javascript (39) | JSP (10) | Linux (81) |
| Microsoft Access (17) | Microsoft Windows (87) | Mysql (21) |
| Networking & Communication (6) | Oracle (15) | Perl (19) |
| PHP (47) | PostgreSQL (9) | Python (18) |
| Ruby (51) | SAP (2) | Search Engine (28) |
| Structured Query Language (29) | Visual Basic (15) | Web Hosting (15) |
| XHTML (9) | XML (21) |
Monday, 21 January 2008 |
Written by
http://www.namaraii.com/hiki/
|
User rating: Rate it first |
Hits: 1950
Thin is a new web server which has been written by Marc-André Cournoyer that uses the EventMachine, Rack and Mongrel libraries. EventMachine makes it super fast at processing network I/O, Rack makes it easy to integrate with existing Ruby Web app frameworks, and Mongrel helps it parse HTTP.
{mos_sb_discuss:50}
What to do if you need to extract data from a document that’s supposed to be HTML or XML, but that contains some invalid markup.
{mos_sb_discuss:50}
Ruby has all the usual control structures, such as if statements and while loops. Java, C, and Perl programmers may well get caught by the lack of braces around the bodies of these statements. Instead, Ruby uses thekeyword end to signify the end of a body.
{mos_sb_discuss:50}
Ruby’s arrays and hashes are indexed collections. Both store collections of objects, accessible using a key. With arrays, the key is an integer, whereas hashes support any object as a key. Both arrays and hashes grow as needed to hold new elements. It’s more efficient to access array elements, but hashes provide more flexibility. Any particular array or hash can hold objects of differing types; you can have an array containing an integer, a string, and a floating-point number, for example.
{mos_sb_discuss:50}
Here’s a Ruby class definition.
class Order < ActiveRecord::Base has_many :line_items
def self.find_all_unpaid
find(:all, 'paid = 0')
end
def total
sum = 0
line_items.each {|li| sum += li.total}
end
end
{mos_sb_discuss:50}
One of the most interesting (and powerful) features of JRuby is the ability to access and manipulate Java classes and libraries. The code below creates, configures and starts an instance of an ActiveMQ Broker that accepts connections based on the Stomp protocol.
{mos_sb_discuss:50}
I have occasionally participated in conversations around the subject of the database as a product with an expiry date, destined to eventually be replaced by highly distributed data storage models. Given the current technological state, this sounds much a like science fiction scenario, but services like AWS S3 bring the idea closer to science and further from fiction.
| Results 1 - 10 of 51 | << Start < Prev 1 2 3 4 5 6 Next > End >> |
Powered by jReviews




