Mobile App Source

The last few posts have been discussing CCV’s mobile app developed using PhoneGap.  For anyone interested I posted the source on GitHub.  Currently, the app is only released on iOS, but the start of the Android project is in the ‘develop’ branch. Feel free to use it anyway you like as long as it’s non-commercial. Enjoy!

Note: Unfortunately, we can’t support this code or answer in-depth questions about it.  If you have quick questions feel free to post them in the comments and I’ll try to answer them.

Mobile App Released

Our mobile app was released this weekend.  So far it has been well received.  To date it has been downloaded to 2300 devices.  Below is a quick overview of the features it contains with a short description on how each is integrated into our systems.

(note click thumbnails for larger images)

Application Home

Contains the main navigation with a single promotion.  We’re moving to a “This Week’s One Thing” promotion strategy in our communications team.  This will highlight that one thing each week.  If you touch the ad you get more details.  Currently, this ad is driven out of our Arena database.  This will soon be moved to the Rock ChMS.

About Us

This page of the app shows the location of each of our campuses.  It also has an invitation feature that allows an attendee to send a personalized email to their friends.  This page is a bit of a ‘filler’ page in my mind and probably will be replaced with additional functionality in the future.


This page displays a sample of the current prayer requests in our Arena database.  It only shows those that a person has OK’ed to be public.  Each is approved (and possibly edited for privavcy) by our prayer team. From this page you can also add a prayer request.  These requests are added directly into Arena.  This will in time also be transitioned into Rock.


The notes functionality is by far the most popular.  This allows attendees to take digital notes during the sermon.  There are a ton of features to this part of the app (fill-in the blanks, free form entry, etc.).  I’ll do a future post just on this feature soon.

Message Videos

The app lets you select and watch sermons directly on your mobile device with support for AirPlay.  This again uses Arena’s podcast functionality to drive the content.  We currently host our messages on Vimeo so it uses their HTML5 player.  We’re currently looking for a better video network.  If anyone has some good recommendations please post in the comments.

Group Finder

This portion of the app allows someone to use their current location, or enter in an address, to find the closest Neighborhood Group (aka small group).  It also allows them to register for a selected group.  The usage of this feature has surprised us.  In the first two days over 25 families have registered for a group.

On-line Giving

Due to the fact that Apple does not allow donations in a native app we redirect the giving button to our website.  We have created a new highly responsive (thanks Titter Bootstrap) page that is very interactive.  If someone wants a peak at what the giving UX in the Rock ChMS will look like this is it. I hope Apple allows for a more native experience in the future.

For the most part that is the app.  I’ll be posting a couple of deeper dives into some of the features and code in the near future.

Evolution of a Mobile App

We’re close to rolling-out CCV’s first mobile app.  It’s been a long journey.  Before this weekend’s roll-out I thought I might walk through the project’s journey with all of it’s twists and turns.  It all started out over a year ago when we got serious about needing a mobile app. Our first step was to look at the church specific mobile app packages. These services can quickly provide a great looking app for a reasonable price.  Our two concerns with these services were:

  1. Most don’t have features that in our mind get people to come back and use them.  They don’t fell sticky.  They may get downloaded, but how many consistently get 3-4 uses a month per attendee?  I look at the feature list and don’t see something that would make me return.
  2. Starting with these apps was an option we considered, but most get deployed to the App Stores under the vendors account.  We felt that if we did this it would be hard to change course in the future.  By deploying under our own account we can quickly replace the app with anything we like in the future.

We also spent some time discussing what platforms we would support.  We ended up deciding that we needed to support both Apple iOS and Android on both the phone and tablet medium.  Part of me would have rather stuck to just iOS, but looking at the sales metrics, that’s just not an option. Therefore, we decided to embark on a quest to write two native apps (one for each platform).  Our initial features for our 1.o release included:

  • Announcements
  • Prayer Request (both praying for and submitting)
  • Group Finder
  • Sermon Video Streaming
  • Digital Sermon Notes
  • About Us Info (Campus maps, invite a friend etc)

As we’re pretty limited on resources with our current Arena projects and writing for the new Rock ChMS, development was  limited to my free-time.  I started out on the iOS app and go pretty far.  About 60-65% of the way through though I came to the conclusion there was no way with our current resources we were going to be able to write AND support two native platforms.  I quickly pinged a few outside resources to get a picture of what it might cost to have someone else develop the apps for us.  The quote I got back was $120K for both platforms.  That was not an option…

