JAX 08: Ruby - die Programmiersprache der Zukunft

von Thomas, assono GmbH, Standort Kiel, 23.04.2008



Stefan Tilkov:
Ruby ? die Programmiersprache der Zukunft

Why Ruby?

  • it's different
  • it supports growth
  • it's expressive
  • it's concise
  • we can afford it
  • Rails!
  • it's fun

Quick Intro

  • Type system: dynamic, strong, implicit
  • interpreted (mostly...)
  • very dynamic
  • strong metaprogramming support
  • purely object-oriented

    code examples...
  • loops
  • lists and operations on lists
  • hashes

    comparison von Java code and Ruby code to sort an array by lenght of elements
  • methods
  • classes

    #{variableName} in string literals is replaced by the variable's value
  • inheritance
  • modules (kind of container for methods)
  • "getters" and "setters" (properties!)
  • Attribute Accessor: short cut for properties (nice smile.gif )


    Metaprogramming with Ruby

    Structures
    Struct.new "Person", :first_name, :last_name creates new class

    Creating objects and classes by name
    Kernel.const_get('String').new "Teststring" creates String object
    Test = Class.new

    Indivual object methods
    class << t1
    def object_method ...

    Classes and constants

    Runtime Definitions

    Methods adding methods

    Adding methods to existing classes like String: (Re)opening classes

    method_missing: Method called, when a missing method is called, with name of called method as argument

    short, declarative notation is "expanded" to many method definitions


    Ruby language implemenations
  • MRI = Matz's Ruby Interpreter
  • YARV = Yet anthother Ruby VM
  • Rubinius: "Ruby in Ruby"
  • JRuby: "Ruby in Java"


    Ruby vs. other dynamic languages

    Perl
  • many libraries
  • "write only" reputation
  • weak (wierd) OO features
  • very fast

    Python
  • great community
  • extensive libraries
  • extremely fast

    Jython
  • JVM version of Python
  • neglected for a long time
  • now supported by Sun

    Groovy
  • designed for the JVM
  • supposedly easier for Java developers


    Summary
    Ruby: nice, concise, object-oriented language
    Killer feature: metaprogramming support
    Killer framework: Ruby on Rails
Thomas Bahn

Thomas Bahn

Diplom-Mathematiker, IT-Spezialist & Speaker auf Fachkonferenzen

Thomas Bahn ist Mitgründer und Geschäftsführer der assono GmbH. Seit mehr als 20 Jahren berät er erfolgreich Unternehmen aus ganz Deutschland rund um das Thema Software und Digitalisierung. Insbesondere in den Bereichen HCL Notes und Domino (ehemals IBM) als auch bei aktuellen, unternehmensrelevanten KI-Themen wie Chatbots kennt er die neusten Entwicklungen und weiß, wie diese sich gewinnbringend für Unternehmen einsetzen lassen. Aufgrund seines Expertenwissens ist Thomas Bahn regelmäßiger Sprecher auf nationalen und internationalen Fachkonferenzen.

Fachbeitrag JavaScript Sonstiges Veranstaltung

Sie haben Fragen zu diesem Artikel? Kontaktieren Sie uns gerne: blog@assono.de

Sie haben Interesse an diesem Thema?

Gerne bieten wir Ihnen eine individuelle Beratung oder einen Workshop an.

Kontaktieren Sie uns

Weitere interessante Artikel