home
firma

CAL Open Quark -- Haskell für Java

jump to english contents/update site

Was ist CAL?

  • CAL wurde seit 1999 von Business Objects (Firma 2008 gekauft von SAP) mit folgenden Zielen entwickelt:
    • "Business Logic" als wiederverwendbare und kombinierbare Komponenten (funktional)
    • in Java einbettbare Lösung, welche nahtlos mit anderen Java Objekten und der Applikationslogik verbunden werden kann.
    • Java als Applikationsplattform (GUI, Applikationserver, Datenbanken, ...) erweitert um funktionalen Kern für knackige Probleme.
    • Komfortabler Zugang zur getypten funktionalen Welt für den durchschnittlichen (Java) Entwickler
  • Seit 2007 ist CAL Compiler/IDE/Quark Open Source unter BSD Lizenz!
  • Lazy, streng getypt mit viel Ähnlichkeit zu Haskell
  • Volle, dynamische Kontrolle von CAL-Funktionskomposition - und - erzeugung aus Java (ohne CAL)
  • Kompiler der effizienten Java Byte Code erzeugt

Warum CAL?

  • läuft auf der Java Virtual Machine
    • CAL kann Java Bibliotheken benutzen (z.B. Excel R/W, PDF Erstellung, JDBC)
    • Portierbarkeit
    • Einbettbarkeit in Java Anwendungen, CAL Compiler und Interpreter in Java geschrieben
  • gutes Basis Framework QUARK mit sehr guter Dokumentation
  • Standard Libs: (von Haskell) Prelude, Monad, Pretty Printer, Parsec...
  • Erweiterte Libs: XML - und typsicherer SQL-Builder (u.a. Oracle, MS-SQL) und einfacher SQL Parser
  • Entwicklungsumgebung: Eclipse Plugin und ice (CLI: Interpreter und Compiler-Tools, vgl. ghci)
  • Leichte Verteilung von CAL Anwendungen als JAR Archive, sonst nichts weiter notwendig.
  • Erhöhung der Akzeptanz durch Plattform Unabhängigkeit und Sicherheit von JAVA, selbst in Konservativen Umgebungen (Strenge IT Policies)
  • Leichte Erlernbarkeit , vereinfachter Haskell Syntax

Installation

Prerequisite:

Tutorial

  • Step by Step tutorial (in german): HaL4 CAL Tutorial
  • needed eclipse projects: eclipse-projects-hal4.zip
    • Open Quark Framework Binary Package
    • Quark01 -- a simple "Hello World" project, as entry point for own projects
    • Quark02 -- a real world example of using CAL

      Steps of the tutorial:
      - showing of real world cal examples
      - calling of static java methods
      - find a file in classpath
      - convert a Excel file into [[String]]
      - parsing of rows into own data structure
      - implementing a instance of the show typeclass
      - aggregation of rows with equal coordinates
      - conversion of the result to xml using the XmlBuilder
      - outputing a string into a file using a UTF8 encoding
      - using the assert function to test the whole code

      To follow the tutorial read the ExcelConverter.cal from top and execute the ex1 .. ex15 in ice.
  • Send Feedback and Questions to haskell at iba-cg dot de