We quickly huddled and formed a new strategy.  We decided to experiment with HTML5/CSS3/Javascript to native wrappers like PhoneGap.  I wrote up a quick prototype in PhoneGap w/ jQuery Mobile and found the progress to be very quick and a good match to our current skill-set.  I have to admit it feels like cheating.  There are a couple of downfalls to this approach.  First of all the apps don’t have a completely native feel.  To be honest the normal user probably won’t notice, but those with a technical eye should be able to spot the difference.   Secondly, the PhoneGap apps are a bit sluggish.  Again the average person won’t notice the difference, but there’s no question that the iOS Webkit control is a bit slow in rendering.  Finally, while the frameworks (PhoneGap and jQuery Mobile) are impressive there still are some bugs. Most of these we were able to work around, but there still are a few known bugs that are impacting the app (they’re small through).

In the end the productivity savings more than made up for the lack of a truly native application.  This is our 1.o deliverable so hopefully we’ll learn a lot through the roll-out.  So far the application has received high marks from our internal testers.  In the end though I do feel like we cheated a bit.

I’ll post more once the app is released this weekend.

T4 It Ain’t Just a Movie

image I’ve been diving into some of the new Microsoft programming technologies of late (MVC, Entities, Linq2Sql, etc.).  It’s been quite a trip, read frustrating, but I’ve enjoyed the learning.  One thing I just learned about was the T4 templating capabilities in Visual Studio.

T4 is basically CodeSmith built into Visual Studio.  With the integration you can do some pretty cool things, like auto-generating classes that get immediately added to your project.

