Prabhu Sunderaraman

Fullstack Engineer, Programmer, Writer, Trainer

prabhu.bits@gmail.com,     GitHub     Youtube     LinkedIn
  • Home
  • Profile
  • Books
  • Reading List
Browsing: / Home
Shortlink

ReactJS video series – Creating Components (Part 1)

By Prabhu Sunderaraman on January 20, 2019 in React JS

This is the fifth part of the video series on React JS.

We discuss creating a component in React JS. We’re building a login form.

The example used in the video is given below

<html>

<head>
    <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>

<body>
    <!--Let's build a login form-->
    <div id="root"></div>
    <script type="text/jsx">
        class LoginForm extends React.Component {
            render() {
                return (<div>
                    <input type="text" placeholder="User name" id="username"/>
                    <br/>
                    <input type="password" placeholder="Password" id="password"/>
                    <br/>
                    <button>Login</button>    
                </div>);
            }
        }
        ReactDOM.render(<LoginForm/>, document.getElementById("root"));
    </script>
</body>

</html>

You can find the video here.

Read and watch the other parts here.

1. Hello ReactJS without JSX
2. Hello ReactJS with JSX
3. Let’s play with JSX – Part I
4. Let’s play with JSX – Part II

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Kotlin Video series – null safety

By Prabhu Sunderaraman on September 5, 2018 in Kotlin

This is the eleventh part of the video series on Kotlin language.
Read and watch the other parts here.

1. Hello Kotlin
2. Declaring Variables
3. Data Types
4. String (Part 1)
5. String (Part 1)
6. Conditional Expressions
7. Functions (Part I)
8. Functions (Part II)
9. Lambda
10. Range

We discuss null safety in Kotlin language. Kotlin treats nullable and non-nullable references differently. ie., You cannot assign null to references. Compiler doesn’t like it. If you have a reference that can accept null value too, then the question-mark(?) comes into picture. Null comparisons have also been made simple thanks to Elvis operator (?:)

The examples used in the video are given below

fun main(args:Array<String>){
   var name:String = "Ram"
   //name = null
   //This condition is always true
   if(name != null){
	println(name)
   }
	
   var anotherName:String? = "John"
   if(anotherName != null){
	println(anotherName)
    }
    anotherName = null
    println(anotherName)
	
    println(anotherName?.length ?: -1)
}

Nullable types can be passed to functions and also returned as output

  fun calculateLength(value:String?):Int?{
     return value?.length
  }
  fun main(args:Array<String>){
     println(calculateLength("Joe"))
     println(calculateLength(null))
  }

You can find the video here.

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Netflix Circuit Breaker in Spring Boot

By Prabhu Sunderaraman on August 14, 2018 in Spring

Here’s the 3 part videos on implementing a circuit breaker pattern in Spring Boot applications using Netflix Hystrix library. The first part is a short introduction and the other two parts show a code-based demo with a light music in the background. Enjoy!!!

Part -I

Part -II

Part -III

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Kotlin Video Series – Range

By Prabhu Sunderaraman on July 24, 2018 in Kotlin, Languages

This is the tenth part of the video series on Kotlin language.
Read and watch the other parts here.

1. Hello Kotlin
2. Declaring Variables
3. Data Types
4. String (Part 1)
5. String (Part 1)
6. Conditional Expressions
7. Functions (Part I)
8. Functions (Part II)
9. Lambda

We discuss range operators in Kotlin language.

The examples used in the video are given below

fun main(args:Array<String>){
   val range = 1 .. 10
   println(range.javaClass)//IntRange
	
   val rangeWithStep = 1 .. 10 step 2
   println(rangeWithStep.first)
   println(rangeWithStep.last)
   println(rangeWithStep.step)
	
   val range2 = 1 until 10
   val range3 = 10 downTo 1 step 2
   println(range3.first)
   println(range3.last)
}

range can be declared using .. operator or using until and downTo keywords with an option incremental step. In the example above range is an instance of IntRange class. So, we can use properties like first, last, step etc., We can also use methods like min(), max(), average(), filter(), map(), reduce() etc.,

  fun print(message:String){
     val range = 1 .. 10
     println(range.max())
     println(range.min())
     println(range.average())
	
     println(range.filter { num -> num % 2 == 0 })
     println(range.map { num -> num * num })
     println(range.reduce { total, num -> total + num })
  }

You can find the video here.

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Quiz on Spring Framework – Part III

By Prabhu Sunderaraman on July 20, 2018 in Spring

Take the third part of the quiz on Spring Boot and Core Spring Framework. You can read the first and second parts from here; Part 1, Part 2.

Question #1: What is the built-in library in Spring Boot used to serialize objects to JSON format?

Jackson. You can also use third-party libraries like Gson

Question #2: For an entity class Car(id, model,year) which of these methods are automatically synthesised in JpaRepository?

findByModel. findByX or findByXAndY methods are generated

Question #3: For an entity class Car(id, model,year) which of these JPA queries is valid to fetch all the BMW cars?

select c from Car c where c.model=:param1. JPA QL is written on the Entity classes

Question #4: Which annotation binds a JPA Query parameter to a method argument?

@Param

Question #5: What advice annotation is used to decide execution of a method?

@Around. Around advice gets around a method and checks for conditions

Question #6: Which one is not a valid term in AOP?

Pointer. Advice, Joinpoint, Pointcut are valid terms in AOP.

Question #7: Which class is provided in Spring Boot to access external services synchronously?

RestTemplate

Question #8: Which ORM implementation does JPA starter pack in Spring Boot use, by default?

Hibernate

Question #9: Which annotation is used to mark a persistent class in JPA?

@Entity

Share this on: Mixx Delicious Digg Facebook Twitter
« Previous 1 … 11 12 13 … 64 Next »

Youtube Channel




Categories

  • JavaScript (48)
    • RequireJS (5)
  • Go (44)
  • Golang (44)
  • Ext JS (23)
  • Spring (22)
  • Mobile (21)
  • Scala (20)
    • Play (3)
  • Uncategorized (19)
  • Video Sessions (18)
  • GoG (17)
  • Sencha Touch (16)
  • jQuery (14)
  • Languages (13)
  • Java 8 (12)
  • React JS (11)
  • Kotlin (11)
  • HealthyCodeMagazine (9)
  • Video (9)
  • Objective-C (8)
  • NoSQL (8)
  • Android (7)
  • MongoDB (7)
  • GWT (6)
  • Tools (6)
  • HTML 5 (5)
  • Cloud (5)
  • General (5)
  • Micro services (5)
  • Java (5)
  • Books (4)
  • AWS (4)
  • Software Architecture (4)
  • .NET (3)
  • Elixir (3)
  • Docker (3)
  • Reactive (3)
  • NodeJS (2)
  • RoR (2)
  • Backbone (1)
  • AngularJS (1)

Archives

  • 2020 (49)
  • 2019 (7)
  • 2018 (34)
  • 2017 (15)
  • 2016 (7)
  • 2015 (18)
  • 2014 (31)
  • 2013 (55)
  • 2012 (100)

Search

Subscribe




Copyright © 2025 Prabhu Sunderaraman.

Powered by WordPress and News.