Skip to main content

Posts

Scala - Scalable Language

Scala, short for Scalable Language- •             Created by Martin Odersky •             Is object-oriented & functional Programming language •             Scala runs on the JVM Installations •             Install Java •             Set Your Java Environment. Ex- JAVA_HOME, PATH, etc •             Install Scala •             After installation, verify version by typing on command prompt or shell >scala –version >java –version If you have a good understanding on Java, then it will be very easy for you to learn Scala. But, we would again des...

Design Patterns (aka DP), Creational - Abstract Factory Pattern

DP is a well-described solution to a common software problem. Its benefits: Already defined to solve a problem. Increase code reusability and robustness. Faster devlopment and new developers in team can understand it easily DP defined in to 3 categories: Creational  - Used to construct objects such that they can be decoupled from their implementing system. Structural  - Used to form large object structures between many disparate objects Behavioral  - Used to manage algorithms, relationships, and responsibilities between objects. Creational : Abstract Factory :- In short we call it Factory of Factories. To understand this please read factory pattern . When you go through factory pattern: You see that factory can produce only Computers or aptly varied types of Computers. But only Computers. Now, Say you have a 3rd variety of Computer just like PC or Server. Say, Laptop class. You can easily inherit Computer an create your Laptops. So...