Learning Outcome(Slide2)
6
Basics of branding and messaging
5
Target audience and segmentation
4
Different marketing channels
3
Creating value for customers
2
Understanding customer needs
1
What marketing means ?
Choose cool, soft colors instead of vibrant colors
Max 6 Points for Summary & Min 4
Topic Name-Recall(Slide3)
Hook/Story/Analogy(Slide 4)
Transition from Analogy to Technical Concept(Slide 5)
DTO (Data Transfer Object) is a simple Java class used to transfer data between different layers of an application.
EmployeeDTO.java
public class EmployeeDTO {
private String name;
private String department;
// Getters & Setters
}
Simple POJO with only the fields needed for data transfer
Key Features
Lightweight
Contains only essential fields
Serializable
Easy to serialize for APIs
Encapsulated
Private fields with accessors
Validation is the process of checking whether the input data is correct, complete, and follows required rules before processing or storing it in the system.
User Input
Validate
Process
Ensures only correct data is stored in the database.
Prevents runtime issues caused by bad input.
Provides clear error messages for incorrect input.
To enable validation in Spring Boot, we add:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation
</artifactId>
</dependency>
Without this dependency, validation annotations will not work
Adds Hibernate Validator
Enables validation annotations
Integrates with Spring Boot
Bean Validation is a standard framework (API) used in Java to validate object fields (beans) using annotations.
Common annotations
@NotNull
Must not be null
@NotBlank
No empty or whitespace
@Min / @Max
Numeric range validation
@Size
String length validation
Common Use Cases
Form validation in web apps
API request validation
Data integrity enforcement
Custom validations are user-defined validation rules created when built-in annotations are not sufficient.
@Documented
Includes annotation in JavaDocs
@Constraint
Links to validation logic
@Target
Where annotation is used
@Retention
How long annotation is available
message()
Defines validation error message
groups()
Groups validations logically
payload() :
Carries custom metadata information
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.*;
@Documented
@Constraint(validatedBy = PasswordValidator.class)
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidPassword {
String message() default "Invalid password";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
Exception Handling is a mechanism used to handle errors in an application so that it does not crash.
It ensures that errors result in meaningful responses rather than abrupt failures.
Graceful error handling improves user experience and system reliability
Ensures API continues running even when errors occur
Helps identify and fix issues quickly
Returns clear responses like "Employee not found"
Checked Exceptions
Checked at compile time
Must be handled using try-catch or throws
Unchecked Exceptions
Occur at runtime
Not checked at compile time
Custom Exceptions
User-defined exceptions
Created to handle specific business logic errors
Core Concepts (Slide 7)
Core Concepts (.....Slide N-3)
Summary
5
Build strong branding
4
Use different marketing channels
3
Target the right audience
2
Create and communicate value
1
Understand customer needs
Choose cool, soft colors instead of vibrant colors
Max 5 Points for Summary & Min 2
Quiz
Which platform is mainly used for professional networking and B2B marketing ?
A. Facebook
B. Instagram
C. LinkedIn
D. Snapchat
Quiz-Answer
Which platform is mainly used for professional networking and B2B marketing ?
A. Facebook
B. Instagram
C. LinkedIn
D. Snapchat