Pages Menu
Categories Menu

Posted by on Oct 8, 2012 in Mobile, The Cloud, Videos |

From 0 to 60 MPH with AWS DynamoDB and Heroku

This will be a technical presentation covering DynamoDB, a scalable, managed Database in the Cloud. DynamoDB follows the NoSQL paradigm, and offers unmatched performances by using Solid State Disks and replication, allowing users to tune the performance at the level they want. We will start with a quick introduction to DynamoDB, and then dive deeper with some cool demos and examples, including connecting an App from Heroku to DynamoDB. The speaker assumes that the audience has at least some familiarity with NoSQL databases, API calls, the Heroku platform, and Web Services.

facebooktwittergoogle_plusredditpinterestlinkedinmail Read More

Posted by on Oct 8, 2012 in Mobile, The Cloud, Videos |

Security Best Practices for Mobile Development

In the enterprise, apps need to be secure. A lost or stolen phone or tablet can mean your company data falling into the wrong hands. Join us to explore the security features available on both iOS and Android, learn how app data can be compromised, and receive best practices for the development of secure enterprise apps on both platforms.

facebooktwittergoogle_plusredditpinterestlinkedinmail Read More

Posted by on Oct 8, 2012 in Mobile, The Cloud, Videos |

Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore

If a sales rep has five minutes with a doctor in the basement of a hospital, or a service rep needs detailed equipment specs in a remote location, they might not have a data signal when they need it most. Salesforce Mobile SDK SmartStore functionality adds JSON document storage for both native and hybrid applications on iOS and Android. Join us to learn how to build an offline-capable application for salesforce.com, and some of the things to think about along the way.

facebooktwittergoogle_plusredditpinterestlinkedinmail Read More

Posted by on Sep 25, 2012 in Mobile, The Cloud |

Mobile Device Management and Enterprise Application Development

With Gartner reporting that the top three technology agendas for CIOs globally are analytics, mobile, and the cloud, Tech Republic reporting that iOS is now as secure as Blackberry, and Forbes saying “the sin of ignoring mobile will not go unpunished” if you aren’t considering how to roll out mobile devices and apps for your cloud services, you’re missing the boat.

Apart from what you want your workforce to do with their mobile devices, the most important thing you should be considering is how they can do it without compromising secure company information. Enter Mobile Device Management (MDM) providers and Mobile Application Development Platforms (MADP), but the wide array of MDM providers can be dizzying. Gartner has a Magic Quadrant for Mobile Device Management Software that can be helpful, but the reality is that there is an industry-wide commoditization of MDM occurring. The core MDM functions are controlled by device manufacturers (Apple, Google, Samsung, HTC, etc.), so MDM vendors aren’t able to do much that sets them apart with core device security features. Where they have distinguished themselves is with add-ons like MADP, application management (enterprise app stores), cloud services, analytics, automation of compliance measures, file/content sharing, and PC management combined with mobile management.

“Wrapper” MDM

There are two basic models for Enterprise MDM in the marketplace today: “wrapper” based and full device security through manufacturer-provided APIs. The best known example of the former model is that of Good Technology. Good’s core offering provides access to corporate email, calendar, contacts, and a secure browser within an encrypted container app. This is beneficial in Bring Your Own Device (BYOD) scenarios because users are able to use their personal devices unrestricted as they normally would, with all corporate information being locked into the container app. Where this doesn’t work so well is that the replacements for standard apps on devices lack functionality and integration with other device features and with apps that aren’t developed using Good’s MADP, Good Dynamics. That is by design, but can still limit worker productivity. Another limitation is that Good’s device-level security offering, Good Mobile Manager isn’t as feature rich as that of other MDM vendors who have focused entirely on that strategy.

Device Security MDM

With a few exceptions, most of the rest of the MDM vendors on the market have focused on using the device manufacturers’ MDM APIs in order to manage security at the device level. This is a solid approach, because it follows the best practices set by the manufacturers, and secures the entire device. However, with BYOD programs, you may find your users are unhappy about having their personal devices locked down, which may limit the security policies that you can realistically deploy without your users getting out their pitchforks. Some of the most prominent examples of this type of MDM are MobileIron, AirWatch, Zenprise, and Fiberlink MaaS360. I can say that the majority of clients that I’ve worked with have typically either implemented Good Technology or MobileIron. MobileIron is well known for good reporting and automation capabilities, but doesn’t offer a MADP. Airwatch is probably the most mature cloud-based offering, and does include an SDK to embed security features into custom apps. Fiberlink includes PC management, which is a direction Gartner predicts most MDM vendors will be moving toward in the future. Zenprise has solid reporting capabilities, and a strong mobile VPN solution.

