Advice on strategy for maintaining state in Camping

2011-08-27 Thread Anders Schneiderman
Depending on how you deploy camping you can just stick some stuff in some class 
variables if you just need them in one controller, or even global variables if 
you want them in many places. Then all you'd need to do is boot a local copy 
with The Camping Server and do your things. The objects will just stay in 
ruby's memory because unlike cgi apps or things like PHP, ruby web apps don't 
flush their global scope reload on every request.

Wouldn't that be the ridiculously easy and straight forward way to solve this?

Thanks, Jenna!  Sounds good.

Since I'm new to camping, can you tell me where I would add the global objects?

Anders
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Advice on strategy for maintaining state in Camping

2011-08-25 Thread Anders Schneiderman
Hi,



I need a little advice about maintaining state in Camping.



I use NaturallySpeaking voice recognition software for most of my work -- I
don't have happy hands -- and I've been creating little Ruby projects to
make it easier to do some things by voice. I'd like to build a UI for them.
After some painful experiences with some windows-based UIs, I'd like to try
using Camping – it looks like fun, and I can use my HTML/CSS skills to make
something pretty.



For most of these little Ruby projects, I don't have to store anything in a
database because the data is already being stored elsewhere. For example,
I'm managing a team that's building a Microsoft-based data warehouse that
uses Excel pivot tables as a front-end, and pivot tables are hard to
manipulate using NaturallySpeaking. On my Camping site, I want to be able to
display a long list of the available pivot table fields so I can click on
them by voice.  I also want a text box so I can say, e.g., show department
and unit by row, year by column or only show fields containing committee.
So all I need to store is the info I'm using to manipulate the pivot table:
 the connection to the Excel worksheet and a list of the available fields
that I grab from the Excel worksheet plus one or two properties about these
fields. I don't need to save any of this info -- I grab it once at the
beginning of the session, and I don't want to cache it because, for example,
the list of fields will change depending on which data warehouse cube I'm
connecting to.  I have other projects where the data is stored on a
website/application that I'm grabbing/manipulating using Web services/APIs.
In short, I don't need to permanently store any data, I just need to
maintain state for a relatively small number of objects.



What's the easiest way to do this in Camping? Is there a way to cache the
list of field objects? Or does it make more sense to store them in a
database and purge  refresh the data in the database each time I start up
the Camping site?



Thanks!

Anders



PS Maybe you're thinking, using Excel pivot tables as a front-end to a data
warehouse?? It does sound bizarre, and I was pretty skeptical at first, but
it actually works pretty well. Microsoft has put a fair amount of work into
turning Excel pivot tables into a pretty decent data warehouse front end.
And since you're just using Excel, you get all the goodies are built into
Excel. Not a good front-end if you are creating straightforward dashboards
that are totally locked down, but if you have a pretty broad range of fields
and you're encouraging folks to slice and dice the data themselves, it ends
up being easier than most of the other tools out there.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Advice on strategy for maintaining state in Camping

2011-08-25 Thread Anders Schneiderman
Thank you so much Magnus and David for your speedy advice!
Magnus, I think you're right a SQLlight database seems like the best way to
go.

Cool! Is easier to manage web apps than native apps using
NaturallySpeaking, or is it just the the native window-based UIs are
way too complex? I've never really optimized a web app for
accessibility (which is pretty terrible when I think about it)?

It's a bit of both. NaturallySpeaking tries to make their software as
Web-friendly as possible, so, for example, if I display the fields I want to
be able to choose as a bunch of hyperlinks in a on the page, I can click any
of them by voice as I could any link on a webpage.  With wxruby, that's not
the case.  And since I've done a lot of HTML/CSS work in past jobs, I can
bang it out a lot faster than learning wxruby or some other UI – and it's a
lot easier to build something that has a little style to  it.  :)



Thanks very much!

Anders
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list