[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

78
Rakuten Front-end Framework Project October 25th, 2014 Tsutomu Ogasawara / Hiroyuki Tanjo Creative & Web Design Department Rakuten Inc. http://www.rakuten.co.jp/ Presentation Video: http://youtu.be/-d15atCdR0E

description

Rakuten Technology Conference 2014 "Rakuten Front-end Framework Project" Tsutomu Ogasawara, Hiroyuki Tanjo (Rakuten)

Transcript of [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

Page 1: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

Rakuten Front-end Framework

ProjectOctober 25th, 2014

Tsutomu Ogasawara / Hiroyuki Tanjo

Creative & Web Design Department

Rakuten Inc.

http://www.rakuten.co.jp/

Presentation Video: http://youtu.be/-d15atCdR0E

Page 2: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

2

Self Introduction

Role Front-end Technology Team Leader

Organization Creative & Web Design Department

Expertise Software Engineer / UI Designer / Technical Director

[email protected]

ogaoga

OgaTsutomu Ogasawara

Page 3: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

3

Self Introduction

Creative &

Web Design

Department

Development

Unit

Infrastructure

Database

Web Service

Smart Device App

Web API

etc...

UX Design

Web Creation

Analytics

SEO

Performance

Mobile Strategy

Front-end Technology

Page 4: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

4

Self Introduction

Creative &

Web Design

Department

Development

Unit

Business

Unit

Page 5: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

5

Self Introduction

http://tech.rakuten.co.jp/

2012 2013 2014

Page 6: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

6

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 7: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

7

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 8: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

8

Trend of Front-end

Page 9: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

9

Trend of Front-end

Rich Contents

High Performance

Cross Platform

etc..

Page 10: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

10

Trend of Front-end

Various issues became obvious.

Large-scale, complicated

JavaScript code.

Security threat.

Low web performance.

Compatibility problems.

etc...

Page 11: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

11

Trend of Front-end

To solve the issues, developers around the

world have created many useful tools and

libraries.

Page 12: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

12

Trend of Front-end in Rakuten

Page 13: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

13

Trend of Front-end in Rakuten

Combination of tools and libraries was different

in each project.

Project Project Project Project Project ・・・

Page 14: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

14

Trend of Front-end in Rakuten

Combination of tools and libraries was different

in each project.

Project Project Project Project Project ・・・We need to standardize tools to

improve our productivity,

and

keep flexibility for various projects.

Page 15: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

15

Trend of Front-end in Rakuten

Additionally, we wanted to standardize

templates and UI components with approaches

like "HTML5 Boilerplate" and "Bootstrap".

Bootstrap

http://getbootstrap.com/

HTML5 Boilerplate: The web’s most popular front-end template

http://html5boilerplate.com/

Page 16: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

16

Trend of Front-end in Rakuten

Staerted a project to standardize our tools and

libraries in order to improve our productivity

with front-end technologies.

Page 17: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

17

Trend of Front-end in Rakuten

Started a project to standardize our tools and

libraries in order to improve our productivity

with front-end technologies.

Rakuten Front-end Framework

Project

Page 18: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

18

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 19: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

19

What is "Rakuten Front-end Framework" ?

"Rakuten Front-end Framework" is

the activities to improve front-end

development environment in Rakuten

by utilizing the latest technologies.

Page 20: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

20

What is "Rakuten Front-end Framework" ?

OgaTsutomu Ogasawara

Project Leader

/ Developer

TantanHiroyuki Tanjo

Lead Architect

/ Developer

Page 21: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

21

What is "Rakuten Front-end Framework" ?

RFF consists of 4 parts:

Tools Libraries

Environment Operation

Page 22: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

22

What is "Rakuten Front-end Framework" ?

Tools Libraries

Environment Operation

Page 23: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

23

What is "Rakuten Front-end Framework" ?

Tools Libraries

Environment Operation

Page 24: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

24

What is "Rakuten Front-end Framework" ?

RFF includes templates, UI components,

resources, common scripts, etc.

Standard

TemplatesUI Components Resources

Page 25: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

25

What is "Rakuten Front-end Framework" ?

Tools Libraries

Environment Operation

Page 26: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

26

What is "Rakuten Front-end Framework" ?

Tools Libraries

Environment Operation

Page 27: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

27

What is "Rakuten Front-end Framework" ?

Tools Libraries

Environment Operation

Page 28: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

28

Objective of RFF

We aim to

Page 29: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

29

Objective of RFF

We aim to

Develop our useful tools by utilizing the

latest technologies to improve our

quality and productivity.

Page 30: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

30

Objective of RFF

We aim to

Develop our useful tools by utilizing the

latest technologies to improve our

quality and productivity.

Deliver common libraries via the tools to

spread out our knowledge.

Page 31: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

31

Objective of RFF

We aim to

Develop our useful tools by utilizing the

latest technologies to improve our

quality and productivity.

Deliver common libraries via the tools to

spread out our knowledge.

Contribute to the user experience of

Rakuten services.

Page 32: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

32

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 33: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

33

RFF Tools

Tools Libraries

Environment Operation

Page 34: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

34

RFF Tools

Developed 2 products.

Desktop Application

rff-guiCommand Line Tool

generator-rff

Page 35: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

35

RFF Tools

1. Scaffolding2. Package

Management4. Build3. Preview

Desktop

Application

rff-gui

Yeoman Bower GruntBrowserSync

Command line

tool

generator-rff OR

Page 36: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

36

RFF Tools / Scaffolding

1. Scaffolding2. Package

Management4. Build3. Preview

Yeoman Bower GruntBrowserSync

• Generate standard scaffold

• Customize

Page 37: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

37

RFF Tools / Scaffolding

Page 38: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

38

RFF Tools / Scaffolding

Page 39: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

39

RFF Tools / Package Management

1. Scaffolding2. Package

Management

Yeoman Bower

• Generate standard scaffold

• Customize

• Install packages

• Resolve dependency

4. Build3. Preview

GruntBrowserSync

Page 40: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

40

RFF Tools / Package Management

Page 41: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

41

RFF Tools / Package Management

$ cat bower.json {"name": "rff-test","version": "0.0.0","dependencies": {"jquery": "~1.11.1","normalize.css": "~3.0.1"

},"devDependencies": {}

}

bower.json

$ bower install

$ tree src/bower_components -L 1src/bower_components├── jquery└── normalize.css

install command

installed libraries

Page 42: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

42

RFF Tools / Preview

1. Scaffolding2. Package

Management

Yeoman Bower

• Generate standard scaffold

• Customize

• Install packages

• Resolve dependency

• Check locally

• Test multi browser

4. Build3. Preview

GruntBrowserSync

Page 43: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

43

RFF Tools / Preview

Page 44: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

44

RFF Tools / Build

1. Scaffolding2. Package

Management

Yeoman Bower

• Generate standard scaffold

• Customize

• Install packages

• Resolve dependency

• Check locally

• Test multi browser

• Convert files

• Push to servers

4. Build3. Preview

GruntBrowserSync

Page 45: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

45

RFF Tools / Build

Page 46: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

46

RFF Tools / Build

img img

.css

.scss

.less

.stylus

.coffee

.jade .html

.js .js

.css.css .css

.js

img

.html .html

.css

img

CSS Sprite

Compile

Compile Auto prefixer

Modify Links

Compile

Merge & Minify

Merge & Minify

Minify

Modify Links

Add Revision

Add Revision

Add Revision

src dist

Page 47: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

47

RFF Tools / Build

img

.css

.html

.js .js

.css.css .css

.js

img

.html .html

.css

img

CSS Sprite

Compile

Compile Auto prefixer

Modify Links

Compile

Merge & Minify

Merge & Minify

Minify

Modify Links

Add Revision

Add Revision

Add Revision

dist

Git FTP

Push

Put

Page 48: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

48

RFF Tools

"generator-rff" is very useful but it's hard to use

for non-engineers such as designers or

directors.

Page 49: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

49

RFF Tools / rff-gui

We also developed the GUI application of

generator-rff, "rff-gui" for Mac & Windows.

Page 50: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

50

RFF Tools / rff-gui

1. Scaffolding2. Package

Management

4. Build3. Preview

Page 51: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

51

RFF Tools / rff-gui

node-webkit: An application runtime based on

Chromium and Node.js for Win, Mac and Linux.

Page 52: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

52

RFF Tools / rff-gui

Mac or Windows or Linux

node-webkit

(Node.js + Chromium)

generator-rff

AngularJS Bootstrap

HTML / CSS / JavaScript

rff-gui

GUI Layer

Page 53: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

53

RFF Tools / rff-gui

Benefits of rff-gui are:

Non-engineers can develop in the common

environment with engineers.

Easy to explain this project for

stakeholders by showing the visible app.

Good opportunity to improve our

development skills.

Page 54: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

54

Other tools

grunt-charset

Grunt plugin to convert text encoding and

replace charset code in HTML and CSS.

grunt-appdmg

Grunt plugin to generate a disk image file for

OS X.

rff-doctor

Node module to verify the system

configuration.

Page 55: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

55

Other tools

grunt-charset

Grunt plugin to convert text encoding and

replace charset code in HTML and CSS.

grunt-appdmg

Grunt plugin to generate a disk image file for

OS X.

rff-doctor

Node module to verify the system

configuration.

Page 56: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

56

Other tools

grunt-charset

Grunt plugin to convert text encoding and

replace charset code in HTML and CSS.

grunt-appdmg

Grunt plugin to generate a disk image file for

OS X.

rff-doctor

Node module to verify the system

configuration.

Page 57: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

57

Other tools

grunt-charset

Grunt plugin to convert text encoding and

replace charset code in HTML and CSS.

grunt-appdmg

Grunt plugin to generate a disk image file for

OS X.

rff-doctor

Node module to verify the system

configuration.

Page 58: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

58

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 59: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

59

Self Introduction

Role Developer of RFF Components

Organization Creative & Web Design Department

Expertise Front-end Development / Graphic Design / Painting

[email protected]

htanjo

TantanHiroyuki Tanjo

Page 61: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

61

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 62: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

62

Case Examples

Already started using RFF for over 10 projects.

Rakuten CAFE Rakuten Energy (for Smartphone)

http://cafe.rakuten.co.jp/ http://energy.rakuten.co.jp/

Page 63: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

63

Case Examples

Developer's voice:

We didn't have to write the grunt

configuration.

We don't have to take care of

performance because RFF

automatically optimized resources.

Page 64: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

64

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 65: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

65

Future Plan

Tools Libraries

Environment Operation Keep improving based on developers'

feedback and technology trend.

Make rff-gui user-friendly.

Page 66: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

66

Future Plan

Tools Libraries

Environment Operation Provide various libraries such as templates,

UI components, utilities, etc.

Page 67: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

67

Future Plan

Tools Libraries

Environment Operation

Build the server-side environment to

automate our tasks such as build, test,

deploy, etc.

Page 68: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

68

Future Plan

Tools Libraries

Environment Operation

Build the team to continuously develop

RFF, support developers and maintain

the environment.

Page 69: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

69

Agenda

1. Trend of Front-end

2. What is"Rakuten Front-end Framework" ?

3. Technology of RFF

4. Demo

5. Case Examples

6. Future Plan

7. Wrap up

Page 70: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

70

Wrap up

Utilize the latest technologies to improve our

quality and productivity.

Page 71: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

71

Wrap up

Utilize the latest technologies to improve our

quality and productivity.

Launched the Rakuten Front-end Framework

which consists of Tools, Libraries,

Environment and Operation.

Page 72: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

72

Wrap up

Utilize the latest technologies to improve our

quality and productivity.

Launched the Rakuten Front-end Framework

which consists of Tools, Libraries,

Environment and Operation.

RFF should be suitable for various projects,

useful for various people to become common.

Page 73: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

73

Wrap up

Utilize the latest technologies to improve our

quality and productivity.

Launched the Rakuten Front-end Framework

which consists of Tools, Libraries,

Environment and Operation.

RFF should be suitable for various projects,

useful for various people to become common.

Developing by ourselves is very important to

improve our development environment.

Page 74: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

74

Open Source

Page 75: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

75

Open Source

Released some RFF tools as open sources on

GitHub!

https://github.com/rakuten-frontend

Page 76: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

76

Rakuten Front-end Framework

Page 77: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

77

Let's work together!

We are seeking

Front-end Engineers!

http://corp.rakuten.co.jp/careers/cwd/

Page 78: [Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project

78

Thank you!