Research Log of Web Science Students

Computer Science is not simply programming

Boo Facebook and Sprint 2 Start

leave a comment »

So after setting up the Spring framework and translating the login using Google ID into Java (from PHP), I can finally start working on Sprint 2. The goals for this sprint are:

1. Use Oauth to get a PLE user’s Twitter account profile.
2. Refactor code smells from the first sprint. There are lots of em! I am feeling quite uneasy already. Like this one:

bp

The problem with that is I don’t know how to inject beans from a static factory method. I tried the code in the book but that didn’t seem to work. Or is it just me?

So far, I’ve setup my unit tests and the data access objects since we will be storing a user unique access token which a user will get once he authorizes our app to access his twitter profile (no wonder it’s called oauth!).

unit_test

For now my Learner Data Access Object implements a BaseDao interface:

package com.hardwire.dao;

import java.util.List;

import com.hardwire.model.Learner;

public interface BaseDao {
public void insert(Learner learner);
public boolean learnerInDB(String email);
public List getAllLearners();
}

But that will have to change as my persistent classes multiply and inevitably vary. Grrrrrr this will be a tough one to refactor. But I am looking forward to it. This is where all my reading on Design Patterns kicks in.

BAD NEWS: Facebook has no Oauth implementation! And I guess they don’t intend to implement anytime soon. Instead they have the permissions API and we’ll have to work on that. A lot of people I know are on Facebook and wouldn’t it be nice if they could haul their profile into our webapp? Yes it would right? I just hate that we have to weather through their API instead of just using Oauth.

(sigh) The joys of developing software. 🙂

Advertisements

Written by Jose Asuncion

August 18, 2009 at 7:50 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: