Building a Team That Works (Well)

Back in April, Far Reach celebrated its fourth anniversary.  At that time, we blogged about the key things we’ve learned in our first four years.   We shared one of our company mantras in that post: surround yourself with smart people you like.

We were incredibly honored to find out a couple of weeks ago that our team nominated us for the Waterloo-Cedar Falls Courier’s Employer of Choice award.  You may have seen in Monday’s publication that we were chosen as one of this year’s winners.

How do you build a team that’s passionate and productive?  Foster an environment that brings out the best in every employee and makes them look forward to coming to work every day?  (Well, hey, almost every day. Nobody’s perfect, right?)

You don’t do it by creating an “Office Space” type of environment. That movie has a cult following of cube dwellers (and, admittedly, former cube dwellers) for a reason.

Motivation

Photo courtesy of pescatello*

Here’s what we do:

1.)   Set high expectations by getting into the trenches yourself.  We expect a lot out of our employees, but never more than what we’d ask of ourselves as partners.  We work side-by-side on projects with our employees, brainstorm together, and park ourselves in the same open office area as our team members.  No corner offices here—we’ve all got the same equipment and the same amount of space.  There’s a very strong sense of “we’re in this together” in the Far Reach office, both physically and metaphorically.

 2.)   Don’t force structure, rules, and formality when there isn’t a need for them.  We don’t believe in dress codes, formal hierarchy, and a lot of employee policies.  We deal with issues as they arise (which is almost never).  We treat our employees like grown ups who know what is and isn’t appropriate.  They, in turn, act like grown ups. (Surprise, surprise.)

 3.)   Give employees the flexibility they need to live their lives; they’ll become more devoted to their work, not less.  We think work should be an organic part of a person’s day instead of an inflexible force around which everything else must revolve. Our employees have the option of working flextime and working from home when needed, and we encourage them to take time to volunteer and be active in the community. We think this flexibility makes them more productive, not less so.  Our employees respect the role that work plays in their lives because Far Reach respects the fact that they have lives.

 4.)  Build fun, casual, team-building experiences into the regular routine. Company picnics and holiday parties are great, but there’s something to be said about “team-member-only” bonding that gives everyone a break from the normal workday.  Once a month we take an afternoon and do lunch and a movie, attend local events, or just order pizza and play Wii in the office.  On paper, can we really afford the time devoted to these activities?  Of course not.  But we’ve become a stronger, tighter team because of them and no one will convince us that getting to know our team members as people isn’t worth the price of a few billable hours.

So, what’s the underlying theme for us when it comes to our employees?  Hire smart and then manage with trust, not fear.   The management style we’ve outlined above works because we’re incredibly careful about selecting our team.  We only hire people who share our passion and company values.  Derek, James, Jen, Logan, Mike, and Todd, we’ve definitely hired smart and we trust that you’ll continue exceeding our expectations for years to come.

And to our blog readers, does Far Reach sound like the kind of place where you’d like to devote your energy?  Contact us.  You just never know—you might be the perfect fit for our growing team.

*pescatello on flickr

 

Enhanced by Zemanta


Posted in Business, Entrepreneurship, Fun | Tagged , , , | 1 Comment

HTML5 – Will it Really Make Native Apps Obsolete?

HTML5

Image via Wikipedia

Given the recent release of Amazon’s new HTML5 Cloud Reader web app, we thought it made sense to address HTML5, especially since we’ve been talking so much about mobile technology lately.

For a few years now, there’s been quite a bit of debate about whether HTML5 will make native mobile apps (i.e., apps designed specifically for the iPhone, Android, Windows Phone 7, Blackberry, etc.) obsolete.  What do we think? Eh, maybe, but not completely and not any time soon.

So, what’s fueling this debate?  Or, taking it back one step even further, what exactly is HTML5?

HTML5 Explained

HTML5 is the fifth version of the HTML language that provides the basic building blocks of web pages. It will be the first version to support multimedia without plugins and has the ability to be “understood” by all computers and devices. In addition, HTML5 web apps can be accessed and used on any device via a web browser, much like a mobile website. These web apps also provide the capability for offline access and usage via application cache, meaning you don’t have to have a network connection to use them.

Given that HTML5 could allow you to develop a single web app rather than multiple native apps, some have predicted the impending demise of the native app.

Getting back to Amazon’s recent release, it’s likely the primary reason they took the web app route was to bypass the 30% cut that Apple takes on transactions made via iOS native apps in the App Store.  The ability to bypass app stores presents an additional advantage for companies that use mobile apps to engage consumers in purchase transactions.

HTML5’s Pitfalls

