Wednesday, March 10, 2010

Geospatial Environment Kit

[Link to Geospatial Environment Kit]

On approaching this task, I felt I had to explore coding and distribution platforms. I looked into Facebook at Sabrina's suggestion and it seemed a little complicated at the outset. I thought it I could to a rapid prototype to leverage distributability on the web without application specific distribution models. I figured it couldn't be to hard to do as a Javascript AJAX (advanced javascript and XML) interface. Looking onto some rapid development environments I figured basic basic compliance with common browsers would not be too hard.

For the text editor I used TextWrangler
I would be building a suite of applications (pages) for the kit.

I wrote the code in some several chunks but I'm unsure of where the conditionals (or what kind) should go. Here's the basic structure:

header
Javascript
Function

body
Javascript
HTML code
I realized in the body I would be using forms and I wanted to make sure I was able to manipulate a second window. This let me to the decision to adopt functions to create a separate window for the result of the survey constituting the result

For questions (user input) , I decided on forms. I was able to get basic text entry to work. But I still want to experiment with radio buttons as per my proposal. Since the basic structure of the process is to ask questions and deliver custom results in the form of a list. So I am translating yes/no logic questions into show/don;t show specific page elements (such as document.write).

The survey questions are:

is there a shower in the bathroom
is there a tub in the bathroom
is there a garbagecan in the bathroom
is there a sink in the bathroom
is there a toilet in the bathroom

so I need the folowing code fragments:

If shower = yes, display "Clean the shower"
If tub = yes, display "Clean the tub"
If garbagecan = yes, display "take out the garbagecan"
If sink = yes, display "Clean the sink"
If toilet = yes, display "Clean the toilet"

to display as the result

I am using one function to create the window.

Do I need to use a second function to process the conditionals? If so, does the order of the functions in the header matter?

Or is there some way to express the conditional text formatting in the body with the forms and then send the whole thing up to the create window function?

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.