Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Reproのビジネスサイドを支えるJS
Search
boiyama
October 25, 2019
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Reproのビジネスサイドを支えるJS
We Are JavaScripters! @37th
https://wajs.connpass.com/event/150356/
の発表資料
boiyama
October 25, 2019
Transcript
21 slides
Reproのビジネスサイドを支えるJS Hilo Yamamoto 2019-10-25 We Are JavaScripters! @37th
Hilo Yamamoto (@boiyama) Software Engineer, BizOps div., Repro inc. JS
Background: Yoshimoto → jQuery → Backbone → React → GAS プロフィール
フロントエンドエンジニアから コーポレートエンジニアになりました でも、JSやってます
AWS IoT ボタンと Amazon Connect でトイレが詰まったら管理事務 所に自動で電話する https://qiita.com/boiyama/items/cb0594defa3b554d8086 Lambda /
Node.js を間で使用 トイレを支えるJS
• ビジネスプロセスの理解と整理 • 運用効率化・指標可視化のためのシステム構築 簡単に言うとじゃんじゃん売れる基盤作り 業務ハックと呼ばれてたりする領域 BizOpsチームのエンジニアがやっていること
• 実装難易度でいうと低いものが多い • 早く実現すればするほど事業インパクトがある プロダクト開発とは技術選定の観点が変わってくる 業務ハックのポイント
GASこと Google Apps Script は、 JSで G Suite を簡単に操作できるサービス で、そんな業務ハック界で大人気「GAS」
スプシが大体の業務を運用できる汎用性の高い CRUD UI 付 DaaS って感じなので、 スプシにGAS載っけてビジネスロジックだけ書いてアプリケーションを 作る、 というのがてっとり早くて、定番の開発手法となっている
例えば、CS向けのツールを作る場合
• Salesforceに営業活動データがあって、Auroraにツー ル利用データがある • 顧客毎のツール利用状況の一覧 • 利用状況から対応の必要な顧客を抽出して対応管理 • 非機能要件無し •
デザイン指定無し 要件
今こんな作り データはRedashに持ってきて結合させる ビジネスロジックだけGASで実装して、 一覧機能はスプシ、 対応管理機能はTrelloに任せる
Redash
Google Sheets
Trello
GAS Knowledge (あまりないけど・・)
• tsconfig の module を es2015 にする • gas-webpack-plugin を使う
• @types/google-apps-script を入れる • GASライブラリの型付け自分でやらないといけないので 極力使っていない TypeScript で書く
// Redash の query result の CSV を取得 const values
= Utilities.parseCsv(UrlFetchApp.fetch([RedashクエリAPIの CSV]).getContentText("UTF-8")); // CSVをパースした配列構造だとスプシにそのまま貼り付けられる SpreadsheetApp.getActiveSpreadsheet() .getSheets() .filter(sheet => sheet.getSheetId() === [シートID])[0] .getRange(1, 1, values.length, values[0].length) .setValues(values); Redashからスプシへのデータ出力は超簡単
// 指定シートの値を全取得 const values = SpreadsheetApp.getActiveSpreadsheet() .getSheets() .filter(sheet => sheet.getSheetId()
=== [シートID])[0] .getDataRange() .getValues(); // 1行目にキー、2行目以降に値が入ってる使い方の場合 const items = values .slice(1) .map( value => (value.reduce((previousValue, currentValue, currentIndex) => ({ ...previousValue, [values[0][currentIndex]]: currentValue }), {}) as unknown) as Item ); シートのデータはキーと値でマッピングしてる
• もう一個スプシ作るだけ • claspを使ってデプロイしわけている • clasp setting scriptId [スクリプトID] &&
clasp push テスト環境は作りやすい
こんなもんかな・・
• 使う技術が変わり、JS実装量が減っちゃった(WeJS登壇させてもら えなくなっちゃうかな・・) • 今日の話は(開発)要件が決まった後の話で、要件決まる前の仕事 がプロダクト開発エンジニアより多い • 業務要件があって、運用設計調整して、開発要件決まる • 自社のビジネスのことがわかって面白い
コーポレートエンジニアになってみて
We are hiring! DM開放中! https://twitter.com/boiyamamoto
More Decks by boiyama
See All by boiyama
バックオフィスに行ったソフトウェアエンジニアの業務効率化事例
boiyama
1
310
2018年、IE6対応サイトを作る
boiyama
4
1k
ヤバいESLint/TSLintルール作っちゃったかもしれない
boiyama
0
1.5k
チームをCQRS
boiyama
1
1.7k
フロントエンドのサーバーレス SSR編
boiyama
0
730
Serverless for Front-end Server-Side Rendering
boiyama
1
150
Learning Elm in JS
boiyama
1
590
JSでElmを学ぶ
boiyama
0
130
フロントエンドのサーバーレス SPA編
boiyama
1
1.1k
Other Decks in Programming
See All in Programming
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
200
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
140
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
Distance field of Julia set
kinakomoti321
0
330
はじめてのPLATEAU
nokonoko1203
1
670
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Chasing Engaging Ingredients in Design
codingconduct
0
410
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
790
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
630
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
360
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k