Android Application Concepts: the Activity

Android development No Comments »

Android applications can be constructed from four different types of components: activities, services, broadcast receivers, and content providers. Of the four, the only one that you must use at least one of in every application (and the only one that I've had to use so far) is the activity.

I'm not going to even try to give a full explanation of what an activity is: the Application Fundamentals page on the Android Developers site provides a thorough (and rather long) explanation of activies as well as the other three components. So I'm just going to give a bullet-list overview to give you a conceptual overview of what an activity is.

Read more...

Developing Native Android Applications: Not as Hard As You Might Think

Android development , Android 5 Comments »

Two months ago, my boss asked me to try and build a native Android application based on the mobile website I had created for the university's annual Maryland Day festival. Both he and I are part of an IT initiative in our department tasked with figuring out how best to provide IT services to smartphone users on campus, and while we have in-house expertise in iPhone development, none of us were familiar with what would be involved in building Android applications. So he asked me to give it a shot.

Read more...

Quick Tip: Removing That Flash of Content Before jQuery Kicks In to Hide It

Web development , jQuery No Comments »

The focus of the jQuery UI Meetup I attended last week was on jQuery UI 1.8 and to work out some questions regarding future meetups, but of course some other topics came up as well. One of those other topics was the not-uncommon problem of having certain HTML content, meant to be hidden or styled by jQuery, briefly appearing in its raw form before the page has fully loaded and jQuery gets to do its thing. Apparently the term for this phenomenon is "FOUC", which stands for "flash of unstyled content."

Now, if you took it as an absolute that any and all uses of your web page had Javascript enabled, you could solve a FOUC problem by assigning a CSS style to the problem content that hid the content right from the get-go, and then you could use Javascript to reveal the content at the appropriate time. But such a solution would fail if the user had Javascript disabled--the content would never be visible to them--and it's contrary to the idea of progressive enhancement (the idea that the page is usable as is, but is enhanced when Javascript is available).

So in answer to the question on FOUC, Richard Worth (the speaker for the meetup) pointed us to the following blog post by Karl Swedberg:

http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content

The post provides a pretty good explantion of the technique (which is pretty simple), so I don't feel the need to explain it or add to it. Just thought I'd put it out there because it would be hard to find via a web search if you didn't know how to describe the problem and didn't know the FOUC acronym.

jQuery UI 1.8: The Newly Arrived, and the Coming Soon

JavaScript , jQuery 3 Comments »

This past Wendsday, I attended the first jQuery UI meetup at the Microsoft office in downtown Washington D.C. The sole presenter for the meeting was Richard Worth, one of the members of the jQuery UI development team, who spoke to us about the new features in the latest release of jQuery UI, version 1.8...and mentioned a few things that were planned for the next release.

Read more...

My Quick Reaction to Steve Jobs' "Thoughts on Flash" Letter

Technology , Miscellaneous , Adobe 7 Comments »

So just when I thought that all of the rhetoric regarding the Apple verses Adobe dustup over Flash had died down, Steve Jobs published an open letter entitled "Thoughts on Flash" on the Apple website today, ringing in yet another round in this boxing match.

I encourage those folks who care about this issue to read the letter in its entirety (rather than someone's summary of it).

Some quick thoughts I have on what was said (just my opinions/observations):

  • When Jobs dings Adobe on the issue of Flash being proprietary, he acknowledges that Apple has proprietary products as well, but that "we strongly believe all standards pertaining to the web should be open." Why, exactly? What makes it okay to engage in proprietary protections off of the web but not on it?
  • Jobs makes the point of mentioning WebKit to illustrate that Apple contributes to the open standards for the web.  He fails to mention that Adobe also makes contributions to web standards as well (the partnership with Mozilla on Javascript engine code comes to me) and that Adobe does have products in their toolset to allow developers to create websites using the latest advances in HTML, CSS, and Javascript. Adobe certainly has an interest in promoting Flash, but they continue to support other competing technologies.
  • It's interesting that Jobs implies that Adobe was tardying in providing support for the H.264 hardward decoder, yet it has been pointed out by a number of sources that Flash has long suffered from performance issues on Macintosh computers because Flash was not allowed to make use of the graphics accelerator on Macintosh chips.
  • Jobs states that any Flash sites that rely on "rollover" events to activate certain functionality would have to be re-coded in order to work on the iDevices. That may be true in some cases, but let's not forget that certain HTML and Javascript events also rely on the idea of hovering over a page element with a mouse, or dragging and dropping an item. The need to adjust to a multi-touch paradigm is not something that just affects Flash-based sites; it affects websites built with those open web standards as well. And just because something doesn't work quite right on a new device doesn't mean you should throw it out and start over from scratch.
  • I see the issue of allowing Flash to run as a browser plugin on the iDevices and the issue of letting Adobe provide a tool for developers to translate Flash code into a binary file that runs on the iPhone OS as two separate things, yet the way the letter is written it seems to combine the two issues. Perhaps it was done as a means of using the earlier arguments to sway some options regarding the Flash-to-iPhone compiler issue.
  • A lot of these complaints Jobs has regarding Flash (valid or not) can be or are being rectified. Instead of encouraging Adobe to address the things he has issues with, he "suggests" Adobe should drop Flash and stop criticizing Apple. That certainly implies to me that even an open, secure, battery-friendly, and efficient version of Flash would still never be allowed on the iDevices.
  • I have to wonder what he thinks this letter will accomplish. The fact that he wrote it at all seems to imply either some desperation or annoyance over the fact that that Apple's anti-Flash stance hasn't been as widely accepted amongst the industry and amongst consumers as he'd like.  Perhaps he's looking to gain a few more converts to his stance at the cost of making his opposition that much angrier with him?