or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
webアプリの
UIパターン管理
効率化ツール
am-mocktimes@1.0.19
を、小型案件で使ってみたお話
自己紹介
---
フリーランスエンジニア@3年目 / 独学@6年
---
twitter / @am_nimitz3
github / @ampcpmgp
facebook / akira.hayatake
取り掛かった案件
開発体制
UIパターン管理ツール
導入前の開発フロー
デザインリニューアル案件
ミッション
デザインが上がってきたとき
デザイナ「よろしくねー」
自分「きれいなデザインですね! 👍」要件定義を見ると
Dir「D1とD2は切り替わるので、お願いね」
自分「承知しました。問題ないです。 🙂」クライアント要望
クライアント様の声
自分「なるほどです😲 やります。💪」「D1に、条件によりボタンを表示し、
押すとE2を表示してほしい」
テスト中
QA/テスターさん
「既存仕様が反映されていないです。
Setting A / B が切り替わり、
hidden C / D が、条件により出現します」
\(^o^)/
理想
どこを取っても壊れない
現実
どこかを取ると盛大に崩れる
もちろん気合で何とか乗り切りましたが、
今後どんどん機能追加されていくと・・
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →そこで作ったのが、今回紹介する
UIパターン管理ツールになります
am-mocktimes
元々は社内ツールの1つとして作っていたものをオープンソース化したものです。
何ができるものか
導入
推奨環境はこちら
ファイル構造
2つのファイルを編集していきます。
簡単なwebアプリ(ライツアウト)でご紹介
デモ / ソース
2画面構成
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →コードの書き方を、5ページで、ざっくりと
UIパターン定義
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →UIパターン定義(switch)
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →UIパターン定義(action)
そのURL内容を、config.jsが見ていて、実行されます。

黄色いラインが紐づき、緑の部分が引数として渡ります。親の設定から順に、呼び出されます。
mock/config.js の特徴
詳しくはドキュメントにて
↓に、サンプル有り
riotxでのサンプル
直接actionを呼び出すことができます
jQueryでのサンプル
本体と同じjQueryを読み込んでいるため、
clickイベント等、triggerさせることができます
(参考までに)dobjsのご紹介
am-mocktimesでは、状態管理ツールに、
dobjsを採用しています。
IE11は未対応ですが、楽に状態管理ができます。
要約すると
複雑なことはツールに任せて、
短いコードで、様々なパターンを作れます
本日最も伝えたいところ→
導入して、何が変わったか
何を意識して作ったか
am-mocktimes + Riot.jsでサクサク開発し、
プロダクトの規模が大きくなっていったものの
弱点
プロダクト規模の拡大に伴い
求められたもの
工数は3~5倍、堅牢性が上がり、柔軟性がダウン
中~大規模開発での利用ツール
am-mocktimes の今後
中~大規模開発にも耐えられるよう、
画面キャプチャ取得など、機能改善を進める
などありましたら、github issueやtwitter等
連絡もらえれば、前向きに対応します!
「何を使ったかでは無く、何を作ったか」
を、自分は意識していたい
ご清聴ありがとうございました。
ツール・デモのURL一覧