HTML5 sounds pretty great, right?  Less development time = less expense, simplification, etc.   However, HTML5 is not without its downside.  There was an excellent article posted on InfoWorld earlier this month that went into great detail on the limitations of HTML5.  There are a few we want to highlight:

  1. Security issues.  HTML5 web apps are set up in a way that ultra-savvy users could tamper with processing scripts, which might allow unauthorized access. Variables could be altered in a way that would allow hackers to access perks, discounts, etc. for which they really aren’t eligible.
  2. Synchronization challenges.  We mentioned that HTML5 allows for offline app usage.  However, the InfoWorld post sums up the issue with this quite nicely, “If a Web app is connected to the Internet, it can continually save data to the cloud. When it’s offline, changes aren’t always stored in the cloud. When someone switches browsers or uses a different machine, copies begin to proliferate and the difficulties of synchronization rear their head.”
  3. Functionality does not rival that of a native app (not yet anyway). We’ve read several reviews of the Amazon Cloud Reader app.  Most say that it’s pretty good, but it’s no native app.  It will be a while yet before web apps can offer the speed and features of a native app.  So, even though Amazon is saving themselves that 30% cut for Apple by opting for a web app, it’s important to remember that consumers use native apps because they’re easy, fast and convenient.
  4. You lose the marketing benefits of being featured in app stores.  If you’re Amazon, then maybe you don’t need app stores to help push your app.  However, if you’re a smaller company, new and potential customers are probably more likely to find you if you’re featured in an app store.
  5. HTML5 is not quite ready for “prime-time.”  The final reason we’re not 100% gung-ho on abandoning mobile apps for HTML5 web apps is that it’s just too early.  Developers are obviously able to use HTML5, but the latest we’ve read is that the World Wide Web Consortium (W3C) — the group charged with creating HTML5 – says that HTML5 won’t be fully complete until 2014.

Our Recommendation on HTML5 vs. Native Apps

Given where HTML5 is as of today, we stand by our earlier recommendations on mobile platforms.   If you’ve followed our advice so far and determined that mobile apps make sense for you, we think you’re wise and safe to go that route in the near future.  However, as we seem to say quite often when writing about mobile technology, stay tuned!

Has the buzz about HTML5 caused you to reconsider native app development for your company?  We hope you’ll chime in with your thoughts on this debate.

Enhanced by Zemanta


Posted in Mobile | Tagged , | 5 Comments

Useful Mobile Productivity Apps

To wrap up our series on mobile technology, we thought we’d talk about some great mobile apps already out there, available for you to download.  Our Far Reach team members have quite a few favorite apps they use to stay on top of work, travel, and life in general.  As you can imagine, few places on earth are geekier (and you know that’s a good thing, right?) than an office full of developers.

Here’s how the Far Reach crew responded to the question, “Which apps help you get more done?”

Jason (aka the Big Kahuna) uses quite a few apps to keep him on track.   He shared three of his favorites:

Cube Time & Expense Tracker Pro helps you quickly record the time you spend working on project-related tasks.  Jason commented, “I really like the timer functionality that is provided – simply start the timer when you begin working on a task and when finished, stop the timer and the time is automatically recorded. One other nice feature is the ability to flag time as billable or non-billable.” Available for iPad, iPhone, and Android

Action Method is a great app for managing tasks and increasing productivity. With this app you can quickly add tasks, organize them by project, assign due dates, and delegate to others. “One of my favorite features, the “Focus List,” allows me to tag tasks that I need to focus on today and it won’t let me tag more than 5 tasks at a time,” Jason says.  “It must be that I lose focus after 5 tasks. This is a great tool to help me have a bias towards action.“  Available for iPad, iPhone, and Android

FLUD is a personal newsreader.  You can add the feeds from your favorite news sites and blogs and FLUD will aggregate for you. One great feature is the ability to connect with your Google Reader account.  Content can easily be shared using Twitter, Facebook, or Email.  Jason promises, “The user interface is amazing…it has to be seen to be believed.”  Available for iPad, iPhone, and currently in beta for Android

Chris, our very own WP7 devotee and a guy who seemingly never runs out of steam, shared two apps that keep him going:

Basecamp is an online project management system that uses message boards to share document files and easily communicate with team members and clients.  Basecamp allows you to assign project tasks, lists, and milestones and can sync with Google Calendar, Outlook, and iCal.   While Basecamp has a mobile site that allows you to access the most important features on the go, a number of related mobile apps are also available.  Chris uses Envision on his Windows phone to work in Basecamp and there are a number of other apps in alternate platforms that allow you to do the same thing.  Envision is available for WP7.  Similar Basecamp apps are available via app markets for additional mobile platforms. 

DropboxDropbox’s online service helps you keep your important files accessible and in sync no matter where you happen to be working.  Dropbox is accessible via your desktop machine or on mobile devices.  Chris and several other Far Reach Team members use this app, which only takes a few minutes to set up and is free of charge if you store less than 2G of data.   Larger plans are available as well.   Available for iPad, iPhone, Android, and Blackberry

As the woman who does a little bit of everything around our office, (or as we like to say, the person who does the stuff no one else wants to) Kate keeps her wide array of tasks and projects in line with the help of these apps:

EvernoteEvernote lets you keep track of virtually anything, wherever you might be. This combination software/Web-based service can store text, photos and voice recordings and is automatically synced across your computer, smartphone or electronic tablet.  Mobile apps for this service are offered on nearly every mobile platform.  You can gather information from the Web, email, and peripherals.  The best part is you can organize it all with annotations and tags, making your information incredibly easy to find.   This is a great resource for writers and researchers or busy people who manage multiple projects.  Available for iPad, iPhone, Android, Android tablet, WP7, Blackberry, Palm Pre/Pixi

