Archiv for ‘rails’


published: October 1st, 2008

Android - Ruby on Rails app, setup and HttpClient hello world

OK, onto the initial post for my foray into Android and Ruby on Rails.  This basic application assumes you have Ruby on Rails 2.0 installed using MySQL and the 1.0 Android SDK.

I am by no means an expert in Ruby on Rails, and am still learning the Android API and SDK, so if any of you ninjas/rockstars/experts see something that needs correction or a better way of doing things, I’d greatly appreciate the tips.

Other posts on this subject include:

Part 2- SAX Parsing

Part 3 - Using Android Cursors

(more…)

published: September 30th, 2008

Android-Rails app intro

I’ve been meaning to write a series of blogs for awhile now which walk through steps to create a client-server application involving an Android client and a Ruby on Rails server.  This is a learning experience for me and will help me out on a couple of ideas I have for an Android application that utilizes a server on the backend to store and process data.

The following features define the application:

  • Ruby on Rails Server
    •  Allow for login with username and password
    • Allow user to CRUD projects via REST
    • Allow user to CRUD tasks for a project via REST
    • Allow user to invited other users to project via REST using the new users email
    • Allow user to assign tasks to other users via REST
  • Android Client
    • Allow user to login with username and password
    • Allow user to login using quick access once a username and password have been provided
    • UI to CRUD projects
    • UI to CRUD tasks for projects
    • Periodically ask server for new projects and tasks

So that’s the basics, not sure how many posts this will take, or how quickly I will get on it, but it’s a start, and sometimes starting is the hardest part!

published: June 25th, 2008

Rails hint, or at least a reminder for myself

Here is some coding I used to set up two simple forms to edit attributes for a simple Project/Task feature of my new application. For the life of me, I was having a hell of a time figuring out how to default the UI elements to show the current value for the model object.

I finally got it by setting adding the “task.complete” and the “task.assigned_user_id” values of the check_box_tag and select_tag.

Still to do, make the calls to the controllers restful and add in AJAX so it doesn’t refresh the entire page.

<% form_tag (:controller => 'tasks', :action => 'task_completed', :id => task) do %>
Complete? <%= check_box_tag :completed, '1', task.complete, :onchange => 'submit()' %>
<% end %>

<% form_tag  (:controller => 'tasks', :action => 'change_assigned_to', :id => task) do %>
Assigned to: <%= select_tag (:user_id, options_for_select( @users_select, task.assigned_user_id), :onchange => 'submit()') %>
<% end %>

published: June 25th, 2008

The next big thing…or at least, my next big thing

So now I’m onto my next side project after completing my Android application and submitting to the Android Challenge (I didn’t get selected for the top 50…oh well, next time maybe).  I’ve been working on a number of Rails apps and have deployed a couple in beta states.  While going through this process, a number of similarities have emerged and now I’m onto my next big idea which is a combination of my endeavors.  I also want to work in what I learned while working on Android, and have a mobile application along with the web app.

When I get a little closer, I’ll post a link and let everyone play.  If I get enough interest I’ll put together a pricing/billing model and maybe get lucky enough to be able to step out on my own, away from the 9-5 job I currently hold.