Mobile Application Development Platforms

What about application development? Some MDM vendors offer a MADP, some don’t, and some MADP vendors don’t offer an MDM. So, if you are developing custom apps for your enterprise, how do you decide which MADP vendor to choose? First, I think it’s helpful to come up with some criteria for evaluation:

    It should be Standards Based. Architectures based on broad industry standards like those created by Apple, Google, or the W3C are more flexible, more scalable, and less tied to proprietary 3rd-party capabilities that may meet your needs today but not in the future.
    It should have both Native and Hybrid development options available. Native is often better for single-device deployments where apps need to perform well, look good, have a high degree of sophistication, or get to market quickly. Hybrid can be good for multi-device deployments, but development times often increase substantially
    It should have an Encrypted Application Container. Many mobile devices offer device-level encryption. Some don’t, most notably Android phones running the Gingerbread version of the OS (which is most of them right now, unfortunately). Even so, as I showed at a recent Dreamforce Session, hardware encryption isn’t foolproof. Many iOS apps that rely on hardware encryption are leaving their data easily accessible to anyone who gets ahold of the device. An encrypted application container keeps the data for your application locked away, even if the device encryption is compromised.
    It should have a Strong Developer Ecosystem. Developer and Consumer ecosystems feed on each other. The more consumers are using a technology, the more interested developers are in making apps for it. The more apps there are, the more consumers will be interested in using the technology. Looking at developer interest in a platform is a strong indicator of how well it’s doing, and how well it will continue to do in the future. This is a core reason for why iOS and Android are doing well, while Blackberry and Symbian aren’t, and why Microsoft is paying prominent developers to build apps for Windows Phone.
    It should be Open Source. Open Source technologies avoid dead ends. They also allow 3rd parties to improve and build upon them, and to search for security holes. If you have the source for the platform you’re building upon, you’ll never have an instance where it’s impossible to meet a key business requirement because the technology doesn’t support it and the source is proprietary.
    It should have Immediate Support for new OS Features. The next time Apple or Google release some awesome new feature as a part of their mobile OS, you should be able to take advantage of it without waiting for a 3rd party to add support for it.
    It should Integrate with your MDM. You’ll be rolling this app out to your workforce, so you want to make sure you can keep it secure and available to the users who need it.
    It should Integrate with the Cloud. Mobile apps need access to data, and secure integrations with Cloud services are a key component for providing that data.

So, here’s where some of the MADP leaders stack up:

MADP Comparison

Salesforce Touch Platform

The Salesforce Touch Platform “leverages the power of the Force.com platform and its proven security, reliability, and scale for enterprise applications”, and offers standards-based options for Native and Hybrid development on both iOS and Android devices. The Salesforce Touch Platform contains three core components: Force.com for Touch, Mobile Container SDKs, and Identity. The SDK is Open Source Software on Github, and contains an encrypted container for storing and transferring data. Since it’s built on industry standard technologies, the developer ecosystem comes built in, and Github allows for anyone to be able to contribute patches to be reviewed by the Salesforce team.

Good Dynamics

Good Dynamics allows application developers to build apps that use the same encrypted wrapper technology employed by the Good Email/Calendar application. This has been employed by well known brands like Box.com and iAnnotate PDF to create apps that integrate with the Good container. Good Dynamics is based on native libraries that are included in the source of natively built apps for iOS and Android. Like Salesforce.com, the reliance on standard development technologies means that the developer ecosystem comes built in. Some weaknesses are the current lack of a hybrid development model, a proprietary closed-source system, and if you’re building apps for Salesforce.com, a lack of OAuth and REST API wrappers out of the box (though, the native Salesforce SDK could be combined with Good Dynamics to add this).

SAP Sybase Unwired Platform (SUP)

The SUP platform compliments SAP’s MDM offering, Afaria. It’s strengths are in delivering a hybrid app with a single codebase to many different device types. However, this model doesn’t come without tradeoffs. If you need integration with SAP from a mobile device, SUP may be the best option, but you’ll be giving up the slick, highly performant apps possible with native development, and you’ll be committing yourself to a complicated proprietary middleware architecture.

Appcelerator Titanium

Appcelerator Titanium allows you to build cross-platform apps using the Javascript language, but with a custom native compiler. With a free connector for Salesforce.com, it provides a good, if slightly non-standard way of building cloud-connected mobile apps. Appcelerator’s strength is in building cross-platform apps that are more performant than is possible with Phonegap/HTML5 hybrid solutions, but you are locking yourself into a proprietary client architecture to some degree. The developer ecosystem with Appcelerator is strong, and they even publish quarterly developer surveys that are always worth reading to see where the industry is headed.