TripitTripIt offers a simple way to organize your travel by giving you access to all of your travel plans on your phone, tablet, calendar, or online.  You simply forward your travel confirmations to your Tripit email account and Tripit creates a “smartinerary” that offers driving directions, maps, and sharing capabilities.  Available for iPad, iPhone, Android, and Blackberry

Jen, one of our newest team members and a mom with a lot to juggle, initially confessed that her favorite productivity apps are games–“The kids play, I get stuff done.”  But, she does have a couple of go-to’s for herself:

ASAP ListsASAP Lists allows you to create, archive, and retrieve all of those lists you need to make—shopping, packing, etc.  You can enter lists by text or voice.  You can also archive or retrieve entire categories or individual items on your lists.  ASAP Lists allows you to share a text version of your list with friends and co-workers.  Available for Android

DwollaDwolla is an online service that lets you pay cash for goods and services offered by participating businesses or send/receive money to/from individuals without extra fees.  Dwolla offers a mobile app for several platforms, which allows you to use your smartphone to manage Dwolla transactions on the go.  Available for iPhone, Android, WP7

Todd is out and about on projects quite a bit but is never without an Internet connection, thanks to his favorite mobile app:

PdaNetPdaNet lets you use your smartphone’s high-speed data connection to access the Internet on your laptop when you find yourself without wifi.  Some mobile providers aren’t fond of this practice—“tethering”–so this recommendation comes with the caveat that you familiarize yourself with your provider’s policies before you tether up.  Available for iPhone (if you’re willing to jailbreak), Android, PalmOS, Blackberry, Windows Mobile

And, last but not least, James, like Jen, not only uses his phone for work, but also to keep the youngest members of his family occupied now and then.  His favorite app keeps all of his mobile files and apps organized and backed-up, just in case.

Astro File ManagerASTRO File Manager lets you manage files on your phone without connecting to your computer, including copy, paste, move, delete, open with other apps, create folders, etc.  You can also select multiple files to perform actions and search.  Astro offers the ability to backup the installer files (APK) to SD card so you can free up low internal phone memory without rooting the phone.   If you want to reuse the app, you just reinstall if from backup.  James also noted, “Astro is handy if an app you like disappears from the Market.  Just last night a favorite game of my daughter’s was disabled in the most recent Market update.  I was able to easily reinstall it from backup.”  Available for Android

What mobile apps are you using to stay organized and connected wherever you go?  Have you tried any of the apps we suggested?  We hope you’ll feel compelled to share your own recommendations and reviews.

 

Posted in Mobile | Tagged , , , , , , | Leave a comment

Which Mobile Platform(s) Should I Target?

Last time, we left you to ponder whether a mobile app is right for your business. You listened to us, pondered, and have now concluded a mobile app is definitely in your future.  So, what’s next?  Should you focus on one mobile platform?  Several?  How should tablets weigh in your decision?

First, let’s look at the most recent market share figures for both smartphones and tablets.  These figures are hot off the press, released in the weeks following our initial post on mobile trends:

U.S. Marketshare Figures – July 2011 (via Nielsen)
Platform Smartphone Share Tablet Share
Android 39% 9%
iOS (iPhone) 28% 82%
RIM (Blackberry) 20% -
Windows Mobile/WP7 9% -
Palm 2% -
Symbian OS 2% -
Other - 9%*

*Breakdown not published

Android, with iOS next in line, is leading the smartphone market after an impressive surge this past year.  For tablets, it’s clear that no one’s catching up to iPad yet.   Although we wrote a while back of some analysts predicting Android would surpass the iPad in 2011, these figures demonstrate the reality that Android tablets are off to a slow start.  (And that the mobile market is not an easy one to analyze.)

Beyond market share figures, let’s also take a look at app usage numbers for smartphones.  30-day stats show iPhone users are the heaviest app downloaders/users, followed by Android.    It’s interesting to note that while Blackberry is third in market share, it’s at the bottom of the heap here, with the average user having one-third as many installed apps as the typical iPhone user has.  Of course, that has a lot to do with the relatively limited number of apps available on the Blackberry platform. (Check out the detailed graphs from Nielsen.)

Mobile App Usage by Platform, April 2011
Platform Average Number of Apps Installed % that Use Apps “Multiple Times Each Day”
iOS 48 68%
Android OS 35 60%
Palm OS 21 48%
Microsoft Windows Mobile 17 29%
Blackberry OS 15 45%

There you have the numbers.   Now, here’s what we think they suggest:

1.)  If our previous post led you to the carefully considered decision that a mobile app is worth the investment, then it’s probably also worth it to dive in with both Android and iOS apps. Android is the market leader for smartphones with no sign of slowing down. iOS no slouch, either.  Apple continues on a path of consistent growth and a new (but small) study asserts that iPhone users are the most brand-loyal.  Finally, the figures above point to iPhone users also being the heaviest app users.   If you’re focused on reaching the highest percentage of the overall smartphone market, you’ll accomplish that by investing in both platforms.

