Tag Archives: Mobile

Absinthe Dilution Faerie 2.0

Absinthe Dilution Faerie

Absinthe Dilution Faerie version 2.0 is now available for free via Google Play!

“Absinthe Dilution Faerie” is a small application which calculates how much water one should temper a dose of absinthe with in accordance with the ABV percentage as laid out by Michael Meyers of The Wormwood Society.

So what’s new in this version? Quite a bit!

  • New application imagery
  • Default database of absinthes
  • Clicking upon an absinthe will load it into the calculator
  • Ability to add your favorite absinthes to the database
  • Database management: add/update/delete
  • Include tasting notes for each brand of absinthe

So… go download and louche up a few ;)

The application was compiled with PhoneGap Build and written with HTML, CSS, and JavaScript. Libraries used include jQuery Mobile and HTML5SQL.JS. Also – please welcome Midge back as the faerie, herself!

PhoneGap and HTML5SQL.JS

I’ve been doing a lot of digging around in PhoneGap lately. This dovetails nicely with my Edge Animate and Edge Reflow work – but I also see it as an extension of my work with Adobe AIR and Flash Player on mobile.

One of the interesting things about working in web technologies with modern browsers (including mobile), is that we have so many choices due to fragmentation or simply because of competing ideas. I’ve found many of the solutions for web storage on mobile to be either lacking or frustratingly complex. A few weeks back, I rand across a nice solution to simply all of this and have adopted it into my workflow.

HTML5SQL.JS makes working with local databases in a PhoneGap app super easy. This video demonstrates how to use it within a project.

Also – you can check out my progress for this app on the project Github repository.

PhoneGap Starter (for PhoneGap Build)

Most PhoneGap “Hello World” examples make you go through the task of configuring PhoneGap on your system and making sure your system PATH is set with Android Virtual Device support and a bunch of command line interfacing… and it is CONFUSING for newcomers!

What if you just want to write your code… test your code in browser… then compile everything with PhoneGap Build services?

Well, then you read this tutorial!

ripple

To complete this example, you will need:

  1. Be sure you have some sort of web server running locally. I recommend XAMPP as it is cross-platform and has probably more than you need to get started. Install it and make sure it is all working. The reason you will want this is that you can better test via browser emulation in this way and will avoid XMLHttpRequest cross-origin issues.
  2. http://localhost/ in the browser should pull up a page. Make sure this is working.
  3. Install an IDE. It can truly be any IDE that can edit HTML/CSS/JS. I’m using Dreamweaver in this example. Honestly – any IDE – Notepad works.
  4. Create a new directory within your local web files. For me, this is C:\xampp\htdocs\phonegap and this will map to http://localhost/phonegap/ in the browser.
  5. Have a look at the zip package I have provided. You will find index.html and cordova-2.6.0.js and a config.xml– this is ALL YOU NEED! Place these files within your phonegap directory.
  6. Run this within the Chrome Ripple emulator. You’ll see an alert fire.
  7. Feel free and play with any other API’s or CSS styling or whatnot.
  8. You can package these files up in a zip and send them up to PGP to compile.
  9. EASY!

pgbuild

Not bad, right? :)

Here’s the index.html code:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <title>Hello World</title>
        <script type="text/javascript" src="cordova-2.6.0.js"></script>
		<script type="text/javascript">
			var showMessageBox = function() {
				navigator.notification.alert("Hello");
			}
			function init(){
				document.addEventListener("deviceready", showMessageBox, true);
			}
        </script>
    </head>
    <body onload="init();">
        <p>content</p>
    </body>
</html>

Some Clarity around Flash Platform Changes

Before this evening, this post was going to read as another grueling defense of Flash technologies… Here’s an except from my earlier draft:

I have always used Flash when appropriate, to do things which were either impossible with HTML or at least would be a major pain. I’ve developed many applications which use Flash technology – they do so in a modular way. Will this change in the near future? Not at all. For functionality that requires technology beyond what HTML can provide, I am going to use Flash. Build a website? Use HTML. Will HTML continue to improve? Sure it will… and if Adobe can provide some killer tools and frameworks around HTML in the future – that would be pretty cool too.

