HOW to handle PHONE/ CREDIT CARD user input? Spring MVC / BOOT Formatter | Explore with debugging.

  Рет қаралды 27,222

Selenium Express

Selenium Express

Күн бұрын

Spring MVC Formatter: First of all, Why do we need a formatter? Well, The importance of a formatter comes when our app requires some special formartting. Imagine a phone number like 91-213132131212, which needs to be bind with a Phone object having a string country code, phone number properties.
A scenario like this needs to be handled by the developer by using an interface called Formatter.
When The user submits a form, all the input we get in string format. Spring framework internally converts all the values to a required data type.
Now, The problem comes when the auto data binding fails. Think about the phone number example, Where the user gives the phone input as the String and, We need to convert the string to a phone object.
Here, We need to bind the data manually by using the Spring Formatter interface.
We will have a deep dive into this concept here in this video.
To Use the Formatter interface, We need to understand three different interfaces.
Formatter Interface
Printer Interface
Parser Interface
The Printer and the Parser Interface have the print() and the parse() methods, respectively.
The print() helps for displaying the object, whereas the parse helps for the conversion of an object.
We will take the help of an eclipse debugger to understand the flow of execution. I will encourage everyone to start debugging the web app as it will help us to have a batter clarity.
----------
Here is the video map :
Video contains : 00:00:00
Why Late upload? : 00:02:16
Adding a communication channel to our app: 00:06:20
Do's and Don't: 00:12:56
How to handle nested objects: 00:15:01
Why a Formatter is required: 00:24:58
Formartter introduction : 00:37:00
Printer and Parser deep dive: 00:38:51
Writing a Phon number formatter: 00:40:00
Registering the formatter with the app: 00:44:00
Print method Logic implementation: 00:53:53
Parse method implementation : 01:06:49
Bug Fixes: 01:24:11
Assignment one (Defect) : 01:35:55
Assignment two (Story): 01:40:28
Wait for a Twist: 01:45:23
Bye Bye: 01:52:00
-----------------
We have two similar concepts called converter and property editor which I am going to cover in the later tutorial but the concepts are pretty identical.
--------------
Any time you are getting stuck with issues, Feel free to ask for support.
You can send mail to seleniumexpress@gmail.com
you can ping me on my Facebook page
/ seleniumexpress
Make sure to join my private Facebook page
“SeleniumExpress - Support"
/ 187000222361579
you can ask for support in my website forum
www.seleniumexpress.com
Subscribe to my youtube channel
/ @seleniumexpress
Follow me on Insta
/ selenium_express
Music :
-----------
credits : -
(intro)
Adventures by A Himitsu / a-himitsu
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons.org/licenses/b...
Music released by Argofox • A Himitsu - Adventures...
Music provided by Audio Library • Adventures - A Himitsu...
intro template :
/ alexbau01

Пікірлер: 87
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 8 МЛН
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 5 МЛН
Это реально работает?!
00:33
БРУНО
Рет қаралды 3 МЛН
The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021
1:00:41
NDC Conferences
Рет қаралды 1,3 МЛН
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 159 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 57 М.
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 8 МЛН