Posts Tagged ‘gps’

COTW: Facebook Places two-timing

Monday, August 23rd, 2010

ACTION:

Last Thursday morning Facebook announced their location based application: Places.  One of the surprises in the announcement is that the most popular existing location based services are able to integrate with Facebook’s application and share data.

REAL SCENARIO:

I believe that Facebook will play nice and work closely with the competition until Facebook is able to become the dominant player in the game.  Then as the competition introduces new features and continue to evolve Facebook will slowly begin to not support those new features and use the ‘extraneous’ features as a reason to stop supporting that service altogether.  Since most people are already on Facebook, when the user is required to suddenly have to start checking in with Facebook AND another service, well, we all know how lazy users can be.

Till Next Time

updating symfony form values after submitting

Friday, January 1st, 2010

One thing that’s made programming on symfony very aggravating has been dealing with the forms.  Some sections of the forms are not well documented.  The main issue that I have with this at work is that we deal with GPS coordinates and the users enter their coordinates in degree-minute-seconds format but the database saves them in degree-decimal format.

I had googled for a solution to this problem before, but had not found anything to guide me to the answer.  The couple answers I had found were not very clear on getting it to work.  Till I found this.  Following these guidelines I got it to work on a test deployment of symfony.  Code below:

class Blog extends BaseBlog {
 
	/**
	 * Initializes internal state of Blog object.
	 * @see        parent::__construct()
	 */
	public function __construct()
	{
		// Make sure that parent constructor is always invoked, since that
		// is where any default values for this object are set.
		parent::__construct();
	}
	/*
	 * this function overrides the BaseBlog::save function to allow
	 * changes to be made to the object before saving to the database
	 */
	public function save(PropelPDO $con = null)
	{
		$this->setCommentCount('11');
		return parent::save($con);
	}
 
}

Till Next Time