<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kazukifu</author_name>
  <author_url>https://blog.hatena.ne.jp/kazukifu/</author_url>
  <blog_title>Kazuki's Blog</blog_title>
  <blog_url>https://kazukifu.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>はじめに 前回の記事ではMVCパターンの全体像について触れましたが、今回は具体的なリファクタリングの第一歩として、「定数管理」と「DBスキーマ初期化」のロジックを外部モジュールへ切り出していきます。 現在のPythonスクリプトでは、スクリプトの冒頭に設定値が散在し、クラス内でDBのテーブル作成を行っています。これを整理することで、設定の変更を容易にし、モデル層（Model）の独立性を高めるのが今回の狙いです。 1. 定数管理の分離 これまでPythonスクリプトの冒頭部分で定義していたアプリケーション名、ウィンドウサイズ、DBパスなどの定数を、新しく作成するconfig.pyに集約します。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkazukifu.hatenablog.com%2Fentry%2F2026%2F03%2F10%2F180237&quot; title=&quot;tkinterを利用してカレンダーWidgetと予定・実績管理Widgetを統合する(その22: MVCパターンリファクタリング その2 DBスキーマ初期化) - Kazuki&amp;#39;s Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-03-10 18:02:37</published>
  <title>tkinterを利用してカレンダーWidgetと予定・実績管理Widgetを統合する(その22: MVCパターンリファクタリング その2 DBスキーマ初期化)</title>
  <type>rich</type>
  <url>https://kazukifu.hatenablog.com/entry/2026/03/10/180237</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
