<?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>SUP Dev Blog</title>
	<atom:link href="http://blogs.sybase.com/mobiledevelopment/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.sybase.com/mobiledevelopment</link>
	<description>A Dev blog by SUP Product Management</description>
	<lastBuildDate>Tue, 13 Dec 2011 01:47:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>MBO Best Practices &#8211; Video</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/12/mbo-best-practices-video/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/12/mbo-best-practices-video/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 01:35:03 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=654</guid>
		<description><![CDATA[Good news! Video posted of the 90 minute &#8216;MBO Best Practices&#8217; presentation from SUP R&#38;D. All the deep level info you&#8217;ve been asking for&#8230; (c) Copyright Sybase, an SAP Company]]></description>
			<content:encoded><![CDATA[<p>Good news!  Video posted of the 90 minute &#8216;MBO Best Practices&#8217; presentation from SUP R&amp;D.  All the deep level info you&#8217;ve been asking for&#8230;</p>
<p><object style="height: 390px; width: 640px"><param name="movie" value="http://www.youtube.com/v/E3mjk-IAh0Y?version=3&#038;feature=player_detailpage"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/E3mjk-IAh0Y?version=3&#038;feature=player_detailpage" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="360"></object></p>
<p> (c) Copyright Sybase, an SAP Company</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/12/mbo-best-practices-video/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The value of HTML5 in the Container</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/10/the-value-of-html5-in-the-container/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/10/the-value-of-html5-in-the-container/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 21:57:50 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=642</guid>
		<description><![CDATA[I spend a lot of my time talking with developers and architects about how HTML5 fits into their mobile application strategy.  SUP&#8217;s Hybrid Web Container enables them to get the cross-platform advantage of HTML and JavaScript, and provides the security mechanisms, provisioning, and hooks to native device features they can&#8217;t get through the browser. In [...]]]></description>
			<content:encoded><![CDATA[<p>I spend a lot of my time talking with developers and architects about how HTML5 fits into their mobile application strategy.  SUP&#8217;s Hybrid Web Container enables them to get the cross-platform advantage of HTML and JavaScript, and provides the security mechanisms, provisioning, and hooks to native device features they can&#8217;t get through the browser.</p>
<p>In the Hybrid App Designer, we bundle jQueryMobile as the User Interface (UI) framework.  The UI framework in an app provides the application user experience (screen-screen transitions, screen components).  It includes building blocks like a table-view, which can then have a number of configurations to meet the developer&#8217;s use case.  For instance, configuration &#8216;a&#8217; sets each cell in the table to have a bold-face label, and a smaller detail text label.  Config &#8216;b&#8217; adds an icon to the left of each cell. Config &#8216;c&#8217; adds a disclosure button to the right of each cell.  And so on.</p>
<p>jQueryMobile is what you would call a &#8216;JavaScript UI framework&#8217;, because it is written in JavaScript, for use in HTML5 applications.  It is a replacement (/supplement) to a native SDK, such as Cocoa Touch on the iOS platform.  (Technically a supplement, since it leverages the WebKit runtime in the native SDK, but that&#8217;s details&#8230;).  There are a few other JavaScript UI frameworks that are increasingly relevant in the mobile application development space&#8211;especially in hybrid apps (web + native / container)&#8211;because they optimize the HTML development experience for mobile.  There is a huge advantage to an SUP developer of using these JavaScript UI frameworks, because they tend to be open-source, have plenty of community, and allow really rich customization of SUP Hybrid Apps that run in the Container.</p>
<p>I wanted to show a few screenshots of some jQueryMobile-based hybrid apps we&#8217;ve developed in the Hybrid Web Container.  These apps are connecting through SUP to enterprise data, can be managed and secured using the native functionality for SSO &amp; authentication, and can be remotely provisioned on a role basis with the administrative tool.</p>
<p><a href="http://farm7.static.flickr.com/6213/6290241054_182fc68aee.jpg"><img class="size-full wp-image-644 alignnone" title="HWCjQM1" src="http://farm7.static.flickr.com/6213/6290241054_182fc68aee_z.jpg" alt="HWCjQM1" /></a></p>
<p>Here, the jQueryMobile table view is combined with a button to launch an interactive webview to GoogleMaps that plots the current device location and the location of the customer.</p>
<p><a href="http://blogs.sybase.com/mobiledevelopment/wp-content/uploads/2011/10/HWCjQM2.png"><img class="size-full wp-image-645 alignnone" title="HWCjQM2" src="http://farm7.static.flickr.com/6099/6290241080_226df525f6_z.jpg" alt="HWCjQM2" /></a></p>
<p>Here, a stock check is displayed in a table view, with a numeric indicator of the quantity, and a bar chart indicating quantity vs. target.</p>
<p>All of this customization is basic web development in HTML5 and JavaScript, and requires no knowledge of xCode, Objective-C, Android development, etc.  The same app runs across all supported platforms, and can be re-skinned to match whichever OS it&#8217;s running on.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/10/the-value-of-html5-in-the-container/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP developers describe first experience with SUP 2.1 OData SDK and NW Gateway</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/10/sap-developers-describe-first-experience-with-sup-2-1-odata-sdk-and-nw-gateway/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/10/sap-developers-describe-first-experience-with-sup-2-1-odata-sdk-and-nw-gateway/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 05:36:36 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=636</guid>
		<description><![CDATA[Yaad Oren of the NetWeaver Gateway Solution Management team interviewed developers Subhasha Ranjan and Varun Rangahbashyam at the TechEd Bangalore about their experience developing with SUP 2.1 and Netweaver Gateway in the Innojam.  Their application was targeting a use case of integrating social (Facebook) media and business transactions.  Neither had any prior experience with SUP, [...]]]></description>
			<content:encoded><![CDATA[<p>Yaad Oren of the NetWeaver Gateway Solution Management team interviewed developers Subhasha Ranjan and Varun Rangahbashyam at the TechEd Bangalore about their experience developing with <strong>SUP 2.1</strong> and Netweaver Gateway in the Innojam.  Their application was targeting a use case of integrating social (Facebook) media and business transactions.  Neither had any prior experience with SUP, Gateway, or Android, and in 24 hours used the RFC Generator, modeled their OData services in Gateway, installed SUP 2.1 (on its first day of release), and used the documentation to easily develop a native Android application using the SUP 2.1 OData SDK.</p>
<p>Subhasha described how SUP 2.1 &#8216;makes a nice handshake&#8217; with Gateway.  &#8220;It was designed in such a way that you could say a &#8216;lemon&#8217; could go in step-by-step and create SAP applications.&#8221;  His teammate Varun added:  &#8220;It was nice&#8211;we didn&#8217;t know what to do, and we went to this document [infocenter.sybase.com] and it says &#8216;do this, do this&#8217;, do that&#8217;.  So that really really helped.&#8221;</p>
<p>Describing the application design process:  &#8220;we had this content and the diagram available, and we were able to visualize how this application overall is going to work.  From that perspective we could see that these were the steps that we were going to develop/consume in NetWeaver Gateway, and these were the steps that we were going to put in SUP.  We created a PowerPoint slide with a diagram of the proper flowchart, and visualized how the application was going to work.  It worked in a similar way.&#8221;</p>
<p>View the video here: <a title="http://tinyurl.com/4y7jah5" href="http://tinyurl.com/4y7jah5">http://tinyurl.com/4y7jah5</a></p>
<p><script src="http://www.sapvirtualevents.com/mediaplayer/jwplayer.js" type="text/javascript"></script><script type="text/javascript">// <![CDATA[
ShowEmbedPlayer("http://sapvod.edgesuite.net/TechEd/TechEd_Bangalore2011/VOD/2924.mp4", 512, 288, true, "mediaplayercontainer", "");
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/10/sap-developers-describe-first-experience-with-sup-2-1-odata-sdk-and-nw-gateway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MBO Modeling:  Best Practices</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices-2/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices-2/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 04:05:32 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=632</guid>
		<description><![CDATA[Michael Ho on the Product Architecture team delivered a presentation on MBO Modeling:  Best Practices, and I wanted to share some of the notes. Row Size I realize that quite a lot of you already have a lot of experience using the SUP tooling.  I wanted to talk through some of the best practices of what [...]]]></description>
			<content:encoded><![CDATA[<p>Michael Ho on the Product Architecture team delivered a presentation on <em style="font-style: italic;">MBO Modeling:  Best Practices</em>, and I wanted to share some of the notes.</p>
<p><strong style="font-weight: bold;">Row Size</strong></p>
<p>I realize that quite a lot of you already have a lot of experience using the SUP tooling.  I wanted to talk through some of the best practices of what we think is appropriate for MBO modeling.</p>
<p>The first thing about the MBO is that it is a data model on the client-side, not for the business back-end.  So you should consider whether every attribute that you put into the MBO is something that will be used by the application.  If it is not, than the implication is that you waste space in the CDB, you take up synchronization bandwidth when you sync those to the device, and you also take up space on the device.  If you send enough of those things, you&#8217;ll actually slow down the device performance.</p>
<p>The MBO instance is actually corresponding to a database row on the device.  Your MBO instance is nothing but a row in a database, and the columns are your attributes.  So the implication is that the row must fit within the page on the device.  The larger your row, the larger the page size that is required.</p>
<p>This is important because during generation, we look at your MBO model, look at the number of attributes, the data types, and we try to calculate what is the maximum row size.  We then compare that to the developer-entered page size, and if it is not large enough, we will actually start promoting some of your varchar data types corresponding to a string to long varchar, and get it out of the row itself.  Obviously when we do that, there are performance implications, because now there is indirection in order for you to access your data.  So it is important that you don&#8217;t just arbitrarily define a very large MBO, and then end up causing the code generation to start promoting a lot of your attributes into the long varchar type.</p>
<p>Typically, what we find is that when you start having 50 attributes, we have to really start wondering whether you have the right object?  Are you putting in the right information, and should you have 2 MBOs instead of 1 MBO?  Because the larger the row size, the fewer rows that we can put into a page, and then the more i/o&#8217;s that we have to do.</p>
<p>An easy thing we see is when people use a STRING as a data type.  Instead of using STRING, use STRING(n).  When you use a STRING and don&#8217;t define what the size is we default it to 300.  In one of the customer cases we saw, he had everything as a STRING, and he was blowing up the size of the row.  We started promoting just about everything into LONG VARCHAR, and that caused serious performance implications.</p>
<p>Another thing that you can do in MBOs with attributes with long maximum length that are typically much smaller is set the database on the device to run with a smaller page size than the one calculated at code generation. We see that with strings a lot where the developer defined a Notes column for 1000 or 2000 characters. When you add all those up, the row size can actually end up being quite large.  We end up bumping up the size of the page.  Usually, even though the back-end says the attribute is 2000 characters, in most cases, normally, you know there isn&#8217;t going to be that many characters.  You can use a larger page size&#8211;say, 16K&#8211;during code generation, and run with a smaller one&#8211;8K&#8211;on device if the normal size is much lower than the maximum.  But be warned&#8211;this may lead to a synchronization error if a record comes through at full size and cannot fit.  It&#8217;s something you&#8217;ll need to test.</p>
<p><strong style="font-weight: bold;">Indexes</strong></p>
<p>The other key issue is the Index.  You already know what they are and how to use them to speed up your query, but indexes actually impact the performance on operations, because if you do anything you have to maintain the index.  Even more-so, it actually impacts the synchronization, because if you sync data to the device, during the &#8216;apply download&#8217; phase&#8211;when we try to apply the download onto the client-side data&#8211;we have to maintain those indexes as well.  So synchronization is actually impacted by the number of indexes you have for some of the MBOs.  We&#8217;ve seen cases where the customer has a lot of indexes defined, and we&#8217;ve seen that the data processing and synchronization takes much longer</p>
<p>So what we say is:  we know indexes are necessary for your query to perform well.  But you should understand the size of the data.  For example, if your table is very small, you didn&#8217;t really need that index.  There are some things we do automatically in the tooling to be aware of.  We generate &#8216;findByPrimaryKey&#8217;.  findByPrimaryKey is actually the business key.  Sometimes you don&#8217;t actually need to find the primary key.  A good example is if you have child MBOs, maybe you&#8217;re doing navigation to access the child MBOs.  findByPrimaryKey is not something you normally use for the child MBOs.  In that case, the best thing to do is un-check the option for auto-generating so that we will not generate findByPrimaryKey, and then create indexes for the key.</p>
<p>The other thing we generate&#8211;which doesn&#8217;t impact the indexes&#8211;is the findAll.  Even though it doesn&#8217;t require indexes, it is a very expensive operation to perform, because it returns the entire collection of objects as a list, so if you have a lot of collections of MBOs, that can actually impact the performance as well as the memory consumption.  So findAll is something that it&#8217;s best not to use unless you know that it will be returning a relatively small collection.</p>
<p>In the tooling, we allow you to create custom Object Queries.  When you create object queries, you also have the ability to create indexes for them.  That&#8217;s one more opportunity to manage the indexes.  So it&#8217;s always a tradeoff on a mobile device&#8211;you can&#8217;t take the i/o and memory for granted&#8211;so you should use these options to optimize for your model.</p>
<p><strong style="font-weight: bold;">Synchronization Group</strong></p>
<p>As far as Synchronization Groups go, what are the best practices?  The main thing is to allow you to control what is being synchronized, so you don&#8217;t always have to end up syncrhonizing everything across to the device.  The concept allows you to customize, or prioritize the MBOs that you want to get across.</p>
<p>You might want to get your call ticket or service ticket across first, but you don&#8217;t want all the details associated with it.  Later you want the details if they&#8217;re necessary.  Or we see customers only sync bulky materials when they have a wifi connection.  The sync group gives you that flexibility to control what you synch, and limits the amount of data traffic, which is important when you have limited connectivity.</p>
<p>Now, in the synch group, just like the MBO, when you start putting a lot of MBOs in the sync group, you should again question:  is this the right thing to do?  The idea of the sync group is to control what you sync.  When you start putting everything in there, it kind of defeats the purpose.</p>
<p>Typically what we recommend you do is:  any MBO that&#8217;s in a relationship should be put in the same synchronization group, for the obvious reason that you don&#8217;t want to sync half of the object graph across. Then again, if you have a really huge object graph that consists of many MBOs, again you kind of defeat the purpose, so that&#8217;s something you should consider when you craft your graph and synchronization groups.</p>
<p>Sometimes, we purposely break this rule when we want to separate the higher priority object from the lower priority data coming across.  But it can expose you to an incomplete graph, and as a result you may have a case where you can&#8217;t access all the data on the device.</p>
<p>Even though you specify the sync group, that doesn&#8217;t mean you lose flexibility for cases like when you have wifi connection and want to pull everything across in one synchronization.  During runtime, you can specify a synchronization that syncs all the sync groups together in one session.  So you have the flexibility of setting sync duration to &#8220;1&#8243;, or &#8220;5&#8243;, and it doesn&#8217;t really matter at runtime because you can over-ride from the device.</p>
<p><strong style="font-weight: bold;">Cache Group</strong></p>
<p>I mentioned that the Cache Group is somewhat similar to the sync group, but the impact of the cache group is really on the CDB, and how you load the data.  By having a cache group, it allows you to break up your data between the back ends.  Normally, if you have everything in one cache group, the result is:  anytime you do anything, the whole cache group might be refreshed, depending on the caching policy.  That might not be the right policy, because everytime a user changes something, the whole cache group might be refreshed, and other devices might have to wait.  So the idea of the cache group is to separate out similar MBOs that have similar cache characteristics, so you can then apply a policy to only load that data when they are needed.</p>
<p>In a similar vein, when you do put object graphs across multiple cache groups, you can end up with incomplete graphs&#8211;it&#8217;s no different, because the CDB itself is also a relational database.  So you can get warnings spilling out telling you that we are not able to link up with the relationship. You can do that, but in some cases it can impact your performance, and I would definitely recommend that you put related objects in the same cache group.</p>
<p>One of the things that is the most common-sense thing to do is:  map the synchronization group to the cache group.  The reason is:  when the cache group is being synchronized, it&#8217;s going to trigger the data to be potentially refreshed or retrieved from the back end.  If the granularity between sync group and cache group doesn&#8217;t match, you could potentially have one sync group that triggers a very large cache group to be refreshed, and the end result is you waiting for the entire cache group to refresh before the synch continues.  The mismatch can slow you down.  So the most common sense is to map it so when you sync something, you only cause that group to refresh from the back end.</p>
<p>The other thing to do is avoid circular dependencies between cache groups, because when one refreshs, then the other group will be wanting to refresh, and that&#8217;s not going to work very well.  Similarly, avoid driving the load of an MBO in one cache group based on attributes of an MBO in another cache group.</p>
<p>In summary:  the Cache Group controls how the data is being retrieved from the back end, and the Sync Group controls what is synched.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SUP 2.1 GA</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 03:26:52 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=629</guid>
		<description><![CDATA[SUP 2.1 is GA, and we are really excited about the new features, and especially the apps running on top. The quick and dirty New Features: OData SDK:  Support for NW Gateway, RESTful native application development Hybrid Web Container:  Camera API, enhanced Offline Storage API Application Lifecycle Management tools:  Afaria SDK integration, automatic user on-boarding [...]]]></description>
			<content:encoded><![CDATA[<p>SUP 2.1 is GA, and we are really excited about the new features, and especially the apps running on top.</p>
<p>The quick and dirty New Features:</p>
<ul>
<li>OData SDK:  Support for NW Gateway, RESTful native application development</li>
<li>Hybrid Web Container:  Camera API, enhanced Offline Storage API</li>
<li>Application Lifecycle Management tools:  Afaria SDK integration, automatic user on-boarding</li>
</ul>
<p>The key message:  SUP 2.1 is the platform for 20+ SAP-delivered applications in Q4 2011, including Mobile Sales 2.0, EAM, Retail Execution, Field Service, and the Employee Productivity Suite of person-centric native apps.  The new functionality improves our ability to manage and administer these apps and users, and points to the platform value of providing deepening integration between the management tools and the SDK tools themselves.</p>
<p>To answer the question:  the OData SDK is additive to SUP.  We now provide APIs for 3 core scenarios:  offline/synchronized, online+ (business process push in the Container), and online/RESTful.  As we evolve into a world with nearly ubiquitous connectivity, wifi, and LTE, the RESTful OData programming model is a simple, standards-driven way to develop apps with rich UI&#8217;s and exciting user-experience, make ad hoc requests, and consume analytics.  SAP and Partners will continue to develop for both offline and online apps on SUP, driven by the use case and customer requirements.</p>
<p>We had a great Knowledge Transfer workshop this past week on the 2.1 release with R&amp;D and our field consultants, support, CSA, and pre-sales teams.  I&#8217;ll have full posts with excerpts of the presentations OData, MBO Best Practices, and Hybrid Web App development over the next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video: Debugging in HWC, using Weinre</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/09/video-debugging-in-hwc-using-weinre/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/09/video-debugging-in-hwc-using-weinre/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 23:23:41 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=599</guid>
		<description><![CDATA[Check out this recent screencast from Andrew Lee in SUP engineering showing how to use the 3rd-party Weinre tool to do live debugging in Hybrid Apps!  If you&#8217;re not familiar, Weinre is an open-source tool that allows remote on-demand inspection and citing of the DOM, CSS, and JavaScript on WebKit-based browsers.  Debugging web apps on [...]]]></description>
			<content:encoded><![CDATA[<p>Check out this recent screencast from Andrew Lee in SUP engineering showing how to use the 3rd-party <strong>Weinre</strong> tool to do live debugging in Hybrid Apps!  If you&#8217;re not familiar, Weinre is an open-source tool that allows remote on-demand inspection and citing of the DOM, CSS, and JavaScript on WebKit-based browsers.  Debugging web apps on mobile simulators or devices is tough, since it&#8217;s a challenge to see what data is in the client and check the variable state.  You could end up writing a bunch of alert messages in your code, and going through the constant refresh processes to iron out the bugs.</p>
<p>Weinre isn&#8217;t  a step-by-step JavaScript debugger.  But it does allow you to use the console to write in JavaScript calls, and drill-down into the returns.  What does this mean?  You can see the live state of the MessageValueCollection when you make a query, or call a submit.  You can see exactly what the structure of the results is, check the key values, and see the functions available.  In short:  it&#8217;s pretty awesome.</p>
<p>Check out these tutorials for using Weinre in Hybrid Apps on iOS, Android, and BlackBerry.  They mostly show the same functionality&#8211;there&#8217;s some additional things in the iOS and Android screencasts that didn&#8217;t make it into the BB6 video, but still work across all the platforms.</p>
<p>Key takeaways:</p>
<ul>
<li>Add the Weinre target-script-min.js src location to customBeforeWorkflowLoad().</li>
<li>Use the Weinre console to call getCurrentMessageValueCollection() to view the current contents of the Message Value Collection.</li>
</ul>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/LBorb7POeeU" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/LBorb7POeeU"></embed></object></p>
<p>(The Weinre homepage is hosted here:  <a href="http://phonegap.github.com/weinre/">http://phonegap.github.com/weinre/</a>).</p>
<p>Check out the other videos here:  <a title="playlist" href="http://www.youtube.com/playlist?list=PL0B1BEA2F5930BE70">http://www.youtube.com/playlist?list=PL0B1BEA2F5930BE70</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/09/video-debugging-in-hwc-using-weinre/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video:  Talk with SUP Developers @ TechEd Live</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/09/video-talk-with-sup-developers-teched-live/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/09/video-talk-with-sup-developers-teched-live/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 16:33:27 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=554</guid>
		<description><![CDATA[Still coming down off the TechEd high&#8230; today I&#8217;ll let the video speak for me.  Check out my conversation with some SUP developers on the TechEd Live channel on the show floor about their experience using SUP and the Hybrid Web Container, their experience in the SAP InnoJam, Gamification, and their future roles in mobility [...]]]></description>
			<content:encoded><![CDATA[<p>Still coming down off the TechEd high&#8230; today I&#8217;ll let the video speak for me.  Check out my conversation with some SUP developers on the TechEd Live channel on the show floor about their experience using SUP and the Hybrid Web Container, their experience in the SAP InnoJam, Gamification, and their future roles in mobility in their companies.</p>
<p>Apologies:   there weren&#8217;t any cue cards, so the intro is a bit off the cuff.  But we get going into regular conversation shortly @ the 3:15 mark.</p>
<p>link:  <a title="video" href="http://sapvod.edgesuite.net/TechEd/TechEd_Vegas2011/VOD/1609.mp4">video</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/09/video-talk-with-sup-developers-teched-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting:  Connect to SUP Server</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/09/troubleshooting-connect-to-sup-server/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/09/troubleshooting-connect-to-sup-server/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 19:17:07 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/mobiledevelopment/?p=551</guid>
		<description><![CDATA[First off:  it was an amazing week @TechEd Vegas.  It was great to meet all the customers, partners, and individuals involved in SUP projects, great to be able to share the features and apps coming with and on SUP 2.1, and to get feedback on our roadmap strategy for the upcoming year.  It&#8217;s an exciting [...]]]></description>
			<content:encoded><![CDATA[<p>First off:  it was an amazing week @TechEd Vegas.  It was great to meet all the customers, partners, and individuals involved in SUP projects, great to be able to share the features and apps coming with and on SUP 2.1, and to get feedback on our roadmap strategy for the upcoming year.  It&#8217;s an exciting time to be in mobile apps in the SAP ecosystem.  I&#8217;m looking forward to Madrid in November to share with the community in EMEA.</p>
<p>Second:  now that I can set TechEd prep aside, there are a bunch of SUP development posts that have been stacking up that I want to get out.  To start off, I&#8217;ll deal with a most basic question recently posted to the <a title="Why Are We So Excited About SUP 2.0?" href="http://blogs.sybase.com/mobiledevelopment/?p=432" target="_blank">Why Are We So Excited About 2.0..</a> post:  &#8220;<strong>When I am deploying application in SUP workspace, an error is generating while connecting to ‘My Unwired Server’.  The error is: ‘ Could not connect to My Unwired Server’. Ping also failed</strong>.&#8221;</p>
<p>If you cannot connect to the SUP Server, this typically means one of two things:  the server isn&#8217;t started, or you have a domain configuration which is incorrect.</p>
<p><strong>Check the SUP Server is running</strong></p>
<ol>
<li>In the Services directory, look for: SybaseUnwiredPlatform&lt;hostname&gt;Server1</li>
<li>If it is not started, click the &#8216;Start Sybase Unwired Platform Services&#8217; batch file icon installed on the desktop.  The batch will run, and attempt to start the set of SUP services.  This includes the internal databases, the OpenDS service, etc.  When it comes to the SUPServer1 service, it will check some properties against the license/admin service.  <em>This happens regardless of whether you are using a licensed or evaluation environment.</em></li>
<li>Refresh the Services directory.  If the SUPServer1 failed to start, that means one of two things:  the license settings are inaccurate, and/or the admin services are improperly configured.</li>
<li>If the SUP Server is running, skip to:  <strong>Check the Connection Profile Settings</strong></li>
</ol>
<p><strong>Check that the License settings are correct</strong></p>
<ol>
<li>Make sure your license is for the version you selected @ install.  This process is documented here:  <a href="http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00838.0200/doc/html/eka1250810362517.html">Sybase Unwired Platform Licenses</a></li>
<li>Key Points:  make sure that you have the correct version of the license (<a href="http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00838.0200/doc/html/jwo1266551889311.html">Locating Information in a License File</a>)</li>
<li>Troubleshooting guide is here:  <a href="http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00838.0200/doc/html/jwo1265996142907.html">Troubleshooting SySAM</a></li>
</ol>
<p><strong>Check the Admin Tool Domain settings</strong></p>
<ol>
<li>Sometimes if you installed SUP while on a corporate domain, that domain setting will be hard-coded to the Admin service-config file.  To check this, go to: <strong>&lt;Install dir&gt;/SCC-3_0/Services/RMI/</strong>, and open <strong>service-config</strong> in Notepad.</li>
<li>In the &lt;properties&gt; tag, make sure that the “address” value is set to &#8220;localhost&#8221; or an appropriate IP for when the administration service is running locally.</li>
<li>Example:</li>
</ol>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;ISO-8859-1&#8243;?&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;service-config id=&#8221;RMIService&#8221; version=&#8221;3.0.0&#8243; name=&#8221;RMI Service&#8221; provider-name=&#8221;Sybase, Inc.&#8221; register-on-startup=&#8221;true&#8221; mbean-type=&#8221;Model MBean&#8221; mbean-descriptor=&#8221;mbean-descriptor.xml&#8221; arl-config=&#8221;arl.xml&#8221;&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;dependencies /&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;properties&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;set-property property=&#8221;address&#8221; value=&#8221;127.0.0.1&#8243; /&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;set-property property=&#8221;addressType&#8221; value=&#8221;dynamic&#8221; /&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;set-property property=&#8221;port&#8221; value=&#8221;9999&#8243; /&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;set-property property=&#8221;timeout&#8221; value=&#8221;43200&#8243; /&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;/properties&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 428px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;/service-config&gt;</div>
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;service-config id="RMIService" version="3.0.0" name="RMI Service" class="com.sybase.ua.services.rmi.RMIService" provider-name="Sybase, Inc." register-on-startup="true" mbean-type="Model MBean" mbean-descriptor="mbean-descriptor.xml" arl-config="arl.xml"&gt;
  &lt;dependencies /&gt;
  &lt;properties&gt;
    &lt;set-property property="address" value="<strong>localhost</strong>" /&gt;
    &lt;set-property property="addressType" value="dynamic" /&gt;
    &lt;set-property property="port" value="9999" /&gt;
    &lt;set-property property="timeout" value="43200" /&gt;
  &lt;/properties&gt;
&lt;/service-config&gt;</pre>
<p>Save.  If you changed this setting, you should re-boot your machine so that the SCC service can capture the new value and take effect.  Once you&#8217;ve confirmed in the Services window that the Sybase Unified Agent 3.0 is &#8216;Started&#8217; (not just &#8216;Starting), run the &#8216;Start Sybase Unwired Platform Services&#8217; bat file on the desktop.  The server should get running.</p>
<p><strong>Check the Connection Profile Settings</strong></p>
<p>Now, the server is running, but you can&#8217;t connect from the Eclipse tool.  This has to do with the same domain issue as in the RMI service, and is a much easier fix because you can do it right in Eclipse.</p>
<ol>
<li>Right-click on the &#8216;My Unwired Server&#8217; connection profile in the Enterprise Explorer window, and select &#8216;Properties&#8217;.</li>
<li>Switch from &#8216;Common&#8217; view to &#8216;Unwired Server Connection Properties&#8217;.</li>
<li>If you are running SUP on a local machine, delete the value in the &#8216;IP domain&#8217; field.  Leave it empty.</li>
<li>Click &#8216;Test Connection&#8217; to get a ping.  You should be able to ping successfully.</li>
</ol>
<p><em>Special Case:  <strong>TechEd 2011</strong> <strong>images</strong>: </em>If you are using a TechEd 2011 image, you must also change the &#8216;Port&#8217; value to 20000 from the default 2000.  This was modified during the image creation to eliminate a conflict, and was not propagated to the WorkSpace configurations.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/09/troubleshooting-connect-to-sup-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP Mobility InnoJam &#8211; Palo Alto, CA</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/07/sap-mobility-innojam-palo-alto-ca/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/07/sap-mobility-innojam-palo-alto-ca/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 01:54:41 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/threecuts/?p=524</guid>
		<description><![CDATA[What a phenomenal week!  I just got back into the office after a 31 hour SAP Mobility InnoJam at the Palo Alto SAP Labs COIL facility, where we had 24 developers from 12 customers and partners go hands-on with SUP for the first time, produce an app against a live SAP ECC system, and compete [...]]]></description>
			<content:encoded><![CDATA[<p>What a phenomenal week!  I just got back into the office after a 31 hour SAP Mobility InnoJam at the Palo Alto SAP Labs COIL facility, where we had 24 developers from 12 customers and partners go hands-on with SUP for the first time, produce an app against a live SAP ECC system, and compete for TechEd 2011 Vegas tickets with a 6-minute presentation to Sybase and SAP&#8217;s product executives.</p>
<p>Coding started at about 4:30pm.  No one in the room had any experience with SUP at the start, and the team members were a combination of developers, architects, and business analysts.  They broke into teams of 2-5 around business scenarios that they&#8217;d brought with them or shared.  At least one team had prepared service wsdls.  Everyone targeted the Hybrid Web Container, using primarily the Eclipse-based designer, and a few of the 8 teams wrote directly to the HTML and JavaScript.</p>
<p>I caught up with the AMD/Satyam partnership at about 10pm, right after they&#8217;d succeeded in hooking up the 3rd-party charting library they dropped in the Container to the data coming out of the SAP ECC system, and deployed to the iPad.</p>
<p>The teams broke at 3:30am (though one of the HP Technical Leads went straight through the night), then re-convened early morning to work through to the 4:30pm cut-off.  By brunch the business scenarios were showing definite shape, and included: (team-member organizations)</p>
<ul>
<li>Expense submission and approval (Nvidia)</li>
<li><a href="https://cw.sdn.sap.com/cw/ideas/4730">Customer service request for a support contact center</a> (HP)</li>
<li><a href="https://cw.sdn.sap.com/cw/ideas/4698">Journal Entries (FI) Approvals</a> (eBay)</li>
<li><a href="https://cw.sdn.sap.com/cw/ideas/4456">Maintenance Notification Creation</a> / <a href="https://cw.sdn.sap.com/cw/ideas/5005">Service Notification Management</a> (Genentech, Intel, IGT)</li>
<li>Executive Dashboard Reporting (AMD, Satyam)</li>
<li><a href="https://cw.sdn.sap.com/cw/ideas/5023">SAP System Health Checker</a> (BAPS Software Consulting Services, HP)</li>
<li><a href="https://cw.sdn.sap.com/cw/ideas/4971">Sales Order Approval</a> / Invoice Approval (KLA, Maxim Integrated Products)</li>
<li>Workflow Management (Applied Materials)</li>
</ul>
<p>A few great takeaway stories:  Prithvi, the young man feverishly coding with headphones-in on what would become my personal favorite app (a remote-monitoring app to check SAP system status) turned out to be a Duke EE/BioTech undergrad attending with his father <a href="https://cw.sdn.sap.com/cw/people/22858">Bala</a>.  His task was to read comma-delimited values out of the Message Value Collection in Custom.js containing the system load data and render in a table view.  Another screen presented color-coded the state of multiple systems.  Bala took the iPad in the raffle, so I&#8217;m guessing it was good flight home for father/son.</p>
<p><a href="http://blogs.sybase.com/threecuts/wp-content/uploads/2011/07/5988738599_bf7f16a5e0_z.jpg"><img class="aligncenter size-full wp-image-532" title="Father/Son InnoJam Team" src="http://blogs.sybase.com/threecuts/wp-content/uploads/2011/07/5988738599_bf7f16a5e0_z.jpg" alt="Father/Son InnoJam Team" width="640" height="427" /></a></p>
<p>The Genentech/Intel/IGT (&#8216;Team Awesome&#8217;) partnership that would go on to win the competition had an agressive plan to use location services from the device in the Hybrid Web Container as input to a server-side SQL query to determine &#8216;Functional Location&#8217; of a maintenance request.  Every object in the company is assigned a &#8216;functional location&#8217; mask that is associated with a cost center.  The codes for functional locations are virtually meaningless to most end-users, so using the device location to automate the entry will streamline the process for users, and reduce help requests and errors.</p>
<div id="attachment_528" class="wp-caption aligncenter" style="width: 650px"><a href="http://blogs.sybase.com/threecuts/wp-content/uploads/2011/07/5989303626_67cc5f7f5f_z.jpg"><img class="size-full wp-image-528" title="Team Awesome - Mobility InnoJam Palo Alto" src="http://blogs.sybase.com/threecuts/wp-content/uploads/2011/07/5989303626_67cc5f7f5f_z.jpg" alt="Team Awesome - Mobility InnoJam Palo Alto" width="640" height="427" /></a><p class="wp-caption-text">Rob Robertson (Intel) Ashish Singh (Genentech) George Rally (Genentech) Raj Chintam (IGT) Brian O’Neill (IGT)</p></div>
<p>Starting in the morning they were the dark horse&#8211;they&#8217;d had trouble with the BAPI-MBO interface for the notification creation BAPI, and there was some debate as to whether to use the easier SQL data source in order to meet the competition deadline.  But then the BAPI &#8216;clicked&#8217;, and from there, &#8220;we started just pumping out screens&#8221;, said Brian O&#8217;Neill from IGT.  &#8220;Then it was like, you work on this, you work on this, and you work on this, and then we all came together and mashed it together.  Most of the app got written in the last 4 hours.&#8221;  The final product was &#8216;A Day In the Life of A Service Technician&#8217;, an app to enable a complete suite of tasks for a serviceman&#8211; an impressive leveraging of location-based services to retrieve Functional Location as an input for a new maintenance notification, also calling Google location services to provide a site image for the record.</p>
<p>At 4:30pm coding stopped, and the judging began.  Raj Nathan of Sybase, Sanjay Poonan and Dan Mahowald of SAP, and Tiago Dias of Slalom Consulting (who sponsored the event) viewed 6-minute presentations from each team, asked questions of the participants, then returned after deliberation to award TechEd 2011 Vegas tickets to two winning teams:  the Team Awesome partnership, and Rakesh Palle of Applied Materials, who was the only individual participant.</p>
<p>I want to thank everyone who participated, and the InnoJam team for hosting.  The event was a great opportunity to get to know our developers while they&#8217;re hands-on with our SDK, understand their business scenarios, collaborate, and show-off a bit.</p>
<p>There is another Mobility InnoJam in Australia early next week, looking forward to seeing the video.  For more, see <a href="http://www.flickr.com/photos/sapinnojam/sets/72157627311768766/">photos</a>, follow <a href="http://twitter.com/#!/SAPInnoJam">@SAPInnoJam</a><a href="http://twitter.com/#!/search?q=%23sapinnojam"> </a>on Twitter, and show up at DemoJam at TechEd!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/07/sap-mobility-innojam-palo-alto-ca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Value of SUP (one part of it):  Managed Objects</title>
		<link>http://blogs.sybase.com/mobiledevelopment/2011/07/value-of-sup-one-part-of-it-managed-objects/</link>
		<comments>http://blogs.sybase.com/mobiledevelopment/2011/07/value-of-sup-one-part-of-it-managed-objects/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 00:47:19 +0000</pubDate>
		<dc:creator>Stan Stadelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/threecuts/?p=512</guid>
		<description><![CDATA[An SAP employee recently asked in a forum: &#8220;what is the value of SUP for development? How does the Object API save total development effort?&#8221;   The Object API is only one of three ways to develop with SUP.  There is also the HTML5/JavaScript Container SDK, and the OData SDK (coming in SUP 2.1), and [...]]]></description>
			<content:encoded><![CDATA[<p>An SAP employee recently asked in a forum:  &#8220;what is the value of SUP for development?  How does the Object API save total development effort?&#8221;   The Object API is only one of three ways to develop with SUP.  There is also the HTML5/JavaScript Container SDK, and the OData SDK (coming in SUP 2.1), and all three SDKs will be available to developers as the Sybase Mobile SDK.  But this is a great opportunity to show how developer productivity is the core value of the &#8216;managed object&#8217; approach in the Object API for extending SAP applications (and other data) to mobile devices.</p>
<p>As I was finishing penning the response, I started thinking about Steve Jobs&#8217; comments in the <a href="http://youtu.be/3LEXae1j6EY?t=41m24s">WWDC 1997 closing keynote</a> about developer productivity (41:24 mark in clip):</p>
<blockquote><p>&#8220;The way you get programmer productivity is by eliminating lines of code that you have to write.  The line of code that&#8217;s the fastest to write, that doesn&#8217;t break, that doesn&#8217;t need maintenance, is the line of code that you never have to write, right?  So the goal here is to eliminate 80% of the code that you have to write for your app.  That&#8217;s the goal.&#8221;</p></blockquote>
<p>That&#8217;s exactly it. SUP&#8217;s libraries and code for native apps (the Object API) is a &#8216;managed object&#8217; approach to developing with on-device persistence, similar to the iOS-specific Core Data framework.  Managed object approaches provide significant benefits to developers by eliminating the amount of code they have to write, and eliminating points of failure.  SUP&#8217;s Object API provides the client-side data management functionality, and also provides a huge set of functionality that Core Data does not:</p>
<ol>
<li>The ability to connect to an external data source and authenticate</li>
<li>The ability to handle (queue) operations on the database when offline</li>
<li>The ability reconcile with the external data source when the device reconnects.  This means processing the format of the result set and writing to the database/exposing to an object &#8216;under the hood&#8217;.  Similarly, it means updating the client database without wiping out pending operations.</li>
</ol>
<p>These features:  connectivity/authentication, update handling, and queuing are all API features provided by SUP for which a developer could write code, but it would be long, complex, and difficult to maintain.</p>
<p>To understand just how important a managed object API is, I&#8217;ve compared the development processes for a purely client-side app that uses raw SQLite, Core Data, and the SUP Object API.  See how the two managed object approaches are quicker to develop and much less likely to be buggy or to break:</p>
<p>Your development process is as follows:</p>
<p>For raw SQLite:</p>
<ul>
<li>Write the SQL to create the data structure</li>
<li>Create NSObject classes for each of your objects.  These map to the tables you&#8217;ve created in the SQLite db.</li>
<li>Write the query methods for each of your queries that will be needed by the application.  if you&#8217;re pretty good, these could be generic (taking the object class types and set of clauses. as parameters), or specific:  -(Customer *)getAllCustomersInRegion:(Region *)region ofGender:(NSString *)gender age:(NSNumber *)age &#8230;</li>
<li>You need to then write the handles for the database results to pass them to the NSObject.  This means if you have 20 attributes (columns) in your table, you&#8217;ll be writing a 20-line block of code to accept each item in the result array, assign it a type, and map it to an attribute in the NSObject.  This is a freaking pain, because each attribute is name-specific, and possibly type-specific.  So you can be clever and create a static array of the attribute names for each NSObject, and then iterate through them for this.  But that array is another ordered thing to maintain. The difficulty of maintaining these queries is directly proportional to size and specificity.</li>
</ul>
<p>For Core Data:</p>
<ul>
<li>Use the Core Data modeling tool in xCode to create the data structure</li>
<li>Generate the NSManagedObject classes for each of your objects.  These map to the model.</li>
<li>Use the Core Data framework (including the FetchedResultsController) as your structure for processing SQL statements.  You can use Key Value Coding, which is another thing to learn, but is pretty useful once mastered.  You will still need to construct the SQL statements to input to the FRC.  Fortunately, you can map result sets directly to the managed objects, so that eliminates all the garbage of maintenance described above.</li>
</ul>
<p>For SUP Object API:</p>
<ul>
<li>Use the Eclipse modeling tool to create the data structure</li>
<li>Generate the MBO classes for each of your objects.  These map to the model.  The database is generated at initial runtime &#8216;under the hood&#8217;.</li>
<li>Use the generated methods for returning results from the database.  Results are automatically mapped to managed objects.</li>
</ul>
<p>So, as you can see:  SUP Object API and Core Data are both &#8216;managed object&#8217; approaches to persisting and working with data on the device (for iOS). <strong>They both require learning to use the API for accessing results, but the benefit in terms of unbreakable code and reducing maintenance is huge.</strong></p>
<p>Where the SUP Object API <em>extends</em> that benefit is by also managing the code for connecting to an external data source, authenticating, and updating the databases on both the back-end and on the device.</p>
<p>Really quick, think about the mess of attributes and mapping I described in the &#8216;raw SQLite&#8217; approach above.</p>
<p>Now, think about the code that you&#8217;ll have to write in order to make a connection to your data source, authenticate, submit any create/update/delete operations you&#8217;ve stored since the last time you connected to the network (you should also create a flag in your tables to create keep track of that&#8230;), then retrieve the current values from the data source.</p>
<p>How will you deal with the results?  Will you write a block of code to check whether each result is an update or not?  Will you just over-write the existing data?  What if the user was working while that happened? What if the results for every user are 5MB, and most don&#8217;t have WiFi?</p>
<p>It&#8217;s doable. It&#8217;s an absolute nightmare to maintain, and SUP provides a huge benefit by handling it all for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/mobiledevelopment/2011/07/value-of-sup-one-part-of-it-managed-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

