<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>microprocessvn</title>
	<atom:link href="http://microprocessvn.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://microprocessvn.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Tue, 03 Jan 2012 03:28:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='microprocessvn.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>microprocessvn</title>
		<link>http://microprocessvn.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://microprocessvn.wordpress.com/osd.xml" title="microprocessvn" />
	<atom:link rel='hub' href='http://microprocessvn.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Mười một điều mà các lập trình viên nên làm thường xuyên trong năm 2012</title>
		<link>http://microprocessvn.wordpress.com/2012/01/03/m%c6%b0%e1%bb%9di-m%e1%bb%99t-di%e1%bb%81u-ma-cac-l%e1%ba%adp-trinh-vien-nen-lam-th%c6%b0%e1%bb%9dng-xuyen-trong-nam-2012/</link>
		<comments>http://microprocessvn.wordpress.com/2012/01/03/m%c6%b0%e1%bb%9di-m%e1%bb%99t-di%e1%bb%81u-ma-cac-l%e1%ba%adp-trinh-vien-nen-lam-th%c6%b0%e1%bb%9dng-xuyen-trong-nam-2012/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 03:28:37 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[Dân IT]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=43</guid>
		<description><![CDATA[Nhân dịp năm mới, Micheal Crump, Microsoft MVP, đã chia sẽ với cộng đồng lập trình chúng ta một vài lời điều mà các lập trình viên nên làm để có thể nâng cao kỹ năng lập trình và làm việc hiệu quả hơn, và đó là danh sách 11 việc bạn nên làm thường [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=43&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Nhân dịp năm mới, Micheal Crump, Microsoft MVP, đã chia sẽ với cộng đồng lập trình chúng ta một vài lời điều mà các lập trình viên nên làm để có thể nâng cao kỹ năng lập trình và làm việc hiệu quả hơn, và đó là danh sách 11 việc bạn nên làm thường xuyên trong năm 2012.</strong></p>
<p>Nhân dịp năm mới, Micheal Crump, Microsoft MVP, đã chia sẽ với cộng đồng lập trình chúng ta một vài lời điều mà các lập trình viên nên làm để có thể nâng cao kỹ năng lập trình và làm việc hiệu quả hơn, và đó là danh sách 11 việc bạn nên làm thường xuyên trong năm 2012.</p>
<p>Micheal Crump là tác giả của một số cuốn sách về .NET. Ông là một diễn giả khá nỗi tiếng tại các diễn đàn như CodeStock, DevLink và TechDays. Ông cũng là tác giả của hàng chục bài viết về .NET trên các trang CodeProject, Silverlight Show, Dzone, Developer Fusion và Code Zone. Micheal làm việc tại Telerik với vai trò là XAML Evangelist (truyền bá về XAML).</p>
<p>Mười một điều lập trình viên nên làm trong năm 2012:<br />
1. <strong>Hãy sử dụng Twitter</strong> – Nếu bạn không sử dụng Twitter thì thật đáng tiếc, bạn đã bỏ lỡ một công cụ tốt nhất mà một lập trình viên có thể dùng, tại vì:</p>
<p>·         Dù bạn có 10 người theo đuôi hay 10.000 người, thì mỗi câu hỏi về việc lập trình của bạn đều có thể được phát hiện và được trả lời chỉ sau vài giây.</p>
<p>·         Nhận được thông tin mới nhất về lập trình trực tiếp từ các lập trình viên khác</p>
<p>·         Và sử dụng hashtags để theo dõi các chủ đề quan trọng đối với bạn. Trong trường hợp của Micheal thì ông theo dõi các tag #wp7 #silverlight và #wpf.</p>
<p>·         Để trao đổi với các lập trình viên khác và nhờ đó bạn biết được họ đang phát triển dự án nào.</p>
<p>2. <strong>Đọc trang StackOverflow hàng ngày</strong> – StackOverflow là diễn đàn hàng đầu về hỏi đáp các câu hỏi về lập trình. Trong trường hợp bạn không có tài khoản trên đó, thì nó cũng hữu ích bởi bạn có thể duyệt các câu hỏi và trả lời. Và Micheal nghĩ rằng 20 phút mỗi ngày cho việc đọc trang StackOverflow là một khoản đầu tư hợp lý.</p>
<p>3.  <strong>Hãy viết blog</strong> – Micheal tin rằng mỗi lập trình viên nên có một blog, bởi vì:</p>
<p>·         Đó là những dấu chân mà chúng ta để lại để các lập trình viên khác có thể theo và học tập những gì chúng ta đã trải qua</p>
<p>·         Đó là cách mà bạn tham gia và trở thành một thành phần của cộng đồng</p>
<p>·         Đó là cách mà bạn tiếp thị chính bạn như là một chuyên gia về lập trình.</p>
<p>4. <strong>Ra ngoài và tiếp xúc</strong> – Bạn hãy thoát khỏi chiếc vỏ sò của bạn và bắt đầu nói chuyện với các lập trình viên khác ở các cuộc gặp nhóm hoặc các hội thảo. Ai cũng sẽ hơi ngại ngùng tại thời điểm ban đầu, nhưng nếu bạn bắt chuyện thì mọi thứ sẽ tiến triển rất nhanh</p>
<p>·         Kết nối với các lập trình viên khác là việc quan trọng hàng đầu bạn nên làm. Khi bạn cần có ai đó giúp đỡ thì bạn đã có rồi đấy.</p>
<p>5. <strong>Hãy mua một chiếc điện thoại hiện đại và sử dụng nó</strong> – Nếu  bạn là một lập trình viên và bạn xài một chiếc điện thoại cũ thì bây giờ là thời điểm bạn cần nâng cấp nó rồi đấy. Nếu bạn thấy ai đó làm việc và sau đó phải quay lại máy tính của anh ta để gởi mail hoặc tin nhắn thì bạn sẽ nghĩ “Có lẽ tên này không phải là dân IT”. Sử dụng một chiếc smartphone khi bạn là lập trình viên cũng tương tự với việc các nhân viên ngành tín dụng cần mang áo quần bảnh bao, lúc nào cũng lịch lãm với veston. Với dân công nghệ, chúng ta luôn phải sẵn sang với máy tính, phần mềm và điện thoại có đủ chức năng để đáp ứng công việc của chúng ta.</p>
<p>6.<strong> Chú ý nhiều hơn đến thiết bị di động</strong> – Bạn cần phải tìm hiểu nhiều hơn về việc lập trình cho iPhone, WP7 và Android. Bạn cần phải học cách thiết kế ứng dụng web có thể chạy được trên mọi thiết bị di động (như điện thoại, Ipads, tablets các loại). Micheal tin rằng mỗi lập trình viên phải viết ít nhất một ứng dụng di động trong đời lập trình của họ. Đó là thứ mà lập trình viên hiện đại không nên bỏ qua.</p>
<p>7. <strong>Học ít nhất một design pattern (mẫu thiết kế) </strong>– Chúng ta không thể nói rằng bạn nên học hoặc chú ý vào pattern nào, nhưng rõ là bạn cần học ít nhất một pattern. Micheal chọn MVVM vì ông ta là một lập trình viên về Silverlight/WPF/WP7. Nếu bạn quen thuộc với một design pattern, nhà tuyển dụng sẽ thấy yên tâm hơn khi họ tuyển dụng bạn</p>
<p>8. <strong>Đặt ra các mục tiêu có thể đạt được cho mỗi năm </strong>– Đưa ra các mục tiêu mà bạn dự định sẽ hoàn thành cho năm tới. Đó là hình thức tự thách thức và tự vượt qua chính mình. Bạn hãy nhớ đặt lịch để nhắc nhở và nhớ đánh giá tiến độ công việc thường xuyên. Bạn sẽ đạt được nhiều kết quả hơn bạn tưởng tượng đấy.</p>
<p>9. <strong>Học một ngôn ngữ lập trình khác </strong>– Đây là một cách để bạn mở mang trí óc và biết sâu hơn về cách mà máy tính và các ngôn ngữ lập trình làm việc.</p>
<p>10.<strong> Tự tin lên </strong>– Có nhiều lập trình viên không có chút tự tin vào chính mình. Nếu bạn cảm thấy bạn đang thiếu kiến thức về điều gì thì hãy học nó bởi vì người ta sẽ không chấp nhận lời xin lỗi hoặc sự bỏ qua cho sự thiếu hiểu biết của chính bạn. Có quá nhiều tài nguyên miễn phí trên web để bạn học tập.</p>
<p>11.<strong> Đọc blogs / Sách lập trình/ Các tạp chí lập trình</strong> – Có bao nhiêu cuốn sách bạn đã đọc trong năm vừa rồi? Bao nhiêu tạp chí lập trình bạn đã đọc? Micheal tin rằng một lập trình viên giỏi chí ít cũng phải đọc 5 cuốn sách mỗi năm và đọc một hoặc hai tạp chí hàng tháng. Và nhớ đừng quên tạp chí MSDN của Microsoft nếu bạn là một lập trình viên .NET. Nếu bạn không thường xuyên đọc thì làm sao bạn giỏi lên được?</p>
<p>Lời bàn của người dịch bài viết này<br />
Tôi đã đọc và thấy cần chia sẽ bài viết của Micheal với cộng đồng lập trình viên Việt, bởi hơn ai hết tôi đã tiến bộ hơn rất nhiều nhờ làm những điều tương tự với Micheal viết. Tôi đã cố gắng đọc nhiều sách, học công nghệ mới, xem screencasts, duyệt hàng chục bài viết trên các blog của các lập trình viên hàng ngày. Nhờ đó, mà từ một người chả biết gì nhiều về thế giới lập trình, tôi đã tiến bộ từng ngày. Tôi luôn đặt ra các mục tiêu để hoàn thành không chỉ theo năm mà theo quý và tháng, tôi cũng nhận thức rõ được rằng chia sẻ tri thức là việc nên làm. Một trong những mục tiêu mà tôi đã đạt được và chia sẻ được tri thức cho cộng đồng là trang web http://geeksship.com và bây giờ là trang http://d.jou.vn .</p>
<p>Là một lập trình viên Việt, đặc biệt là các lập trình viên .NET bạn hãy đừng bỏ qua những blogger Việt, những diễn đàn lập trình và đặc biệt đừng bỏ qua Jou Lập trình (http://d.jou.vn ) bởi chung tôi sẽ luôn mang tới cho bạn những kinh nghiệm cũng như những thông tin mới nhất về thế giới lập trình.</p>
<p>Lời cuối, nếu bạn là lập trình viên và bạn muốn chia sẽ tri thức, nếu bạn chưa có điều kiện để tự xây dựng blog cho riêng mình, bạn hãy gởi bài viết cho chúng tôi qua email lehoangdung@live.com hoặc chịu khó chờ đợi đến tháng 04/2012, Jou lập trình sẽ mở chức năng viết blog trực tiếp trên Jou để bạn có thể viết các bài viết về lập trình trực tiếp trên Jou chứ không chỉ đọc hoặc comment các bài viết chúng tôi đăng tải.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=43&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2012/01/03/m%c6%b0%e1%bb%9di-m%e1%bb%99t-di%e1%bb%81u-ma-cac-l%e1%ba%adp-trinh-vien-nen-lam-th%c6%b0%e1%bb%9dng-xuyen-trong-nam-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick Tip: Handy Sort Arrows in your GridView Without CSS or Graphics</title>
		<link>http://microprocessvn.wordpress.com/2011/12/28/quick-tip-handy-sort-arrows-in-your-gridview-without-css-or-graphics/</link>
		<comments>http://microprocessvn.wordpress.com/2011/12/28/quick-tip-handy-sort-arrows-in-your-gridview-without-css-or-graphics/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 03:19:18 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=36</guid>
		<description><![CDATA[The nice thing about the GridView in .Net is that there is a plethora of built in controls that simply need enabling. One of them is Sorting. Simply set the AllowSorting property to “true” in your and then make sure to write up some code for the Sorting event to adjust your data source, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=36&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The nice thing about the GridView in .Net is that there is a plethora of built in controls that simply need enabling. One of them is Sorting. Simply set the AllowSorting property to “true” in your and then make sure to write up some code for the Sorting event to adjust your data source, and you’re set.</p>
<p>However, one tricky thing to work with is providing a friendly way to indicate which field is being sorted, and in which direction. I’ve found a simple trick that uses no CSS or images whatsoever.</p>
<p>They key here is that there is an extended ASCII character for both the up (▲) and down (▼) arrows that are readable by most, if not all, modern browsers. More importantly, they have their HTML friendly counterparts (&amp; #9650;) and (&amp; #9660;) available as well. Go ahead, you can copy and paste those somewhere for a quick reference. 8^D</p>
<p>All we have to do at this point, is add the proper icon next to the column we’re sorting as we’re rendering the GridView. We do this in the RowDataBound event. Here’s what my code looks like, and I’ll explain it below:</p>
<p><code><br />
protected void gvVersions_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{</p>
<p>   /* GridView Row has following column layout<br />
   * 0 - Actions (Edit)<br />
   * 1 - Revision<br />
   * 2 - Updated By<br />
   * 3 - Updated At<br />
   * 4 - Field Changed<br />
   * 5 - Old Value<br />
   * 6 - New Value<br />
   */</p>
<p>   if (e.Row.RowType == DataControlRowType.Header)<br />
   {<br />
      LinkButton sortLink;<br />
      string sortBy = Session["sortColumn"].ToString();<br />
      string sortDir = Session["sortDirection"].ToString();</p>
<p>      // Use the HTML safe codes for the up arrow ▲ and down arrow ▼.<br />
      string sortArrow = sortDir == "ASC" ? "&amp; #9650;" : "&amp; #9660;";</p>
<p>      // GridView rows with sortable columns will have a linkbutton<br />
      // generated. Compare to the CommandArgument since this is what<br />
      // we set our sortColumn based on.<br />
      foreach (System.Web.UI.WebControls.TableCell currCell in e.Row.Cells)<br />
      {<br />
         if (currCell.HasControls())<br />
         {<br />
            sortLink = ((LinkButton) currCell.Controls[0]);<br />
            if (sortLink.CommandArgument == sortBy)<br />
            {<br />
               sortLink.Text = sortLink.Text + " " + sortArrow;<br />
            }<br />
         }<br />
      }<br />
   }</p>
<p>   if (e.Row.RowType == DataControlRowType.DataRow)<br />
   {<br />
      VersionLog versionLog = (VersionLog) e.Row.DataItem;<br />
      e.Row.Cells[1].Text = versionLog.version.ToString();<br />
      e.Row.Cells[2].Text = versionLog.updatedBy;<br />
      e.Row.Cells[3].Text = versionLog.updatedAt.ToString("MM/dd/yyyy hh:mm:ss tt");<br />
      e.Row.Cells[4].Text = versionLog.fieldChanged;</p>
<p>      if (versionLog.oldValue != null)<br />
      {<br />
         e.Row.Cells[5].Text = versionLog.oldValue;<br />
      }</p>
<p>      if (versionLog.newValue != null)<br />
      {<br />
         e.Row.Cells[6].Text = versionLog.newValue;<br />
      }<br />
   }<br />
}<br />
</code><br />
So let’s take a quick peek at what’s going on here. If we’re dealing with our header row, we pull the sorting column and direction out of some session variables that are stored. Sadly the GridView doesn’t handle sorting by direction well when you do your own custom binding, so the session works best. Next we set our arrow code based on the direction of the sort. I use the HTML based codes so that it will render nice in the browser. Some browsers may not recognize the ASCII, so its best to use the HTML.</p>
<p>For each column in our GridView, if the column has a SortExpression value assigned to it, a LinkButton control is created to handle it. In our case, we want to check the CommandArgument value of the LinkButton created, and not the text, because I often use friendly names for the text, such as “Updated By” when the underlying data field is “updated_by” or something else. In cells where we have a control, I grab the first (and typically only) control, and look at it’s CommandArgument. If it matches the current sorting column, I simply append the arrow to the text and move along. Our DataRows do their typical binding of values from our DataItem.</p>
<p>That’s all there is to it! If you click the image at the top of the page, you’ll see a simple GridView, with a nice arrow sitting next to it to indicate the sort direction, without the use of CSS manipulation or even additional graphics.</p>
<p>Enjoy!</p>
<p>Note: In the text and example above, there is a space between the &amp; and the #9650; values since putting them together will render the arrow again on the page instead of the code. Make sure to close that gap again in your own code. 8^D</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=36&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2011/12/28/quick-tip-handy-sort-arrows-in-your-gridview-without-css-or-graphics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.Net MVC 3 Custom Membership Provider with Repository Injection</title>
		<link>http://microprocessvn.wordpress.com/2011/11/22/asp-net-mvc-3-custom-membership-provider-with-repository-injection/</link>
		<comments>http://microprocessvn.wordpress.com/2011/11/22/asp-net-mvc-3-custom-membership-provider-with-repository-injection/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 03:22:33 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=32</guid>
		<description><![CDATA[ASP.Net MVC 3 Custom Membership Provider with Repository Injection Posted on June 23, 2011 by Dan Harman In most serious ASP.NET MVC, or even legacy ASP.Net web sites, you are unlikely to want to use the default membership provider of ASP.Net. Its dependency on SQLServer and unhealthy predilection for littering databases with hundreds tables, just [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=32&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>ASP.Net MVC 3 Custom Membership Provider with Repository Injection</strong><br />
Posted on June 23, 2011 by Dan Harman<br />
In most serious ASP.NET MVC, or even legacy ASP.Net web sites, you are unlikely to want to use the default membership provider of ASP.Net. Its dependency on SQLServer and unhealthy predilection for littering databases with hundreds tables, just to support features you don’t care about, make it distinctly unattractive.</p>
<p>What we really want is to integrate our web site’s security with the project’s schema and bind directly to a table or repository encapsulating the users model for the site. The way to do this is through the implementation of a custom MembershipProvider.</p>
<p>This may seem a little daunting, but in practise is fairly simple. In fact, all we need do is override a pair of methods, on a couple of abstract classes, and all authentication and role checking will be routed to our code. Even better, by leveraging the well-tested and robust ASP.NET security facilities, we can still utilise the convenience and security of ASP.Net’s attribute based security to protect your controllers and controller methods. If you aren’t familiar with these, it’s as simple as attaching an Authorise tag, and optionally specifying a role the user must have to gain access e.g.</p>
<p><strong>public class MemberController : Controller<br />
{<br />
    IAccountRepository repo;</p>
<p>    public MemberController(IAccountRepository accountRepository)<br />
    {<br />
        repo = accountRepository;<br />
    }</p>
<p>    [Authorize]<br />
    public ActionResult Index()<br />
    {<br />
        &#8230;<br />
    }</p>
<p>    [Authorize(Roles = "Admin")]<br />
    public ActionResult Delete(int accountId)<br />
    {<br />
       &#8230;<br />
    }<br />
}</strong><br />
Just being authorised means the user has been authenticated i.e. logged in. The role is supplementary to this and allows you finer grained access control. Easy huh?</p>
<p>So, firstly authentication. To take control of this, we have to create a class derived from the abstract class MembershipProvider.</p>
<p>Unfortunately, being a hangover from old-school ASP.net, wiring this in is a little more clumsy than one might expect. It predates the pluggable design pattern applied throughout the MVC platform. The upshot being, that if you want to use the repository pattern with it, you can’t pass a repository into the constructor as ASP.Net instantiates the class for you, and only knows how to do this through a default constructor.</p>
<p>One way to work around this is to make your repository a property on the class and update it after the framework has constructed it. In this example I’m going to use ninject as my DI framework, but you could use a different one, or in fact just set the property without using DI at all.</p>
<p>First lets start with an example membership provider. I’ve only bothered to override ValidateUser() as the other methods aren’t required to leverage ASP.NET’s integrated security features.</p>
<p><strong>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Security;<br />
using Ninject;</p>
<p>namespace MyProj.Web.Infrastructure<br />
{<br />
    public class AccountMembershipProvider : MembershipProvider<br />
    {<br />
        [Inject]<br />
        public IAccountRepository AccountRepository { get; set; }</p>
<p>        public override string ApplicationName<br />
        {<br />
            get<br />
            {<br />
                throw new NotImplementedException();<br />
            }<br />
            set<br />
            {<br />
                throw new NotImplementedException();<br />
            }<br />
        }</p>
<p>&#8230; lots of unimplemented overrides&#8230;</p>
<p>        public override void UpdateUser(MembershipUser user)<br />
        {<br />
            throw new NotImplementedException();<br />
        }</p>
<p>        public override bool ValidateUser(string username, string password)<br />
        {<br />
            return AccountRepository.IsValidLogin(username, password);<br />
        }<br />
    }<br />
}</strong><br />
You’ll notice there is an AccountRepository being used here to validate the user login. This is where your custom authorisation logic goes – as such I’m not going to provide an implementation here as it will depend on the specifics of your site.</p>
<p>Next, we need to ensure that the AccountRepository is injected into our MembershipProvider, and the place to do this is Application_Start() in Gloabl.asax.</p>
<p>   <strong> internal class MyNinjectModules : NinjectModule<br />
    {<br />
        public override void Load()<br />
        {<br />
            Bind()<br />
                .To();<br />
        }<br />
    }</p>
<p>    public class MvcApplication : System.Web.HttpApplication<br />
    {<br />
        private IKernel _kernel = new StandardKernel(new MyNinjectModules());</p>
<p>&#8230;code deleted&#8230;.</p>
<p>        protected void Application_Start()<br />
        {<br />
            AreaRegistration.RegisterAllAreas();</p>
<p>            RegisterGlobalFilters(GlobalFilters.Filters);<br />
            RegisterRoutes(RouteTable.Routes);</p>
<p>            // Inject account repository into our custom membership provider.<br />
            _kernel.Inject(Membership.Provider);<br />
        }<br />
    }</strong><br />
You’ll notice that I’m grabbing the framework instantiated instance of our membership provider, and using ninject to set the repository property on our custom membership provider.</p>
<p>I’m also setting up a ninject controller factory which is a great class when you want to inject repositories into your controller’s constructors. This is based on code found in one of the best programming books I’ve ever read Pro ASP.NET MVC 2 Framework by Steven Sanderson. This book covers so much more than ASP.NET MVC, it teaches you how to design and build applications for testability, and is the most digestable explanation of modern test driven design I’ve ever come across. It’s worth a read even if you aren’t an MVC programmer! n.b. I believe a revised MVC3 edition is to be released shortly.</p>
<p><strong>public class NinjectControllerFactory : DefaultControllerFactory<br />
    {<br />
        private IKernel _kernel;</p>
<p>        public NinjectControllerFactory(IKernel kernel)<br />
        {<br />
            _kernel = kernel;<br />
        }</p>
<p>        protected override IController GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType)<br />
        {<br />
            if (controllerType == null)<br />
                return null;</p>
<p>            return (IController)_kernel.Get(controllerType);<br />
        }<br />
    }</strong><br />
Now… what if we want to create a custom role provider too? Well that’s easy. Here is an exampe RoleProvider:</p>
<p><strong>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Security;<br />
using Ninject;</p>
<p>namespace MyProj.Web.Infrastructure<br />
{<br />
    public class AccountRoleProvider : RoleProvider<br />
    {<br />
        [Inject]<br />
        public IAccountRepository AccountRepository { get; set; }</p>
<p>        public override void AddUsersToRoles(string[] usernames, string[] roleNames)<br />
        {<br />
            throw new NotImplementedException();<br />
        }</p>
<p>&#8230; lots of unimplemented overrides&#8230;</p>
<p>        public override string[] GetRolesForUser(string id)<br />
        {<br />
            return AccountRepository.GetRoles(id);<br />
        }</p>
<p>&#8230; lots of unimplemented overrides&#8230;</p>
<p>        public override bool RoleExists(string roleName)<br />
        {<br />
            throw new NotImplementedException();<br />
        }<br />
    }<br />
}</strong><br />
Again, you really don’t need to override much of the RoleProvider abstract class, simply implementing GetRolesForUser() and ensuring it returns a string array of the given users roles will suffice.</p>
<p>To inject the membership provider juat change the previous code version of Application_Start() to:</p>
<p>   <strong> public class MvcApplication : System.Web.HttpApplication<br />
    {<br />
        private IKernel _kernel = new StandardKernel(new MyNinjectModules());</p>
<p>&#8230;code deleted&#8230;.</p>
<p>        protected void Application_Start()<br />
        {<br />
            AreaRegistration.RegisterAllAreas();</p>
<p>            RegisterGlobalFilters(GlobalFilters.Filters);<br />
            RegisterRoutes(RouteTable.Routes);</p>
<p>            // Inject account repository into our custom membership &amp; role providers.<br />
            _kernel.Inject(Membership.Provider);<br />
            _kernel.Inject(Roles.Provider);<br />
        }<br />
    }<br />
Finally we need to register our providers in web.config:</p>
<p><span id="more-32"></span></p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>&#8230;<br />
</strong><br />
It really us as simple as that!</p>
<p>One other note, if you are implementing your own password storage, make sure you hash them! (and I recommend you look at bcrypt for that).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=32&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2011/11/22/asp-net-mvc-3-custom-membership-provider-with-repository-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>
	</item>
		<item>
		<title>Asp.net role membership provider (phần 1)</title>
		<link>http://microprocessvn.wordpress.com/2011/11/15/asp-net-role-membership-provider-ph%e1%ba%a7n-1/</link>
		<comments>http://microprocessvn.wordpress.com/2011/11/15/asp-net-role-membership-provider-ph%e1%ba%a7n-1/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 15:43:09 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=23</guid>
		<description><![CDATA[Xây dựng 1 website, chắc chắn cũng có người dùng, việc có người dùng thì cũng sẻ phải quản lý, ít nhất là tài khoản admin, biết được đó là 1 phần tất yếu của 1 website, Microsoft’s team đả xây dựng Role Membership Provider như 1 phần không thể tách rời của .Net Framework. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=23&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Xây dựng 1 website, chắc chắn cũng có người dùng, việc có người dùng thì cũng sẻ phải quản lý, ít nhất là tài khoản admin, biết được đó là 1 phần tất yếu của 1 website, Microsoft’s team đả xây dựng Role Membership Provider như 1 phần không thể tách rời của .Net Framework.</p>
<p>Mặc dù cũng không quá dài dòng để nói về Role và Membership trong ASP.NET, nhưng mình muốn nói chi tiết và hướng dẫn cụ thể cho các bạn, người đả và đang biết ASP.NET, cho nên mình chia làm nhiều phần.</p>
<p>Điểm mạnh của Role và Membership provider là cho phép chúng ta có thể kế thừa và viết lại custom provider, cái mà cách đây hơn 1 năm mình đả làm, và giờ mình đang làm custom provider cho MySql.</p>
<p>Cài đặt database<br />
Nói đến quản lý người dùng, chúng ta cần phải có csdl để lưu giử dử liệu, asp.net cung cấp 1 công cụ để cài đặt csdl, để lưu trữ SQL Provider là: Aspnet_regsql.exe, chúng ta có thể chạy nó từ C:\WINDOWS\Microsoft.NET\Framework\\aspnet_regsql.exe</p>
<p>Chạy aspnet_regsql.exe lên chúng ta sẻ thấy màng hình.</p>
<p><img src="http://code2code.info/image.axd?picture=2010%2f1%2fwelcome.png" alt="" /><br />
Màng hình welcome khi cài run aspnet_regsql.exe</p>
<p><a href="http://code2code.info/image.axd?picture=2010%2f1%2finstall-Or-Remove-membership.png"></a></p>
<p>Màng hình install mới hay remove membership</p>
<p><img src="http://code2code.info/image.axd?picture=2010%2f1%2fconfig-db.png" alt="" /></p>
<p>Màng hình config database setting</p>
<p><img src="http://code2code.info/image.axd?picture=2010%2f1%2fconfirm.png" alt="" /></p>
<p>Màng hình confirm setting db</p>
<p><img src="http://code2code.info/image.axd?picture=2010%2f1%2fsuccess-message.png" alt="" /></p>
<p>Màng hình thành công install aspnet_regsql.exe</p>
<p><img src="http://code2code.info/image.axd?picture=2010%2f1%2fdb-schema.png" alt="" /></p>
<p>Chúng ta cũng có thể chạy bằng command line của hộp thoại Visual Studio</p>
<p>aspnet_regsql.exe -E -S localhost\sqlexress -A mr</p>
<p>Các tham số sẻ là:<br />
-E: Chứng thực bằng tài khoản hiện tại login vào window<br />
-S: Server chứa database<br />
-A: Những feature của Membership, default là all, còn tham số m là membership, r là role, như vậy chúng ta chỉ cài membership và role, nếu chạy dòng lệnh này.</p>
<p>Chi tiết thêm dòng lệnh của aspnet_regsql, chúng ta có thể tham khảo thêm <a href="http://msdn.microsoft.com/en-us/library/x28wfk74.aspx">tại đây</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=23&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2011/11/15/asp-net-role-membership-provider-ph%e1%ba%a7n-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>

		<media:content url="http://code2code.info/image.axd?picture=2010%2f1%2fwelcome.png" medium="image" />

		<media:content url="http://code2code.info/image.axd?picture=2010%2f1%2fconfig-db.png" medium="image" />

		<media:content url="http://code2code.info/image.axd?picture=2010%2f1%2fconfirm.png" medium="image" />

		<media:content url="http://code2code.info/image.axd?picture=2010%2f1%2fsuccess-message.png" medium="image" />

		<media:content url="http://code2code.info/image.axd?picture=2010%2f1%2fdb-schema.png" medium="image" />
	</item>
		<item>
		<title>Lựa chọn công nghệ nào để phát triển website</title>
		<link>http://microprocessvn.wordpress.com/2011/11/06/l%e1%bb%b1a-ch%e1%bb%8dn-cong-ngh%e1%bb%87-nao-d%e1%bb%83-phat-tri%e1%bb%83n-website/</link>
		<comments>http://microprocessvn.wordpress.com/2011/11/06/l%e1%bb%b1a-ch%e1%bb%8dn-cong-ngh%e1%bb%87-nao-d%e1%bb%83-phat-tri%e1%bb%83n-website/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 04:25:42 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=10</guid>
		<description><![CDATA[Hiện nay có rất nhiều công nghệ được sử dụng để phát triển website (PHP, ASP, ASP.NET, JSP…) Vậy bạn phải lựa chọn công nghệ nào ? Bài viết sau đây đưa ra những nhận định đơn giản giúp bạn chọn được giải pháp tốt nhất cho mình. Các so sánh này dự trên các [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=10&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hiện nay có rất nhiều công nghệ được sử dụng để phát triển website (PHP, ASP, ASP.NET, JSP…) Vậy bạn phải lựa chọn công nghệ nào ? Bài viết sau đây đưa ra những nhận định đơn giản giúp bạn chọn được giải pháp tốt nhất cho mình. Các so sánh này dự trên các thông số cơ bản như: tính kinh tế, khả năng ứng dụng, mức độ bào mật, môi trường hỗ trợ và tốc độ xử lý.</p>
<h3>So sánh các công nghệ xây dựng website</h3>
<table width="600">
<tbody>
<tr>
<th>PHP</th>
<th>ASP.NET</th>
<th>ASP</th>
<th>JSP</th>
</tr>
<tr>
<td width="150">- Tốc độ xử lý nhanh, hiệu quả cao.</td>
<td width="150">- Tốc độ xử lý nhanh, hiệu quả cao.</td>
<td width="150">- Tốc độ xử lý rất chậm.</td>
<td width="150">- Hơi chậm.</td>
</tr>
<tr>
<td>- Chi phí giá thành thấp (ngôn ngữ free không tốn chi phí mua bản quyền).</td>
<td>- Chi phí giá thành cao (do một phần phải mua bản quyền).</td>
<td>- Chi phí giá thành trung bình (do một phần phải mua bản quyền).</td>
<td>- Chi phí giá thành cao.</td>
</tr>
<tr>
<td>- Thời gian code và triển nhanh, đơn giản.</td>
<td>- Thời gian code và triển khai đơn giản , nhanh hơn PHP.</td>
<td>- Thời gian code và triển khai trung bình.</td>
<td>- Thời gian code và triển khai hơi phức tạp, chậm hơn PHP.</td>
</tr>
<tr>
<td>- Số lượng nhà cung cấp hosting nhiều, dễ lựa chọn.</td>
<td>- Số lượng nhà cung cấp hosting không nhiều, vì vậy khó cho việc lựa chọn.</td>
<td>- Số lượng nhà cung cấp hosting không nhiều, vì vậy khó cho việc lựa chọn.</td>
<td>- Số lượng nhà cung cấp hosting ít, khó tìm.</td>
</tr>
<tr>
<td>- Số nhà cung cấp website nhiều, khả năng chọn lựa một trang web phù hợp tốt hơn.</td>
<td>- Số nhà cung cấp website nhiều, khả năng chọn lựa một trang web phù hợp tốt hơn.</td>
<td>- Số nhà cung cấp website ít.</td>
<td>- Số nhà cung cấp website ít, khả năng chọn lựa để xây dựng 1 trang web phù hợp rất khó.</td>
</tr>
<tr>
<td>- Khả năng mở rộng và phát triển dễ dàng .</td>
<td>- Mở rộng và phát triển website dễ dàng và nhanh chóng.</td>
<td>- Khả năng mở rộng và phát triển website khó khăn.</td>
<td>- Khả năng mở rộng và phát triển website khó khăn.</td>
</tr>
<tr>
<td>- Các công cụ và công nghệ hỗ trợ phong phú, đa dạng. Phát triển web trên nền web 2.0. Sử dụng công nghệ Ajax làm cho quá trình duyệt web nhanh chóng và thân thiện hơn đối với người dùng.</td>
<td>- Các công cụ và công nghệ hỗ trợ phong phú, đa dạng. Phát triển web trên nền web 2.0. Sử dụng công nghệ Ajax làm cho quá trình duyệt web nhanh chóng và thân thiện hơn đối với người dùng.</td>
<td>- Công cụ và công nghệ hỗ trợ ít, khó tìm.</td>
<td>- Công cụ và công nghệ hỗ trợ ít, khó tìm.</td>
</tr>
</tbody>
</table>
<p>- <strong>Với nhiều kinh nghiệm trong việc xây dựng và triển khai các ứng dụng web trên nhiều công nghệ khác nhau chúng tôi có thể đưa ra kết luận sau:</strong><br />
- Đối với đa số website nên chọn ngôn ngữ phát triển web PHP/MySQL vì giá thành tương đối, tốc độ xử lý nhanh, dễ lựa chọn nhà cung cấp.<br />
- Một số website cung cấp dịch vụ mang tầm quan trọng mức tối đa nên sử dụng ngôn ngữ ASP.NET/MS SQL</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=10&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2011/11/06/l%e1%bb%b1a-ch%e1%bb%8dn-cong-ngh%e1%bb%87-nao-d%e1%bb%83-phat-tri%e1%bb%83n-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://microprocessvn.wordpress.com/2011/11/06/4/</link>
		<comments>http://microprocessvn.wordpress.com/2011/11/06/4/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 03:37:55 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[Crystal Report]]></category>
		<category><![CDATA[report]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=4</guid>
		<description><![CDATA[Thông thường khi tạo báo cáo. Không gian hiển thị thường cố định(đây là mặt định của Crystal Report). Chính sự  cố định không gian hiển thị này làm cho báo cáo không được đẹp hay mất nội dung khi gặp phải dữ liệu lớn(vượt quá phạm vi hiển thị). Vậy giả quyết vấn đề [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=4&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thông thường khi tạo báo cáo. Không gian hiển thị thường cố định(đây là mặt định của Crystal Report). Chính sự  cố định không gian hiển thị này làm cho báo cáo không được đẹp hay mất nội dung khi gặp phải dữ liệu lớn(vượt quá phạm vi hiển thị). Vậy giả quyết vấn đề này bằng cách nào. Rất đơn giản, ta chỉ cần tự động tăng số dòng hiển thị trong Crystal Report cho phù hợn với dữ liệu. Hiện tại  Crystal Report đã hổ trợ tất cả, ta chỉ việc thay đổi các giá trị mặt định là xong.</p>
<p>Đầu tiên Click phải lên đối tượng cần Auto Grow và Chọn Format Object. Trong hộp thoại Format Object ta chọn cửa sổ Common. Click chọn Can Grow. Nhập số dòng tự tăng nếu muốn vào “Maximum number of lines”. Mặt đinh là 0(0 là không giớ hạn số dòng). Cuối cùng là Click “OK”. Vậy là xong(Xem hình dưới để hiểu rỏ hơn).</p>
<p><a href="http://easydeveloping.files.wordpress.com/2011/03/autogrow.jpg"><img title="AutoGrow" src="http://easydeveloping.files.wordpress.com/2011/03/autogrow.jpg?w=600&#038;h=326&#038;h=326" alt="" width="600" height="326" /></a></p>
<p>Đôi khi báo cáo không chỉ bao gồm các TextObject mà còn bao gồm các LineObject. Vậy làm thế nào các Line Object này tự động tăng kích thước chiều cao cho phù hợp với TextObject. Rất đơn giản, làm giống như TextObject</p>
<p>Đầu tiên Click phải vào đối tượng cần tự động tăng chiều cao. Chọn Format Object. Click chọn Extend to the Botton of Section when Printing. Cuối cùng Chọn “OK”. Vậy là xong(Xem hình dưới để hiểu rỏ hơn).</p>
<p><a href="http://easydeveloping.files.wordpress.com/2011/03/autogrow2.jpg"><img title="AutoGrow2" src="http://easydeveloping.files.wordpress.com/2011/03/autogrow2.jpg?w=595&#038;h=411&#038;h=411" alt="" width="595" height="411" /></a></p>
<p>Và một điều cần chú ý: hiện tại Crystal Report chưa hổ trợ Columns Grow(tự động tăng kích thước trường hiển thị).</p>
<p>sưu tầm.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=4&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2011/11/06/4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>

		<media:content url="http://easydeveloping.files.wordpress.com/2011/03/autogrow.jpg?w=600&#38;h=326" medium="image">
			<media:title type="html">AutoGrow</media:title>
		</media:content>

		<media:content url="http://easydeveloping.files.wordpress.com/2011/03/autogrow2.jpg?w=595&#38;h=411" medium="image">
			<media:title type="html">AutoGrow2</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET MVC 3</title>
		<link>http://microprocessvn.wordpress.com/2011/11/06/hello-world/</link>
		<comments>http://microprocessvn.wordpress.com/2011/11/06/hello-world/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 02:23:11 +0000</pubDate>
		<dc:creator>microprocessvn</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://microprocessvn.wordpress.com/?p=1</guid>
		<description><![CDATA[Mô hình Model-View-Controller(MVC) là một nguyên tắc thiết kế kiến trúc chia các thành phần của một ứng dụng Web. Cách này cho phép bạn kiểm soát nhiều hơn đối với các bộ phận cá nhân của ứng dụng, cho phép bạn dễ dàng phát triển, sửa đổi, và thử nghiệm chúng. ASP.NET MVC là [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=1&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mô hình Model-View-Controller(MVC) là một nguyên tắc thiết kế kiến trúc chia các thành phần của một ứng dụng Web. Cách này cho phép bạn kiểm soát nhiều hơn đối với các bộ phận cá nhân của ứng dụng, cho phép bạn dễ dàng phát triển, sửa đổi, và thử nghiệm chúng.</p>
<div>ASP.NET MVC là một phần của framework ASP.NET. Phát triển một ứng dụng ASP.NET MVC là một thay thế để phát triển các trang ASP.NET Web Forms, nó không thay thế hình thức mô hình Web.</div>
<div>Nếu bạn đã cài đặt Visual Studio 2010, ASP.NET MVC 2 là đã được cài đặt trên máy tính của bạn. Bạn có thể nhận được lên hầu hết các cập nhật phiên bản của framework ASP.NET MVC từ trang <a href="http://www.microsoft.com/web/gallery/install.aspx?appid=MVC3">ASP.NET MVC download.</a></div>
<p>&nbsp;</p>
<div>ASP.NET MVC 3 được xây dựng trên ASP.NET MVC 1 và 2, thêm các tính năng tuyệt vời mà cả đơn giản hóa mã của bạn và cho phép mở rộng sâu hơn. Chủ đề này cung cấp tổng quan của nhiều tính năng mới được bao gồm trong bản phát hành này, tổ chức thành các phần sau:</div>
<ul>
<li>The Razor View Engine</li>
<li>Support for Multiple View Engines</li>
<li>Controller Improvements</li>
<li>JavaScript and Ajax</li>
<li>Model Validation Improvements</li>
<li>Dependency Injection Improvements</li>
</ul>
<div><strong>ASP.NET MVC Code Examples from MSDN</strong></p>
<ul>
<li><a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=aspnetmvcsamples&amp;DownloadId=14240">ASP.NET MVC 3 with Razor</a></li>
<li><a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=aspnetmvcsamples&amp;DownloadId=14288">ASP.NET MVC 3 Filters</a></li>
<li><a href="http://code.msdn.microsoft.com/aspnetmvcsamples/Release/ProjectReleases.aspx?ReleaseId=5114">ASP.NET MVC 3 Remote Client Validation</a></li>
<li><a href="http://code.msdn.microsoft.com/aspnetmvcsamples/Release/ProjectReleases.aspx?ReleaseId=5114">Getting Started with MVC C# 3</a></li>
<li><a href="http://code.msdn.microsoft.com/aspnetmvcsamples/Release/ProjectReleases.aspx?ReleaseId=5114">Getting Started with MVC 3 VB</a></li>
</ul>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/microprocessvn.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/microprocessvn.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/microprocessvn.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/microprocessvn.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/microprocessvn.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/microprocessvn.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/microprocessvn.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/microprocessvn.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=microprocessvn.wordpress.com&amp;blog=29159455&amp;post=1&amp;subd=microprocessvn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://microprocessvn.wordpress.com/2011/11/06/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b769d0fc839ad970c56d519f9bf413c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">microprocessvn</media:title>
		</media:content>
	</item>
	</channel>
</rss>
