Posts by Collection

portfolio

publications

talks

AWS: 30,000 feet view

Published:

Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow Read more

teaching

OOPS in Scala

chapter, Online, 2016

OOPS in Scala


Classes

  • Classes in Scala are static templates that can be instantiated into many objects at runtime
  • A Class can contain information about:
    • Fields
    • Constructors
    • Methods
    • Superclasses (inheritance)
    • Interfaces implemented by the class, etc.
      // Simple Class
      class MyClass {}
      

  • Class in Scala is very much similar to Java or C++
  • Class contains fields and methods
    class Emp {
    private var employeeNumber = 0
    var employeeName =null
    def display(empNumber: String, empName: String) = {
        println(s"Employee Number is ${empNumber}")
        println(s"Employee Name is ${empName}")
    }
    }
    
  • In Scala a class is NOT declared as public.
  • A source file can contain multiple classes.
  • All of the classes could be public

    Classes can be used as
    val emp = new Emp()
    emp.display("8597","Dhananjay")
    
  • Parameter less method could be called with or without parentheses
  • Using any form is programmer’s choice
  • However, as convention
    • Use () for mutator method
    • Use no parentheses for accessor method

      Check your Understanding
  • What is the output of the following code ? ```scala class add { var x:Int=10 var y:Int=20 def add(a:Int,b:Int) { a = x + 1 println(s”Value of a after modification :${+a}”);
Read more

Scala

Workshop, Online, 2016

Scala is a deep and powerful language with many advanced features such as macros, implicits and existential types. This is a collection of basic training of Scala addressed at people who are getting started with Scala language or moving from Java to Scala. Read more

Introduction to Scala

chapter, Online, 2016

Introduction To Scala

Scala is a general purpose programming language, multiparadigm object oriented, functional, scalable Read more

Pattern Matching

chapter, Online, 2016

Pattern Matching


Scala has a built-in general pattern matching mechanism It allows to match on any sort of data with a first-match policy — alt
  • Here is a second example which matches a value against patterns of different types: alt

    Enumeration

  • Enumeration allows programmer to define their own data type
  • Often we have a variable that can take one of several values. For instance, a WeekDays field of an object could be either Mon, Tue, Wed, or Thu alt

    Enumeration (cont’d)

  • Another way alt
  • Gives Error if value is not found alt
Read more

Scala Collections

chapter, Online, 2016

Scala Collections


Scala has a rich set of collection library
  • Collections are containers that hold objects
  • Those containers can be sequenced, linear sets of items like Arrays, List, Tuple, Option, Map, etc alt
Read more

Scala Essentials

chapter, Online, 2016

Scala Essentials


Data Types in Scala

  • A Data type tells the compiler about the type of the value to be stored in a location
  • Scala comes with the following built-in data types which you can use for your Scala variables alt

    Data Types in Scala (cont’d)

    Few examples alt
Read more

Angular

Workshop, Online, 2017

Angular (2+) is here, and we’re all super excited about it. Let’s explore all the changes coming in Angular 2. If you come from the world of Angular 1, you may have heard that Angular 2 is a complete code change. While this can seem scary, let’s take a step back and look into what exactly is going on with the new version. There are reasons why Angular 2 is so different. In this course, we’ll take a look at how we can get started with Angular 2 and see all the cool new features Angular 2 provides. Read more

Angular: Overview

chapter, Online, 2017

Angular JS is an open source framework built over JavaScript. It was built by the developers at Google. This framework was used to overcome obstacles encountered while working with Single Page applications. Also, testing was considered as a key aspect while building the framework. It was ensured that the framework could be easily tested. The initial release of the framework was in October 2010. Read more

Environment

chapter, Online, 2017

To start working with Angular 2, you need to get the following key components installed. Read more