Lets see how
Designa registration form for GirlsWhoJS
• Applicants must enter name, email and gender
• Only letters with spaces are allowed in the name
field. Name should be between 5 and 20
characters.
• Email should be of format abc@example.com.
• All are mandatory fields.
• Submit button should be enabled only when all
fields are entered and in valid formats.
5.
One way todo this
(code for a traditional approach)
6.
The Problem
• Formrendering and validations is repetitive
logic
• Code is duplicated
• Leading to increased maintenance costs
7.
Ember to theRescue
• Observer pattern
• Component logic
• Inheritance