webOS Nation Forums >  Stuff for your webOS Device >  webOS Apps & Games > puchk
puchk
  Reply
 
Thread Tools Display Modes
Old 05/17/2010, 06:30 AM   #1 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
I have 2 comments about puchk:

1. The version number inside the app could come from Mojo.Controller.appInfo.version.

2. Could the newest version be checked via the Palm RSS feeds? So that you don't need to run a web server for that.
sidamos is offline   Reply With Quote
Old 05/19/2010, 08:36 PM   #2 (permalink)
Member
 
Posts: 115
1. That is something that will be included in the next version.

2. I am looking at this. However, if it's run without a webserver, you wouldn't be able to set the custom text/html that is displayed in the update scene. The reason I like it this way is that you don't have to know a version ahead of time exactly what you want to say to the user when the update comes. If you have to set it ahead of time like that, you wouldn't be able to display release notes or the like. I may fork this and have two separate versions. I'm looking for the best solution.
jdforsythe is offline   Reply With Quote
Old 05/20/2010, 12:08 AM   #3 (permalink)
Member
 
Posts: 115
The update is halfway completed. Still working out exactly what to do with #2, but what I'm thinking is having 2 different splash-assistant.js files, one for having a web server, and one if you don't. Should it display your description from the catalog as the update text, if you're using the version without a server?
jdforsythe is offline   Reply With Quote
Old 05/20/2010, 12:59 AM   #4 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
No, I think this is not necessary. It would be fine, if it displays a localizable text "there is an update" or something like that.

I have not looked at the code, yet. Is it asynchronous, so the app can run while it waits for an answer? Does it have a timeout, where it "dies" silently? I would not want an error box, if the user has bad network connection.
sidamos is offline   Reply With Quote
Old 05/20/2010, 03:17 PM   #5 (permalink)
Member
 
Posts: 115
The sample app included in the source shows how I personally implemented it, though it could be modified to work in a different way if you like.

I have a disabled button on a splash scene. The button says "Checking for updates..." While this is shown, it's doing the AJAX call in the background. onSuccess it compares the versions and either pushes the update scene, if there's an update, or changes the button to "Continue" and enables it if there is none. onFailure it acts as though there's no update, so the button is enabled and changes to "Continue". This way if the user doesn't have a network connection, or something happens with the AJAX call, it will just show them the update the next time. I think this is better for the average user rather than displaying an error for something they probably can't fix anyway.
jdforsythe is offline   Reply With Quote
Old 05/20/2010, 03:23 PM   #6 (permalink)
Member
 
Posts: 115
BTW if you have Sabre installed, the new version just hit the catalog today and uses puchk, so you could see how it works from the user's perspective.
jdforsythe is offline   Reply With Quote
Old 05/20/2010, 04:32 PM   #7 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
OK, but if there is a real slow network connection, it will keep the user on the splash scene for a while, right?
sidamos is offline   Reply With Quote
Old 05/21/2010, 06:27 PM   #8 (permalink)
Member
 
Posts: 115
I have a new version of puchk that is being uploaded to the web site in a couple of minutes:
puchk JDF-Software.com

This new version has two different methods of using it:
1) no web server required, the app gets the most up-to-date version number from the Palm web site. You hard-code the update text into the app.
2) web server required. the app still gets the version number from the Palm web site, but you store the text/html you want to display to the user in the update scene on your web server, allowing you to show release notes or any other sort of message to the user so that you don't have to know what you want to say ahead of time.

The sample app (included in the package zip or tar.gz) is being uploaded right now to web distribution so you can test right on your device how this will work.

If there is a slow network connection, it will take longer to get a response, but only long enough to load a website. You're loading the app details page for your app (go to http://developer.palm.com/appredirect/?packageid=APPID on your computer and you'll get to the webChannel page - this is what the app loads). If there is no connection, puchk should fail nicely and pretend there's no update this time around.

Check it out and let me know what you think.
jdforsythe is offline   Reply With Quote
Old 05/21/2010, 06:32 PM   #9 (permalink)
Member
 
Posts: 115
The next version of puchk, when I get around to it sometime this coming week, will include assistant files to make it an asynchronous check that brings up a dialog box, rather than a synchronous check that pushes a scene. Just so you know. Any further suggestions are welcomed. I want this to be helpful to all developers.
jdforsythe is offline   Reply With Quote
Old 05/21/2010, 06:54 PM   #10 (permalink)
Member
 