2.)  If your budget really does allow for only one platform, consider how your app is most likely to be used. Android would be a good place to start if your app is primarily geared towards smartphone use. However, if you feel your app will have value not only to smartphone users, but also to tablet owners, consider iOS.  In addition to the numbers above, April market figures from ComScore show there are 37.9 million total devices powered by iOS in the hands of users versus Android’s 23.8 million; that’s 59% more devices when you’re counting phones, tablets, and the iPod touch.

3.)   Keep an eye on Palm, RIM/Blackberry, and Windows Mobile/WP7 over the next year. When you look at the direction market share has headed quarter to quarter, Palm and RIM don’t show a lot of promise. WP7 can still use the excuse–for now–that it’s a pretty new player.  Despite low market share numbers, there’s enough going on with these platforms that we’re not quite ready to write them off as viable options moving forward.  Some recent projections even have WP7 overtaking iOS and Blackberry by 2015.  Stay tuned!

4.)   Pay attention to general market trends, but learn as much as you can about your own customers.   The mobile market is evolving quickly, to say the least.   Yes, it’s important to maintain a grasp on the overall marketplace.  But now’s the time to start monitoring mobile behavior via your company’s own marketing research.  Understanding the specifics for your current and prospective customers is hands-down the best way to prioritize strategy.

Next time, we’ll give you an inside look at the apps Far Reach team members use to stay on top of their busy work lives.   In the meantime, where do you plan to start with your mobile app development?  We’d love to hear about your plans or any research you’ve conducted with your own customers.

 

Posted in Uncategorized | 1 Comment

Do I Need a Mobile App?

In our previous post on mobile trends we took a look at the current environment in mobile technology.   We hope it got you thinking (dreaming, dare we say?) about how mobile solutions could play into your own marketing and management strategies.

With all the hype out there, you’re ready to develop a mobile website along with mobile apps for every device on the market, right?  A few experts would say absolutely; that at the very least, you need a mobile site along with IOS and Android apps for your business.  Well, we think the better plan is to develop a more personalized strategy based on your needs.

Far Reach has worked with several clients on some pretty fantastic mobile solutions.  But, what made these true “solutions” was how the final products provided convenience and value to customers in ways no other medium could.

Before we answer the question “Do I Need a Mobile App?” let’s step back and first cover the basic differences between mobile apps and mobile sites:

Mobile Apps
Pros:

  • Because they’re developed in the specific platform of the user’s device, they often function better than a mobile site.
  • The user accesses the app via an icon on their device’s screen—it’s easy to use regularly and your logo is permanently on their screen.
  • An app is able to take advantage of the device’s functions—camera, GPS, and push notifications.
Cons:

  • Apps can be expensive to develop & you’ll likely need to develop them in multiple platforms.
  • There are hurdles to navigate in getting them distributed via an app store. (More on that in an upcoming post on mobile platforms.)
Mobile Sites
Pros:

  • Development of one site can cover every platform.
  • Sites are cheaper to develop than apps.
  • Your mobile site is findable via online searches.
Cons:

  • Because a mobile site is serving as ‘all things to all devices’ it may perform at a lesser level than a native app.
  • You lose some marketing benefits–distribution in app stores, as well as icon placement on user devices.
  • Mobile sites are less effective at taking advantage of the device’s functions–camera, GPS, push, etc.—than apps are.

Given these differences and the trends we pointed out last time, these are the key areas that should drive your mobile strategy:

1.) Function. If customers have mobile access to you, what is it they want to do?  Just as importantly, what do YOU want them to do?  We think there are two main function-related reasons to consider a mobile app instead of, or in conjunction with, a mobile site:

  • There are specific functions your customers engage in where one-click launch and streamlined performance will add a high level of convenience and value.   (Think online banking, online payment, special events, etc.) The Sturgis Falls app is a perfect example.  The main functions users needed on-site during the event—schedule, venue maps–were incorporated into lean iPhone, Android, and WP7 apps available at a single click.
  • Tapping into the mobile device’s functions (camera, gps, push) is the best way to give your customer the on-the-go service they need and/or provide you the ability to engage in targeted marketing.  (Think barcode scanning, social apps, location-aware marketing, etc.) Dwolla’s mobile payment app allows customers, with one click, a map of participating merchants based on their current location.  Super convenient for them, great marketing perk for the merchants.

2.) Your Target Market.  If the situations above don’t apply, it could still make sense to invest in a mobile app if this describes you:

  • You operate in an industry where technology adoption and trendsetting are valuable for your brand image.  Sometimes “cool” really does count.  An app can provide a means for your most die-hard customers to feel even more connected to your brand.
  • Your customer demographics dictate an app would be a good idea. You’ve done your research and know that a high percentage of your target market engages in heavy mobile app use.  There’s data out there on mobile app usage versus web browsing for the general population, but we always recommend finding out as much as you can about your own customers.

If none of these situations apply, a mobile site may be just fine for you.  And given the incredible usage stats we shared in our last post, a good mobile site should probably be your minimum investment.    Unless your standard site is riddled with Flash or other elements that could bog down mobile performance, optimizing for mobile users is likely an affordable option.  Keep in mind, too, that not everything on your website needs to be included in your mobile site. As with apps, the key is to keep it as simple as possible. You’ll want to carefully consider how people using a mobile device would use your site and forego any unnecessary content.

