<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rob Tiffany &#187; Mobile Development</title>
	<atom:link href="http://robtiffany.com/category/mobile-development/feed" rel="self" type="application/rss+xml" />
	<link>http://robtiffany.com</link>
	<description>Author, Software Architect, Speaker, Technology Executive, Former Navy Submariner</description>
	<lastBuildDate>Sat, 04 Feb 2012 22:55:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Discover the future of Windows Phone 7 in the Enterprise at Tech Ed North America 2010</title>
		<link>http://robtiffany.com/windows-phone/discover-the-future-of-windows-phone-7-in-the-enterprise-at-tech-ed-north-america-2010</link>
		<comments>http://robtiffany.com/windows-phone/discover-the-future-of-windows-phone-7-in-the-enterprise-at-tech-ed-north-america-2010#comments</comments>
		<pubDate>Sun, 06 Jun 2010 01:51:00 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[Windows phone]]></category>
		<category><![CDATA[.NET Compact Framework]]></category>
		<category><![CDATA[Apps]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Gartner]]></category>
		<category><![CDATA[iPAQ]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[MEAP]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[Pocket PC]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[ROI]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[Tech Ed]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://robtiffany.com/windows-phone/discover-the-future-of-windows-phone-7-in-the-enterprise-at-tech-ed-north-america-2010</guid>
		<description><![CDATA[Ten years ago, we created the Pocket PC and Compaq launched the iPAQ. This would become the most compelling Mobile Enterprise Application Platform of the last decade.&#160; In 2006 I created the Windows Mobile Line of Business Accelerator to help jumpstart the efforts of corporate developers + enterprise ISVs with advanced tools and technologies like [...]]]></description>
			<content:encoded><![CDATA[<h2>Ten years ago, we created the Pocket PC and Compaq launched the iPAQ. </h2>
</p>
<h4>This would become the most compelling Mobile Enterprise Application Platform of the last decade.&#160; In 2006 I created the Windows Mobile Line of Business Accelerator to help jumpstart the efforts of corporate developers + enterprise ISVs with advanced tools and technologies like the .NET Compact Framework, SQL Server Compact and Visual Studio.</h4>
<p>&#160;</p>
<h4>It’s a new decade and we’ve created the most powerful Mobile Enterprise Application Platform ever with Windows Phone 7.&#160; Next week at Tech Ed North America 2010, I will begin the process of jumpstarting your enterprise development efforts again with Silverlight, WCF, Azure and Visual Studio 2010.&#160; Give yourself an edge and come check out my sessions:</h4>
<p>&#160;</p>
<h2>Developing Occasionally Connected Applications for Windows Phone 7</h2>
<h4>The Silverlight development environment has proven itself to be a rich, capable, and adaptable runtime that has reached across platforms to support Windows, the Mac and the Web. Silverlight has now become the application platform for Windows Phone 7, which is great news for new and existing Silverlight developers looking to support this exciting new phone platform. To ensure the best experience for mobile users, apps built for Windows Phone 7 must implement an occasionally-connected pattern of development that Silverlight developers for the other platforms may find unfamiliar. In this session, learn how to build mobile apps that adjust their behavior based on changing network conditions. Also learn how to conquer unreliable wireless networks by implementing RESTful principles to ensure your messages are both compact and fast. Then take those WCF REST services and use them to retrieve database tables, rows, and columns in order to drive the behavior of your mobile applications. Finally, learn how to build an in-memory database that you can query with LINQ and save its data to Isolated Storage to ensure that your Windows Phone apps keep working regardless of network conditions.</h4>
<p>&#160;</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2010/06/ContosoBottling.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="ContosoBottling" border="0" alt="ContosoBottling" src="http://robtiffany.com/wp-content/uploads/2010/06/ContosoBottling_thumb.png" width="360" height="601" /></a>&#160;</p>
<h2>Microsoft’s Next Generation Mobile Enterprise Application Platform (MEAP)</h2>
<h4>A Mobile Enterprise Application Platform (MEAP) allows corporate IT departments to support multiple mobile applications on a single platform. Gartner states that this market currently tops $1 billion and forecasts that 95% of the world&#8217;s organizations will standardize on a single MEAP offering by 2012. Companies looking for a better ROI are moving to reusable platforms instead of building tactical, ad-hoc mobile solutions that support only a single app. Attendees of this session will learn how to save money by steering away from point solutions and on to Microsoft&#8217;s MEAP stack. Come see what Microsoft&#8217;s Next-Gen Mobile Enterprise Application Platform looks like and learn how it will support a broader range of mobile platforms and operating systems including Windows Phone 7 and Azure.</h4>
<p>&#160;</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2010/06/image.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://robtiffany.com/wp-content/uploads/2010/06/image_thumb.png" width="624" height="401" /></a></p>
<p>&#160;</p>
<h4>See you in New Orleans!</h4>
<h4>- Rob</h4>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/windows-phone/discover-the-future-of-windows-phone-7-in-the-enterprise-at-tech-ed-north-america-2010/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MIX10</title>
		<link>http://robtiffany.com/mobile-development/mix10</link>
		<comments>http://robtiffany.com/mobile-development/mix10#comments</comments>
		<pubDate>Tue, 16 Mar 2010 03:44:00 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://robtiffany.com/mobile-development/mix10</guid>
		<description><![CDATA[This year at MIX10 we brought the ghost of MEDC back to life by adding Windows Phone 7 to a conference that typically targets web designers and developers.&#160; We even saw Scottgu develop the first-ever Twitter app for our forthcoming phone platform.&#160; The big news back at Barcelona was how we’ve breathed new life into [...]]]></description>
			<content:encoded><![CDATA[<p>This year at MIX10 we brought the ghost of MEDC back to life by adding Windows Phone 7 to a conference that typically targets web designers and developers.&#160; We even saw Scottgu develop the first-ever Twitter app for our forthcoming phone platform.&#160; The big news back at Barcelona was how we’ve breathed new life into the Smartphone space by building something that doesn’t look like a me-too copy of all our competitors.</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2010/04/phones1_5.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="phones[1]_5" border="0" alt="phones[1]_5" src="http://robtiffany.com/wp-content/uploads/2010/04/phones1_5_thumb.png" width="246" height="108" /></a></p>
<p>At MIX10, it was time to show application and game developers that we not only have the best mobile platform for them, but we also have the best tools.&#160; We launched a Windows Phone 7 Developer Tools Preview that includes:</p>
<ul>
<li>Visual Studio 2010 Express for Windows Phone</li>
<li>XNA Game Studio 4.0</li>
<li>Windows Phone Emulator</li>
<li>Expression Blend 4 for Windows Phone</li>
</ul>
<p>&#160;</p>
<p>The tools are free and can be downloaded from <a href="http://developer.windowsphone.com"><b>http://developer.windowsphone.com</b></a>. </p>
<p>We’ve gone from eMbedded Visual Basic and eMbedded C++ to the .NET Compact Framework and now we’re making the jump to Silverlight which allows mobile developers to build the richest, most visually stunning apps ever seen on a phone.&#160; Game developers get the same easy-to-use XNA tools that are used for Xbox, Windows and Zune HD.</p>
<p>Go to the site, download the tools, and start building apps and games for Windows Phone 7!</p>
<p>- Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/mobile-development/mix10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MemMaker for the .NET Compact Framework</title>
		<link>http://robtiffany.com/mobile-development/memmaker-for-the-net-compact-framework</link>
		<comments>http://robtiffany.com/mobile-development/memmaker-for-the-net-compact-framework#comments</comments>
		<pubDate>Fri, 24 Apr 2009 01:24:41 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[.NET Compact Framework]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[OS/2]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows CE]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[Windows phones]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=85</guid>
		<description><![CDATA[Does everyone remember the good old days of DOS when we used to spend our time making more of the 640 KB memory space available for our drivers, programs, TSRs and even Windows?  Things like QEMM, HIMEM.SYS and EMM386.EXE bring back fond memories for me.  We had this one slot and Billg said we’d never [...]]]></description>
			<content:encoded><![CDATA[<p>Does everyone remember the good old days of DOS when we used to spend our time making more of the 640 KB memory space available for our drivers, programs, TSRs and even Windows?  Things like QEMM, HIMEM.SYS and EMM386.EXE bring back fond memories for me.  We had this one slot and Billg said we’d never need more than 640 KB.</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2009/12/DOSMem_2.gif"><img class="aligncenter size-full wp-image-86" title="DOSMem_2" src="http://robtiffany.com/wp-content/uploads/2009/12/DOSMem_2.gif" alt="DOS Memory Map" width="640" height="480" /></a></p>
<p>Some of us even switched to OS/2 which could give us 740 KB to our DOS sessions while providing them with preemptive multitasking.  Yes, I could run multiple DOS games in multiple windows simultaneously with no degradation.  Wow, now I had a bunch of crash-protected slots each with 740 KB of memory.</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2009/12/dos_2.gif"><img class="aligncenter size-full wp-image-87" title="dos_2" src="http://robtiffany.com/wp-content/uploads/2009/12/dos_2.gif" alt="OS/2" width="640" height="480" /></a></p>
<p>If you fast forward to today, you’ll see that Windows CE 5.0 and Windows Mobile 6.x shares some commonalities with their forefathers from the 80’s and 90’s.  The 32-bit embedded operating system that we rely on to power our Windows phones is made up of a bunch of slots.  The mobile applications that you build run inside one of these slots and unlike DOS with its 640 KB memory space, your app gets 32 MB of virtual memory space.  But just like with DOS, you don’t get access to the whole space because other things like system DLLs are already eating into your free virtual memory. </p>
<p>Many of you might not care because you build simple apps that use very little memory.  On the other hand, most of the people and organizations I work with build the largest, most memory-intensive applications ever seen on the mobile device.  Needless to say, these folks aren’t too pleased that they don’t get the whole 32 MB of virtual memory that’s coming to them.  They probably wish they a utility like QEMM or MemMaker to put things in high memory.</p>
<p>I recently met with a good friend of mine who wanted to share some interesting findings with me.  Keep in mind, not only do I consider this person and his colleagues to be some of the top Compact Framework developers in the world, his team members designed and developed of one of the world’s largest, most complex managed apps running on a Windows Mobile device.  Like many organizations that have built very large Windows Mobile applications, free virtual memory issues and the &#8220;DLL Crunch&#8221; have deprived this app from of all the memory it would like to have.  <strong>One of the architects on this &#8220;Dream Team&#8221; noticed that by keeping their application’s EXE empty and putting all the forms, code, resources, and data in managed DLLs, he reduced the amount of virtual memory his app uses inside its slot while at the same time taking advantage of memory outside the slot in the 1 GB shared memory area.</strong></p>
<p>To help you visualize this, I’m going to show you 2 pictures of the Windows Mobile process slots running a Compact Framework application two different ways.  The virtual memory viewer you see running in the emulators below shows the 32 slots in the User space of the OS.  Everything in Red is free virtual memory, Blue is committed memory and Green is reserved.  Slot 1 is crammed full of ROM DLLs and you can’t help but notice the area of Blue at the top of every other slot.  That’s space out of everyone’s slot being used by system and other native DLLs which means nobody’s going to get their fair share of their 32 MB slot space.</p>
<p>On the left you’ll see a NETCF app called StandardExe.exe running in slot 14 of the operating system.  This simple managed EXE has a 2.25 MB bitmap bound to it as a resource and a single form that compiles to the same size as the bitmap inside it.  If you look at the picture on the left, you’ll see a 2.25 MB Blue area coming up from the bottom of slot 14.  This represents the space being taken up by the EXE.</p>
<p><img class="alignleft size-full wp-image-88" title="StandardSM_thumb" src="http://robtiffany.com/wp-content/uploads/2009/12/StandardSM_thumb.jpg" alt="Standard Memory Map" width="244" height="374" /></p>
<p><img class="size-full wp-image-89 alignright" title="OptimizedSM_thumb" src="http://robtiffany.com/wp-content/uploads/2009/12/OptimizedSM_thumb.jpg" alt="Optimized Memory Map" width="244" height="376" /></p>
<p>On the right a NETCF app called OptimizedExe.exe running in slot 11 of the operating system.  This managed EXE is completely empty.  The Main function calls into a static class of a managed DLL and that’s it.  No mas.  This results in an EXE with a file size of 5 KB.  In the managed DLL we have the same 2.25 MB bitmap bound to it as well as a simple form.  This compiles into a 2.25 MB DLL called OptimizedDLL.dll.  <strong>When you look at the picture on the right, you’ll be hard-pressed to see any Blue area coming up from the bottom of slot 11.  A closer look reveals the 2.25 MB DLL is nowhere to be found either.</strong></p>
<p>This is pretty cool and has the potential to unleash the largest, most powerful games and applications Windows phones have ever seen.  <strong>So the big question is, how is this happening?  Is it magic?  </strong></p>
<p>Those of you who have read Steven Pratschner’s <a href="http://blogs.msdn.com/stevenpr/archive/2005/12/12/502908.aspx" target="_blank">blog</a> know that the Compact Framework memory maps your managed EXE and DLLs into the 1 GB shared memory area outside the slot your app is running which is cool.  <strong>What you may not know is that the OS automatically blocks out virtual memory at the bottom of your slot that’s the same size as your EXE.</strong>  So even though the CLR is in control of app execution and is giving you lots of love by putting your managed EXE up in the shared memory area, Windows CE takes away a valuable chunk of memory because it thinks that’s where your EXE is running.  <strong>Guess what, your app isn’t running there and it’s not native.</strong>  For those of you with giant managed EXEs, you’re losing out on a lot of virtual memory in your slot that could be put to good use.  So the first lesson here is to do what Brian did and make your EXE nothing but an empty stub used to launch your app which really lives inside managed DLLs.</p>
<p>Your empty EXE code should look like the following:</p>
<p><strong>using System; </strong></p>
<p><strong>namespace OptimizedExe<br />
{<br />
    static class Program<br />
    {<br />
        /// &lt;summary&gt;<br />
        /// The main entry point for the application.<br />
        /// &lt;/summary&gt;<br />
        [MTAThread]<br />
        static void Main()<br />
        {<br />
            OptimizedDLL.StartUp.Main();<br />
        }<br />
    }<br />
}</strong></p>
<p>Your DLL code should look like the following:</p>
<p><strong>using System;<br />
using System.Windows.Forms; </strong></p>
<p><strong>namespace OptimizedDLL<br />
{<br />
    public class StartUp<br />
    {<br />
        public static void Main()<br />
        {<br />
            Application.Run(new Main());<br />
        }<br />
    }<br />
}</strong></p>
<p>So now that you’ve learned how to instantly give your managed apps more memory by beating Windows CE at its own game, let’s talk about the curious case of your managed DLL.  If you’ve read Reed Robison’s <a href="http://blogs.msdn.com/hegenderfer/archive/2007/08/31/slaying-the-virtual-memory-monster.aspx" target="_blank">blog</a> discussion about Slaying the Virtual Memory Monster, you know that DLLs seem to take up everyone’s virtual memory from the top of the slot down which doesn’t sound too fair.  DLLs keep pushing their way down everyone’s slot causing something we call the “DLL Crunch” as free virtual memory get’s squeezed between the DLLs and EXEs.  I’ve got some good news for you.  Managed DLLs do not exhibit this same behavior.  In fact, not only do they not use up memory in all the other slots of your Windows phone, they don’t even push downward on the memory of your own slot.  How could this be?</p>
<p><strong>Managed DLLs are not DLLs.</strong>  The CLR just treats them as files that it memory maps into the 1 GB shared memory area.  To the Compact Framework, managed EXE and DLL assemblies are just files full of IL that it maps outside your process slot.  So now you know where the 2.25 MB bitmap that we bound to OptimizedDLL.dll is.  <strong>It’s beyond the 32 MB barrier of your slot and therefore not using up your valuable memory.</strong> </p>
<p><strong>So if I follow this new pattern for NETCF development, will my slot ever have virtual memory allocated or do I get a free lunch?</strong></p>
<p>While there’s no free lunch, you did get a buy one get one free discount.  The JIT compiler is running in your slot and it pulls in IL from the 1 GB space as needed to compile the current call stack.  Resources that aren’t designed to be compiled or executed will never be pulled down here.  The GC Heap is in your slot and that’s where your currently allocated Objects and instance variables are hanging out.  Your slot maintains a 64 KB Stack for every Thread your app spawns and the AppDomain Heap maintains a representation of the data structures found in your assembly’s IL.</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2009/12/image_thumb_1.png"><img class="aligncenter size-full wp-image-90" title="image_thumb_1" src="http://robtiffany.com/wp-content/uploads/2009/12/image_thumb_1.png" alt="Windows CE Memory Map" width="594" height="318" /></a></p>
<p>So what are the big takeaways here?</p>
<p>You can eliminate the erroneous and wasted allocation of EXE virtual memory in your slot by following the pattern of using an empty stub managed EXE to kick off your application.  Windows CE will now only block out 5 KB of memory.</p>
<p>You can take better advantage of the 1 GB shared memory area by putting your entire application inside managed DLLs.  This will make your app a good neighbor by not creating the dreaded “DLL Crunch” for all the other apps on your Windows phone.  It also reduces the amount of memory that has to be allocated inside your slot.</p>
<p>This new pattern of managed development on the Windows Mobile platform is a true breakthrough in memory management.  Come join me at Tech Ed 2009 this May in Los Angeles for a complete deep dive on this new way of building memory-intensive games and applications.</p>
<p>- Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/mobile-development/memmaker-for-the-net-compact-framework/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

