<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Salt</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Salt"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Salt"/>
	<updated>2026-05-09T03:58:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29872</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29872"/>
		<updated>2009-11-23T03:44:13Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Energy Conscious Factory Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have fewer resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been recognized and further developed in coding for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Efficient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile software and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]  To cope with this:&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
The Factory Method Pattern is a good pattern to build upon for the energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern:&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern: &lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory Method Pattern that uses a static factory method in the Factory struct. &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type. &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod().&lt;br /&gt;
&lt;br /&gt;
The Modified Factory Method Pattern applies both struct and class recommendations.&lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod():''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In this case, we use VehicleChooser which is a ConcreteCreator, which is a struct, while Car, Plane and Ship (which are ConcreteProduct as  is a class).  Method ChooseVehicle(...) which is a FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod():''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use the static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination:''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison:''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison:''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that the optimum Energy Concerned Factory Method Pattern can be obtained from the combination of ConcreteProduct classes and the ConcreteCreator struct with the static FactoryMethod(). The ECFactory Method Pattern consumes less CPU time than the regular Factory Method  Pattern (around  11%), which is is better than the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in terms of energy consumption will be.  This pattern saves energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of a SOA:''&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6]. &amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example:''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is similar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29871</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29871"/>
		<updated>2009-11-23T03:43:06Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Energy Conscious Factory Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have fewer resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been recognized and further developed in coding for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Efficient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile software and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]  To cope with this:&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
The Factory Method Pattern is a good pattern to build upon for the energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern:&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory Method Pattern that uses a static factory method in the Factory struct. &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type. &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod().&lt;br /&gt;
&lt;br /&gt;
The Modified Factory Method Pattern applies both struct and class recommendations.&lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod():''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In this case, we use VehicleChooser which is a ConcreteCreator, which is a struct, while Car, Plane and Ship (which are ConcreteProduct as  is a class).  Method ChooseVehicle(...) which is a FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod():''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use the static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination:''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison:''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison:''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that the optimum Energy Concerned Factory Method Pattern can be obtained from the combination of ConcreteProduct classes and the ConcreteCreator struct with the static FactoryMethod(). The ECFactory Method Pattern consumes less CPU time than the regular Factory Method  Pattern (around  11%), which is is better than the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in terms of energy consumption will be.  This pattern saves energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of a SOA:''&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6]. &amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example:''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is similar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29870</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29870"/>
		<updated>2009-11-23T03:42:20Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Service Oriented Architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have fewer resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been recognized and further developed in coding for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Efficient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile software and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]  To cope with this:&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
The Factory Method Pattern is a good pattern to build upon for the energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern:&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory Method Pattern that uses a static factory method in the Factory struct. &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type. &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod().&lt;br /&gt;
&lt;br /&gt;
The Modified Factory Method Pattern applies both struct and class recommendations.&lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod():''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In this case, we use VehicleChooser which is a ConcreteCreator, which is a struct, while Car, Plane and Ship (which are ConcreteProduct as  is a class).  Method ChooseVehicle(...) which is a FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod():''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use the static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination:''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison:''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison:''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that the optimum Energy Concerned Factory Method Pattern can be obtained from the combination of ConcreteProduct classes and the ConcreteCreator struct with the static FactoryMethod(). The ECFactory Method Pattern consumes less CPU time than the regular Factory Method  Pattern (around  11%), which is is better than the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in terms of energy consumption will be.  This pattern saves energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of a SOA:''&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6]. &amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example:''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is similar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29869</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29869"/>
		<updated>2009-11-23T03:41:19Z</updated>

		<summary type="html">&lt;p&gt;Salt: Grammar fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have fewer resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been recognized and further developed in coding for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Efficient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile software and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]  To cope with this:&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
The Factory Method Pattern is a good pattern to build upon for the energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern:&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory Method Pattern that uses a static factory method in the Factory struct. &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type. &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod().&lt;br /&gt;
&lt;br /&gt;
The Modified Factory Method Pattern applies both struct and class recommendations.&lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod():''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In this case, we use VehicleChooser which is a ConcreteCreator, which is a struct, while Car, Plane and Ship (which are ConcreteProduct as  is a class).  Method ChooseVehicle(...) which is a FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod():''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use the static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination:''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison:''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison:''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that the optimum Energy Concerned Factory Method Pattern can be obtained from the combination of ConcreteProduct classes and the ConcreteCreator struct with the static FactoryMethod(). The ECFactory Method Pattern consumes less CPU time than the regular Factory Method  Pattern (around  11%), which is is better than the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in terms of energy consumption will be.  This pattern saves energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA:''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6]. &amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example:''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is similar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29868</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29868"/>
		<updated>2009-11-23T03:37:50Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* The Mobile Application Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have fewer resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been recognized and further developed in coding for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]  To cope with this:&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
The Factory Method Pattern is a good pattern to build upon for the energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory Method Pattern that uses a static factory method in the Factory struct. &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type. &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod().&lt;br /&gt;
&lt;br /&gt;
The Modified Factory Method Pattern applies both struct and class recommendations.&lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In this case, we use VehicleChooser which is a ConcreteCreator, which is a struct, while Car, Plane and Ship (which are ConcreteProduct as  is a class).  Method ChooseVehicle(...) which is a FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use the static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that the optimum Energy Concerned Factory Method Pattern can be obtained from the combination of ConcreteProduct classes and the ConcreteCreator struct with the static FactoryMethod(). The ECFactory Method Pattern consumes less CPU time than the regular Factory Method  Pattern (around  11%), which is is better than the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in terms of energy consumption will be.  This pattern saves energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6]. &amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29867</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29867"/>
		<updated>2009-11-23T03:32:34Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been recognized and further developed in coding for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]  To cope with this:&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
The Factory Method Pattern is a good pattern to build upon for the energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory Method Pattern that uses a static factory method in the Factory struct. &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type. &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod().&lt;br /&gt;
&lt;br /&gt;
The Modified Factory Method Pattern applies both struct and class recommendations.&lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In this case, we use VehicleChooser which is a ConcreteCreator, which is a struct, while Car, Plane and Ship (which are ConcreteProduct as  is a class).  Method ChooseVehicle(...) which is a FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''The Factory Method Pattern that uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use the static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that the optimum Energy Concerned Factory Method Pattern can be obtained from the combination of ConcreteProduct classes and the ConcreteCreator struct with the static FactoryMethod(). The ECFactory Method Pattern consumes less CPU time than the regular Factory Method  Pattern (around  11%), which is is better than the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in terms of energy consumption will be.  This pattern saves energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6]. &amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29865</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29865"/>
		<updated>2009-11-23T03:22:20Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* The Mobile Application Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The emerging mobile application environment presents many unique opportunities and challenges for developers.  It seems almost everyone has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones are no longer only used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen on mobile devices is typically smaller and there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally lower than those found in the typical environment [7].  Power usage is also limited because batteries are usually the power source, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more often.  While this causes a greater usage of resources, this is outweighed by the benefits of much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in Object Oriented Programming (OOP) [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
Factory Method Pattern is a good pattern to build upon for energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory  Method  Pattern  that  uses  static  factory  method  in Factory struct &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;br /&gt;
So it is clearly proven how this pattern can save energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6].&amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29864</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29864"/>
		<updated>2009-11-23T03:18:25Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Design Pattern for Mobile Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  Design patterns can help make the development process more efficient.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen on mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
