<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for jQueryTips by Tee++;</title>
	<atom:link href="http://www.jquerytips.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jquerytips.com</link>
	<description>Coding is fun.</description>
	<lastBuildDate>Mon, 22 Feb 2010 07:54:04 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Beauty Your CI Step 1 &#8211; Beauty My Model by ponko</title>
		<link>http://www.jquerytips.com/2010/02/04/beauty-your-ci-step-beauty-my-model/comment-page-1/#comment-2199</link>
		<dc:creator>ponko</dc:creator>
		<pubDate>Mon, 22 Feb 2010 07:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=515#comment-2199</guid>
		<description>สู้ๆครับ
กำลังรออ่านผลงานอยู่ครับ อิอิ</description>
		<content:encoded><![CDATA[<p>สู้ๆครับ<br />
กำลังรออ่านผลงานอยู่ครับ อิอิ</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Our Courses by heypetch</title>
		<link>http://www.jquerytips.com/our-courses/comment-page-1/#comment-2197</link>
		<dc:creator>heypetch</dc:creator>
		<pubDate>Mon, 15 Feb 2010 10:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?page_id=282#comment-2197</guid>
		<description>สนใจทุก คอร์ส เลยครับ พี่ Tee++</description>
		<content:encoded><![CDATA[<p>สนใจทุก คอร์ส เลยครับ พี่ Tee++</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on เฮ้ยจะกลับมา Update แล้ว 555+ by 7</title>
		<link>http://www.jquerytips.com/2010/01/28/i-am-back/comment-page-1/#comment-2189</link>
		<dc:creator>7</dc:creator>
		<pubDate>Sun, 07 Feb 2010 19:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=510#comment-2189</guid>
		<description>โห เหมือนจอมยุทธเพิ่งลงจากเขาเหลียงซาน</description>
		<content:encoded><![CDATA[<p>โห เหมือนจอมยุทธเพิ่งลงจากเขาเหลียงซาน</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Beauty Your CI Step 1 &#8211; Beauty My Model by แฟนพันธุ์แปลก</title>
		<link>http://www.jquerytips.com/2010/02/04/beauty-your-ci-step-beauty-my-model/comment-page-1/#comment-2186</link>
		<dc:creator>แฟนพันธุ์แปลก</dc:creator>
		<pubDate>Sat, 06 Feb 2010 16:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=515#comment-2186</guid>
		<description>ขอบคุณมากครับ

ผมจะพยายามทำความเข้าใจครับ

เพราะ เพิ่งรู้จักเรื่องของ OOP เอง -&quot;-</description>
		<content:encoded><![CDATA[<p>ขอบคุณมากครับ</p>
<p>ผมจะพยายามทำความเข้าใจครับ</p>
<p>เพราะ เพิ่งรู้จักเรื่องของ OOP เอง -&#8221;-</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on เฮ้ยจะกลับมา Update แล้ว 555+ by Tee++;</title>
		<link>http://www.jquerytips.com/2010/01/28/i-am-back/comment-page-1/#comment-2185</link>
		<dc:creator>Tee++;</dc:creator>
		<pubDate>Sat, 06 Feb 2010 10:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=510#comment-2185</guid>
		<description>จะทำอะไรได้วะ 1 นอกจาก &quot;จีบสาว&quot; 555+</description>
		<content:encoded><![CDATA[<p>จะทำอะไรได้วะ 1 นอกจาก &#8220;จีบสาว&#8221; 555+</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on เฮ้ยจะกลับมา Update แล้ว 555+ by Ekapol</title>
		<link>http://www.jquerytips.com/2010/01/28/i-am-back/comment-page-1/#comment-2184</link>
		<dc:creator>Ekapol</dc:creator>
		<pubDate>Sat, 06 Feb 2010 09:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=510#comment-2184</guid>
		<description>เอ๊ะ!! หายไปทำไรมาหว่า?? อิอิ</description>
		<content:encoded><![CDATA[<p>เอ๊ะ!! หายไปทำไรมาหว่า?? อิอิ</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Beauty Your CI Step 1 &#8211; Beauty My Model by Tee++;</title>
		<link>http://www.jquerytips.com/2010/02/04/beauty-your-ci-step-beauty-my-model/comment-page-1/#comment-2183</link>
		<dc:creator>Tee++;</dc:creator>
		<pubDate>Fri, 05 Feb 2010 03:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=515#comment-2183</guid>
		<description>จากความคิดเห็นด้านบน จริงๆ แล้วมันทำได้อยู่แล้วครับ ถ้าจะใช้งานแบบนั้น

สมมุติผมมี Controller Blogs แล้วมี method การ insert ผมสามารถเรียกใช้แบบนี้ได้เลย เพราะยังไง MY_Model ของผมก้มีคำสั่ง insert อยู่แล้ว

&lt;pre lang=&quot;php&quot;&gt;function add($action=null)
{
	if ($action == &#039;action&#039;)
	{
		$this-&gt;load-&gt;model(&#039;model_blogs&#039;, &#039;blogs&#039;);
		$user_id = user_info_data(&#039;id&#039;);
		$data = array(
			&#039;id&#039; =&gt; null,
			&#039;user_id&#039; =&gt; $user_id,
			&#039;title&#039; =&gt; &#039;xxx&#039;,
			&#039;body&#039; =&gt; &#039;hello test&#039;,
			&#039;created_at&#039; =&gt; date_now(),
			&#039;modified_at&#039; =&gt; date_now(),
			&#039;visible&#039; =&gt; 1
		);
		$this-&gt;blogs-&gt;insert(&#039;blogs&#039;, $data);
	}
}&lt;/pre&gt;

โดยที่ model_blogs ของผมไม่จำเป้นต้องไป implement method &quot;insert&quot; ซ้ำ แต่ว่าการทำแบบนี้ ผมว่ามันไม่สะดวกกับคนแก้โคดข้างหลัง นั่นคือ การที่ logic ของ db ไปอยู่ใน controller มันก็เหมือนกับการ Hard Code แล้วก็หลุด concept MVC ไปนิด รวมไปถึงตามปกติ ผมจะมี logic เรื่อง cache ในเกือบทุกๆ method ก็เลย ไป implement คำสั่ง insert ซ้ำใน model จะดีกว่า....
</description>
		<content:encoded><![CDATA[<p>จากความคิดเห็นด้านบน จริงๆ แล้วมันทำได้อยู่แล้วครับ ถ้าจะใช้งานแบบนั้น</p>
<p>สมมุติผมมี Controller Blogs แล้วมี method การ insert ผมสามารถเรียกใช้แบบนี้ได้เลย เพราะยังไง MY_Model ของผมก้มีคำสั่ง insert อยู่แล้ว</p>
<pre lang="php">function add($action=null)
{
	if ($action == 'action')
	{
		$this->load->model('model_blogs', 'blogs');
		$user_id = user_info_data('id');
		$data = array(
			'id' => null,
			'user_id' => $user_id,
			'title' => 'xxx',
			'body' => 'hello test',
			'created_at' => date_now(),
			'modified_at' => date_now(),
			'visible' => 1
		);
		$this->blogs->insert('blogs', $data);
	}
}</pre>
<p>โดยที่ model_blogs ของผมไม่จำเป้นต้องไป implement method &#8220;insert&#8221; ซ้ำ แต่ว่าการทำแบบนี้ ผมว่ามันไม่สะดวกกับคนแก้โคดข้างหลัง นั่นคือ การที่ logic ของ db ไปอยู่ใน controller มันก็เหมือนกับการ Hard Code แล้วก็หลุด concept MVC ไปนิด รวมไปถึงตามปกติ ผมจะมี logic เรื่อง cache ในเกือบทุกๆ method ก็เลย ไป implement คำสั่ง insert ซ้ำใน model จะดีกว่า&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Beauty Your CI Step 1 &#8211; Beauty My Model by AMp</title>
		<link>http://www.jquerytips.com/2010/02/04/beauty-your-ci-step-beauty-my-model/comment-page-1/#comment-2182</link>
		<dc:creator>AMp</dc:creator>
		<pubDate>Fri, 05 Feb 2010 02:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=515#comment-2182</guid>
		<description>ลองยกโค้ดที่เป็นพวก normal operation อย่าง insert/update/delete
ไปไว้ใน MY_Model น่าจะช่วยลดโค้ดที่ต้องเขียนซ้ำๆ ในแต่ละ model ได้เยอะเลยครับ :)</description>
		<content:encoded><![CDATA[<p>ลองยกโค้ดที่เป็นพวก normal operation อย่าง insert/update/delete<br />
ไปไว้ใน MY_Model น่าจะช่วยลดโค้ดที่ต้องเขียนซ้ำๆ ในแต่ละ model ได้เยอะเลยครับ <img src='http://www.jquerytips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Beauty Your CI Step 1 &#8211; Beauty My Model by DevLism</title>
		<link>http://www.jquerytips.com/2010/02/04/beauty-your-ci-step-beauty-my-model/comment-page-1/#comment-2181</link>
		<dc:creator>DevLism</dc:creator>
		<pubDate>Thu, 04 Feb 2010 20:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=515#comment-2181</guid>
		<description>สุดยอดครับพี่

เดี๋ยวส่งเมล์ไปขอ Open Source ไปศึกษารอบทความต่อไปครับ</description>
		<content:encoded><![CDATA[<p>สุดยอดครับพี่</p>
<p>เดี๋ยวส่งเมล์ไปขอ Open Source ไปศึกษารอบทความต่อไปครับ</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [CI Day 6] มาใช้ Zend Framework ใน CI กันเถอะ by Beauty Your CI Step 1 &#8211; เปลี่ยน Model ให้เป็น My Model @ jQueryTips by Tee++;</title>
		<link>http://www.jquerytips.com/2009/01/01/codeigniter-using-zend-framework/comment-page-1/#comment-2180</link>
		<dc:creator>Beauty Your CI Step 1 &#8211; เปลี่ยน Model ให้เป็น My Model @ jQueryTips by Tee++;</dc:creator>
		<pubDate>Thu, 04 Feb 2010 15:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.jquerytips.com/?p=232#comment-2180</guid>
		<description>[...] มาใช้ &#8220;Zend Framework ใน CI กันเถอะ&#8221; แล้วทำให้ได้ตามตัวอย่างซะก่อน [...]</description>
		<content:encoded><![CDATA[<p>[...] มาใช้ &#8220;Zend Framework ใน CI กันเถอะ&#8221; แล้วทำให้ได้ตามตัวอย่างซะก่อน [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
