
I finally took the plunge and picked up an iPhone a few days ago. While I was looking around for neat things that might be possible to do with it using Echo3, I ran into this page. It discusses the use of RFC 2397 (the "data" URL scheme) to embed images and even entire JavaScript/HTML applications into URLs. When you combine this with the fact that the iPhone now supports bookmarking web URLs and adding them to its "home screen", we have everything we need to create client-side Echo3 applications in JavaScript and package them up for offline iPhone use. That is, it's possible to create real Echo3 apps that can run even when the phone is out of network range or in "airplane mode".
There was one caveat: encoding URLs and applications using RFC 2397 is a horribly tedious process. My solution has been to throw together a proof-of-concept software development kit to take the pain out of it. You put in your JavaScript application and any other JS libraries you need, and out pops a ready-to-run offline Echo app for the iPhone. It can be downloaded from /content/echo3/iphone/echo-off-sdk.0.0.1.zip. Please bear in mind that this was written in one day with a cold and is thus the farthest thing from being polished.
For a simple proof-of-concept app, I've chosen the truly awful "Guess-A-Number" example. It looks just as ugly on the iPhone as it does on a desktop computer. Developing a library with a stylesheet and a few components to mimic the iPhone look&feel would go along way toward changing that. Additionally, in the case of "Guess-A-Number", it probably makes sense to change the text input field to a select field (numeric entry on an iPhone requires a few too many taps).
As well-engineered as the Mobile Safari browser is, it is necessarily different from a desktop computer's web browser. Echo3's "Pane" components, e.g., SplitPanes and WindowPanes, have fairly limited functionality on the iPhone in their current states. In my present opinion they are of no benefit to an iPhone-specific application's user experience. Other Echo components may need some teaking in order to work to their full potential.
The offline SDK allows the developer to configure an application build using an XML file. Below is a sample used by the NumberGuessApp:
<build> <title>#Guess</title> <icon>NLogo.png</icon> <!-- EchoLite.js has no splitpane/windowpane support, no IE6 support, and no ARC support. --> <lib>EchoLite.js</lib> <lib>NumberGuess.js</lib> <image-namespace name="NumberGuessApp.Images"> <image name="titleBanner">TitleBanner.png</image> <image name="congratulationsBanner">CongratulationsBanner.png</image> </image-namespace> <!-- <save-html>out/out.html</save-html> <save-url>out/url.txt</save-url> --> <!-- The redirect and start pages should be deployed to the server --> <save-redirect>out/redirect.html</save-redirect> <save-start-page>out/start.html</save-start-page> </build>
The lib elements define the JavaScript modules of the application. They'll be automatically compressed using Yahoo's YUI compressor.
The title and icon elements specify the page title and icon that will appear on the iPhone home screen.
The image-namespace elements of the build file will generate JavaScript code containing URLs that actually contain an image's data. In the above example, it will generate the following code:
NumberGuessApp.Images = {
titleBanner: "data:image/png;base64,gHFhwf7234....",
congratulationsBanner: "data:image/png;base64,f7ghw23HF7...."
};
You then use these objects to refer to your images, e.g.:
new EchoApp.Label({
icon: NumberGuessApp.Images.titleBanner
})
The save-start-page element generates a trivial HTML page that links to the application. It's useful to bookmark it on your iPhone for repeated testing.
The save-redirect element generates the page containing the URL-embedded JavaScript application. It simply redirects to the application's data URL. When a user adds this page to his/her home screen, it will show up just like a normal iPhone application.
To build an offline Echo app using this SDK, run Apache Ant with a command line like the following:
ant -Dbuildfile=example/offline-build.xml
The code above will build the Guess-A-Number example. To build your own applications, simply replace the "example/offline-build.xml" portion of the path with your own. Or if you prefer you can put the whole works in the IDE of your choice and run the main() method of nextapp.echooff.EchoOff, specifying the build file of the application as the first command line paramter in your launch configuration.
For more info on iPhone development, I recommend reading the Apple docs @ http://developer.apple.com/iphone. You'll need to use/create an "AppleID" to access that site.
And, again, please bear in mind that this is only a proof-of-concept which was quickly thrown together. That said, I'm happy to offer any help if you'd like to try it out.
Download: /content/echo3/iphone/echo-off-sdk.0.0.1.zip
Online Application Start Page: /content/echo3/iphone/start.html (NOTE: This application is tested only in Mobile Safari and Firefox. It will definitely not work in any version of Internet Explorer, due to its lack of support for data URLs.)
Comments
Air cargo Miami
From a long time I have been searching such Kind of things which should be good for me but I was not able to get even one of them but by searching and by passing by time lastly I got something to which I can trust and I can say that this one is the thing from which I can get a lot. now I came on the thing I like to thank to the blogger to give such kind of care to this cute blog and the commenters who gave us so many external knowledge Air cargo Miami
Air cargo Miami
Definitely cool. There is the caveat that it will not work to style arbitrary content, since you need to know the text content of the element and be able to rely on it being fixed assignment help Air cargo Miami
Brilliant post and useful information Looking forward to future posts in this field thanks A very interesting article, interesting ideas and a lot of good questions posed Thanks for your insight for the great written piece
Took me time to read all the
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It's always nice when you can not only be informed, but also entertained! I'm sure you had fun writing this article.
Pos Systems
portable swimming pools
This was really a helpful post for me .Thanks a lot for sharing such a nice post in this blog. I had also bookmarked this post for my future use. Thanks a lot!portable swimming pools
I really enjoy the article.
I really enjoy the article. It proved to be really useful for me and I am sure to all the followers here! Keep blogging.
<a href="http://www.aasiwins.com/">NBA Basketball Picks</a>
it works really nice... it
it works really nice... it is an interesting technology for smart-phones.
mixed wrestling
Vimax Penis Enlargement
Vimax Penis Enlargement Pills
Vimax Pills are the best and most reasonably priced penis enlargement pills on the market today. Men have a 94-98% Success Rate with the Vimax Pills.
http://www.official-vimax.com
Or if you prefer you can put
Or if you prefer you can put the whole works in the IDE of your choice and run the main() method of nextapp.echooff.EchoOff, specifying the build file of the application as the first command line paramter in your launch configuration.Credit Card Debt Relief It discusses the use of RFC 2397 (the "data" URL scheme) to embed images and even entire JavaScript/HTML applications into URLs. When you combine this with the fact that the iPhone now supports bookmarking web URLs and adding them to its "home screen", we have everything we need to create client-side Echo3 applications in JavaScript and package them up for offline iPhone use.
I am keen of reading and i
I am keen of reading and i always keep on searching like this sites where i can remove my reading thirst.This blog is so nice and wonderful.I have found lot of interesting and Knowledgeable stuff here.Shredding Services Orange County
I have found this blog very
I have found this blog very useful and very interesting.I highly appreciate your work and your precious views. Please keep posting.I am keen of reading and i always keep on searching like this sites where i can remove my reading thirst.Shredding Services Orange County
john
Thank you for sharing to us.there are many person searching about that now they will find enough resources by your post.I would like to join your blog anyway so please continue sharing with us
pet meds
Generic [filtered word]
Generic *****
Careprost
Took me time to read all the
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It's always nice when you can not only be informed, but also entertained! I'm sure you had fun writing this article.
house painting services
commercial painting services
Thanks
Great post mate! Thanks for your sharing! My site download movies for free, download movies for free online, download movies free. Thanks again!
iphone
i am not addicted to iphone and i dont like it.and i never like to do such operations on my phone but this are useful for my friend football kits blog
Could it work in Iphone4?
Could it work in Iphone4? DUI Attorney Virginia Beach What is the firmware version of this one?
There are certainly a lot of
There are certainly a lot of details like that to take into gadgets news consideration. That is a great point to bring up the lowongan kerja. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don't know if best practices have emerged around things like celebrity, but I am sure that your job is clearly identified as a fair game. Both boys and girls feel the seo impact of just a moment’s pleasure, for the rest of their lives.
This is a great post it was
This is a great post it was very informative. I look forward in reading more of your work. Brookfield Car Insurance Also, I made sure to bookmark your website so I can come back later. I enjoyed every moment of reading it.
flower delivery to switzerland
Thanks for everything you do on this blog. <a href="http://www.flowers2world.com/send_flowers_online/flowers_online_delivery_in_Switzerland.asp">flower delivery to switzerland</a>
nice!
very valuable blog. Thank's for good knowledge!
wrocław praga wrocław bus
e-papierosy, elektroniczny papieros
the postman
pozycjonowanie stron wrocław
This is a smart blog. I mean
This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. Youve got a design here thats not too flashy, but makes a statement as big as what youre saying. Great job, indeed.
>kid digital camera
>hair color ideas
>wedding dress
>discount baby furniture
>best wireless router
>cheap contact lenses
>coventry health care
>pregnancy symptoms
>single parents
>entrepreneur ideas
school scheduling software
I like the direction you are taking your blog. I’ll be bookmarking your site so I can follow along down the road. Hope to see more posts soon.
credit repair
.InterestingI layout on your blog. I really enjoyed reading it and also I will be back to read more in the future
>,<a href="http://creditrepairbay.com/">credit repair</a>,<a href="http://creditrepairbay.com/">credit problems</a>
cityville
Just want to say your article is stunning. The lucidity in your post is simply striking and i can assume you are an expert on this subject. Well with your permission allow me to grab your rss feed to keep up to date with incoming post. Thanks a million and please keep up the delightful work. cityville
Dance wear Toronto
Clever work and reporting! Keep up the great works guys I've added you guys to my blogroll. This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.thanks for sharing.
Dance wear Toronto
markkinointirekisteri
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
markkinointirekisteri
glo minerals retailers
The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and skin the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.
glo minerals retailers
reniu pure fiji
Found your weblog by accident for the second time these days so I considered I would have a nearer appear. I've just started producing my own blog site and modeling it right after what you have done. I hope mine is going to be as profitable as yours.
reniu pure fiji
sell my house
I honestly believe there is a skill to writing articles that only very few posses and honestly you got it. The combining of demonstrative and upper-class content is by all odds super rare with the astronomic amount of blogs on the cyberspace.
Sell my house
oh, i would surely love to
oh, i would surely love to own one.. i wish i'll have an iPhone myself.. hcg drops
i just checked my own
i just checked my own profile and i have 4 skype contacts in my list my profile says 5
this count does not include skypeout numbers only skype users.
Contemporary Rugs