Whatever mobile path you decide to take, your efforts in this area must be well integrated into your overall marketing strategy and reflective of your brand.  If you decide to go mobile, you should be using your other marketing media to drive customers to your mobile offerings and vice versa.  Remember all those “dumb” smartphone users we talked about in our last post?  Opportunities like that—scores of people with the means but not necessarily the know-how—dictate that you need a well-integrated strategy. If you believe mobile technology could ultimately help a broader number of people become more engaged customers, it’s your job to help them along that path regardless of where they are now.

Next time, we’ll talk platforms and how you decide where your focus should be.  In the meantime, are you considering a mobile app for your company?  We’d love to hear about the factors you’re weighing in that decision.

 

Posted in Marketing, Mobile | 2 Comments

Mobile Trends

Image representing iPhone as depicted in Crunc...

Image via CrunchBase

After our recent post on the benefits of a mobile app for your event (inspired by the success of the Sturgis Falls apps we developed), it seems like a perfect opportunity to discuss the mobile world a bit more broadly.  Lists of trends as well as “do’s” and “don’ts” abound.  The one thing that seems certain is those who choose to ignore the rise of mobile technology are likely to be left behind.

Upcoming posts will delve into the nitty-gritty decisions you’ll need to make for your own business.  But, before we get ahead of ourselves, we’ll let you in on what we see as today’s most relevant mobile trends.

1.  Monster leaps in the number of smart phone owners, but the newest users are (initially) less engaged than early adopters.  Falling smart phone prices have led to a surge in the percentage of consumers who own them.  The Mobile Marketing Association says that this year, 85% of all handsets shipped globally will include a browser. Research firm Forrester points out an interesting trend along with this surge–the rise of the “dumb” user in 2011.  Before you jump to the conclusion that we’re calling grandma and her new smartphone stupid, we should mention Forrester is referring to late-adopters who are upgrading from “dumb phones” but not immediately upgrading their usage behavior.  Rather than finding this discouraging, we see it as an opportunity. (But you’ll have to wait for a future post to hear more about that.)

2.  A lot of buzz about 4G technology, but little impact in the short-term. For heavy mobile users, it’s all about convenience with the understanding that less functionality is often the tradeoff.  There’s a lot of talk right now about 4G from mobile providers but, in reality, it’s more of a long-term game-changer.  Keep an eye out and know that once 4G is truly in play, mobile functionality can begin to rival that of the PC.

3.  Android’s on top.  If you pay attention at all to the world of technology, you know that Android is gaining ground, both in smartphones and tablets.  In smartphone U.S. market share, Android took the lead this year and continues its upward hike.  Figures from ComScore for the three-month period ending May 2011 indicate Android has grown to hold 38% of the smartphone market, with Gartner, Inc. predicting that Android will power 49% of the world’s smartphones in 2012.  At the end of May, iPhone’s market share was up slightly to 26.6% with RIM/Blackberry dropping to 24.7%. Windows Phone 7 (WP7) is off to a slow start–5.8% of market share, down from February. There’s a lot of disagreement on where WP7 is headed, but some predict it may gain ground due to a new partnership with Nokia.  Looking beyond smartphones, some analysts predict the sales of Android tablets will match the iPad by the end of 2011.  We’ll see if that pans out but, regardless, Android is definitely a strong player here as well.

4.  Tablets count, too.  There’s a lot of focus on smartphones, for obvious reasons.  But it’s important to pay attention to the rise of the iPad over the past year and the flood of new tablets hitting the market with the Android OS. Tablets are quickly taking the place of netbooks and laptops for many individuals and businesses.  Along with this change in hardware comes the need for apps that accommodate these users–streamlined, focused apps versus monstrous software suites.

5.  Increase in location-aware apps. Combining social media behavior with check-in stats can provide businesses an unprecedented depth of customer data. A business’s ability to serve up on-the-spot, personalized marketing messages is increasing thanks to location-aware technology.  One interesting prediction we came across in a David Sims post on Mashable involves some consumers making a complete turnaround. Where once they were “creeped-out” by an online service knowing too much about them, they’re now likely to express disappointment when this same, all-knowing technology doesn’t serve up a personalized experience.

6.  Growth of mobile commerce. Shoppers on the go can now use phone apps to scan a product barcode and search the web for the best price, enabling them to buy a product online for a more competitive price before they’ve even left the store.  Convenient, mobile payment opportunities are also on the rise.  (Check out the app we recently developed for Iowa-based, mobile payment startup, Dwolla.) While most consumers have yet to make major purchases via mobile technology, the way they shop and make decisions is changing.

Understanding where mobile is headed will help you prioritize and develop a smart and focused strategy. Stay tuned to future posts where we’ll help you weigh whether a mobile app is right for your own business, discuss platform options and, finally, let you in on some of the mobile apps the Far Reach crew can’t live without.

In the meantime, we’d love to hear how you’re already using mobile technology in your day-to-day work and personal lives.

Enhanced by Zemanta


Posted in Mobile | Tagged , , , , , | 2 Comments

Storing Files in SQL Server using WCF RIA Services and Silverlight – Wrap up

