Skip to content

Резюме зустрічі 03.11.15

romach edited this page Nov 4, 2015 · 2 revisions

youtube-icon Відео

Резюме

🕒 [01:04 - 03:04]

  • скласти резюме і опублікувати його в Slack в форматі Google Docs

Загальна таблиця звітності

🕒 [03:04 - 7:12]

  • в таблицю звітності треба записувати час роботи над проектом, в коментарях вказувати, що було зроблено, яка задача виконується в даний момент

TDD kata

🕒 [07:12 - 14:45]

Code Kata is an attempt to bring this element of practice to software development. A kata is an exercise in karate where you repeat a form many, many times, making little improvements in each. The intent behind code kata is similar. Each is a short exercise (perhaps 30 minutes to an hour long). Some involve programming, and can be coded in many different ways. Some are open ended, and involve thinking about the issues behind programming. These are unlikely to have a single correct answer. http://codekata.com/

Англійська мова

🕒 [16:15 - 17:57]

  • бажано вчитися на курсах, які мають it-направленість
  • http://dreamer.kiev.ua/ - курсы, упор на разговор

Виключення

🕒 [19:40 - 33:00]

Какие исключения в каких случаях в каких слоях должны генерироваться?

  • рекомендують використовувати unchecked exceptions
  • принципи поділу проекту на модулі:
    • рівневий (контроллер, сервіс, DAO);
    • горизонтальний (по фічах)
  • кожен модуль повинен бути самодостатнім і мати повноцінний API і свої типи виключень
  • DAO повинен генерувати виключення (наприклад, якщо об'єкт не знайдено) [25:00 - 26:30]
  • в ідеалі, щоб кожен рівень можна було виділити в jar
  • обробка виключень: dao генерує DaoException, сервіс ловить його, пише в лог і генерує ServiceException, контроллер обробляє ServiceException;

Надлишкові методи

🕒 [33:00 - 38:20], [41:00 - 44:20]

"You aren't gonna need it" (acronym: YAGNI) is a principle of extreme programming (XP) that states a programmer should not add functionality until deemed necessary. XP co-founder Ron Jeffries has written: "Always implement things when you actually need them, never when you just foresee that you need them." Other forms of the phrase include "You aren't going to need it" and "You ain't gonna need it". Wikipedia

  • не треба писати код, який не використовується в даний момент
  • краще додати в коментарях посилання на статтю, яка зможе знадобитись

Exeption Handlers

🕒 [38:20 - 41:00]

  • @ControllerAdvice - used to define @ExceptionHandler, @InitBinder, and @ModelAttribute methods that apply to all @RequestMapping methods
  • @ExceptionHandler
  • треба змінити реалізацію DAO, щоб можна було кидати виключення [46:39 - 51:00]
Clone this wiki locally