<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rabeeh Abla</title><link>http://weblogs.asp.net/rabeehabla/default.aspx</link><description>Works @ CSP Solutions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>It is here Take Your Silverlight Application Full Screen &amp; intercept all windows keys!.</title><link>http://weblogs.asp.net/rabeehabla/archive/2010/12/02/it-is-here-take-your-silverlight-application-full-screen-amp-intercept-all-windows-keys.aspx</link><pubDate>Thu, 02 Dec 2010 08:04:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7654004</guid><dc:creator>rabeehabla</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=7654004</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2010/12/02/it-is-here-take-your-silverlight-application-full-screen-amp-intercept-all-windows-keys.aspx#comments</comments><description> &lt;style type="text/css"&gt;
.style1 {
	color: #6489E3;
}
.style2 {
	text-decoration: underline;
}
&lt;/style&gt;

&lt;p&gt;It is here Take Your Silverlight Application Full Screen &amp;amp; intercept all 
windows keys, whether your writing a game, or an internet cafe program, or any 
application that requires intercepting all windows key.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="style2"&gt;&lt;strong&gt;This is only possible to do, when the application 
is running out side browser, and is trusted &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1- Just install Our Com exposed library, on client machine that requires such 
functionality.&lt;br /&gt;
&lt;br /&gt;
2- Call Com exposed library, from your Silverlight Application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember to Visit our sites&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cspsolutions.com"&gt;www.cspsolutions.com&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://cuteurl.me"&gt;http://cuteurl.me&lt;/a&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;

