Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Permenkaret Permenkaret is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 351
Rep Power: 13
Permenkaret mempunyai hidup yang Normal
Default [Share Tutorial] Memulai Scala step-by-step; bahasa objek-fungsional masa depan?

Quote:





What is Scala?

Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java.






Quote:





What is Lift?

Because Lift applications are written in Scala, an elegant JVM language, you can still use your favorite Java libraries and deploy to your favorite Servlet Container. Use the code you've already written and deploy to the container you've already configured!





Sebenarnya dah lama dengar skala cuma sebelumnya gak gitu tertarik...sebulan lalu pas lagi banyak waktu kosong, iseng2 ngoprek scala. wah ternyata maknyus gan



Scala http://www.scala-lang.org/node/273 adalah bahasa yg object-oriented sekaligus functional yg berjalan di atas java virtual machine (JVM), di klaim sangat scalable, makanya diberi nama scala yg juga berarti tangga dalam bahasa spanyol



Scala diklaim sebagai bahasa objek fungsional masa depan



Instal Scala

selain stand-alone install, skala tersedia sebagai plugin untuk netbeans, idea dan eclipse. dalam contoh kali ini kita akan memakai eclipse classic 3.5.2 sebagai mana disarankan oleh scala-ide.org karena saat ini support untuk Eclipse 3.6 (Helios) adalah support experimental



Oke mari mulai



1. Requirement

a. Java development kit 1.6 http://java.sun.com/javase/downloads/

b. Eclipse galileo 3.5.2 http://eclipsesource.com/download/st....5.2-win32.zip ukuran 163 MB



2. Ekstrak eclipse ke folder kesukaan anda misal C:\program files\

a. jalankan eclipse lalu klik Help | Install New Software | Add | Add Site (catatan: harus sedang terkoneksi ke internet, ukuran plugins 22 MB)

b. name kosongkan saja masukkan address ini di location http://download.scala-ide.org/nightl...er-2.8.1.final

c. klik Ok dan tunggu, ketika muncul scala eclipse plugin dkk cek list semuanya lalu next


Spoiler for gambarnya:














d. next dan next... pas muncul terms & license pilih I accept ....

e. pas muncul warning: you are installing softaware that contains unsigned content..... pilih ok

f. tunggu sampai selesai lalu restart eclipse



3. Memulai Scala

a. membuat projek --> klik file | new | other | scala wizard | scala project | beri nama halokaskus | finish


Spoiler for gambarnya:




















b. setelah membuat projek, berikutnya kita membuat objek --> klik file | new | scala object

beri nama cobascala dan nama package com.contoh | finish


Spoiler for gambarnya:




















c. klik cobascala.scala


Spoiler for gambarnya:
















d. masukkan kode berikut


Spoiler for gambarnya:
















e. klik save lalu run...hasilnya


Spoiler for gambarnya:
















untuk user scala yg kelas kakap contohnya twitter dan foursquare telah beralih ke scala, lengkapnya bisa dilihat di http://www.scala-lang.org/node/1658



scala yg kini versi 2.8.1 sudah sangat matang begitu juga framework pemrograman web-nya yg di kenal dengan nama lift http://www.liftweb.net/



sekian, semoga berguna mungkin dilain waktu akan ane sambung



Buku Scala yg ane rekomen

silahkan cari di

http://wowebook.com

http://avaxhome.ws/ebooks





Beginning Scala

By David Pollak

Apress





Programming Scala

By Alex Payne and Dean Wampler

O’Reilly





Steps in Scala Introduction to Object-Functional Programming

By Christos KK Loverdos and Apostolos Syropoulos

Cambridge University Press



Untuk Lift framework



The Definitive Guide to Lift Scala-based Web Framework

By Derek Chen-Becker, Tyler Weir, Marius Danciu

Apress




Spoiler for pengguna enterprise:








http://www.scala-lang.org/node/1658

Scala in the Enterprise



The Scala programming language is used by many companies to develop commercial software and production systems; please find below some notable examples. Your company can also benefit from using Scala, just like :



LinkedIn

Électricité de France Trading

Twitter

Novell

The Guardian

Xebia

Xerox

FourSquare

Sony

Siemens

Thatcham

OPOWER

GridGain

AppJet

Reaktor

and many others













Reply With Quote
Reply


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


 


All times are GMT +7. The time now is 09:09 AM.