The Supermarket API app

Posted by on Jan 17, 2012 in development | 0 comments

Image by .shock @ photoxpress

I recently started a small app – or at least the beginnings of an app that I may decide to add additional functionality to – and deployed it to my projects domain. It’s still pretty rough around the edges and I may or may not keep it and add to it. For now I’ve named it Django Supermarket.

The application uses an external API – the Supermarket API.

It’s not 100% fully featured. Right now it does a few things, but not everything you’d expect if it were a fully featured supermarket-cart-shopping-checkout kind of application.

For me, it fulfilled some curiosity behind using an external API, Bootstrap from Twitter and Django. For the most part I’d say that it turned out pretty well. I built it pretty quickly and I’d like to revisit it and do a few things differently, make a few things better and add a few things here and there to achieve some general improvements overall.

The application does the following:

  • First it allows you select your location using either Zip Code or State and City.
  • Then, you select the grocery store you would like to use.
  • After you’ve chose your location and store, you can start shopping for items and add them to your basket.

Data Storage

Keep in mind, I don’t really save much data in this app. I do store the States. Every time a new user enters the app I call for a fresh list of States served up by the API and store those in the event a new one might be added. I also use this call to make sure the external API is live.

The only other thing I store is the user’s preferences ( location and store info ) and items added to the cart – unless the items are removed from the cart.

The things I’d like to be able to change:

Facelift

Yep. It needs to be prettier. I do, in fact, know this.

Location

Overall I’d like to provide more a much more rich location selection feature – maybe add some intelligent location detection or some kind of HTML 5 location awareness. However, one thing the API does not provide is Longitude / Latitude. It’s either Zip Code or State and City. I imagine I could build something to be more region aware, but it would be nice if the API was better tuned to provide something by Lat/Lon.

Better Product Shopping Selection

The “shopping” screen never really has anything to display unless the user actually searches for something.

Something that would really be nice from the API is a “Recommended Items” method. For example, if I could provide a keyword in my request and the response provides a list of recommended items, that would be a nice addition. This could be done when the user has selected their store and moves to the “shopping” screen.

If there was an API call like this, another parameter could potentially be the storeid. The response could either send “recommended” items or items “on sale.”

Autocomplete

That doesn’t work very well, does it? Seems kind of weird to me that it always returns the same chunk of data regardless of what the user enters.

Pricing

Seriously? I have to pay to get the prices of items? Since I don’t intend to pay just to work on an app that I really have no intention of selling – this is just for fun – I need to make up my own prices.

Checkout

I may build this – I may not. Probably not. Most likely I will have moved on to the next app that’s interested me.

If you’ve had a chance to use it, please let me know what you think.

Read More

The weekend in which everything gets changed

Posted by on Jan 15, 2012 in blinkray | 0 comments

Image by dinostock @ photoxpress

It’s been a pretty productive weekend so far.

I’ve made a significant number of changes to the site that badly needed done. Luckily this weekend is a three-day weekend and that provides me with a generous chunk of time to do all the stuff I need to get it done.

I’ve wanted to make a bunch of changes since the first of the year. First off, I wanted to change the theme I’ve been using. There’s nothing wrong with the previous theme, I just wanted something new to look at. I also wanted to change the way I was putting project stuff out there.

Now I can say I have made those changes and I am ( for the time being ) happy with the outcome.

Previously I was using the Yoko theme. I like the theme for the mobile capabilities it has right out of the box. Using a child theme I created based on it, I was happy for quite some time. However, as every WordPress user does, after a while you decide that there’s something else you would like your theme to do or you just want a fresh look. For me it was the latter. I just wanted a fresh look – something new, something different.

Personally, I’d really like to do something else along the lines of the site’s look and feel. But, a guy’s gotta pick his battles and I decided to knock this one out early because the real meat of the change was ahead of me. WordPress theme changes, as easy as they are, were the least of my worries.

This year is really about change for me. For years I’ve been a software developer. I like it. It feeds, houses and clothes my family and I. I’m not attached to any one language, framework or technology. But, as I said, this year is about real change for me. I feel as if I’ve been stagnant – doing the same repetitive tasks for too long expecting the outcome to be different each time.

I remember hearing somewhere that that is the definition of psychotic behavior. I hope not! I don’t think I’ve achieved that just yet.

A while back I applied for an internal position where I work to do front-end development. I was “hired” for it. The caveat being that my position was replaced first before it would become official. Well, I’ve been waiting for quite a while. Although it’s not “official” at work yet, in my mind it’s official and it’s part of the way I define who I am now.

The job change also brought about a change in the way I do my work. Previously I was kind of a Linux guy. I’m no uber-console-jockey, but I’ve always preferred using a Linux box as my workspace/development machine. Now that has become a Mac – and I love it. I used to make fun of all those Apple fanboys, but now I will most likely join their ranks.

The other change to the site I made follows one of the goals I set for this site and why I chose to use Webfaction. At home I generally use Django for project development. Although there are a couple reasons why, I’m not going to espouse the virtues of Django development – that’s for another post entirely. I do a lot of stuff at home. Some of it I finish, some of it I don’t. That needed to change. My goal was to put the projects I do at home “out there.” It’s one thing to work on stuff and talk about it in a blog post, but it’s another to have it where people can see it. I want people to see it – that’s why I do it.

Previously I had my little project stuff ( which was predominantly non-application stuff ) out there in a sub-directory that consisted primarily of static html. Now all my projects are at projects.blinkray.com. I created a Django project to house everything. This, as I see it, benefits me in a big way since I can now add a heck of a lot more functionality to the apps I create, deploy the stuff much easier and maintenance is much easier. What’s more I’m no longer tying anything to WordPress.

So, I migrated all the projects to the Django project and I have a mini-app in there which was a bit of experimentation for me. A few weeks ago I was trying out Bootstrap from Twitter ( which is pretty stinking cool ) and I wanted to put together an app using it. However, I wanted to use an external API that would provide the data I needed for the app. I follow Programmable Web and saw the Supermarket API. I thought it might do nicely.

The app isn’t full featured. It’s still a work in progress. Some things are not available to me ( like product pricing ) since I have no desire to pay to use the API, but it’s a good start. I may build on it and I may not. I’m already beginning to think about another project that interests me using another API.

That’s it so far. Check out the projects and the new site.

Read More