Here’s a intro video that’s pretty good (except for the random use of VB and C#).  Also here’s a T4 editor extension for Visual Studio to add syntax highlighting.  Finally, here’s another blog with some good resources and samples.

Based on the price alone (free) it might be worth the move to T4.

Can You Ever Have Too Much Innovation?

image I love new things… new technologies, new ideas, new… everything.  When it comes to innovation I think Microsoft has been dropping the ball for years (dare say since the dawn of the Internet).  That is in all areas except one… their programming frameworks.  There in the last five years the .Net Team has been on an innovation binge. 

Not only has the framework moved through rapid innovation (1.0, 1.1, 2.0, 3.0, 3.5…) but they’ve also release so many related technologies, Windows Presentation Foundation (WPF), Silverlight, MVC, Linq, Linq to Entites, Windows Communication Foundation (WCF), Micro Framework, and on and on…  What’s a developer to do?

I wonder though if all of this is a good thing.  Are other developers as stress out as I am about falling behind (anyone have kids too)?  I spent the Christmas break working on a MVC / Linq to Entities application that uses jQuery and is managed in SVN.  I was a ton of fun learning all these new technologies, but at the same time I felt a sinking feeling as though I was struggling to stay afloat, but knowing that once work started again I’d have a tough time keeping up the pace.  Man… I don’t think I’ve even master all of the functionality in .Net 3.0 yet…

I’m not saying the Microsoft should slow down in this area (or maybe I am)… but at the very least I think they need to be aware of the psychological effects the rapid innovation is having on their developer base; especially with the confidence of their skills.  I’ve entertained the thought of switching over to Rails for PHP just to catch my breath (plus I could ditch my PC).  But alas… I think I’ll stay… for now… 

Better get back to that app…

T-SQL Improvements in SQL Server 2008

image I’ve talked before about some of the great new features coming in SQL Server 2008, especially spatial queries.  Here’s a few very cool additions to T-SQL.  None are game changing, but they are some real nice productivity improvements.

  • Assign variables at time of declaration (this has always been a pet peeve of mine)
        DECLARE @HomeAddress varchar(200) = ‘123 Elm Street’

  • Compound assignment operators
        @DECLARE @Counter int = 0
        SET @Count += 1
  • Multiple inserts in one statement
        INSERT INTO TestTable VALUES
            (1, ‘Test 1’), (2, ‘Test 2’), (3, ‘Test 3’)
  • Merge statements that allow you to merge two tables into one without duplicating data.

These tips were outlined in the most recent issue of SQL Server Magazine.  If you’re a developer and don’t get this magazine you might consider a subscription.

SQL Server Indexes

I was reading a copy of SQL Server Magazine the other day and ran across an ad for Idera’s SQL Defrag Manager.  I decided to install the demo and take a look at our Arena database.  Looks like quite a few indexes that could use some rebuilding.  I’m really impressed with the product.  Not only does it provide some nice visualizations of the state of your indexes, but it also provides some great tools to intelligently rebuild your indexes over time.


The only problem is the price tag.  While $1,100 is certainly a fair price, it’s a bit steep for us and our needs.  I did a bit of research had found a script I could modify to rebuild all of the indexes in the Arena database.  It’s a bit heavy handed as it rebuilds all of the indexes whether they need them or not, but for a database our size it’s probably OK (the script could be modified to check the fragmentation level too).

If you’re interested here’s the script.  It assumes your database name is ‘Arena’.  You’ll probably want to run this after hours to avoid any performance issues.


   2:  DECLARE @Table VARCHAR(255) 
   3:  DECLARE @cmd NVARCHAR(500) 
   4:  DECLARE @fillfactor INT
   6:  SET @fillfactor = 90
   8:  SET @cmd = 'DECLARE TableCursor CURSOR FOR SELECT table_catalog + ''.'' + table_schema + ''.'' + table_name as tableName  
   9:                  FROM Arena.INFORMATION_SCHEMA.TABLES WHERE table_type = ''BASE TABLE'''  
  11:  -- create table cursor 
  12:  EXEC (@cmd) 
  13:  OPEN TableCursor  
  15:  FETCH NEXT FROM TableCursor INTO @Table  
  16:  WHILE @@FETCH_STATUS = 0  
  17:  BEGIN  
  19:     SET @cmd = 'ALTER INDEX ALL ON ' + @Table + ' REBUILD WITH (FILLFACTOR = ' + CONVERT(VARCHAR(3),@fillfactor) + ')' 
  20:     EXEC (@cmd) 
  22:     PRINT @Table
  23:     FETCH NEXT FROM TableCursor INTO @Table  
  24:  END  
  26:  CLOSE TableCursor  
  27:  DEALLOCATE TableCursor 


The only catch to this script is that if it hits a deadlock it will stop in it’s tracks.  I’ll have to look at how to handle that gracefully in the near future.  In the meantime we’ll probably run this script weekly.  If you can afford the money though the Idera tool is definitely the way to go!

AIR Springs a Leak (at least for me… maybe)?

image I’ve been playing around with Adobe Flex/AIR for the last few days.  There’s a lot I like about the product and direction.  My favorite feature is that you can create a cross platform desktop application that is a cinch to deploy and is very very engaging from a design perspective.  But…here’s a few issues I have….

  1. The documentation and samples leave a bit to be desired.  My first app (after Hello World) was to consume a basic web service and display it’s results.  There’s several ways to do this, but the documentation is a bit weak in showing you all the options.  They give you a few examples, but they never quite do what you want…
  2. Bit buggy… in playing around things still seem a little shaky… one example.  I pointed Flex to a WSDL and had it create ActionScript objects for me.  The main object contains custom instructions on how to use it from ActionScript and MXML.  Problem is that custom sample code it provides didn’t work (had some case issues with some of the method calls).  I was able to resolve it, but it kinda stinks with the code they generate for you doesn’t work.
  3. This one might be picky, but it’s a deal breaker for Arena development (at least the way it stands today).  Currently, there is no way to call a Web Service that is secured using Basic Authentication.  Doh!  All of our Arena Web Services are protected in this manner.  we could open them up and require that a person’s username and password be pass on each call (I’ve seen a few Web Service APIs do this).  I’ll have to talk to David and see what he thinks…

So I we could go back to plan A, Silverlight… but it can’t create a desktop application.  From what I’ve read and seen (and correct me if I’m wrong), Silverlight is meant to be run from the browser.  While this is fine for most things, I was hoping to create a small desktop app that would allow for simple searches.  Something that I was planning on building as a Vista/iGoogle/Widget.  AIR is a much better alternative if being cross-platform is important (and it is). 

I do have to say Silverlight’s XAML XML presentation layer is much more powerful than AIR’s MXML.

I hope we can still figure out a way to use AIR, I still think it’s a viable option.  If not now, perhaps in the future.