Monday, June 24, 2013

SCALA Environment Setup

For SCALA we need JAVA to be installed.

After setting up Java
    GO to http://www.scala-lang.org/downloads
    Download the package which suites to your working environment.
    If you download the zip file of source, Then, extract the zip file.
    From command prompt go to the location of "bin" folder in scala folder which you extracted.
    From command prompt type the command "scala" and press enter.
    If scala installed properly, then we can see the message as "Welcome to Scala version x.x.x" and "SCALA" console opens.
    From that console we can test the code samples.
   
    To setup class path, add a System level "Path" variable to the downloaded "scala/bin" folder in both linux and windows environment.

If we set the path variable properly, we can run SCALA from any folder of the computer.




Thursday, June 20, 2013

What is SCALA

What is SCALA:
SCALA is a Object Oriented Functional 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, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application.

SCALA boost up the development productivity as the lines of code is reduced also it will increase application scalability and overall reliability.

SCALA programs run on the Java VM, are byte code compatible with Java so we can make full use of existing Java libraries or existing application code. We can call SCALA from JAVA and we can call JAVA from SCALA, the integration is seamless. Also Scala Supports .NET Framework also.

How SCALA Compiler developed:
After having written hundreds of thousands lines of Java himself, Martin Odersky, Professor at EPFL, was well aware of the frustrations faced by Java programmers. He formed the vision of applying the best knowledge of the academic research community to the problem of making the Java programming experience better, even fun. His first pragmatic step was Java Generics, seen as a major success by the Java community. Later he wrote a compiler and named it as SCALA.
Scala was released late 2003/early 2004 on the Java platform, and on the .NET platform in June 2004.

Why Scala is Object Oriented and also Functional:
Scala is Object Oriented language because every value in Scala is an Object. Types and behavior of objects are described by classes and traits.

Scala is also a functional language in the sense that every function is a value. Scala provides a lightweight syntax for defining anonymous functions, it supports higher-order functions, it allows functions to be nested,

Wednesday, June 19, 2013

Getting Started

I want to become a JAVA Developer. But unfortunately I become a PHP Developer. When ever I get free time I want to practice some sample basic programs in JAVA. But I never did it. Unfortunately few months back, I got a chance to work on Selenium automation script. It gave me a wonderful chance to recall my Java skills after 5 years.

With my initital skills and with the help of Google I wrote Selenium automation scripts in Java. But I didnt made any notes on it.

Now I got another chance to learn SCALA. Now this time I want to make a note on, how I'm learning the basics of SCALA and how I'm going to practice. By this way I can recall what I did also it may help the other viewers to start progress on it.