08/23/2009, 05:47 PM
|
#1 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
Nutrition Facts is a nutritional info search tool that generates "Nutrition Facts" labels like the kind you see on the backs of boxes at the supermarket. Imagine having a simple, easy-to-read label for a McDonald's burger. Well, now it's doable.
I hope you like it. The API that I hooked into (FatSecret) was difficult to port so I had to perform a couple of work-arounds. Additionally, I'm admittedly not the greatest fan of their searching algorythms (which I have no control over). Nevertheless, it's a fully functional app that does just one thing, and happens to do it particularly well. Enjoy! Any feedback would be greatly appreciated. Some things I can change and somethings are built into the API. However, I'll do what I can. :-) You will be able to find it at: http://www.precentral.net/homebrew-apps/nutrition-facts TODO: "pretty up" the search results Last edited by alans17; 08/23/2009 at 07:23 PM. Reason: Attached screenshots |
08/23/2009, 06:24 PM
|
#3 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 145
Likes Received: 0
Thanks: 18
Thanked 25 Times in 16 Posts
|
Nope, the problem isn't on your end. It takes time after you submit the app for it to get approved and for the link to work. After, it should appear on filecoaster and on the homebrew apps gallery here on the site.
Thanks for this btw, can't wait to try it! |
08/23/2009, 06:58 PM
|
#4 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
Screen shots are now attached...
I hope you like it too, though! I'm open to suggestions and any offers to help improve it. It's closed source for now, but I would considering opening it up under the right circumstances. Last edited by alans17; 08/23/2009 at 07:00 PM. Reason: New screenshots attached |
08/24/2009, 07:11 AM
|
#6 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
It doesn't work offline. It's highly online-dependent. The search screen won't even appear if you can't get a network connection. I would give it a moment to let it load. Perhaps I should implement some sort of wait status or something. It's one of the unfortunate caveats of the API. There's no offline mode.
|
08/24/2009, 07:28 AM
|
#8 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
You're absolutely right after all. Even test HTML pages on my local machine that were working yesterday are now not doing anything. It's a problem of the API provider. There's a daily request limit, and I bet we already hit it. I will email them and ask them to raise the limit for me.
|
08/24/2009, 07:55 AM
|
#9 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
Upon further investigation, it looks like FatSecret (the people who wrote the API) have introduced a bug into their own system that is affecting me. Wonderful... I've already contacted them. We'll see what they say.
|
08/24/2009, 09:35 AM
|
#12 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
It's alive! It's noticeably sluggish, though. I'll see what I can do about that. Give it a little time to load the seach dialog, results, etc.
I'll work on speeding it up when I get home from work today. EDIT: Did I say "noticeably sluggish"? I meant "freaking slow"... I need some sort of message to indicate it's working so people don't just close it and walk off. Last edited by alans17; 08/24/2009 at 09:44 AM. |
08/24/2009, 09:50 AM
|
#13 (permalink) |
|
Member
![]() ![]() Join Date: May 2009
Posts: 4,565
Likes Received: 134
Thanks: 277
Thanked 1,366 Times in 664 Posts
|
I've been looking for an app like this. I was thinking about creating an app like this for myself, but the site I use for nutritional info is DailyPlate and they don't have an open API. I never even heard of FatSecret until now.
One thing I noticed while using the app is that the search parameters seem to be "OR" based, instead of "AND" based. For instance, if I search for "Red Robin Turkey" (to try to find Red Robin's turkey burger), it comes up with a bunch of turkey items. I'm curious, are you using the Javascript or REST API? |
08/24/2009, 10:09 AM
|
#14 (permalink) | |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
Quote:
I'm using the Javascript API and trying to shoehorn it into an app. I'm not familiar with REST (yet). However, the REST API doesn't include the very convenient pre-formatting for the nutrition fact labels, and I don't know if FatSecret would be open to sharing it with me. I can already dynamically look up labels by internal id, but using the Javascript API search feature steals away all my options. I may just build some sort of hybrid using REST search and Javascript results. I'll have to go that route if I intend to beautify the search results, anyway. Plus it would allow me the opportunity to build in a "return to results" feature by swiping back. It's kind of "all or nothing" here. The REST API is completely granualar and the Javascript API is almost completely fixed. |
|
08/24/2009, 10:11 AM
|
#15 (permalink) |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
I just hope everyone realize's it's not even 1.0 software here. It's still a proof-of-concept in some ways. It works, and (as far as I know) is bug free, but that doesn't mean it's without fault.
|
08/24/2009, 11:45 AM
|
#16 (permalink) |
|
Member
![]() ![]() Join Date: May 2009
Posts: 4,565
Likes Received: 134
Thanks: 277
Thanked 1,366 Times in 664 Posts
|
If you search for "Red Robin Turkey" on their web site, it comes up with one entry (the Red Robin Turkey Burger), but in your app, it comes up with a bunch of non-related turkey items.
When you pass in the search expression, do you pass in exactly what the user types (with spaces), or do you replace the spaces with "+" signs? I noticed that when you search on their web page, the query string has "+" signs in between each word. I don't know if that's necessary or not with the API call. |
08/24/2009, 11:52 AM
|
#17 (permalink) | |
|
Member
![]() ![]() Join Date: Aug 2009
Posts: 53
Likes Received: 0
Thanks: 6
Thanked 6 Times in 4 Posts
|
Quote:
BTW, even the search button is rendered via the API. That's how all-inclusive it is. :-S |
|
08/24/2009, 01:26 PM
|
#19 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
|
Nice start but... please use the REST API. It returns raw XML which is perfect because you can then use that to render it in a gorgeous all-MOJO interface. You can fetch the XML, stick it in a DOM node and then walk the entire document to get the stuff you need from it and present it nicely.
Funny, I've been looking into this but with CalorieKing and they didn't seem to have a free to use API. I didn't know about FatSecret having a completely free one. Very cool! Other idea I have for this: Save searches into 'my foods' so you can have these readily available whenever you want without having to perform API calls. You then don't even need to be connected to the internet to use parts of the app. |
08/24/2009, 01:34 PM
|
#20 (permalink) |
|
Member
![]() ![]() Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
|
Any chance of being able to search for a specific restaurant and pulling up all items from that restaurant? Or going into a submenu to then be able to search for items within that restaruant?
|
![]() |
|
| Tags |
| fatsecret, food, nutrition, reference, search |
| Thread Tools | |
| Display Modes | |
|
|