Factory Method Pattern is a good pattern to build upon for energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory  Method  Pattern  that  uses  static  factory  method  in Factory struct &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;br /&gt;
So it is clearly proven how this pattern can save energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6].&amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29788</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29788"/>
		<updated>2009-11-20T01:21:34Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* The Mobile Application Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  It is therefore beneficial to make the development process more efficient and design patterns can help.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen on mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[http://www.umsl.edu/~subramaniana/concepts1.html 12].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
Factory Method Pattern is a good pattern to build upon for energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory  Method  Pattern  that  uses  static  factory  method  in Factory struct &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;br /&gt;
So it is clearly proven how this pattern can save energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6].&amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29787</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29787"/>
		<updated>2009-11-20T01:20:11Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  It is therefore beneficial to make the development process more efficient and design patterns can help.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen on mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[22 http://www.umsl.edu/~subramaniana/concepts1.html].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
Factory Method Pattern is a good pattern to build upon for energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory  Method  Pattern  that  uses  static  factory  method  in Factory struct &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;br /&gt;
So it is clearly proven how this pattern can save energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6].&amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;br /&gt;
&lt;br /&gt;
12. http://www.umsl.edu/~subramaniana/concepts1.html&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29786</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29786"/>
		<updated>2009-11-20T01:13:18Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Design Pattern for Mobile Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity and number of mobile applications rising quickly.  It is therefore beneficial to make the development process more efficient and design patterns can help.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen on mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with[22 http://www.umsl.edu/~subramaniana/concepts1.html].  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems [http://en.wikipedia.org/wiki/Mobile_operating_system] on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
We will now discuss few important ones.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : Energy Conscious design pattern and Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
=== Energy Conscious Factory Design === &lt;br /&gt;
According to the research published in ''[10]''&lt;br /&gt;
&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  [7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results are discussed in [10]:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ECFactory_Fig8.jpg| General Strategies]]&lt;br /&gt;
&lt;br /&gt;
'''''Factory Method pattern''''' is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
Factory Method Pattern is a good pattern to build upon for energy conscious pattern.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets look at both versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Class Diagram of sample Factory Method pattern::&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg|Class Diagram of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
Sequence Diagram (with Activations) of sample Factory Method pattern :: &lt;br /&gt;
[[Image:ECFactory_Fig2.jpg|Sequence Diagram (with Activations) of sample Factory Method pattern ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Modified  Factory  Method  pattern''''' &lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
*Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
*Factory  Method  Pattern  that  uses  static  factory  method  in Factory struct &lt;br /&gt;
*Factory Method Pattern that applies generics principle which is parametered type &lt;br /&gt;
*Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig3.jpg|Class Diagram of Factory Method pattern]]&lt;br /&gt;
&lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
''Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()::''&lt;br /&gt;
[[Image:ECFactory_Fig4.jpg|Class Diagram of Factory Method pattern]]&amp;lt;br&amp;gt;&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
'''''Experimental Result:'''''&lt;br /&gt;
&amp;lt;br&amp;gt;For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Characteristic of components in each combination::''&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg|Characteristic of components in each combination ]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CPU Usage Comparison ::''&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg|CPU Usage Comparison ]]&amp;lt;br&amp;gt;&lt;br /&gt;
UPT is utilized processor time and TPT is total processor time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''Energy Usage Comparison::''&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig7.jpg|Energy Usage Comparison]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;br /&gt;
So it is clearly proven how this pattern can save energy.&lt;br /&gt;
&lt;br /&gt;
===Service Oriented Architecture ===&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
''Example of an SOA::''&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meeting pattern Example===&lt;br /&gt;
According to the research published in [6].&amp;lt;br&amp;gt;&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
''Meeting pattern Example::''&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
8. WIM Workshop,Uppsala, 17.9.2004&lt;br /&gt;
&lt;br /&gt;
9. Mobile Application Development, Sam Nasr , www.CleavelandDotNet.info&lt;br /&gt;
&lt;br /&gt;
10. Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
&lt;br /&gt;
11. http://www.codeproject.com/csharp/structs_in_csharp.asp&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29686</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29686"/>
		<updated>2009-11-19T04:55:53Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment [3].  Within this architecture, applications can make use of various services by sending messages to them via a protocol.  Applications may interact with services on operating systems and written in different languages, as long as the protocol is followed.  Services may be located on different mobile devices.  This protocol is a good fit, allowing applications to reach out to services on other mobile devices, even though they may be on very different devices.&lt;br /&gt;
&lt;br /&gt;
*'''''Service Oriented Architecture Example''''' [3]&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Energy Conscious (EC) Factory model [7]!!!!&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
*'''''Meeting pattern Example''''' [6]&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29680</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29680"/>
		<updated>2009-11-19T04:47:58Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment. [3]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Service Oriented Architecture Example [3]&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
*'''''Example meeting pattern''''' [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29674</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29674"/>
		<updated>2009-11-19T04:44:32Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment. [2]&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Example meeting pattern''' [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html - Model View Controller Architecture&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge - Challenges of the Mobile Environment&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/ - Designing and Developing mobile web sites in the real world&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29664</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29664"/>
		<updated>2009-11-19T04:39:38Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
Service Oriented Architectures are well suited for the mobile environment. [2]&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Example meeting pattern''' [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29655</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29655"/>
		<updated>2009-11-19T04:35:34Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert SOA here&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
Example of a meeting pattern [6]&lt;br /&gt;
&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29654</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29654"/>
		<updated>2009-11-19T04:34:54Z</updated>

		<summary type="html">&lt;p&gt;Salt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert SOA here&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
Example of a meeting pattern [6]&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29642</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29642"/>
		<updated>2009-11-19T04:29:52Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Working Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
[6]&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29641</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29641"/>
		<updated>2009-11-19T04:29:21Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Working Notes ==&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29640</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29640"/>
		<updated>2009-11-19T04:28:46Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[7]&lt;br /&gt;
- Use registers instead of memory whenever possible (registers use less energy)&lt;br /&gt;
- Use structs instead of classes&lt;br /&gt;
- Use static instead of dynamic&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29631</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29631"/>
		<updated>2009-11-19T04:22:59Z</updated>

		<summary type="html">&lt;p&gt;Salt: Copy in notes, need to paraphraze&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This wiki explains the mobile application environment, then focuses on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: Energy Conscious Factory Method Design Pattern for Mobile Devices with C# and Intermediate Language, &lt;br /&gt;
by Kayun Chantarasathaporn  and Chonawat Srisa-an, Ph.D.  at  Faculty of Information Technology,  Rangsit University, Thailand.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
Two major design patterns that have come up to help in mobile softwares and to address the above discussed issues in a mobile device are : &lt;br /&gt;
&lt;br /&gt;
   1. Energy Conscious design pattern&lt;br /&gt;
   2. Mobile agent design pattern&lt;br /&gt;
&lt;br /&gt;
Energy Conscious Factory Design&lt;br /&gt;
Power consumption has not been much of a concern to developers in the past, but this is important in the mobile environment.  Battery power on cell phones is limited.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Energy Conscious design pattern:&lt;br /&gt;
&lt;br /&gt;
In oo design pattern, forever minimizing  power  consumption was never considered as they were used on normal computers. But nowadays due to high usage of smartphone and demand for better performance on the portable gadgets, energy usage is considered as an important issue. Due to business reasons, everyone wants their applications to come to market as soon as possible time to market, thus the usual practice of writing an optimized code in low level language has shifted towards high level object oriented language. This also helps to create much more complicated software, which can exploit the dual core mobile processors up in market these days. Thus  there is an high demand for patterns in oops which can take care of energy optimization in the software.&lt;br /&gt;
However,  using  Design  Patterns  directly  in  software  development for  power  conscious  systems  is  not  recommended  because  they were  not  originally  designed  for  such  environment.  So energy conscious design pattern is tweaked version of these patterns to suit for this need.&lt;br /&gt;
&lt;br /&gt;
 Energy Concerned  Design  Patterns.    EC  Design  Patterns  are  based  on existing patterns in GOF book.  &lt;br /&gt;
One general rule followed is should  avoid  using  memories  and  use  registers  since  the  latter  required less energy.  &lt;br /&gt;
&lt;br /&gt;
Some strategies and their experimental results: Ref:: http://www.codeproject.com/csharp/structs_in_csharp.asp &lt;br /&gt;
&lt;br /&gt;
What to work with?	Choice 1	Choice 2	Recommendation&lt;br /&gt;
Type	class	struct	struct&lt;br /&gt;
Field	static	dynamic	static&lt;br /&gt;
Method	static	dynamic	static&lt;br /&gt;
&lt;br /&gt;
Factory Method Pattern is a good pattern to build upon for energy conscious pattern.&lt;br /&gt;
Factory Method pattern is a pattern that returns an object from one of various possible classes.  Which class is chosen to be an object generator  is  depended  on  data  provided  to  it.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Figure 1. Class Diagram of sample Factory Method pattern &lt;br /&gt;
 &lt;br /&gt;
Figure 2. Sequence Diagram (with Activations) of sample Factory Method pattern &lt;br /&gt;
&lt;br /&gt;
In Factory  Method  pattern,  the  actor  need  not  know  which  exact  class  will  create  the  object  for  it.  &lt;br /&gt;
Actor  just  sends  the  ChooseVehicle()  message,  and  specifies condition in &amp;quot;order&amp;quot; parameter, to object of VehicleChooser class, then instance of the appropriated class will be provided.&lt;br /&gt;
&lt;br /&gt;
As regular Factory Method pattern was not designed for being energy concerned, so, it is slightly modified. Some of the critical tweaks are:&lt;br /&gt;
&lt;br /&gt;
    *  Factory Method Pattern that mixes usage of struct and class in several manners. &lt;br /&gt;
&lt;br /&gt;
    *  Factory  Method  Pattern  that  uses  static  factory  method  in Factory struct &lt;br /&gt;
&lt;br /&gt;
    *  Factory Method Pattern that applies generics principle which is parametered type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modified  Factory  Method  pattern applies both struct  and  class recommendations.&lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Class, ConcreteCreator Struct with Non-Static FactoryMethod()&lt;br /&gt;
Figure 3. Class Diagram of Factory Method pattern :  &lt;br /&gt;
In  this  case,  we  use VehicleChooser  which  is  a  ConcreteCreator  as  struct  while  Car, Plane  and  Ship  which  are  ConcreteProduct  as  class.    Method ChooseVehicle(...) which is as FactoryMethod() is non-static. &lt;br /&gt;
&lt;br /&gt;
 Factory Method Pattern That Uses ConcreteProduct Struct, ConcreteCreator Struct with Static FactoryMethod()&lt;br /&gt;
Figure 4. Class Diagram of Factory Method pattern&lt;br /&gt;
If we use static method appropriately, CPU workload will be reduced.  This affects directly in lessening power consumption as a whole.&lt;br /&gt;
&lt;br /&gt;
Experimental Result:&lt;br /&gt;
For various combination shown in figure, the tests were run, and the result obtained are shown in the graph below.&lt;br /&gt;
 Characteristic of components in each combination &lt;br /&gt;
Fig5 &lt;br /&gt;
&lt;br /&gt;
CPU Usage Comparison &lt;br /&gt;
fig6&lt;br /&gt;
&lt;br /&gt;
Energy Usage Comparison&lt;br /&gt;
fig 7&lt;br /&gt;
&lt;br /&gt;
Here i8 is regular Factory Method pattern which turns out to be worst performer,  best  solution  from  our  test  in  both  regular  and  light  weight &lt;br /&gt;
type    is    &amp;quot;i5&amp;quot;    Factory    Method    pattern    that    comprises    of ConcreteProduct    class,    ConcreteCreator    struct    with    static &lt;br /&gt;
FactoryMethod  inside.&lt;br /&gt;
&lt;br /&gt;
Conclusion(this can be put in the main conclusion) :: It is observed that   Energy Concerned  Factory  Method  Pattern can be obtained from the combination     of     ConcreteProduct     classes     and ConcreteCreator    struct    with    static    FactoryMethod(). The ECFactory  Method  Pattern  consumes  less  CPU  time  than  regular Factory  Method  Pattern  around  11%  while  it  is  better  than  the worst case around 80%.  The bigger the ConcreteProduct type size is, the more range between the best and the worst case in term of energy consumption will be.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29595</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29595"/>
		<updated>2009-11-19T04:12:49Z</updated>

		<summary type="html">&lt;p&gt;Salt: Cut out old stuff, linked in images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ECFactory_Fig1.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig2.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig5.jpg]]&lt;br /&gt;
[[Image:ECFactory_Fig6.jpg]]&lt;br /&gt;
[[Image:MCFigure3.jpg]]&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:MCFigure3.jpg&amp;diff=29586</id>
		<title>File:MCFigure3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:MCFigure3.jpg&amp;diff=29586"/>
		<updated>2009-11-19T04:09:38Z</updated>

		<summary type="html">&lt;p&gt;Salt: Figure 3 from Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes. Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal d&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Figure 3 from Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes. Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig6.jpg&amp;diff=29572</id>
		<title>File:ECFactory Fig6.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig6.jpg&amp;diff=29572"/>
		<updated>2009-11-19T04:00:38Z</updated>

		<summary type="html">&lt;p&gt;Salt: Figure 6 from Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Figure 6 from Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig5.jpg&amp;diff=29567</id>
		<title>File:ECFactory Fig5.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig5.jpg&amp;diff=29567"/>
		<updated>2009-11-19T03:57:45Z</updated>

		<summary type="html">&lt;p&gt;Salt: Figure 5 from Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Figure 5 from Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig2.jpg&amp;diff=29559</id>
		<title>File:ECFactory Fig2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig2.jpg&amp;diff=29559"/>
		<updated>2009-11-19T03:54:19Z</updated>

		<summary type="html">&lt;p&gt;Salt: Figure 2 from Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Figure 2 from Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig1.jpg&amp;diff=29550</id>
		<title>File:ECFactory Fig1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ECFactory_Fig1.jpg&amp;diff=29550"/>
		<updated>2009-11-19T03:52:39Z</updated>

		<summary type="html">&lt;p&gt;Salt: Figure 1 from
Image Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Figure 1 from&lt;br /&gt;
Image Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29507</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29507"/>
		<updated>2009-11-19T03:32:52Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364 Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29487</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29487"/>
		<updated>2009-11-19T03:20:51Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* The Mobile Application Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment [7].  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal [7].  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly [7].  The mobile environment is changing rapidly [2].  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP [7].&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29484</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29484"/>
		<updated>2009-11-19T03:20:03Z</updated>

		<summary type="html">&lt;p&gt;Salt: Fix citing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced) [5].  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals [6].&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly[7].  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code [7].&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible [5].&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources [6].&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices [6].&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use [7].  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29476</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29476"/>
		<updated>2009-11-19T03:17:35Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources. [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices. [6]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use. [7]  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29474</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29474"/>
		<updated>2009-11-19T03:16:49Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources. [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices. [6]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.  The EC factory pattern was designed for the mobile environment to reduce energy use.  A few other patterns show much promise with mobile devices, including the meeting pattern, master / slave pattern, and service oriented architectures.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29461</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29461"/>
		<updated>2009-11-19T03:11:57Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more and provide more resources. [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern is very useful for performing actions in parallel on different mobile devices. [6]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29457</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29457"/>
		<updated>2009-11-19T03:10:34Z</updated>

		<summary type="html">&lt;p&gt;Salt: Master / Slave pattern&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  Agents may be located on different devices, even on computers with more resources.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more things and provide more resources. [6]&lt;br /&gt;
&lt;br /&gt;
The master slave pattern is simmilar to the meeting pattern.  Instead of a meeting manager and agents, there is a master that creates, uses, and destroys slave objects.  The master assigns the slaves tasks to complete.  Like agents in the meeting pattern, slaves may be located on different mobile devices, or even on computers that have more resources.  The master / slave pattern would be very useful for performing actions in parallel on different mobile devices.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29398</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29398"/>
		<updated>2009-11-19T02:40:48Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
The meeting pattern [6] is especially useful in mobile environments.  One device or application serves as the meeting manager.  The meeting manager coordinates and tracks the other agents (programs or applications).  These agents communicate with the oversight of the meeting manager.  This is especially well suited for the mobile environment because it is a good way to manage the communications and relatively small applications.  A further benefit of the meeting pattern is that mobile applications may be combined (somewhat in the fashion of parallel computing) to do more things and provide more resources.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29364</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29364"/>
		<updated>2009-11-19T02:30:34Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. Kayun Chantarasathaporn, Chonawat Srisa-an. ACM International Conference Proceeding Series; Vol. 270 Proceedings of the 3rd international conference on Mobile technology, applications &amp;amp; systems SESSION: Mobile applications, article 29. ISBN:1-59593-519-3 http://portal.acm.org/citation.cfm?id=1292331.1292364,Bangkok, Thailand, 2006&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29329</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29329"/>
		<updated>2009-11-19T02:20:47Z</updated>

		<summary type="html">&lt;p&gt;Salt: Reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. Emerson F.A Lima, Patrícia D. L. Machado, Fláavio R. Sampaio, and Jorge C. A. Figueiredo. ACM SIGSOFT Software Engineering Notes.  Volume 29, issue 3 ISSN: 0163-5948 http://portal.acm.org/citation.cfm?id=986710.986726 Universidade Federal de Campina Grande, Paraíba, Brazil, May, 2004.&lt;br /&gt;
&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29280</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29280"/>
		<updated>2009-11-19T02:04:54Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* References: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29278</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29278"/>
		<updated>2009-11-19T02:04:30Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Ways to Adapt Using Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Views may be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References: ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29264</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29264"/>
		<updated>2009-11-19T02:02:16Z</updated>

		<summary type="html">&lt;p&gt;Salt: Try to fix references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Vies could be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References: ==&lt;br /&gt;
&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29258</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29258"/>
		<updated>2009-11-19T02:01:14Z</updated>

		<summary type="html">&lt;p&gt;Salt: Conclusion added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Vies could be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, certain design patterns are especially useful in the mobile design environment.  These patterns help developers to produce applications quickly and applications which make efficient use of the limited resources in the mobile environment.  Most design patterns can be of benefit to mobile applications, but certain patterns have features that are especially well suited.&lt;br /&gt;
&lt;br /&gt;
== References: ==&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29209</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=29209"/>
		<updated>2009-11-19T01:50:47Z</updated>

		<summary type="html">&lt;p&gt;Salt: MVC + definition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.  A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
!!!! Insert EC Factory here&lt;br /&gt;
&lt;br /&gt;
The [http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html Model View Controller] pattern [1] fits the mobile environment well.  Models may be set up so that optimum data structures are used, as was discussed for the EC Factory pattern [7].  Effecient designs may be built into the controllers.  Vies could be standardized for the application to handle the small screens.&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28205</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28205"/>
		<updated>2009-11-18T06:09:49Z</updated>

		<summary type="html">&lt;p&gt;Salt: Filled in details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse (user inputs are reduced). [5]  CPU resources are generally less than those found in the typical environment. [7]  Power usage is also limited because a battery is typically used, so reducing power use by the application is an important goal. [7]  Connections are typically expensive and are often prone to loss of signals. [6]&lt;br /&gt;
&lt;br /&gt;
Another problem is that there is a high demand for applications to be developed quickly. p7[  The mobile environment is changing rapidly. [2]  Some of the lower level programming languages were useful because they produced fast applications, but they took too long to develop with.  Now, with the increased demand for applications quickly, Object Oriented Programming (OOP) is used more.  While this causes a greater usage of resources, this is outweighed by the much quicker development cycle and the re-use of code.  In particular, good solutions may be re-used in OOP. [7]&lt;br /&gt;
&lt;br /&gt;
In the mobile environment, applications are often written on different operating systems on different mobile systems.  There is increased interaction between mobile systems, especially for cell phones.  The Service Oriented Architecture design pattern is especially well suited for this situation.  This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
Notes appear below here:&lt;br /&gt;
++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
- higher communication with other devices&lt;br /&gt;
- Different underlying operating systems and architectures&lt;br /&gt;
- At first, code was written in low level languages for mobile devices, but now higher level languages are used to reduce development time. [7]&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28182</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28182"/>
		<updated>2009-11-18T05:53:35Z</updated>

		<summary type="html">&lt;p&gt;Salt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
The mobile application environment is new and presents many unique opportunities and challenges for developers.  It seems almost everyone now has a cellphone, blackberry, or other small portable device.  These devices are &amp;quot;getting smarter&amp;quot; in that many people are developing new applications for them.  Cell phones no longer are just used to call people, they often have features like text messaging, cameras, video games, web browsers and more.  There is much opportunity for developers to write new applications for mobile devices.&lt;br /&gt;
&lt;br /&gt;
While opportunity abounds, there are also quite a few challenges.  Mobile applications have less resources than are typically found in other development environments.  The screen om mobile devices is typically smaller, there is usually not a keyboard and mouse.&lt;br /&gt;
This is a fairly new field, and methods are currently being developed to aid developers.&lt;br /&gt;
&lt;br /&gt;
== Ways to Adapt Using Design Patterns ==&lt;br /&gt;
&lt;br /&gt;
Several principles and patterns have been understood and developed in developing for mobile applications.  Many of these methods are still undergoing change and experimentation.  There are new methods being developed and others left behind.&lt;br /&gt;
&lt;br /&gt;
Ease of navigation is a particularly important principle, because of the reduced number of user inputs (for example, buttons from 0 to 9 instead of a mouse and keyboard).  Everything in an application should be no more than three clicks away.  If a program is too &amp;quot;deep&amp;quot;, requiring many clicks, this will be a problem because it takes longer to navigate on a mobile device.  If the application is to &amp;quot;broad&amp;quot; as in too many links on one page, the data may not all fit on the screen.  One way to mitigate this problem is to reduce functionality, to keep the application as simple as possible.&lt;br /&gt;
[5]&lt;br /&gt;
&lt;br /&gt;
- lower resources&lt;br /&gt;
    - Low battery power [7]&lt;br /&gt;
    - CPU Power [7]&lt;br /&gt;
    - Expensive connections [6]&lt;br /&gt;
    - Small screens [2]&lt;br /&gt;
- Rapidly changing environment [2]&lt;br /&gt;
- Quick development cycle [7]&lt;br /&gt;
- Difficult communications (e.g. highly prone to lost data) [6]&lt;br /&gt;
- Fewer user inputs (often 0-9) so ease of navigation is more important than traditional enviroments [5]&lt;br /&gt;
- higher communication with other devices&lt;br /&gt;
- Different underlying operating systems and architectures&lt;br /&gt;
- At first, code was written in low level languages for mobile devices, but now higher level languages are used to reduce development time. [7]&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28152</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28152"/>
		<updated>2009-11-18T05:30:07Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Design Pattern for Mobile Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
- lower resources&lt;br /&gt;
    - Low battery power [7]&lt;br /&gt;
    - CPU Power [7]&lt;br /&gt;
    - Expensive connections [6]&lt;br /&gt;
    - Small screens [2]&lt;br /&gt;
- Rapidly changing environment [2]&lt;br /&gt;
- Quick development cycle [7]&lt;br /&gt;
- Difficult communications (e.g. highly prone to lost data) [6]&lt;br /&gt;
- Fewer user inputs (often 0-9) so ease of navigation is more important than traditional enviroments [5]&lt;br /&gt;
- higher communication with other devices&lt;br /&gt;
- Different underlying operating systems and architectures&lt;br /&gt;
- At first, code was written in low level languages for mobile devices, but now higher level languages are used to reduce development time. [7]&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28151</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28151"/>
		<updated>2009-11-18T05:29:36Z</updated>

		<summary type="html">&lt;p&gt;Salt: /* Design Pattern for Mobile Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
Design Pattern for Mobile Applications&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Mobile Application Environment ==&lt;br /&gt;
&lt;br /&gt;
- lower resources&lt;br /&gt;
    - Low battery power [7]&lt;br /&gt;
    - CPU Power [7]&lt;br /&gt;
    - Expensive connections [6]&lt;br /&gt;
    - Small screens [2]&lt;br /&gt;
- Rapidly changing environment [2]&lt;br /&gt;
- Quick development cycle [7]&lt;br /&gt;
- Difficult communications (e.g. highly prone to lost data) [6]&lt;br /&gt;
- Fewer user inputs (often 0-9) so ease of navigation is more important than traditional enviroments [5]&lt;br /&gt;
- higher communication with other devices&lt;br /&gt;
- Different underlying operating systems and architectures&lt;br /&gt;
- At first, code was written in low level languages for mobile devices, but now higher level languages are used to reduce development time. [7]&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
Stylesheets&lt;br /&gt;
Forms&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28150</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28150"/>
		<updated>2009-11-18T05:27:31Z</updated>

		<summary type="html">&lt;p&gt;Salt: Copy in our document so far and touchup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
The popularity of mobile applications is rising.  Design patterns are useful in almost any coding tasks.  While almost any design pattern could be used within mobile applications, certain patterns are well suited for the unique environment of mobile applications.  This paper focuses first on the mobile application environment, then on design patterns that work well within this new emerging environment.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
Design Pattern for Mobile Applications&lt;br /&gt;
&lt;br /&gt;
Stylesheets?&lt;br /&gt;
Forms?&lt;br /&gt;
&lt;br /&gt;
.......................................&lt;br /&gt;
.....................&lt;br /&gt;
........&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Mobile Application Environment&lt;br /&gt;
&lt;br /&gt;
- lower resources&lt;br /&gt;
    - Low battery power [7]&lt;br /&gt;
    - CPU Power [7]&lt;br /&gt;
    - Expensive connections [6]&lt;br /&gt;
    - Small screens [2]&lt;br /&gt;
- Rapidly changing environment [2]&lt;br /&gt;
- Quick development cycle [7]&lt;br /&gt;
- Difficult communications (e.g. highly prone to lost data) [6]&lt;br /&gt;
- Fewer user inputs (often 0-9) so ease of navigation is more important than traditional enviroments [5]&lt;br /&gt;
- higher communication with other devices&lt;br /&gt;
- Different underlying operating systems and architectures&lt;br /&gt;
- At first, code was written in low level languages for mobile devices, but now higher level languages are used to reduce development time. [7]&lt;br /&gt;
&lt;br /&gt;
Design patterns that are a good fit:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
A design pattern can be defined as a repeatable solution to a common problem in software.  It is a template for how to solve the problem, not actual code. [7]&lt;br /&gt;
 &lt;br /&gt;
- MVC [1]&lt;br /&gt;
- Service Oriented Architecture [3]&lt;br /&gt;
- Mobile Agent Design Model [6]&lt;br /&gt;
- Meeting Pattern [6]&lt;br /&gt;
    - agents (applications / etc...)&lt;br /&gt;
    - meeting manager (tracks which agents are &amp;quot;met&amp;quot;, facilitates meeting (connection))&lt;br /&gt;
    - Multiple PDA search example&lt;br /&gt;
    - Marketplace example&lt;br /&gt;
- Master / slave pattern [6]&lt;br /&gt;
    - Master creates remote slave objects to do tasks, slaves report, slaves reused / destroyed&lt;br /&gt;
- Energy Concerned (EC) factory [7]&lt;br /&gt;
    - The Factory method is used to return an object of the selected type of class.  For example, a Vehicle factory could be coded to return a class object to a car, plane, or boat, depending on what is desired [7].&lt;br /&gt;
    - EC Factory makes use of factories to select energy efficient classes: [7]&lt;br /&gt;
        - Generics principle [7]&lt;br /&gt;
        - Struct vs. class [7]&lt;br /&gt;
        - Static vs. dynamic [7]&lt;br /&gt;
    - Make less use of memory, more use of registers because registers require less energy [7]&lt;br /&gt;
    - Make minimal use of the CPU&lt;br /&gt;
    - Object oriented programming (OOP) consumes more power than procedural programming, but the advantages of code reuse with good designs, and quicker development in OOP outweigh the disadvantages &lt;br /&gt;
    - Use structs vs. classes, and use static vs. dynamic were possible [7]&lt;br /&gt;
 &lt;br /&gt;
of more resource consumption [7]&lt;br /&gt;
- Model View Controller Framework???? - changes have minimal impact in this [1] http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
1. http://www.javaworld.com/javaworld/jw-10-2005/jw-1003-mvc.html&lt;br /&gt;
2. http://patterns.littlespringsdesign.com/index.php/The_mobile_challenge&lt;br /&gt;
3. http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki2_17_va - Service Oriented Architecture&lt;br /&gt;
4. http://wiki.forum.nokia.com/index.php/Understading_Desing_Patterns - Understanding Design Patterns&lt;br /&gt;
5. http://dev.opera.com/articles/view/designing-and-developing-mobile-web-site/&lt;br /&gt;
6. http://portal.acm.org/citation.cfm?id=986710.986726&lt;br /&gt;
7. http://portal.acm.org/citation.cfm?id=1292331.1292364&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28092</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28092"/>
		<updated>2009-11-18T05:01:25Z</updated>

		<summary type="html">&lt;p&gt;Salt: &amp;quot;Clear out&amp;quot; old page while preserving items used for formatting the wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture'' 3] (or SOA) describes how to &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!!!! Note: everything below this point is old and is so we can put in the proper formatting&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28083</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 21 MobileDesignPattern</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_21_MobileDesignPattern&amp;diff=28083"/>
		<updated>2009-11-18T04:57:18Z</updated>

		<summary type="html">&lt;p&gt;Salt: Obtain useful format from wiki2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Design Pattern for Mobile Applications ==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture'' 3] (or SOA) describes how to design a software system and connect the separate components using services.  Reflection and metaprogramming are two powerful concepts that directly support the principles of SOA.  This article covers the following goals:&lt;br /&gt;
#Provides a simple understanding of reflection, metaprogramming, and SOA's.&lt;br /&gt;
#Explains how these concepts are interrelated, specifically how reflection and metaprogramming support SOA's.&lt;br /&gt;
&lt;br /&gt;
== '''Service Oriented Architecture (SOA), Reflection, and Metaprogramming''' ==&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
==='''Service Oriented Architecture'''===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture''] (or SOA) is a concept in computing that defines the interaction of different software in terms of protocols and functionality.  A SOA can be viewed as containing multiple services which may be linked as desired by protocols.  The SOA is designed so that each functional unit of software in a system is isolated from each other and provides a service without directly making [http://en.wikipedia.org/wiki/Subroutine subroutine calls] to each other.  This is generally accomplished by passing messages. [http://en.wikipedia.org/wiki/Service_oriented_architecture 3]&lt;br /&gt;
&lt;br /&gt;
SOA offers the following technical advantages:&lt;br /&gt;
*Offers services across platforms&lt;br /&gt;
*Allows services to be split across systems and networks&lt;br /&gt;
*Allows services to be location independent and close to their business units&lt;br /&gt;
*Provides a bridge between incompatible technologies&lt;br /&gt;
*Leverages existing technologies&lt;br /&gt;
*Reduces dependency on custom systems&lt;br /&gt;
&lt;br /&gt;
The information being used to communicate between services must contain data, sufficient detail about the characteristic of the data and must remain independent of the underlying platform and programming language.  Although SOA does not specify the format to transfer data, programmers have generally used XML for this purpose.  Furthermore, [http://en.wikipedia.org/wiki/Metadata Metadata] (data that describes the actual data) [http://en.wikipedia.org/wiki/Metadata 6] in the SOA must:  [http://en.wikipedia.org/wiki/Service_oriented_architecture 3]&lt;br /&gt;
&lt;br /&gt;
*Be easy to configure&lt;br /&gt;
*Provide an easy way to discover services&lt;br /&gt;
*Provide an easy way to incorporate services&lt;br /&gt;
*Remain coherent&lt;br /&gt;
*Preserve data integrity&lt;br /&gt;
*Be easy to manage&lt;br /&gt;
&lt;br /&gt;
A simple example of metadata is a README file that specifies the inputs and outputs to a program.  The inputs and outputs of the program would be the data, and the README file is metadata that describes this data.&lt;br /&gt;
&lt;br /&gt;
SOA does not limit the protocol used to transfer the data.  A wide variety of technologies can be used including [http://en.wikipedia.org/wiki/SOAP_(protocol) SOAP], [http://en.wikipedia.org/wiki/Representational_State_Transfer REST] and [http://en.wikipedia.org/wiki/Remote_procedure_call RPC].  This is generally left for the programmer of the system.&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
==='''Metaprogramming'''===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Metaprogramming Metaprogramming] is the writing of computer programs that write other computer programs.  This allows the programmer to complete tasks faster than if (s)he had to code everything manually.  A [http://en.wikipedia.org/wiki/Compiler compiler] is an excellent example of a metaprogram. It allows the programmer to code in a higher level language and then the compiler will convert that program into machine language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the example above, attr_accessor is used to create [http://en.wikipedia.org/wiki/Mutator_method 'setters' and 'getters'] for the name attribute via metaprogramming.  From this statement, code is automatically generated that provides a function to write the name (setter) and a function to read the name (getter).&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [http://weare.buildingsky.net/2009/08/25/rubys-metaprogramming-toolbox 9] &lt;br /&gt;
  Array.send(:define_method, :ducky) { puts 'ducky' }&lt;br /&gt;
&lt;br /&gt;
This example does something particularly interesting.  At run time, it defines a new method called ducky that prints out the word &amp;quot;ducky&amp;quot;.  This line modifies the program at run time!&lt;br /&gt;
&lt;br /&gt;
Another example in Ruby is the ActiveRecord library.  It dynamically creates accessor methods that map directly to each column in the database.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': ActiveRecord metaprogramming in Ruby [10]&lt;br /&gt;
  class Movie &amp;lt; ActiveRecord::Base&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  movie = Movie.create&lt;br /&gt;
  movie.title = &amp;quot;Doctor Strangelove&amp;quot;&lt;br /&gt;
  movie.title                          # =&amp;gt; &amp;quot;Doctor Strangelove&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In the example above, we create a new instance of Movie, which subclasses ActiveRecord. We then directly access the database's title column using the setter method 'title=' and then the getter method 'title'.  These methods are not defined anywhere in the source code, but instead, ActiveRecord automatically defines them based on the database column.&lt;br /&gt;
&lt;br /&gt;
==='''Reflection'''===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_(computer_science) Reflection] is a specific type of meta-programming and emphasizes dynamic program modification.  It is the ability of a programming language to inspect its own code and can therefore be used to extend the language beyond its usual capabilities.  For example, it is possible to use reflection to inspect an object for a desired function and execute it dynamically.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Reflection in Perl [http://en.wikipedia.org/wiki/Reflection_(computer_science) 5] &lt;br /&gt;
  # without reflection&lt;br /&gt;
  my $foo = Foo-&amp;gt;new();&lt;br /&gt;
  $foo-&amp;gt;hello();&lt;br /&gt;
 &lt;br /&gt;
  # with reflection&lt;br /&gt;
  my $class  = &amp;quot;Foo&amp;quot;;&lt;br /&gt;
  my $method = &amp;quot;hello&amp;quot;;&lt;br /&gt;
  my $object = $class-&amp;gt;new();&lt;br /&gt;
  $object-&amp;gt;$method();&lt;br /&gt;
&lt;br /&gt;
In the example with reflection, $object and $method can be viewed by the program and even changed at run time.  This allows the program to change its own behavior.  This is an example of reflection because the program can see itself and change itself.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Reflection in Ruby [http://en.wikipedia.org/wiki/Reflection_(computer_science) 5]&lt;br /&gt;
&lt;br /&gt;
  # without reflection&lt;br /&gt;
  Foo.new.hello&lt;br /&gt;
 &lt;br /&gt;
  # with reflection&lt;br /&gt;
  Object.const_get(:Foo).new.send(:hello)&lt;br /&gt;
&lt;br /&gt;
In this example, the first and second lines illustrate how the code is written without reflection.  The first line is a comment, and the second line is the actual code.  The code calls on Foo.new.hello, which calls on the object Foo, method new, and from what is returned on that, calls the method hello.  The second section does practically the same thing, but with reflection.  The main difference is that the object called by :hello can be determined at run time.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': More Reflection in Ruby [http://www.ruby-doc.org/core/classes/ObjectSpace.html 8]&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object(Numeric) {|x| p x }&lt;br /&gt;
&lt;br /&gt;
In this example, Ruby can determine all the objects that are defined.  This particular line of code prints out all the numeric objects that are currently defined.&lt;br /&gt;
&lt;br /&gt;
=='''How metaprogramming and reflection enhance SOA'''==&lt;br /&gt;
&lt;br /&gt;
Service-oriented Architecture is enhanced when the underlying programs are able to dynamically adapt to the data received. Metaprogramming and Reflection make this possible.  To see how this is so, it will be helpful to look at a few potential uses.&lt;br /&gt;
&lt;br /&gt;
One such use would be a service that writes code based on the inputs.  The services within SOA make use of the data passed to them.  When the passed data represents code, for example 'print &amp;quot;Hello World&amp;quot;' in a language independent way, the receiving service could use metaprogramming to write code to just that.  The service would then use reflection to determine what methods are available, in our case 'print', and would perform that task.  If the service logic was to &amp;quot;repeat 3 times&amp;quot;, then the code would ultimately print &amp;quot;Hello World&amp;quot; that number of times.  XML may be used to transfer this message as follows:&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''' XML Data:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;message&amp;gt;&lt;br /&gt;
    &amp;lt;method&amp;gt;print&amp;lt;/method&amp;gt;&lt;br /&gt;
    &amp;lt;data&amp;gt;Hello World&amp;lt;/data&amp;gt;&lt;br /&gt;
  &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more practical use of reflection and metaprogramming in a SOA would be a service that checks code for security holes.  The code could be sent to the service via whatever protocol is chosen.  This service could use reflection to examine the code.  Next, the service would evaluate the code for common security flaws.  If the program is determined to be safe enough, the service may run the code in a safe environment and perform further testing.  The service would output the results of the analysis, and perhaps even output an auto-corrected program upon completion.&lt;br /&gt;
&lt;br /&gt;
Compilers are a good current illustration of metaprogramming and reflection working in a service.  The compiler may be viewed as a service within a SOA.  It can be run on many different systems, which is a major benefit of SOA's.  Data (the code) is sent to a service (the compiler) which then translates it to machine code for the particular system.  Metaprogramming is at work here, because each line of code is generally used to write one or more lines of machine code (code directly executable by the computer).  The code and compiler effectively write a new program in machine code.  Reflection may take place when symbols generated by one section of code are referenced by another section of code. [http://dvanderboom.wordpress.com/2008/11/06/programming-language-directions/ 11]&lt;br /&gt;
&lt;br /&gt;
A pattern emerges when studying these examples.  Metaprogramming and reflection are generally used within the service to enhance the capability of the service.  The data passed to the service is often what guides how metaprogramming and reflection take place.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
3. http://en.wikipedia.org/wiki/Service_oriented_architecture - A very detailed explanation of SOA&lt;br /&gt;
&lt;br /&gt;
4. http://www.javaworld.com/javaworld/jw-06-2005/jw-0613-soa.html - A more easy to understand explanation of SOA&lt;br /&gt;
&lt;br /&gt;
5. http://en.wikipedia.org/wiki/Reflection_(computer_science) - Explanation of reflection&lt;br /&gt;
&lt;br /&gt;
6. http://en.wikipedia.org/wiki/Metadata - Explanation of metadata&lt;br /&gt;
&lt;br /&gt;
7. http://en.wikipedia.org/wiki/Metaprogramming - Explanation of metaprogramming&lt;br /&gt;
&lt;br /&gt;
8. http://www.ruby-doc.org/core/classes/ObjectSpace.html - Explanation of the ObjectSpace command in Ruby&lt;br /&gt;
&lt;br /&gt;
9. http://weare.buildingsky.net/2009/08/25/rubys-metaprogramming-toolbox - Explanation of tools that Ruby provides for metaprogramming&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;br /&gt;
&lt;br /&gt;
11. http://dvanderboom.wordpress.com/2008/11/06/programming-language-directions/ - Illustrates the use of a compiler as a service&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_17_va&amp;diff=25839</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 17 va</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_17_va&amp;diff=25839"/>
		<updated>2009-10-14T01:27:30Z</updated>

		<summary type="html">&lt;p&gt;Salt: Grammar revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture'' 3] (or SOA) describes how to design a software system and connect the separate components using services.  Reflection and metaprogramming are two powerful concepts that directly support the principles of SOA.  This article covers the following goals:&lt;br /&gt;
#Provides a simple understanding of reflection, metaprogramming, and SOA's.&lt;br /&gt;
#Explains how these concepts are interrelated, specifically how reflection and metaprogramming support SOA's.&lt;br /&gt;
&lt;br /&gt;
== '''Service Oriented Architecture (SOA), Reflection, and Metaprogramming''' ==&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''An overview of the concepts'''==&lt;br /&gt;
&lt;br /&gt;
==='''Service Oriented Architecture'''===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture''] (or SOA) is a concept in computing that defines the interaction of different software in terms of protocols and functionality.  A SOA can be viewed as containing multiple services which may be linked as desired by protocols.  The SOA is designed so that each functional unit of software in a system is isolated from each other and provides a service without directly making [http://en.wikipedia.org/wiki/Subroutine subroutine calls] to each other.  This is generally accomplished by passing messages. [http://en.wikipedia.org/wiki/Service_oriented_architecture 3]&lt;br /&gt;
&lt;br /&gt;
SOA offers the following technical advantages:&lt;br /&gt;
*Offers services across platforms&lt;br /&gt;
*Allows services to be split across systems and networks&lt;br /&gt;
*Allows services to be location independent and close to their business units&lt;br /&gt;
*Provides a bridge between incompatible technologies&lt;br /&gt;
*Leverages existing technologies&lt;br /&gt;
*Reduces dependency on custom systems&lt;br /&gt;
&lt;br /&gt;
The information being used to communicate between services must contain data, sufficient detail about the characteristic of the data and must remain independent of the underlying platform and programming language.  Although SOA does not specify the format to transfer data, programmers have generally used XML for this purpose.  Furthermore, [http://en.wikipedia.org/wiki/Metadata Metadata] (data that describes the actual data) [http://en.wikipedia.org/wiki/Metadata 6] in the SOA must:  [http://en.wikipedia.org/wiki/Service_oriented_architecture 3]&lt;br /&gt;
&lt;br /&gt;
*Be easy to configure&lt;br /&gt;
*Provide an easy way to discover services&lt;br /&gt;
*Provide an easy way to incorporate services&lt;br /&gt;
*Remain coherent&lt;br /&gt;
*Preserve data integrity&lt;br /&gt;
*Be easy to manage&lt;br /&gt;
&lt;br /&gt;
A simple example of metadata is a README file that specifies the inputs and outputs to a program.  The inputs and outputs of the program would be the data, and the README file is metadata that describes this data.&lt;br /&gt;
&lt;br /&gt;
SOA does not limit the protocol used to transfer the data.  A wide variety of technologies can be used including [http://en.wikipedia.org/wiki/SOAP_(protocol) SOAP], [http://en.wikipedia.org/wiki/Representational_State_Transfer REST] and [http://en.wikipedia.org/wiki/Remote_procedure_call RPC].  This is generally left for the programmer of the system.&lt;br /&gt;
&lt;br /&gt;
[[Image:SOA_Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
We created this simplified image to illustrate the basic principles of service oriented architectures.  &lt;br /&gt;
* Services may be used by multiple applications.&lt;br /&gt;
* Services do not call on each other.&lt;br /&gt;
* Services communicate via protocols.&lt;br /&gt;
* An example protocol is provided, in which the application passes x to the Sin function, and Sin(x) is returned.&lt;br /&gt;
* Because of the protocol link, services may be written in different programming languages, or even be hosted on different computers with different operating systems, which allows for great flexibility.&lt;br /&gt;
&lt;br /&gt;
==='''Metaprogramming'''===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Metaprogramming Metaprogramming] is the writing of computer programs that write other computer programs.  This allows the programmer to complete tasks faster than if (s)he had to code everything manually.  A [http://en.wikipedia.org/wiki/Compiler compiler] is an excellent example of a metaprogram. It allows the programmer to code in a higher level language and then the compiler will convert that program into machine language. [http://en.wikipedia.org/wiki/Metaprogramming 7]&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [2] &lt;br /&gt;
  class Person&lt;br /&gt;
    attr_accessor :name&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In the example above, attr_accessor is used to create [http://en.wikipedia.org/wiki/Mutator_method 'setters' and 'getters'] for the name attribute via metaprogramming.  From this statement, code is automatically generated that provides a function to write the name (setter) and a function to read the name (getter).&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Metaprogramming in Ruby [http://weare.buildingsky.net/2009/08/25/rubys-metaprogramming-toolbox 9] &lt;br /&gt;
  Array.send(:define_method, :ducky) { puts 'ducky' }&lt;br /&gt;
&lt;br /&gt;
This example does something particularly interesting.  At run time, it defines a new method called ducky that prints out the word &amp;quot;ducky&amp;quot;.  This line modifies the program at run time!&lt;br /&gt;
&lt;br /&gt;
Another example in Ruby is the ActiveRecord library.  It dynamically creates accessor methods that map directly to each column in the database.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': ActiveRecord metaprogramming in Ruby [10]&lt;br /&gt;
  class Movie &amp;lt; ActiveRecord::Base&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  movie = Movie.create&lt;br /&gt;
  movie.title = &amp;quot;Doctor Strangelove&amp;quot;&lt;br /&gt;
  movie.title                          # =&amp;gt; &amp;quot;Doctor Strangelove&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In the example above, we create a new instance of Movie, which subclasses ActiveRecord. We then directly access the database's title column using the setter method 'title=' and then the getter method 'title'.  These methods are not defined anywhere in the source code, but instead, ActiveRecord automatically defines them based on the database column.&lt;br /&gt;
&lt;br /&gt;
==='''Reflection'''===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_(computer_science) Reflection] is a specific type of meta-programming and emphasizes dynamic program modification.  It is the ability of a programming language to inspect its own code and can therefore be used to extend the language beyond its usual capabilities.  For example, it is possible to use reflection to inspect an object for a desired function and execute it dynamically.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Reflection in Perl [http://en.wikipedia.org/wiki/Reflection_(computer_science) 5] &lt;br /&gt;
  # without reflection&lt;br /&gt;
  my $foo = Foo-&amp;gt;new();&lt;br /&gt;
  $foo-&amp;gt;hello();&lt;br /&gt;
 &lt;br /&gt;
  # with reflection&lt;br /&gt;
  my $class  = &amp;quot;Foo&amp;quot;;&lt;br /&gt;
  my $method = &amp;quot;hello&amp;quot;;&lt;br /&gt;
  my $object = $class-&amp;gt;new();&lt;br /&gt;
  $object-&amp;gt;$method();&lt;br /&gt;
&lt;br /&gt;
In the example with reflection, $object and $method can be viewed by the program and even changed at run time.  This allows the program to change its own behavior.  This is an example of reflection because the program can see itself and change itself.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': Reflection in Ruby [http://en.wikipedia.org/wiki/Reflection_(computer_science) 5]&lt;br /&gt;
&lt;br /&gt;
  # without reflection&lt;br /&gt;
  Foo.new.hello&lt;br /&gt;
 &lt;br /&gt;
  # with reflection&lt;br /&gt;
  Object.const_get(:Foo).new.send(:hello)&lt;br /&gt;
&lt;br /&gt;
In this example, the first and second lines illustrate how the code is written without reflection.  The first line is a comment, and the second line is the actual code.  The code calls on Foo.new.hello, which calls on the object Foo, method new, and from what is returned on that, calls the method hello.  The second section does practically the same thing, but with reflection.  The main difference is that the object called by :hello can be determined at run time.&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''': More Reflection in Ruby [http://www.ruby-doc.org/core/classes/ObjectSpace.html 8]&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object(Numeric) {|x| p x }&lt;br /&gt;
&lt;br /&gt;
In this example, Ruby can determine all the objects that are defined.  This particular line of code prints out all the numeric objects that are currently defined.&lt;br /&gt;
&lt;br /&gt;
=='''How metaprogramming and reflection enhance SOA'''==&lt;br /&gt;
&lt;br /&gt;
Service-oriented Architecture is enhanced when the underlying programs are able to dynamically adapt to the data received. Metaprogramming and Reflection make this possible.  To see how this is so, it will be helpful to look at a few potential uses.&lt;br /&gt;
&lt;br /&gt;
One such use would be a service that writes code based on the inputs.  The services within SOA make use of the data passed to them.  When the passed data represents code, for example 'print &amp;quot;Hello World&amp;quot;' in a language independent way, the receiving service could use metaprogramming to write code to just that.  The service would then use reflection to determine what methods are available, in our case 'print', and would perform that task.  If the service logic was to &amp;quot;repeat 3 times&amp;quot;, then the code would ultimately print &amp;quot;Hello World&amp;quot; that number of times.  XML may be used to transfer this message as follows:&lt;br /&gt;
&lt;br /&gt;
:*'''''Example''' XML Data:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;message&amp;gt;&lt;br /&gt;
    &amp;lt;method&amp;gt;print&amp;lt;/method&amp;gt;&lt;br /&gt;
    &amp;lt;data&amp;gt;Hello World&amp;lt;/data&amp;gt;&lt;br /&gt;
  &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more practical use of reflection and metaprogramming in a SOA would be a service that checks code for security holes.  The code could be sent to the service via whatever protocol is chosen.  This service could use reflection to examine the code.  Next, the service would evaluate the code for common security flaws.  If the program is determined to be safe enough, the service may run the code in a safe environment and perform further testing.  The service would output the results of the analysis, and perhaps even output an auto-corrected program upon completion.&lt;br /&gt;
&lt;br /&gt;
Compilers are a good current illustration of metaprogramming and reflection working in a service.  The compiler may be viewed as a service within a SOA.  It can be run on many different systems, which is a major benefit of SOA's.  Data (the code) is sent to a service (the compiler) which then translates it to machine code for the particular system.  Metaprogramming is at work here, because each line of code is generally used to write one or more lines of machine code (code directly executable by the computer).  The code and compiler effectively write a new program in machine code.  Reflection may take place when symbols generated by one section of code are referenced by another section of code. [http://dvanderboom.wordpress.com/2008/11/06/programming-language-directions/ 11]&lt;br /&gt;
&lt;br /&gt;
A pattern emerges when studying these examples.  Metaprogramming and reflection are generally used within the service to enhance the capability of the service.  The data passed to the service is often what guides how metaprogramming and reflection take place.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
SOA is an evolution of distributed computing based on web services.  It is an attractive solution for companies since it is platform independent allowing different software and hardware to communicate together easily.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming and reflection are programming styles used to take advantage of the features in dynamic programming languages. They provide a great advantage when used in the development of SOAs to allow the services to dynamically change and adapt to the messages being passed between services. &lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
'''&lt;br /&gt;
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA&lt;br /&gt;
&lt;br /&gt;
2. Thomas, Dave (2006).  ''Programming Ruby, The Pragmatic Programmers' Guide''.&lt;br /&gt;
&lt;br /&gt;
3. http://en.wikipedia.org/wiki/Service_oriented_architecture - A very detailed explanation of SOA&lt;br /&gt;
&lt;br /&gt;
4. http://www.javaworld.com/javaworld/jw-06-2005/jw-0613-soa.html - A more easy to understand explanation of SOA&lt;br /&gt;
&lt;br /&gt;
5. http://en.wikipedia.org/wiki/Reflection_(computer_science) - Explanation of reflection&lt;br /&gt;
&lt;br /&gt;
6. http://en.wikipedia.org/wiki/Metadata - Explanation of metadata&lt;br /&gt;
&lt;br /&gt;
7. http://en.wikipedia.org/wiki/Metaprogramming - Explanation of metaprogramming&lt;br /&gt;
&lt;br /&gt;
8. http://www.ruby-doc.org/core/classes/ObjectSpace.html - Explanation of the ObjectSpace command in Ruby&lt;br /&gt;
&lt;br /&gt;
9. http://weare.buildingsky.net/2009/08/25/rubys-metaprogramming-toolbox - Explanation of tools that Ruby provides for metaprogramming&lt;br /&gt;
&lt;br /&gt;
10. Perrotta, Paolo (2009).  ''Metaprogramming Ruby''.&lt;br /&gt;
&lt;br /&gt;
11. http://dvanderboom.wordpress.com/2008/11/06/programming-language-directions/ - Illustrates the use of a compiler as a service&lt;/div&gt;</summary>
		<author><name>Salt</name></author>
	</entry>
</feed>