Is Flex Dead?

So what changed? This evening, the Flex team updated their article from last week with a slew of excellent new details on exactly what is going on. I suggest anyone who is even remotely interested in Flex have a look over at Your Questions About Flex. Some of the hi-lights that caught my eye include the following bits and pieces…

Not only the Flex SDK is being open sourced, but also BlazeDS(!), the new Falcon compiler, testing tools, new Spark components, and…

Falcon JS, an experimental cross-compiler from MXML and ActionScript to HTML and JavaScript.

Whoa! Write AS3 and compile to HTML/JS – getting around the need for Flash Player for certain applications? Sure!

Adobe will also have a team of Flex SDK engineers contributing to those new Apache projects as their full-time responsibility.

Similar to their commitments to jQuery – this is really good news as Adobe ought to keep contributing to Flex. They have a lot to contribute!

The Apache model has proven to foster a vibrant community, drive development forward, and allow for continuous commits from active developers.

Having all of these projects (including PhoneGap) under Apache is a good move. The Apache Foundation is respected and established. Flex will not shrivel and die there – Adobe has now made some truly AWESOME contributions to the open source community!

The previous statement of HTML being the “long-term solution for enterprise applications” was also clarified:

Flex has now, and for many years will continue to have, advantages over HTML5 for enterprise application development

What about the roadmap shown at Adobe MAX this year?

Previously communicated road map features, such as enhanced code editing, real-time error highlighting and compile-as-you-type support will be available to both ActionScript and Flex developers.

So there we have it! Flash Builder also gets some mention with Adobe remaining committed to the tool – also a deep commitment for Flash Player on the desktop and the AIR runtime for desktop and mobile. There is a bunch of more info in the article, so be sure to give it a read.

I’d also recommend reading over Brian Rinaldi’s post, as it provides some additional perspective: Moving Forward with Flex and Flash.

And honestly, if you haven’t read Mike Chambers post yet… you really should.

In happy addition: I’ve gotten some rather heartening news from the Adobe Community and Education teams which will wait until another day ;)

More Thoughts on Mobile Flash Player and Adobe

So, basically – here is what is happening:

  • Adobe is halting development on the mobile web browser version of Flash Player for Android. This effectively places Android on the same level as iOS so far as Flash Player goes for the future.
  • They are doing this as part of a massive reorg to shift resources to mobile AIR on Android and iOS. Mobile AIR is the solution I have been working with in my books, recorded materials, and as a developer. I have never targeted the mobile Flash Player.
  • IMPORTANT: Flash through mobile AIR on iOS, Android, Blackberry is going nowhere and is being given more resources. Again, this is what I’ve been working with – not mobile Flash Player in the browser.
  • Mobile Flash Player 11 is not going away on Android – but if Android handsets want to continue with new versions, they must license the source and compile for their customers. It will remain available for download and use in the meantime.
  • Mobile Flash Player source is being licensed to those who wish to compile for their own platforms (like Blackberry does now). So mobile Flash Player may not be going away at all. Depends on partners.
  • Adobe is also furthering efforts in HTML through projects like Dreamweaver, jQuery and WebKit contributions, Apache CallBack (PhoneGap), and notably their HTML/CSS/JS motion and interactivity solution; Adobe Edge, of which I am intimately familiar. I would like to think I have a balanced perspective in all this.
  • Adobe has received, over the past 36 hours, MASSIVE backlash from customers and the community. Many are hoping for some sort of policy reversal, though most of the pain has come from a really AWFUL PR job by Adobe themselves and the resulting fallout by media outlets who do not get their facts right, leaning instead toward sensationalism.
  • A number of Adobe employees in the education, evangelism, and runtimes teams have reached out to me. I appreciate the willingness to talk and good-will exhibited by these individuals.

Feel free to share this with anyone who wants more plain facts than press outlets are spouting.