Apps Developer Blog

Information for Google Apps Developers

Using open-source libraries in Apps Script

November 27, 2012
Share on Google+ Share on Twitter Share on Facebook
Google
Labels: Apps Script

7 comments :

Kris said...

Cool. Can you suggest a good templating library? I tried using jquery templates but it did not work - I am not sure if it violates Caja's validation.

November 27, 2012 at 12:17 PM
Arun N said...

I am not too familiar with jQuery's templating engine, but HtmlService has its own that works really well with Apps Script take a look here

November 27, 2012 at 4:40 PM
Kris said...

I am looking for client side templating functionality - I am using the google.script calls to get the JSON data, and am building the UI via JQuery and JQuery UI - but had to loop through the data to build the UI. Client side templates would come in handy for my task, so was wondering if anyone had recommendations...I should look at the server side templating to see if I can return a fragment from the server and attach it on the client via JQuery DOM manipulation.

November 27, 2012 at 5:46 PM
Autoblog said...

This is great Eric. Two things I would love to see in Appscript along these lines would be:
1) A JSLint checker so I don't have to debug simple syntax and logic errors in my code. When you're using UiApp, you just get an "Unexpected Error" message which is then a pain to troubleshoot.

2) Support for something like Coffeescript.

3) Make Google Appscript scripts shareable via Google Drive, so we can use our laptop client tools like Textmate/Coffeescript or Eclipse. Changes made on my laptop would appear directly in a program I'm debugging in the cloud. There are hacks where you can use eval(filename) in your code but this doesn't lend itself to online debugging.

November 28, 2012 at 2:58 AM
Eric Koleda said...

@Kris, Underscore actually contains it's some templating functionality: http://underscorejs.org/#template

@Autoblog, thanks for the feedback, we'll keep those ideas in mind.

November 28, 2012 at 7:30 AM
Unknown said...

UnderScore/Lodash is a really nice utility library. But `.each()` isn't an appropriate example in this case since `Array.prototype.forEach` is built-in with Google Apps Script which is based on JavaScript 1.8.

December 28, 2012 at 6:19 PM
Evan R. Murphy said...

I think there's no need to define `.load()` since Underscore ships with `.noConflict()`.

October 28, 2013 at 12:22 PM

Post a Comment

  

Labels


  • .NET 3
  • #io15 1
  • Admin SDK 4
  • Administrative APIs 26
  • AdSense 1
  • analytics 4
  • Android 5
  • App Engine 5
  • Apps Script 98
  • Auth 1
  • billing 4
  • Charts 1
  • Chrome OS 1
  • classroom 1
  • Cloud Storage API 1
  • Community 1
  • Developers 5
  • Directory API 1
  • Drive 2
  • Drive SDK 38
  • execution API 1
  • Firebase 1
  • Freemium 1
  • Fusion Tables 2
  • Gadgets 5
  • Gmail APIs 16
  • Google APIs 3
  • Google Apps 3
  • Google Apps Directory API 1
  • Google Apps Marketplace 3
  • Google Apps Script 1
  • Google Calendar API 20
  • Google Contacts API 3
  • Google Data Protocol 7
  • google docs 3
  • Google Docs API 20
  • Google Drive 2
  • Google Forms 4
  • Google I/O 3
  • Google Prediction API 3
  • Google Profiles API 2
  • Google sheets 2
  • Google Sites API 4
  • Google Spreadsheets API 4
  • Google Talk 1
  • Google Tasks API 6
  • Google+ 3
  • googlenew 1
  • Groups 2
  • Guest Post 42
  • ISVs 2
  • java 1
  • JavaScript 3
  • marketing 3
  • Marketplace 47
  • Marketplace ISV Guest 21
  • Migration 1
  • Mobile 1
  • mpstaffpick 1
  • oauth 11
  • OpenID 7
  • PHP 1
  • python 4
  • realtime API 1
  • Resellers 2
  • Ruby 1
  • SaaS 1
  • security 1
  • Staff Picks 2
  • webinar 2


Archive


  •     2015
    • Oct
    • Sep
    • Aug
    • Jul
    • Jun
    • May
    • Apr
    • Mar
    • Feb
  •     2014
    • Dec
    • Oct
    • Sep
    • Aug
    • Jul
    • Jun
    • May
    • Mar
    • Feb
    • Jan
  •     2013
    • Dec
    • Nov
    • Oct
    • Sep
    • Aug
    • Jul
    • Jun
    • May
    • Apr
    • Mar
    • Feb
    • Jan
  •     2012
    • Dec
    • Nov
    • Oct
    • Sep
    • Aug
    • Jul
    • Jun
    • May
    • Apr
    • Mar
    • Feb
    • Jan
  •     2011
    • Dec
    • Nov
    • Oct
    • Sep
    • Aug
    • Jul
    • Jun
    • May
    • Apr
    • Mar
    • Feb
    • Jan
  •     2010
    • Dec
    • Nov
    • Oct
    • Sep
    • Aug
    • Jul
    • Jun
    • May
    • Apr
    • Mar
    • Feb

Feed

Company-wide

  • Official Google Blog
  • Public Policy Blog
  • Student Blog

Products

  • Android Blog
  • Chrome Blog
  • Lat Long Blog

Developers

  • Developers Blog
  • Ads Developer Blog
  • Android Developers Blog
  • Google
  • Privacy
  • Terms