レッツ!google apps scriptでtdd(仮)

Post on 21-Jan-2015

3.871 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

#llplanet(Lightweight Language Planets) でのLT資料

TRANSCRIPT

レッツ!Google Apps ScriptでTDD(仮)

このLTを、全てのVBAチルドレンに捧げる

Option Explicit

Private Type Hogehogename as Stringid as Stringvba_children as Boolean

End TypePrivate me as Hogehoge

Private Sub Class_Initialize()me.name = “Kei Sawada”me.id = “remore”me.vba_children = true

End Sub

Private Property Get name() as Stringname = me.name

End Property

Private Property Let name( ByVal entry as String)me.name = entry

End Property

圧倒的な不思議感

※注 2001年当時の知識で書いています。今はどうなんだろう。。

MS OfficeにはそんなVBAがあった。

GoogleDocsはどうか

サーバサイドjavascript

ブラウザベースのIDE

期待しちゃっていいの

@t_wadaが唱えるソフトウェア開発の3本柱

バージョン管理 △内蔵機能で簡単なバージョ

ン管理が可能

テスティング ▲選択肢は少ないがテスティングフレームワークがある

自動化 ▲ 頑張れば少しだけできる

実証実験

前提条件

Limitations1. Currently Google Apps Script does not allow connection to internal (behind-the-

firewall) corporate databases, which is key to building business apps. Similarly, lack of other connectivity, such as LDAP connectivity, limits the level to which GAS can be used in the enterprise.⇒ファイアウォール越しの通信ができない。例えばLDAPとの接続とかも無理

2. There is no way to share scripts i.e. a new instance has be created for each use.[5] This creates overhead when it is time to update a script, since each instance has to be update manually.⇒スクリプトの共有ができない(※訳注 といいつつ、やりようは結構ある)

3. UI Widgets in Google Apps Script lack support for displaying HTML formatted content.[6] This severely limits the formatting of text displayed in a Google Apps Script app.⇒UI WidgetsあるけどHTML形式のコンテンツ表示とかできない(※訳注 といいつつ、Google Sitesを動的に編集すれば表示できなくもないか)

http://en.wikipedia.org/wiki/Google_Apps_Script

1、バージョン管理:

△(何とかできる、というかやる)

内蔵機能でバージョン管理

それか、UrlFetchAppとeval()で外部管理

2、テスティング:

▲(使い易くはないが無理矢理やる)

既存のjavascript用テスティングフレームワークの多くはそのまま使いづらい

1,870件

案1:gas-unit

http://code.google.com/p/gas-unit/

案2:テスティングフレームワークもどきを作る

https://github.com/remore/framework_experiment

3、自動化:▲(できないことをやろうとする)

実演

いい夢見ました

http://dic.yahoo.co.jp/dsearch?p=%E3%82%86%E3%82%81&stype=0&dtype=0

おわり

top related