I finally got around to actually looking at your article in detail
last night, and I have to criticize your article a bit.
PLEASE take this as helpful criticism. I mean no offense. And by the
way- what I wrote below is as much for EVERYONE writing articles on
Google as it is you.
You made the same mistake I keep seeing over and over on these Google
pages. –
You forgot who your audience is. Savvy programmers might catch on at a
glance, but you aren’t writing for the savvy. You are writing for
beginners and every article should explain step by step and in detail
everything.
You made too many assumptions and you based your article on your
gadget specifically. I know a lot of authors do that, and it is
helpful to have a gadget to look at to follow the article. However,
your article has code snippets that to be honest when I first saw made
no sense. I had no clue what you were doing. So I got your gadget and
tore it open and then I understood. You created pages called
fetcher.js and parameters.js and had these in a folder called Objects.
That may have been obvious to an experienced coder, but I’m not that.
I had to get your gadget and study it to figure that out.

Articles should not require the reader to get someone’s gadget to
understand. An article should be understandable as a standalone
tutorial, and the gadget can be extra.

Going back to your article, write it the way a beginner will recognize
and understand. Combine your elements onto main.js or EXPLICITLY tell
the reader your example has things spread across three pages and give
a good reason why. Point out what difference it makes, and keeping
mind the readers are beginners, say things like “don’t forget to
declare your new fetcher.js in your main.xml”.
Honestly, I’m just trying to help you improve the article a bit. It
was helpful and gave me a good starting point, but I wasted half the
evening trying to figure out what the heck before I caught on to the
parameters.js. I doubt any beginner is going to know that setup. For
your article, just declare variables on main.js like a beginner would
understand.

As I said, your article gave me a good starting point. As soon as I
got it working I realized this would fill the db table with tons of
useless data. So I redid it, some minor changes in the gadget and a
different approach with the mysql and now the table has “installed”,
“installedDate”, “removed”, and “removedDate” fields being updated
based on “gadgetID” key. There is also a “status” field that gets
marked as “active” or “inactive”. This keeps data entries minimal, and
more organized. I put a function in the onClose of the gadget to
signal the “removed” and the dbquery looks for matching entries based
on the gadgetID to either make a new entry or update an existing one.
But it still isn’t that great. Every time the user closes the desktop
app or even reboots, it generates a new ID. My setup will give me an
accurate real-time view of how many gadgets are active, but I’d prefer
not to have a new entry for the same gadget/user. I seriously want a
want to store a gadgetID value more permanently, or possibly pull
something from the computer that would always be unique- like the cpu
ID or MAC address. So far, I haven’t found anything that leads me to
believe that is possible. Probably a privacy concern. I’m looking into
user prefs- but I'm not sure if that'll work either. Anyway, thanks
for a good idea! It gave me a solid starting point.

Any input on the best way to store a value permanently?
Austin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to