Adobe Flex/AIR

Adobe has a long-standing partnership with Salesforce.com, and we’ve developed many great apps on Adobe technologies with our 2GO platform. Similar to Appcelerator, the main strength with Flex/AIR is that one codebase can be used to export apps for multiple different mobile devices, and even desktop PCs (Windows, OSX, and Linux). AIR comes with an encrypted SQLite database built in, and performance is typically better than would be expected of a standard Phonegap/HTML5 type app. Some businesses have shied away from Flex/AIR since Adobe open sourced Flex under the Apache foundation because it was widely reported as an abandonment of the technology, but Adobe has affirmed their commitment to Flex and the Flash Builder toolset longterm.

facebooktwittergoogle_plusredditpinterestlinkedinmail Read More

Posted by on Jul 18, 2012 in Code, The Cloud |

Moving the Cloud — HTML5 and CSS3 on Node.js

ScreenshotMoving the Cloud is an experiment in using HTML5 and CSS3 technologies and Node.js. It was also an experiment on using Node.js on the Cedar stack in Heroku, but that didn’t quite work out as expected (more on that later). It’s also an Easter egg on the Model Metrics Homepage. Click on the animated 1s and 0s down in the bottom left corner of the screen to get to it.

And… if you want, fork the source over on GitHub. The readme.md file there gives some information on how to get it set up.

I was asked to put together a temporary (it’ll probably be around for a few months) artsy installation piece for the Art of Code section on modelmetrics.com. Going into the project, I wanted to do a social media visualization because, well, I think they’re cool. Some of my favorite examples are Twistori.com and Vizeddit — they visualize Twitter and Reddit respectively.

Moving the Cloud uses Node.js to pull tweets containing some keywords like “Cloud”, “Salesforce”, “Social”, “Mobile”, or “Model Metrics” from the Twitter Streaming API and stream them to clients using websockets. They move across the screen right to left, sort of like a cloud — GET IT? (nudge nudge wink wink)?

Twitter Streaming API

The Twitter Streaming API (well, technically APIs) allows you to open up a long-running socket connection with Twitter, and stream tweets that match a certain criteria. For this, I used the Public Stream API with the /filter endpoint so that I could receive tweets that matched my keywords. Technically, you could do this directly from the client using HTML5 websockets, but you have to authenticate with Twitter. You can generate keys for a specific app at dev.twitter.com, so you don’t have to just hard-code your Twitter username and password into the app, but still, you don’t really want to embed that in client-side code. So, in this example, I’m using Node.js as a go-between. It authenticates with Twitter, sets up a socket connection with the Streaming API, and dispatches those tweets out to any clients (browsers) that connect to it.

Node.js

If you haven’t used Node.js, you should. It’s a way to run Javascript on the server-side that takes advantage of Javascript’s inherent event-based non-blocking nature to create a server that works especially well for realtime or data-intensive apps like instant messaging apps. It’s possible to build a regular website (like a blog or something) with it using Express (which I am using here for simplicity), but I’m not sure it’s necessarily the best choice for something like that, as RoR, PHP, and Python (for instance) already do a pretty good job in that space. For a Twitter streaming API app, though, Node is great.

The Node.js server script itself is pretty simple–it uses the node-twitter library to connect to Twitter, and Socket.io to handle the setting up the websocket connections with whatever client browser happens to connect to it. It also handles fallback to XHR long polling for browsers that don’t support websockets. Aside from an array to hold active connections and some error handling, that’s about it on the server side.

HTML5/CSS3

Like I said earlier, one of my goals for this project was to demonstrate some HTML5 and CSS3 technologies. Because of that, it does not work on IE. It would probably be possible to get it sort of working in IE by falling back from HTML5/CSS3 technologies to older ones, but it wouldnt’ work as well, and sometimes you just have to leave the old crappy browsers behind. It does work perfectly fine on current versions of Chrome, Safari, Firefox, Mobile Safari (iPhone/iPad), and the Android Browser, though the transitions are kind of choppy on Firefox. Anyway, here’s some of what’s going on:

WebSockets

Websockets are awesome. If you’re familiar with client/server programming, you’re probably familiar with the concept of sockets. If you’re not, you use them all the time anyway. With a typical HTTP request, for instance, a socket connection is opened with the server, a request is made (GET, POST, etc.), a response is given and the socket is closed. In order for the server to be able to push data down to the client, a socket connection needs to stay open.

