{"id":132,"date":"2025-04-09T21:36:11","date_gmt":"2025-04-09T12:36:11","guid":{"rendered":"https:\/\/suyasuyahirohiro.com\/?p=132"},"modified":"2025-04-09T21:36:11","modified_gmt":"2025-04-09T12:36:11","slug":"%e4%b8%89%e5%b1%a4%e6%a7%8b%e9%80%a0%e5%86%8d%e5%85%a5%e9%96%80%ef%bc%9a%e5%86%97%e9%95%b7%e3%82%b3%e3%83%bc%e3%83%89%e3%82%92%e8%a7%a3%e6%b6%88%e3%81%97%e3%80%81%e3%82%88%e3%82%8a%e5%a0%85%e7%89%a2","status":"publish","type":"post","link":"https:\/\/suyasuyahirohiro.com\/?p=132","title":{"rendered":"\u4e09\u5c64\u69cb\u9020\u518d\u5165\u9580\uff1a\u5197\u9577\u30b3\u30fc\u30c9\u3092\u89e3\u6d88\u3057\u3001\u3088\u308a\u5805\u7262\u306aWeb\u30a2\u30d7\u30ea\u3078"},"content":{"rendered":"\n<p>\u3053\u3093\u306b\u3061\u306f\uff01Web\u958b\u767a\u306b\u304a\u3051\u308b\u4e09\u5c64\u69cb\u9020\u3001\u4e00\u5ea6\u306f\u5b66\u3093\u3060\u3082\u306e\u306e\u3001\u3044\u3056\u5b9f\u88c5\u3057\u3088\u3046\u3068\u3059\u308b\u3068<br>\u300c\u3042\u308c\u3001\u3069\u3053\u306b\u4f55\u3092\u8a18\u8ff0\u3059\u308c\u3070\u3044\u3044\u3093\u3060\u3063\u3051\uff1f\u300d\u3068\u624b\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3001\u3042\u308a\u307e\u3059\u3088\u306d\u3002<br>\u79c1\u3082\u307e\u3055\u306b\u305d\u306e\u72b6\u614b\u3067\u3057\u305f\u3002<br>\u5197\u9577\u306a\u30b3\u30fc\u30c9\u3092\u89e3\u6d88\u3057\u3001\u3088\u308a\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u76ee\u6307\u3059\u3079\u304f\u3001\u4e09\u5c64\u69cb\u9020\u306b\u518d\u6311\u6226\u3057\u305f\u904e\u7a0b\u3092\u5171\u6709\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u5c64\u69cb\u9020\u3068\u306f\uff1f<\/strong><\/h2>\n\n\n\n<p>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3001\u5f79\u5272\u3054\u3068\u306b\u300c\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\u300d\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u300d\u300c\u30c7\u30fc\u30bf\u5c64\u300d\u306e3\u3064\u306b\u5206\u5272\u3059\u308b\u8a2d\u8a08\u30e2\u30c7\u30eb\u3067\u3059\u3002<br>\u5404\u5c64\u3092\u72ec\u7acb\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u4fdd\u5b88\u6027\u3001\u62e1\u5f35\u6027\u3001\u518d\u5229\u7528\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64 (Presentation Layer)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9 (UI) \u3092\u62c5\u5f53\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u3068\u306e\u76f4\u63a5\u7684\u306a\u3084\u308a\u53d6\u308a\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>HTML, CSS, JavaScript \u306a\u3069\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u6280\u8853\u304c\u7528\u3044\u3089\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u3078\u9001\u4fe1\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u304b\u3089\u306e\u5fdc\u7b54\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u8868\u793a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64 (Application Layer)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4e3b\u8981\u306a\u51e6\u7406 (\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af) \u3092\u62c5\u5f53\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u57fa\u3065\u304d\u3001\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3001\u8a08\u7b97\u3001\u691c\u8a3c\u306a\u3069\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30c7\u30fc\u30bf\u5c64\u3068\u9023\u643a\u3057\u3001\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u3001\u4f5c\u6210\u3001\u66f4\u65b0\u3001\u524a\u9664\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>Java, Python, PHP \u306a\u3069\u3001\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u304c\u7528\u3044\u3089\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30c7\u30fc\u30bf\u5c64 (Data Layer)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u3068\u7ba1\u7406\u3092\u62c5\u5f53\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306a\u3069\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u304b\u3089\u306e\u8981\u6c42\u306b\u5fdc\u3058\u3066\u3001\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u66f8\u304d\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u4e09\u5c64\u69cb\u9020\u3092\u56f3\u3067\u8868\u3059\u3068<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code> \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64 \u2502\u2190\u30e6\u30fc\u30b6\u30fc\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n        \u2502\n \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n        \u2502\n \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \u30c7\u30fc\u30bf\u5c64 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u4f8b\u3068\u89e3\u8aac<\/strong><\/h2>\n\n\n\n<p>\u4eca\u56de\u3001\u30dd\u30e2\u30c9\u30fc\u30ed\u30bf\u30a4\u30de\u30fc\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f8b\u306b\u3001\u5404\u5c64\u306e\u5b9f\u88c5\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64 (PomodoroController.java)<\/strong><\/h3>\n\n\n\n<p>Java<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.example.pomodorotimer.controller;\n\nimport com.example.pomodorotimer.service.PomodoroService;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\npublic class PomodoroController {\n\n    private final PomodoroService pomodoroService;\n\n    @Autowired\n    public PomodoroController(PomodoroService pomodoroService) {\n        this.pomodoroService = pomodoroService;\n    }\n\n    @PostMapping(\"\/pomodoro\")\n    public String startPomodoro(@RequestParam int workMinutes, @RequestParam int workSeconds,\n            @RequestParam int breakMinutes, @RequestParam int breakSeconds) {\n        int workTotalSeconds = workMinutes * 60 + workSeconds;\n        int breakTotalSeconds = breakMinutes * 60 + breakSeconds;\n        pomodoroService.startPomodoro(workTotalSeconds, breakTotalSeconds);\n        return \"\u30dd\u30e2\u30c9\u30fc\u30ed\u30bf\u30a4\u30de\u30fc\u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002\";\n    }\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>@RestController<\/code>: JSON \u3084\u6587\u5b57\u5217\u306a\u3069\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>@Autowired<\/code>: Spring \u306e\u4f9d\u5b58\u6027\u6ce8\u5165 (DI) \u306b\u3088\u308a\u3001PomodoroService \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u81ea\u52d5\u7684\u306b\u6ce8\u5165\u3055\u308c\u307e\u3059\u3002DI \u306b\u3088\u308a\u3001\u30af\u30e9\u30b9\u9593\u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u758e\u306b\u306a\u308a\u3001\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u30fb\u67d4\u8edf\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>@RequestParam<\/code>: HTTP \u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001<code>\/pomodoro?workMinutes=25&amp;workSeconds=0&amp;breakMinutes=5&amp;breakSeconds=0<\/code> \u3068\u3044\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5834\u5408\u3001<code>workMinutes<\/code> \u306b\u306f 25, <code>workSeconds<\/code> \u306b\u306f 0, &#8230; \u304c\u305d\u308c\u305e\u308c\u6e21\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64 (TimerService.java, PomodoroService.java)<\/strong><\/h3>\n\n\n\n<p>Java<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ TimerService.java\npackage com.example.pomodorotimer.service;\n\nimport java.util.Timer;\nimport java.util.TimerTask;\nimport org.springframework.stereotype.Service;\n\n@Service\npublic class TimerService {\n\n    public void startCountdown(int taskSeconds, Runnable onFinish) {\n        \/\/ ... (\u30bf\u30a4\u30de\u30fc\u51e6\u7406\u306e\u5b9f\u88c5)\n    }\n}\n\n\/\/ PomodoroService.java\npackage com.example.pomodorotimer.service;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\n@Service\npublic class PomodoroService {\n\n    private final TimerService timerService;\n    \/\/ ... (\u30dd\u30e2\u30c9\u30fc\u30ed\u30bf\u30a4\u30de\u30fc\u306e\u30ed\u30b8\u30c3\u30af)\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>@Service<\/code>: \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u30bf\u30a4\u30de\u30fc\u6a5f\u80fd\u3068\u30dd\u30e2\u30c9\u30fc\u30ed\u30bf\u30a4\u30de\u30fc\u306e\u30ed\u30b8\u30c3\u30af\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30c7\u30fc\u30bf\u5c64 (Task.java, TaskRepository.java)<\/strong><\/h3>\n\n\n\n<p>Java<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Task.java\npackage com.example.pomodorotimer.domain;\n\nimport javax.persistence.Entity;\nimport javax.persistence.Id;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport java.time.LocalDateTime;\n\n@Entity\npublic class Task {\n\n    @Id\n    @GeneratedValue(strategy = GenerationType.IDENTITY)\n    private Long id;\n    \/\/ ... (\u30bf\u30b9\u30af\u306e\u5c5e\u6027)\n}\n\n\/\/ TaskRepository.java\npackage com.example.pomodorotimer.repository;\n\nimport com.example.pomodorotimer.domain.Task;\nimport org.springframework.data.jpa.repository.JpaRepository;\nimport org.springframework.stereotype.Repository;\n\n@Repository\npublic interface TaskRepository extends JpaRepository&lt;Task, Long&gt; {\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>@Entity<\/code>: \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u5fdc\u3059\u308b\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>@Id<\/code>, <code>@GeneratedValue<\/code>: \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306e ID \u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>@Repository<\/code>: \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u307e\u3068\u3081<\/strong><\/h2>\n\n\n\n<p>\u4e09\u5c64\u69cb\u9020\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u306e\u898b\u901a\u3057\u304c\u826f\u304f\u306a\u308a\u3001\u4fdd\u5b88\u6027\u30fb\u62e1\u5f35\u6027\u304c\u5411\u4e0a\u3059\u308b\u3053\u3068\u3092\u5b9f\u611f\u3057\u307e\u3057\u305f\u3002<br>\u6700\u521d\u306f\u6238\u60d1\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5404\u5c64\u306e\u5f79\u5272\u3092\u7406\u89e3\u3057\u3001\u9069\u5207\u306a\u5834\u6240\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u5805\u7262\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01Web\u958b\u767a\u306b\u304a\u3051\u308b\u4e09\u5c64\u69cb\u9020\u3001\u4e00\u5ea6\u306f\u5b66\u3093\u3060\u3082\u306e\u306e\u3001\u3044\u3056\u5b9f\u88c5\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u300c\u3042\u308c\u3001\u3069\u3053\u306b\u4f55\u3092\u8a18\u8ff0\u3059\u308c\u3070\u3044\u3044\u3093\u3060\u3063\u3051\uff1f\u300d\u3068\u624b\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3001\u3042\u308a\u307e\u3059\u3088\u306d\u3002\u79c1\u3082\u307e\u3055\u306b\u305d\u306e\u72b6\u614b\u3067\u3057\u305f\u3002\u5197\u9577\u306a\u30b3 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=132"}],"version-history":[{"count":1,"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/suyasuyahirohiro.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}