I recently completed a three part series which described how you can create a Silverlight LOB application that stores and displays documents using FILESTREAM Storage in SQL Server 2008. Here are the articles for your reference.

  1. Configuring FILESTREAM in your database and WCF RIA Services setup.
  2. Uploading and Saving files to the database from a Silverlight LOB application.
  3. Viewing files stored in the FILESTREAM from a Silverlight LOB application

I received a few requests to share source code so I decided to pull together a solution which contains the code from the three articles listed above.  As a bonus I am including another tip – how to display the image within your Silverlight application.

Displaying a saved image in your Silverlight application

Here are the steps involved to get our image to display in our application.

  1. Add an Image control to your XAML.
  2. Add a SelectionChanged event handler to our Grid
  3. Add a method in our ViewModel to retrieve the File object based on a provided DocumentId.
  4. Add code in our View to render the File object as an image in our Image control.

1. Our XAML:

<Image x:Name="imgViewer" Width="100" Height="100" />

2. Add a SelectionChanged event handler on our gridview control.  First the XAML:

SelectionChanged="rgvDocuments_SelectionChanged"

How the handler in code:

private void rgvDocuments_SelectionChanged(object sender, SelectionChangeEventArgs e)
{
    if (rgvDocuments.SelectedItem != null)
    {
        imgViewer.Source = null;
        AccountDocument accountDocument = (AccountDocument) rgvDocuments.SelectedItem;
        ViewModel.GetDocumentFile(accountDocument.DocumentID);
    }
}

3. Our ViewModel changes to retrieve the File object. Remember, when we bound the grid we bound to the AccountDocuments EntitySet, which included the Document object, but not the File object. We did this for performance reasons. We only retrieve the File when we need it, one File record at a time.

public event EventHandler DocumentLoaded;
private int _documentId = 0;
public Document SelectedDocument { get; set; }
 
public void GetDocumentFile(int documentId)
{
    _documentId = documentId;
    var batch = new DomainContextLoadBatch(DocumentLoadComplete);
    batch.Add(Context.Load(Context.GetDocumentWithFileByIdQuery(documentId)));
}
 
private void DocumentLoadComplete(DomainContextLoadBatch batch)
{
    try
    {
        if (batch.FailedOperationCount > 0)
        {
            //foreach (var op in batch.FailedOperations)
            //    HelperFunctions.ProcessException(new Exception(op.Error.Message, op.Error.InnerException), "ProspectDetailsViewModel.cs");
            DataLoadError(this, null);
        }
        else
        {
            //Got the data - notify the view
            SelectedDocument = Context.Documents.Where(f => f.DocumentID == _documentId).FirstOrDefault();
            DocumentLoaded(this, null);
        }
    }
    catch (Exception ex)
    {
        throw;
    }
}

