Monday, July 15, 2013

[Rails] Re: Need guidance for a simple search Rails application



On Monday, July 15, 2013 12:30:45 AM UTC-4, Arslan Farooq wrote:
Hi,

I am learning Ruby. In the meantime, I have to make a simple app for a small company that I know how to make in PHP and MySQL.

I have not started learning Rails yet (first I want to finish the Ruby book I have started). But I was thinking if with a little guidance may be I can make this app in Rails. If I can do it, that will be great.

The requirement is like this: 

  • I am given an Excel file that has 11 columns. Each row has information about one item. Each row is unique. Right now the company uses this excel file to search for required information, and they want me to make a web app for this. 
  • This Excel data and future data will be inserted into the database in bulk, using CSV imports. I think there is no need to break the table, and our app can just have a single table to search from. 
  • The search will be done using 2 columns from the table.
  • One person will have the privilege to edit searched records.
  • Only 4 people will be using the app for now. There will be no option to sign-up for a new account.

  • The home page will have the search form (two fields, user can fill both or one).

I will appreciate (a lot) any pointers, guidance and help with this.

I can make this in PHP, but I'd love to make it in Rails.

-- arslan

Assuming you have little Ruby experience and no Rails experience I think your best plan would be to familiarize yourself with RubyOnRails tutorials at: http://guides.rubyonrails.org/getting_started.html (a full tree provided by the RoR development group covering major Rails components), and: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book (a very good book by Michael Hartl with the apt sub-title "Learn Web Development with Rails").  Both are free online.

Your application looks like a good one for a first effort with two models: User and Item.  Members of the User class can have roles associated with them, i.e.: Manager, Employee, and Administrator.  The Item class will be a direct map of the spreadsheet, members will have fields that mirror the spreadsheet columns.  The Item search can be nicely built into the item controller's index method and the item edit restriction can be enforced by keying off the user's role in the controller methods and views.

I would suggest that, at least initially, you use a snapshot of the company's spreadsheet to populate a database that you will use for all development, test, and functional acceptance.  You can then segregate out a separate task to either provide functions to import and export the excel based data.  I would suggest that the final design might want to have the data held in a database with a publish capability with an excel format (and/or pdf, and/or ...) that has the published date/time as part of the page header.

Be sure to learn how to test your app, validate your data, and have fun.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3498d654-df09-4e55-bc18-6db3d8ecfaaa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate