There are three examples of my code:
- With architectural approach and clean code
- Regarding to one screen task with the
KISS
principle - Just a task written on Objective-C
Task:
For this assignment we have the Employee class. It has 3 properties:
- name
- birthYear
- salary
We also have EmployeeDirectory, which is a class that manages loading of employee records.
- Create a selector in the Employee class that formats the salary of the employee according to the currency the salary is in and returns it as a string in readable format. You can use built-in libraries to show the proper currency symbols.
- Create a View Controller that shows the list of employees (name, birthYear, and salary) loaded by the EmployeeDirectory. You should use the selector from the previous task to show the salary.
- Make the View Controller have a button on its navigation toolbar that sorts the employee list by name without blocking the main thread. Use blocks.
- Bonus points: don’t use storyboards or XIBs.
- Bonus points: use your own views with custom layout for each employee in the list.
- Bonus points: where is the performance bottleneck in your code while scrolling your employee list (run on a device)? How could you solve it?
Disclamer:
It's just an example, that shows that I can write on Objective-C.