&lt;strong&gt;DOWNLOAD IT:&lt;/strong&gt; &lt;a href="http://cuteurl.me/1Wu"&gt;
http://cuteurl.me/1Wu&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will intercept all windows , escape and Alt - F4 keys, so when it is active, and in full screen remember to add an exit button, or you have to press control-alt-del
&lt;br /&gt;
&lt;br /&gt;
SAMPLE Code&lt;br /&gt;
&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;public partial class App : Application&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;dynamic _keyBoardManager;&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;public App()&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;this.Startup += this.Application_Startup;&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;this.Exit += new EventHandler(App_Exit);&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;InitializeComponent();&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;private void Application_Startup(object sender, 
StartupEventArgs e)&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;this.RootVisual = new MainPage();&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;if (this.IsRunningOutOfBrowser &amp;amp;&amp;amp; 
this.HasElevatedPermissions)&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;this.DisableSystemKeys();&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;private void DisableSystemKeys()&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;try&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;if (_keyBoardManager == null)&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;_keyBoardManager = 
AutomationFactory.CreateObject(&amp;quot;CSPSolutions.KeyboardManager&amp;quot;);&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;_keyBoardManager.DisableSystemKeys();&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;catch &lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;private void EnableSystemKeys()&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;try&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;if (_keyBoardManager != null)&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;_keyBoardManager.EnableSystemKeys();&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;catch &lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;void App_Exit(object sender, EventArgs e)&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;{&lt;em&gt;&lt;br class="style1" /&gt;
&lt;span class="style1"&gt;this.EnableSystemKeys();&lt;/span&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;em&gt;&lt;br class="style1" /&gt;
&lt;/em&gt;}&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Rabeeh Abla&lt;br /&gt;
&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7654004" width="1" height="1"&gt;</description></item><item><title>Recent Readers</title><link>http://weblogs.asp.net/rabeehabla/archive/2009/07/31/recent-readers.aspx</link><pubDate>Fri, 31 Jul 2009 12:49:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7158733</guid><dc:creator>rabeehabla</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=7158733</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2009/07/31/recent-readers.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;
&lt;SCRIPT src="http://www.lijit.com/blog_wijits?json=0&amp;amp;id=recentviewsmapwijit&amp;amp;uri=http%3A%2F%2Fwww.lijit.com%2Fusers%2Frabla&amp;amp;js=1" type=text/javascript mce_src="http://www.lijit.com/blog_wijits?json=0&amp;amp;id=recentviewsmapwijit&amp;amp;uri=http%3A%2F%2Fwww.lijit.com%2Fusers%2Frabla&amp;amp;js=1"&gt;&lt;/SCRIPT&gt;
&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7158733" width="1" height="1"&gt;</description></item><item><title>Albert Einstein Quotes</title><link>http://weblogs.asp.net/rabeehabla/archive/2009/07/31/albert-einstein-quotes.aspx</link><pubDate>Fri, 31 Jul 2009 12:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7158719</guid><dc:creator>rabeehabla</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=7158719</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2009/07/31/albert-einstein-quotes.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;The following are few quote written by Albert Einstein:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Out of clutter, find simplicity. From discord, find harmony. In the middle of difficulty lies opportunity. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Few are those who see with their own eyes and feel with their own hearts. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Perfections of means and confusion of goals seem-in my opinion-to characterize our age. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;It's not that I'm so smart, it's just that I stay with problems longer. &lt;BR&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7158719" width="1" height="1"&gt;</description></item><item><title>Help your helper classes By Defining their context &amp; responsibility</title><link>http://weblogs.asp.net/rabeehabla/archive/2008/12/07/help-your-helper-classes-by-defining-their-context-amp-responsibility.aspx</link><pubDate>Sun, 07 Dec 2008 20:10:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6769939</guid><dc:creator>rabeehabla</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=6769939</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2008/12/07/help-your-helper-classes-by-defining-their-context-amp-responsibility.aspx#comments</comments><description>&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;BR&gt;Help your helper classes by defining their context &amp;amp; responsibility at class design time, and applying refactoring techniques.&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;BR&gt;Each class should state clearly what are its responsibilities and roles in the context it is located in.&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Appending the keyword helper to classes is getting misused and becoming a bad habit. Imagine having code with 30 or more helper classes, first people would start thanking language designer that they made use of namespaces, still this does not remove the ambiguity from helper classes and the duplication of code that is occurring in them.&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;The idea of a class to be helper to another class bounds its responsibility to helping a specified class or set of specified classes, and this causes less use of helper class in libraries or small frameworks, because most of the time there is no specified role for the helper class except helping and this is an ambiguous role because it could be anything!&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;This problem can be solved by defining unambiguous responsibilities and roles to the class, and naming the class with a name that reflects its responsibilities and roles, in addition that the class exposed functions and methods should satisfy the class responsibilities and roles. I recommend applying refactoring techniques available on &lt;A href="http://www.refactoring.com/catalog/index.html"&gt;&lt;FONT color=#0000ff&gt;http://www.refactoring.com/catalog/index.html&lt;/FONT&gt;&lt;/A&gt;, the following refactoring techniques are the most beneficial for such scenario "Extract Superclass", "Extract Class", "Extract Subclass", "Move Class".&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;All classes communicate &amp;amp; help each other under specified roles and responsibilities, these factors are the constraints that make system responsibilities and roles clear and maintainable. Misusing the helper concept causes the formation of an ambiguous system.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Take the following very basic and simple example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 427px; HEIGHT: 129px" height=129 src="http://weblogs.asp.net/blogs/rabeehabla/2.jpg" width=427 align=middle mce_src="http://weblogs.asp.net/blogs/rabeehabla/2.jpg"&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;We have a class called &lt;B style="mso-bidi-font-weight: normal"&gt;‘Help’&lt;/B&gt; that is responsible for viewing a special help file, and we have another class that helps the &lt;B style="mso-bidi-font-weight: normal"&gt;‘Help’&lt;/B&gt; class, I am going to name it as some programmers are doing these days, we will call the class &lt;B style="mso-bidi-font-weight: normal"&gt;‘HelpHelper’&lt;/B&gt; it saves and reads special help files. This is an example of bad naming that does not reflect the class responsibilities and roles.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;While we can name the preceding classes as the following and specify unambiguous responsibilities and roles:&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;The &lt;B style="mso-bidi-font-weight: normal"&gt;‘Help’ &lt;/B&gt;can be named &lt;B style="mso-bidi-font-weight: normal"&gt;‘HelpViewer’ &lt;/B&gt;that has the responsibility and role of viewing a special help file, and the &lt;B style="mso-bidi-font-weight: normal"&gt;‘HelpHelper’ &lt;/B&gt;helper class to &lt;B style="mso-bidi-font-weight: normal"&gt;‘HelpFileManager’ &lt;/B&gt;that is responsible for managing the saving and reading, this a clear specification, that allows better maintainability and clear extension of classes in a framework or library.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;IMG style="WIDTH: 427px; HEIGHT: 129px" height=129 src="http://weblogs.asp.net/blogs/rabeehabla/1.jpg" width=427 align=middle mce_src="http://weblogs.asp.net/blogs/rabeehabla/1.jpg"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;BR&gt;My advice is to decrease the use of naming classes as helpers and work on specifying unambiguous responsibilities and roles for classes, to allow people working in this domain to have better understanding of the classes they are dealing with, for maintenance, testing, extendibility, effective use reasons. &lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Is there a class named with the Helper keyword in .net Framework? And if there exists, what is the number?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Sincerely&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Rabeeh Abla&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6769939" width="1" height="1"&gt;</description></item><item><title>Software Design Patterns Presentation</title><link>http://weblogs.asp.net/rabeehabla/archive/2008/08/12/software-design-patterns-presentation.aspx</link><pubDate>Tue, 12 Aug 2008 08:01:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6507355</guid><dc:creator>rabeehabla</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=6507355</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2008/08/12/software-design-patterns-presentation.aspx#comments</comments><description>&lt;P&gt;&lt;STRONG&gt;Download Files:&lt;/STRONG&gt;&amp;nbsp; &lt;A class="" title=Presentation href="http://weblogs.asp.net/blogs/rabeehabla/Design%20Patterns.zip" target=_blank mce_href="http://weblogs.asp.net/blogs/rabeehabla/Design%20Patterns.zip"&gt;Presentation&lt;/A&gt;&amp;nbsp; &lt;A class="" title="GOF Pattern Template" href="http://weblogs.asp.net/blogs/rabeehabla/GOF%20Design%20Template.zip" target=_blank mce_href="http://weblogs.asp.net/blogs/rabeehabla/GOF%20Design%20Template.zip"&gt;GOF Pattern Template&lt;/A&gt;&amp;nbsp; &lt;A class="" title="GOF Code Examples" href="http://weblogs.asp.net/blogs/rabeehabla/GOF%20Source%20Code.zip" mce_href="http://weblogs.asp.net/blogs/rabeehabla/GOF%20Source%20Code.zip"&gt;GOF Code Examples&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Design patterns are recurring sequences and best practices for repeated scenarios in software development over the years.&lt;/P&gt;
&lt;P&gt;They are common recurring design rules&lt;/P&gt;
&lt;P&gt;We need software design patterns to define constraints on software architecture, in order to achieve the following goals: &lt;/P&gt;
&lt;P&gt;1- Define and manage software extendibility &lt;/P&gt;
&lt;P&gt;2- Bind to standards, eliminate ambiguity &lt;/P&gt;
&lt;P&gt;3- Reduce maintenance cost&lt;/P&gt;
&lt;P&gt;The idea is to maintain change, and enforce rules on a set of entities to define their behavior.&lt;/P&gt;
&lt;P&gt;Download presentation and source code for more information.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rabeeh Abla&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6507355" width="1" height="1"&gt;</description></item><item><title>Beirut</title><link>http://weblogs.asp.net/rabeehabla/archive/2008/01/24/beirut.aspx</link><pubDate>Thu, 24 Jan 2008 13:20:05 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5643933</guid><dc:creator>rabeehabla</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=5643933</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2008/01/24/beirut.aspx#comments</comments><description>&lt;div class="wlWriterSmartContent" id="scid:84E294D0-71C9-4bd0-A0FE-95764E0368D9:99797aa4-3026-4c8b-a72a-2ff283c82002" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;a href="http://maps.live.com/default.aspx?v=2&amp;amp;cp=33.8744~35.51331&amp;amp;lvl=12&amp;amp;style=h&amp;amp;mkt=en-US&amp;amp;FORM=LLWR" id="map-9759d9d4-8439-4a46-b93f-0b274f84d0e4" alt="Click to view this map on Live.com" title="Click to view this map on Live.com"&gt;&lt;img src="http://weblogs.asp.net/blogs/rabeehabla/WindowsLiveWriter/Beirut_D79B/map-b74d47f2d353.jpg" width="320" height="240" alt="Map image"&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5643933" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rabeehabla/archive/tags/Capital+of+Lebanon/default.aspx">Capital of Lebanon</category></item><item><title>Quotes</title><link>http://weblogs.asp.net/rabeehabla/archive/2008/01/24/quotes.aspx</link><pubDate>Thu, 24 Jan 2008 13:15:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5643927</guid><dc:creator>rabeehabla</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=5643927</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2008/01/24/quotes.aspx#comments</comments><description>&lt;BR&gt;
&lt;DIV class=wlWriterSmartContent id=scid:8a9f4560-92b7-41dc-bfcc-9152cc892635:1ba6f949-76cb-4f15-806e-78323422ea62 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;BLOCKQUOTE&gt;The best way to predict the future is to create it. Peter Drucker&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5643927" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rabeehabla/archive/tags/Quotes/default.aspx">Quotes</category></item><item><title>.Net Design Patterns</title><link>http://weblogs.asp.net/rabeehabla/archive/2008/01/24/net-design-patterns.aspx</link><pubDate>Thu, 24 Jan 2008 13:05:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5643890</guid><dc:creator>rabeehabla</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rabeehabla/rsscomments.aspx?PostID=5643890</wfw:commentRss><comments>http://weblogs.asp.net/rabeehabla/archive/2008/01/24/net-design-patterns.aspx#comments</comments><description>&lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="112"&gt;         &lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:89abd0ab-5b65-4ff4-8ede-6a20df0d7d9a" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt;Download: &lt;a href="http://weblogs.asp.net/blogs/rabeehabla/WindowsLiveWriter/555e0e4c6b20.NetDesignPatterns_D43E/Demo.zip" target="_blank"&gt;Demo&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:04e0f7b2-83d9-40d1-b271-938edd565060" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt;| &lt;a href="http://weblogs.asp.net/blogs/rabeehabla/WindowsLiveWriter/555e0e4c6b20.NetDesignPatterns_D43E/Generic_Adapter_.zip" target="_blank"&gt;Code&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;   &lt;br /&gt;Design patterns are recurring sequences, built-in .Net patterns are scattered over the framework.    &lt;br /&gt;    &lt;br /&gt;In practice following standard software patterns will help to achieve a more standard code, that is manageable, and understandable by a bigger set of software programmers/developers and architects.    &lt;br /&gt;    &lt;br /&gt;For example the data adapter factory, that enables the creation of specific DBMS adapters. This centralized class helps in establishing a strong data layer, that supplies a more generic way to communicate with business layer.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;For example:    &lt;br /&gt;    &lt;br /&gt;Imports System.Data.Common    &lt;br /&gt;    &lt;br /&gt;dbPFactory = DbProviderFactories.GetFactory(&amp;#8220;FactoryName&amp;#8221;)    &lt;br /&gt;adapter = dbPFactory.CreateDataAdapter()     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;Uml design of generic Adapter class, that makes use of 'DbProviderFactories' factory, and DbProviderFactory, to create a generic layer.&lt;/p&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&amp;#160;&lt;a href="http://weblogs.asp.net/blogs/rabeehabla/WindowsLiveWriter/555e0e4c6b20.NetDesignPatterns_D43E/Uml.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="338" alt="Uml" src="http://weblogs.asp.net/blogs/rabeehabla/WindowsLiveWriter/555e0e4c6b20.NetDesignPatterns_D43E/Uml_thumb.jpg" width="384" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Fig -1-    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;In simple technical english, a factory pattern is responsible for managing and creating product class instances from a base class that has an increasing or more than one child classes. The DbProviderFactories is a factory of factories, that manages the dbms adapters in .Net 2.0. Building a class wrapper over this architecture and supplying the correct parameters will enable the direct generation of specified data adapters to communicate with most of the standard DBMS in the market.    &lt;br /&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;The following is a code example of creating an adapter to connect to Access database&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;    &lt;hr /&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;public DataTable GetData()   &lt;br /&gt;{&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;GenericAdapter.GenericAdapter genericAdapter = null;&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;ConnectionStringInfo conInfo = new ConnectionStringInfo();&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;DataTable table = null;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;//Supplying parameters to connect to Access db&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;conInfo.DataBaseFilePath = @&amp;quot;c:\db.mdb&amp;quot;;    &lt;br /&gt;conInfo.ProviderName = &amp;quot;Microsoft.Jet.OLEDB.4.0&amp;quot;;    &lt;br /&gt;conInfo.DataSource = &amp;quot;{FilePath}&amp;quot;;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;genericAdapter = new GenericAdapter.GenericAdapter(&amp;quot;System.Data.OleDb&amp;quot;);&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;if (genericAdapter.SetConnectionString(conInfo))   &lt;br /&gt;{&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;table = genericAdapter.ExecuteTableCommand(&amp;quot;MyTable&amp;quot;); //return table data&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;}&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;return table;   &lt;br /&gt;}&lt;/div&gt;  &lt;div align="left"&gt;   &lt;hr /&gt;&lt;/div&gt;  &lt;div align="left"&gt;&lt;/div&gt;  &lt;div align="left"&gt;   &lt;br /&gt;Singleton pattern is implemented in many places in the .net framework, single instance window applications, also in remoting we deal with singleton classes.&lt;/div&gt;  &lt;div align="justify"&gt;   &lt;br /&gt;A singleton pattern can be achieved by forbidding the creation of direct class instance, using the constructors. This is done by making constructors private, and preventing the user from creating an instance of the class.    &lt;br /&gt;    &lt;br /&gt;This enables only the creation of instances from class scope. To enable single instance in memory we use static or shared reference to the class, we make it private to prevent public access, and we set it to NULL.    &lt;br /&gt;    &lt;br /&gt;We add a static or shared function that checks if the class static reference is NULL, if NULL an instance is created, otherwise the previous instance is returned.    &lt;br /&gt;    &lt;br /&gt;The .Net frame makes good use of the proxy pattern , that is a mediator between the real object and the client object. When applying proxy design pattern, the proxy class provides the same services as the real object. That is they inherit from same base class, or apply the same interface. Proxy classes are used in remoting, and when communicating with services.     &lt;br /&gt;&lt;/div&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="justify"&gt;Such patterns define the road map for extending a framework, using these patterns will allow your applications benefit a great deal, in extendability and code maintenance.&lt;/div&gt;  &lt;div align="justify"&gt;&lt;/div&gt;  &lt;div align="justify"&gt;   &lt;br /&gt;    &lt;br /&gt;This was an introduction to .Net Design patterns, an example of using DBFactory to create a generic adapter can be downloaded from this page.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;Regards&lt;/div&gt;  &lt;div align="justify"&gt;Rabeeh Abla &lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5643890" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rabeehabla/archive/tags/Design+Patterns/default.aspx">Design Patterns</category></item></channel></rss>
