Live data from Hacker News

Google's Code Editor

docs.google.com

81–88 of 88 posts

Re: Google's Code Editor

#81

This is actually pretty cool, one step closer to making Google Docs a worthy competitor to Office. If they combine this with an Access-type database app, it could be a great tool for businesses. Although using the interface builder brings back memories of VB...

Thinking about Google Docs simply as an Office competitor is wrong. If you come to it expecting to do everything you do in Office, it is probably adequate but definitely much worse. However, Docs can do sharing of centralized data, use web APIs, integrate with your mail, and more - things Office can't even hope to match.

Re: Google's Code Editor

#82

Earlier quoted context omitted.

That's not a major issue.: You can use Office 2010 web apps FREE from a SkyDrive account and openly collaborate with people or you can pay $20 a month per seat for Office 365 and you will get Sharepoint and ALL Office 2010 desktop apps. The office web apps work perfectly in all browsers (I've tried Chrome, Firefox and IE). Considering the cost of playing around with Google spreadsheet with those restrictions, it's po…

Does the Excel web app support VBA? I was under the impression that the 365 apps offer a subset of the functionality of their desktop counterparts.

They don't support VBA directly.

I've always used Excel to publish result data to a spreadsheet rather than the entire thing. Data collection is done using InfoPath so you get the following workflow:

[www:InfoPath Office 365] -> [dt:Excel]-> [www:Excel report on Office 365]

It depends on your use case. I'd be tempted to use a sharepoint list with a custom report for anything more complicated.

Re: Google's Code Editor

#83

Last year I've used Google Apps Script to automate a spreadsheet, it worked very well and that spreadsheet is still used inside my company. It's not very complex, all together maybe 200 lines of code, with tests. But, I'm not sure if I would do it again. Development style is not enjoyable, coding inside textarea with syntax highlighting is simply not good enough. I would prefer to use my text editor and some way to d…

I've worked with this for some clients. I am but an egg, but I'm not convinced this is entirely JavaScript, I've had some code fail in App Script that passed JavaScript unit tests. And you cannot bring in libraries like jQuery. You can hack some of these. Scripts can import code from a remote server, which allows you to edit where you like, push to your remote server and pull it into App Script. That tool enables sma…

It is server side javascript and because of that there is not jQuery (which is client side library). You are not working with DOM, you are working with API defined by Apps Script, check the docs here https://developers.google.com/apps-script/

Re: Google's Code Editor

#85

Earlier quoted context omitted.

I've worked with this for some clients. I am but an egg, but I'm not convinced this is entirely JavaScript, I've had some code fail in App Script that passed JavaScript unit tests. And you cannot bring in libraries like jQuery. You can hack some of these. Scripts can import code from a remote server, which allows you to edit where you like, push to your remote server and pull it into App Script. That tool enables sma…

It is server side javascript and because of that there is not jQuery (which is client side library). You are not working with DOM, you are working with API defined by Apps Script, check the docs here https://developers.google.com/apps-script/

I get that detachment from the DOM but jQuery has useful tools beyond element selection and manipulation.

For that matter, why doesn't App Script expose an interface that expresses page components as part of a DOM? The Sheet app could provide an interface to a cell with classes for its particular column, row and sheet, allowing access with jQuery / CSS selectors. Instead users have to learn a new interface with stuff like Spreadsheeet.getRange().

And maybe they've revised the docs, but I spent a fair amount of time in them and didn't see any discussion of what JavaScript tools would not be available. I had to figure that out by trial and failure.

Re: Google's Code Editor

#86
I use Google Docs code a lot at work in "production". Here's my experiences:

Yes, you can do more than a few hundred lines of code. My in house library is now about 5k LOC. Yes, it's basically straight JavaScript. Everything is there except for the DOM. Yes, the online editor sucks. I don't use it at all. (see below how) No, you cannot use jQuery/Prototype, etc (there's no DOM or Window class). No, you cannot use long running methods. Google Docs cuts you off at around 30 seconds of execution. No, you cannot share code. (see below)

-- How I develop on Google Docs:

1. I develop it outside of Google Docs using Sublime Text 2

2. I test using Node.JS + assert() + methane.js (see below)

3. I then minify it using Google Closure Tool

4. Then I copy and paste it into Google Docs

This works well because the online editor blows when you're doing anything semi-complex.

--- Testing in Google Docs

I use node.js + assert() + methane.js. What is methane.js? It's a little piece of JS that mocks some of the Google Apps classes and functions. I can then override that mocked method to return the value I expect Google to return and test my own methods.

It's here: https://github.com/chrisle/methane

Consider it alpha code. It's not very well documented. It works for me!(tm)....

-- Sharing code in Google Docs:

Inside of onLoad() I've seen people use UrlFetch and then eval() the response string as a way of getting shared code to work. Not ideal, but it works. I personally don't share code or use this method.

Re: Google's Code Editor

#88

The link title will attract developers anxious to see what Google is offering or Googlers are using to edit code, but this is just an online editor designed for Apps Script editing. It's been around a long time and is less interesting than the link-bait title suggests. Google Apps Script is very useful in conjunction with Google's online apps and their rich libraries. JavaScript makes for a good customization languag…

Update (2012-05-22): Google Apps Scripts now supports libraries:

http://googleappsdeveloper.blogspot.com/2012/05/introducing-...

Yay!

Post reply on HN