<?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/"
	>

<channel>
	<title>Pro-Tek Blog &#187; Modular pattern</title>
	<atom:link href="http://www.pro-tekconsulting.com/blog/tag/modular-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pro-tekconsulting.com/blog</link>
	<description>For UI developers / UI designers and UI trends</description>
	<lastBuildDate>Thu, 05 Sep 2019 03:59:47 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.34</generator>
	<item>
		<title>How do you organize your code? (module pattern, classical inheritance?)</title>
		<link>http://www.pro-tekconsulting.com/blog/how-do-you-organize-your-code-module-pattern-classical-inheritance/</link>
		<comments>http://www.pro-tekconsulting.com/blog/how-do-you-organize-your-code-module-pattern-classical-inheritance/#comments</comments>
		<pubDate>Sat, 25 Apr 2015 05:28:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modular pattern]]></category>

		<guid isPermaLink="false">http://www.pro-tekconsulting.com/blog/?p=557</guid>
		<description><![CDATA[<p>How do you organize your code? (module pattern, classical inheritance?) Modular pattern imitates the classes in conventional software engineering and it mainly focuses on the public and private access to methods &#38; variables. The module pattern goals are to reduce the use of globally scoped variables, so as to decreasing the chances of conflicting with [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/how-do-you-organize-your-code-module-pattern-classical-inheritance/">How do you organize your code? (module pattern, classical inheritance?)</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h4>How do you organize your code? (module pattern, classical inheritance?)</h4>
<p style="text-align: justify;">Modular pattern imitates the classes in conventional software engineering and it mainly focuses on the public and private access to methods &amp; variables. The module pattern goals are to reduce the use of globally scoped variables, so as to decreasing the chances of conflicting with other code throughout an application.</p>
<p>This is also regarded as the most commonly used design pattern and it is also widely accepted in a number of large projects such as jQuery, Dojo, ExtJS and YUI.</p>
<p><strong>Advantages</strong><br />
• Organized and clean approach for developers<br />
• We can encapsulate data.<br />
• More clean code in the global namespace(avoiding conflicts).</p>
<p><strong>Disadvantages<br />
</strong>• We cannot access private methods<br />
• We can extend Private methods and functions.</p>
<p><strong>Classical Inheritance</strong><br />
The classical inheritance in a way is similar to the inheritancein Java or C. Those who have backgrounds in those programming languages must be familiar. So by using classical inheritance, we are recreating the basic programming language’s behavior i.e. using classes and objects, which are instances of those classes.</p>
<p>So a classical pattern is used together with the“prototype”keyword added to the constructor and the newoperator.<br />
1. Call a constructor function.<br />
2. Have a child’s prototype point to the parent’s prototype.</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/how-do-you-organize-your-code-module-pattern-classical-inheritance/">How do you organize your code? (module pattern, classical inheritance?)</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pro-tekconsulting.com/blog/how-do-you-organize-your-code-module-pattern-classical-inheritance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