4. Add code in our view to fill our Image object from the returned File object. This code example assumes we wired up the DocumentLoaded event handler when the view was initialized.

        void ViewModel_DocumentLoaded(object sender, EventArgs e)
        {
            try
            {
                if (ViewModel.SelectedDocument != null)
                {
                    byte[] imageBytes = ViewModel.SelectedDocument.File.DocumentFile;
                    var bitmapImage = new BitmapImage();
                    var stream = new MemoryStream(imageBytes);
                    bitmapImage.SetSource(stream);
                    imgViewer.Source = bitmapImage;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }

Notice that we simply take our byte array from our File object and use it to create a BitmapImage. This can then be assigned as the Source of the Image. Cool stuff!

Here is the complete solution for you to download.  It comes as-is and with no warranties, but I hope it is useful.  One other thing regarding the source code – I use Telerik Silverlight Controls in my projects and this code sample assumes you have these installed.  You can install them for free as a trial basis.

SQLDocuments.zip

SQLDocuments_Tables.zip

Thanks!

Chris Rouw, Far Reach Technologies

MCTS Silverlight 4, Developer

Posted in Silverlight, Silverlight - Technical, Uncategorized | Tagged , , | 1 Comment

Benefits of Having a Mobile App for Your Event

Sturgis Falls iPhone App

We recently developed and released smartphone apps for the 2011 Sturgis Falls Celebration and we’ve gotten a lot of great feedback from festival organizers and those attending this annual event held each June in Cedar Falls, IA.

With Sturgis just wrapping up for the year, we thought this would be a good time to talk about mobile apps and how they can play a pivotal role in your next event.

From an event organizer’s perspective, mobile apps make sense for many reasons:

  • If the event has a database-driven website, the same data can feed the mobile apps. This means a single source of data can feed multiple lines of communication. The beauty of this is that, while the information is the same, the way it’s displayed is appropriate for the device on which it’s being viewed, giving users the best possible experience.
  • This data can be reused and updated from year to year or event to event as needed without having to reenter everything each time.
  • Advertising revenue can be generated by allowing local merchants to purchase ads in the app providing another valuable funding source for the event.
  • As smartphone use increases (and there is no doubt the trend is going nowhere but up),  the costs of printing programs and brochures will likely decline, allowing festivals to redirect funds to other areas.
  • Mobile apps serve as perhaps the most direct connection to festival goers, keeping them informed and up-to-date with schedules, announcements, and alerts. There is currently no better way to communicate last minute changes or announcements quickly and easily to event goers, whether they’re at the event or planning to attend.
  • Mobile apps provide a very economical avenue for additional marketing exposure. Add to this the ability to integrate with social media apps like Facebook, Twitter, and Foursquare and you have a very powerful marketing opportunity.

But of course, apps aren’t just about making life easier for the organizers. They’re ultimately created to benefit the users. Fortunately, in the case of a day-, weekend-, or weeks-long event, the benefits are many.

  • Instead of having to navigate a website on their smartphone, users have the advantage of viewing content in a way that makes most sense for the device they’re using, meaning much less frustration.
  • The convenience of having relevant information at their fingertips. No need to carry around a program that may even be out of date.
  • Making sure they’re up-to-date with the latest information, including last minute changes and announcements, allowing them to better plan their experience. The use of push notifications and alerts are great ways to remind users about events they tagged or to share important announcements and news.
  • App users can share their experience with others at the event and those not attending via Social Media integrated with the app.
  • Integrations with payment platforms like Dwolla, PayPal, or Square (someday) can greatly simplify the  purchasing of t-shirts, beverages, books, or tickets at the event.
  • For events with live music or speakers, live and/or on-demand streaming can allow those who can’t attend in person the ability to experience the event, too.

For these reasons and others, we think including a mobile app in the marketing plan for your next event makes a lot of sense.

What other things do you think would make these kinds of apps valuable? Go ahead and chime in with your comments.

 

Enhanced by Zemanta


Posted in Marketing, Mobile | Leave a comment

Storing Files in SQL Server using WCF RIA Services and Silverlight – Part 3

This is the third of three articles which will describe how you can create a Silverlight LOB application that stores and displays documents using FILESTREAM Storage in SQL Server 2008.

  1. Configuring FILESTREAM in your database and WCF RIA Services setup.
  2. Uploading and Saving files to the database from a Silverlight LOB application.
  3. Viewing files stored in the FILESTREAM from a Silverlight LOB application (this article).

The purpose of this article is to show how you can display documents stored via
FILESTREAM in SQL Server in a Silverlight application or ASP.NET website.

In the previous article we setup a gridview control which contained a listing of documents filtered by the selected folder (see image below).  This provided the means to allow users to upload and store documents.

Now that we have documents stored in our database it is time to provide a way to
display them back to our users.  Here are the requirements for our application.

  1. Only authorized users can view documents.
  2. A user can open multiple documents at once, in separate windows.
  3. Documents can be viewed via our Silverlight administrative application.
  4. Documents can be viewed via our public-facing website.

Given these requirements our approach was to create an ASP.NET page to handle
displaying documents.  This page will perform the following tasks to display a document.

  1. Validates that the user is authenticated.
  2. Reads the querystring to get the document id (PK) and document guid.
  3. Reads the Document record via the provided document id.  The guid is then used to further validate that we have the correct document.  This two prone approach reduces the risk of allowing a user entering random document ids to try to view documents which do not belong to them.
  4. If a valid Document record is found, the page validates that the authenticated user has sufficient authority to view the Document record.  This is done by looking up user roles and applying other security rules.  For example, users in account 100 should only be able to see documents tied to account 100.
  5. If the user has access to view the document then we can display the document to the user.  The page determines the type of document and writes out the
    document to the browser window.

Here is the code demonstrating the above tasks.

protected void Page_Load(object sender, EventArgs e)
{
    try
    {
        lblError.Text = string.Empty;
 
        //Make sure the user is authenticated
        if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
        {
            int documentID = 0;
            string documentGUID = "";
 
            //Get the Document Id
            if (Request.QueryString["ID"] != null)
            {
                if (Helpers.isNumeric(Request.QueryString["ID"]System.Globalization.NumberStyles.Integer))
                    documentID = Convert.ToInt32(Request.QueryString["ID"]);
            }
 
            //Use the GUID as a second line of security so people can't just type in document IDs to view documents.
            if (Request.QueryString["DocID"] != null)
                documentGUID = Request.QueryString["DocID"].ToString().ToLower();
 
            if (documentID > 0 && documentGUID != "")
            {
                MyDomainService service = new MyDomainService();
                MyApplication.RIALibrary.Web.Document doc = service.GetDocumentById(documentID);
                if (doc != null)
                {
                    if (doc.guid.ToLower().Equals(documentGUID))
                    {
                        if (validateDocumentSecurity(doc))
                            processDocument(doc);
                    }
                }
            }
        }
        else
        {
            lblError.Text = "You do not have security to view this document.";
        }
    }
    catch (System.Threading.ThreadAbortException)
    {
        //do nothing
    }
    catch (Exception ex)
    {
        Helpers.ProcessException(ex, "Page_Load - Document.aspx");
        throw;
    }
}
 
//Write out the document based on the type of document
protected void processDocument(Document doc)
{
    Response.ClearContent();
    Response.AppendHeader("content-length", doc.File.DocumentFile.Length.ToString());
 
    string pathLower = doc.Path.ToLower();
 
    if (pathLower.EndsWith(".pdf"))
        Response.ContentType = "application/pdf";
    else if (pathLower.EndsWith(".xlsx"))
        Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
    else if (pathLower.EndsWith(".xls"))
        Response.ContentType = "application/vnd.ms-excel";
    else if (pathLower.EndsWith(".docx"))
        Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
    else if (pathLower.EndsWith(".doc"))
        Response.ContentType = "application/msword";
    else if (pathLower.EndsWith(".zip"))
        Response.ContentType = "application/zip";
    else if (pathLower.EndsWith(".gif"))
        Response.ContentType = "image/gif";
    else if (pathLower.EndsWith(".tiff"))
        Response.ContentType = "image/tiff";
    else if (pathLower.EndsWith(".bmp"))
        Response.ContentType = "image/bmp";
    else if (pathLower.EndsWith(".png"))
        Response.ContentType = "image/png";
    else if (pathLower.EndsWith(".htm"))
        Response.ContentType = "text/html";
    else if (pathLower.EndsWith(".txt"))
        Response.ContentType = "text/plain";
    else if (pathLower.EndsWith(".msg"))
    {
        Response.AddHeader("content-disposition", "attachment; filename=test.msg");
    }
    else
        Response.ContentType = "image/jpeg";
 
    Response.BinaryWrite(doc.File.DocumentFile);
    Response.Flush();
    System.Threading.Thread.Sleep(1000);
    Response.Close();
}

In the processDocument method you will notice the different file extensions that we support.  Your application could have a different list, but the concept is the same.  Another key point in the code is where we write out the DocumentFile via BinaryWrite.

Bonus – Storing and Retrieving Outlook messages

One cool thing we found was that we were able to drag an email message from Outlook to be stored in our application.  Drag a message from Outlook to your desktop, then drag onto the drop area in the Silverlight application and the document is stored.  To view the message write out a Header (instead of ContentType) indicating that the file should be opened as an attachment.  The document opens up in Outlook as an email (with attachments) – very cool!

The nice thing about using an ASP.NET page to display documents is that you can launch the page from both Silverlight and ASP.NET.

That’s it!  I hope you found this series to be useful. I welcome questions and comments.  Thanks!

Chris Rouw, Far Reach Technologies

MCTS Silverlight 4, Developer

 

Posted in Silverlight, Silverlight - Technical, Uncategorized | Tagged , , , | 14 Comments

Storing Files in SQL Server using WCF RIA Services and Silverlight – Part 2

This is the second of three articles which will describe how you can create a Silverlight LOB application that stores and displays documents using FILESTREAM Storage in SQL Server 2008.

1. Configuring FILESTREAM in your database and WCF RIA Services setup.
2. Uploading and Saving files to the database from a Silverlight LOB application (this article).
3. Viewing files stored in the FILESTREAM from a Silverlight LOB application.

The purpose of this article is to show how you can setup a Silverlight application to allow users to drag and drop files on the application and have them automatically uploaded and saved via WCF RIA Services and the FILESTREAM in SQL Server.

Here is a picture of the screen design in our Silverlight application.

A few things to note:

  • A treeview control is used to display the folders
  • A grid control displays the documents for the selected folder
  • A rectangle control is used for the drop area
  • Documents can be viewed by clicking on the document title.  We will discuss how this is done in part 3.
  • An icon is used to display the file type of the document.  The extension of the file dictates which icon to use.

Here is the XAML for the drop area (I am omitting the rest of the XAML so we can focus on the drag/drop functionality).

You will notice a couple of things about this code.

  • The property “AllowDrop” is set to “True”
  • The Drop event is wired up (ImageDrop_Drop) to fire when files are dropped in the rectangle. This event will start the upload/save process.
  • The DragEnter and DragLeave events are also wired up. I find it is good for the user experience to  visually indicate something when hovering over the drop area.

Okay, now let’s look at the events we just wired up. The first two events, DragEnter and DragLeave are used to change the opacity of the rectangle. You can do whatever you want
here, but I prefer the subtleness of the opacity change.

Next is the Drop event. There are lots of moving parts here, so I’ll show the code
and then walk you through.

Here is the UploadImages method:

Some things to note about the Drop event and supporting code:

  • Multiple documents can be dropped at once. A Queue is a great tool to handle this.
  • We are using a class, UploadedDocument, to store information about each file being processed.  This will eventually be stored in the Document and File tables in SQL.
  • The file name and extension are pulled from FileInfo to be stored in the Document table. The extension property will be used to drive the file type icon in the grid.
  • The actual document is then streamed into the DocumentBuffer property, which will later be stored in the File table.
  • Once all of the UploadedDocument records are created then we create our objects in our ViewModel to be saved via WCF RIA Services.
  • For each file we create a File object, Document object, and AccountDocument object. The AccountDocument object is then tied to our main Account object. What we are doing here is adding a document to my Account.

The new objects are saved via WCF RIA Services and the databound grid is refreshed showing the file(s) which were added to the selected folder.

That’s it!  We now have documents being saved in our SQL database from our Silverlight application.

The third part of this series will show how to use a OpenFile Dialog to select a file(s) to be uploaded/saved as well as how to display the documents back to the user.

 

Posted in Silverlight, Silverlight - Technical, Technical | Tagged , , , | 22 Comments