There’s some hacks like XHR Long Polling (Comet) that work on older browsers, basically by opening a dummy request socket and delaying the response until something push-worthy happens, but it’s limited by the HTTP 1.1 spec that says a browser should have no more than 2 open sockets with a server, and, well, it’s hacky. Websockets, on the other hand, let you open up a bi-directional full-duplex socket between a web browser and a server. In Moving The Cloud, tweets are sent from the Node.js server to the each client using websockets. Socket.io handily fails back to XHR long polling if websockets aren’t available.

CSS3 Transitions

CSS3 transitions allow you to do 2D and 3D transformations without using any Javascript. This is great because, for the most part, it’s faster to do things in CSS where possible. On some platforms, it’s even hardware accelerated. Webkit-based browsers even include a special mode that lets you see which elements are hardware accelerated. This is Safari’s CA_COLOR_OPAQUE=1 mode:

Screenshot

Show hardware acceleration in Safari CA_COLOR_OPAQUE=1

Show hardware acceleration in Chrome –show-composited-layer-borders

Firefox, best I can tell, does not have a similar mode. And CSS3 transitions are really slow in the current version of Firefox, too. So, I guess Mozilla has some work to do on that front.

In Moving the Cloud, I used the JQuery Transit plugin because it handles fallbacks to Javascript transitions when CSS3 transitions aren’t available.

CSS3 Web Fonts

Web Fonts use the @font-face rule to include font files that can be hosted on the web – they don’t have to be installed on the viewer’s computer. This has given rise to some great services like Google Web Fonts and fontsforweb.com. This is great, because the Model Metrics logo uses GothamLight, which isn’t a typical web font. In the olden-days, back when onions were worn on belts, logos that had to use a specific font would typically just be images, and the font for the rest of the site would just be a web-safe font that was close enough.

For instance, the rest of the modelmetrics.com site (except the logo) uses the Helvetica font family: “HelveticaNeue-Light”, “Helvetica Neue Light”, “Helvetica Neue”, Helvetica, Arial, “Lucida Grande”, sans-serif. My bit uses GothamLight:

@font-face{
font-family: "GothamLight";
src: url('http://fontsforweb.com/public/fonts/1151/GothamLight.eot');
src: local("Gotham-Light"), url('http://fontsforweb.com/public/fonts/1151/GothamLight.ttf') format("truetype");
}
.fontsforweb_fontid_1151 {
font-family: "GothamLight";
}

CSS3 Opacity

CSS3 adds an opacity parameter, so any element can a specified level of opacity (or what most people would call transparency). It’s pretty simple to use – just add an opacity: attribute to an HTML element, and specify a value. The footer in Moving the Cloud, for instance, has an opacity value of 0.9. Just enough so that you can see tweets floating by underneath.

HTML5 Boilerplate

When starting a new web app, it’s often a good idea to start with a reset.css to normalize your app across browsers. HTML5 Boilerplate gives you that and more. It’s is a “”professional front-end template that helps you build fast, robust, adaptable, and future-proof websites”. It’s a great starting point for an HTMl5 app that handles many of the idiosyncrasies between various browsers.

Known Issues

Moving the Cloud works quite well in most modern browsers, but there are some known issues:

Internet Explorer

Doesn’t work – right now I’m just using an [if IE] statement to show a message to the user that they should use a different browser – yes, I know this is bad form, but it’s not a critical portion of the website, and it’s meant to demonstrate new technologies not imitations of new technologies. Partially it doesn’t work because IE doesn’t support Websockets or CSS3 Transitions, but technically speaking, Socket.io should be able to fail back to XHR long polling, and JQuery Transit should be able to fail back to Javascript, so I’m not 100% sure why it isn’t working. I could spend some more time on it, but to be honest, even if I got it working, I’m assuming it will be really slow and crappy anyway.

Firefox

Speaking of which, it’s kind of slow and crappy on Firefox. I think this is just because CSS3 transitions are slow and crappy on Firefox. Mozilla really needs to step it up – it runs great on my iPhone but not Firefox on a new MacBook Pro.

Heroku

I really wanted to get this working in Heroku. Really really really did. And, technically it does work – on one dyno. I think the issue is that the Cedar stack doesn’t support websockets from Node.js, so it has to use XHR Long Polling, and even though it should work with a RedisStore as a man in the middle, it works sort of intermitently if you try to scale the app up to use more than one dyno. So, it’s running in EC2. I’ll try again when Cedar supports websockets. More information here on stackoverflow.com.

facebooktwittergoogle_plusredditpinterestlinkedinmail Read More