Web Dialogs with Google Gears
-
Hi All,
I have been looking for some information on the ability to leverage Google Gears with the Web Dialog functionality of SketchUp to provide cached / local design content from a web service, and can't find any details on it's usage, so I wondered if anyone here has tried this, or knows any details about the feasibility of using this approach.
Any help / thoughts are appreciated, as I want to be sure I am not heading down a path that ends with a cliff
Thx
V.
-
I would guess that you should look into the gears API. There is a lot of information there, and gears is getting a lot of effort put into it right now with Google Wave up and coming.
Chris
-
Hi Chris,
Thanks for the quick reply. I have been a lurker here for a long time, and now that I officially have a post...and a reply, I finally feel like one of the family.
I am doing a great deal of reading about the Gears API, as it is new to me as well, but my question here was intended to be more specific to the SketchUp product, rather than the functionality of Gears. In that, as I currently understand it, SketchUp uses IE to render the web dialogs that it displays, and since naively IE doesn't support Gears, I was wondering how I would go about enabling Gears in this instance.
So I guess this is really a 2 part question
-
Does SketchUp use the installed version of IE on the box, or does SketchUp actually ship a version of IE with it's windows product, and if so, what is the version? (note I am talking about windows only here)
-
Can I use a web dialog inside SketchUp to install gears on a person's PC if they don't have it, and if they already have it installed in their regular IE, will I be able to leverage it in SketchUp? In other words does SketchUp limit IE at all when it is run for web dialogs?
Thanks, and sorry if my first post was a little vague.
V.
-
-
Sorry i cant be of more help, but i can answer 1. : SU uses the version of IE installed on the persons computer.
-
Hey Remus,
Don't feel too bad about not having all the answers, the fact is, you have answered 50% of all the questions I have ever asked here.
As far as the the other question goes, I guess I will just have to try it for myself and see... then I will post the results here so that collectively we all know.
thx
V.
-
I don't know if an auto-install is possible. Maybe it is, but normally the way it would be done is to determine if the user has gears. If they do, great. If not, point them to where they can download gears.
Check out this page in the "detecting and installing gears" section:
http://code.google.com/apis/gears/design.htmlWhat do you want to gears for? What are you hoping it well help do for you?
Chris
-
Hi Chris,
Thanks for all your support, it is greatly appreciated!
I agree I will simply have the users install gears themselves. It is much easier this way.
As for what i am trying to do, or at least at this point, what I am thinking about doing is:
I have a small catalog of products that are used by designers when they sit down to design outdoor spaces. Rather then send a CD of these models around to the designers (as I have in the past), I would prefer instead to us the web dialog functionality of SU to allow them to log into a webservice where I could use gears to download local copies of the product SU models. Then when the user wishes to use the product, they could browse my catalog through a web dialog (locally cached with gears, allowing both performance gains, and more importantly offline access) and select the product to use. Then I will simply access the gears database and load the component.
The main question / concern I have left is can I download a SU component and simply load it with the Ruby API, or do I need to download the definition of the component and create it in real time with the Ruby API? I am hoping the first opton is possible, but I really need to dive into the Ruby API as I am a complete newbie to it!
V.
-
That sounds like a pretty good usage of gears. I would think that much of the learning will be in learning how to get gears running correctly. Once you get an offline database running that synchronizes itself, you'll be in pretty good shape to just write up the web dialogs to access the models.
That is all WAAAAY over my head, but I think it sounds like a cool project. I am interested in if the data they store is encrypted in any way? Is it possible to put stuff on there computer and only give them access through the authorized web dialogs or something. I'm thinking about ruby scripts. Would there be a way to use gears to put the info on their computer so they can use it inside of SU, but not be able to just navigate to a gears folder and have all the scripts sitting there as files.
Might be useful to make it so people can download scripts from a website, but never really have access to the .rb file, but have it available while they are offline.
Chris
-
Just a quick thought: isnt this sort of thing already possible with the 3d warehouse?
-
The allure of gears is that you can build something like the 3d warehouse so it works even when the user is offline. And it updates (synchronizes) itself when they are online. So for components, it mostly would just automate the downloading of all the required models, and it would update the users library if the host ever updated their library. It does it all automatically, so the user does not have to do it. So each year when the new catalog of products comes out, the clients all get the new models pushed onto them and they are available offline.
Maybe it does lots more than that, I'm really not very sure of gears full potential is.
In terms of ruby scripts, what if it could be set up so that a person could download a ruby through a site, but the ruby file never gets put in their plugins folder. It just lives encrypted inside a database or something. And gets loaded whenever the user starts SU. But they never get their hands on the actual .rb files. That could be interesteing I think.
Chris
-
That makes a lot of sense, i can see how the automation is very alluring.
-
I think you could do what you are asking Chris, with a minor modification. You would need to have the user perform a prior install of a script to enable to communication with the web service, but then once it was installed, that is all they would need. From then on, all scripts could be downloaded, and managed at run time from the database. In that you could store the scripts as either simple strings, and pass them to the ruby engine at run time to be executed, or maybe you could even store them as blobs in the DB and then execute them as a full script. I am not sure about the blob idea, in theory it could work, but in practice there might be hiccups along the way....but the managing them as simple strings that get passed around should work.
As I go through this exercise over the next few weeks / months, I will keep you posted. If anyone out there wants to play a little and be a part of this, by all means, let me know... there is more than enough work to go around
Obviously my catalog specific stuff I wouldn't be open to sharing, but anything generic like methods supporting gears, and or dynamic script loading from the db would be awesome to give back.
Advertisement