Posts: 115
The update is now available. Check out puchk JDF-Software.com and the sample app http://developer.palm.com/appredirec...e.puchk-sample
jdforsythe is offline   Reply With Quote
Thanked By: rretsiem
Old 05/24/2010, 11:00 PM   #11 (permalink)
Member
 
Posts: 115
URGENT!!!

The newest update is now available.

puchk is now entirely asynchronous and will not interrupt the usage of your app!

It is also extremely easy to add to any new or existing app!

Check out puchk JDF-Software.com

and the sample app Palm USA | Palm webOS Applications | Mobile apps that go further.
jdforsythe is offline   Reply With Quote
Old 05/25/2010, 05:14 PM   #12 (permalink)
Member
 
Posts: 115
The newest version has been released. It includes fixes for the wrong version number displaying in the update dialog, and the poor string construction that stopped localization. Sorry, and sorry.

Also new news: there is now a github repository for puchk.
jdfsoftware's puchk at master - GitHub

Grab the source with the "Download Source" button at the right. Or pull from the repository.
jdforsythe is offline   Reply With Quote
Old 05/27/2010, 01:10 PM   #13 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
I just tried it out and found a problem:

It is not enough to search for "Version:" on the page. Our description text contains this string. ;-)

You should use a RegEx, that at least also matches the <br/> from the "Requires" line above the "Version" line.

One question about the license: Do I have to display your copyright somewhere in our app?
sidamos is offline   Reply With Quote
Old 05/27/2010, 06:46 PM   #14 (permalink)
Member
 
Posts: 115
Nice find! RegEx is being worked on.

As far as the license goes...
Quote:
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
I suppose if you interpret an .ipk to be a binary, you'd say you'd have to put the license and copyright notice in user-accessible documentation. I guess it's a binary, but once it's on the device it's source again, so that's a gray area..

I will look at other licenses. Suggestions?

Here's all the license needs to say:
- You're free to use, modify, distribute as long as you attribute by placing "puchk framework Copyright 2010 JDF Software http://www.jdf-software.com/puchk" in the source only, even if you're distributing binaries (ipk files, App Catalog, etc.)
- No warranty, liability, etc
- Can't use my name, company name, or framework name to endorse your product without prior written consent

If that's official enough for you, then go with it.
jdforsythe is offline   Reply With Quote
Thanked By: sidamos
Old 05/28/2010, 12:56 AM   #15 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
That's absolutely OK and fair.

You could use the LGPL license for example.
sidamos is offline   Reply With Quote
Old 05/28/2010, 12:59 AM   #16 (permalink)
Member
 
Posts: 115
New update committed to github. Includes RegExp matching to find the version number, hopefully eliminating the issue you had. As long as you don't have "Version:" followed by whitespace, followed by a string of numbers and .s, followed by {br/}, you should be okay. This should be good enough for the time being, since we aren't currently allowed to use HTML in our descriptions. I'm looking for a better long-term solution. Unwiredben had said they were looking at an API that would allow me to get the version numbers, but then the next day suggested I partner with PreCentral since they are already parsing the catalog feeds. So I guess that means they aren't going to make the API available.
jdforsythe is offline   Reply With Quote
Old 05/28/2010, 01:24 AM   #17 (permalink)
Member
 
Posts: 115
Quote:
Originally Posted by sidamos View Post
You could use the LGPL license for example.
Doesn't the LGPL also require attribution in the same way as New BSD? I was reading GPL, LGPL, MIT, Mozilla, and some others today. Don't want to go with MIT because it allows selling the work. The others seem to require the same thing as New BSD. Maybe I'll write my own modification of the New BSD? I dunno..
jdforsythe is offline   Reply With Quote
Old 05/28/2010, 08:32 PM   #18 (permalink)
Member
 
Posts: 115
puchk v0.5.1 now available at github: jdfsoftware's puchk at master - GitHub

Now has Ares code and a sample Ares app
jdforsythe is offline   Reply With Quote
Old 05/29/2010, 08:00 PM   #19 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
I thought, LGPL does not require the license info to be displayed IN the software, just in the documentation.
sidamos is offline   Reply With Quote
Old 05/30/2010, 12:40 PM   #20 (permalink)
Member

 
sidamos's Avatar
 
Posts: 610
The interval for checking is a very good idea! But I would prefer to prefix ALL puchk global vars with "puchk". This is not the case for this.interval.
sidamos is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0