+ All Categories
Home > Documents > How to separate the f2 e and sde in web development for_taobao

How to separate the f2 e and sde in web development for_taobao

Date post: 25-Jan-2017
Category:
Upload: taobaocom
View: 901 times
Download: 2 times
Share this document with a friend
30
Cisco WebEx – Charlie Du
Transcript
Page 1: How to separate the f2 e and sde in web development for_taobao

Cisco WebEx – Charlie Du

Page 2: How to separate the f2 e and sde in web development for_taobao

Brief historical retrospect of web develop◦ Problems and challenge

Re-organization◦ F2E & SDE1

◦ Process◦ Benefits

Separation and Cooperation◦ How did Y! do it◦ How did Cisco WebEx do it◦ Replicable model of any languages

Page 3: How to separate the f2 e and sde in web development for_taobao

1 man, from end 2 end. Small business Most of the sites

look the same No innovation

Page 4: How to separate the f2 e and sde in web development for_taobao

How to handle the big business dev? How to improve the productivity? How to improve the quality?

Page 5: How to separate the f2 e and sde in web development for_taobao
Page 6: How to separate the f2 e and sde in web development for_taobao

We need Re-organization in our developer team.

Page 7: How to separate the f2 e and sde in web development for_taobao

OrganizationOrganizationTeam Leader

Technic Leader

Team member

Page 8: How to separate the f2 e and sde in web development for_taobao

Explicit Requirements Change Control

Page 9: How to separate the f2 e and sde in web development for_taobao

For CompanyImprove productivityImprove product qualitySave costProfessional

For DeveloperImprove skill to be a masterDo what you want to doHelp for the career planning

Page 10: How to separate the f2 e and sde in web development for_taobao
Page 11: How to separate the f2 e and sde in web development for_taobao

PHP Maple System + PHP

What is the problem? Hard to replace the mock data Always lost the close tag QA joined too later

Page 12: How to separate the f2 e and sde in web development for_taobao

Java + Freemarker + Data Interface Spec

What is the problem? Environment data have no handled Two frameworks conflict

Page 13: How to separate the f2 e and sde in web development for_taobao

Language

URL Register

Template

Data Interface

Directive Implementing

Java URL/TemplateMapping

FreemarkerVelocity

Mock Data(.json)

Form Data

Link URL

I18N For JS

I18N For Template

Biz Data Access

Env Data Access

Static Resource Access

Php N/A .php

Asp(.net) N/A .asp(x)

Page 14: How to separate the f2 e and sde in web development for_taobao
Page 15: How to separate the f2 e and sde in web development for_taobao

Biz Data and Ajax Call Response

◦ It should be agreement with F2E and SDE

{status: “SUCCESS|FAILURE”,message: “Response report of current request”,result: “Return value, it can be any data type,

Such as String, Array, Object, F2E and SDE need agree on the data structure here”

}

Page 16: How to separate the f2 e and sde in web development for_taobao

Environment Data

◦ It should be agreement with F2E and SDE

{skinpath: “/resource/image/”,jspath: “/resource/css/”,rootpath: “/resource/js/”,currentuser.cred: “U1U7EXG5”,currentuser.username: “Charlie Du”

}

Page 17: How to separate the f2 e and sde in web development for_taobao

Environment Data

◦ In order to decide where are these environment data from @SDE

{currentuser.cred: {

from: “session”},currentuser.username:{

from: “session”}

}

Page 18: How to separate the f2 e and sde in web development for_taobao

Mock Data File Structure

Page 19: How to separate the f2 e and sde in web development for_taobao

Form Data Action URL Items’ Name Submit Method

Link URL

Page 20: How to separate the f2 e and sde in web development for_taobao

All these need to be a document of Data Interface Specification finally!

Data Interface Specification

XXX ProjectVersion:0.1

F2E Owner: Charlie DuSDE Owner: Bo Song

2010/10/09

Page 21: How to separate the f2 e and sde in web development for_taobao

I18N For JS

<@easySC.i18nJs path=“…/feed.js”/>

It should generated these codes:

<script type=“text/javascript” src=“…/feed_en_US.js”></script> <script type=“text/javascript” src=“…/feed.js”></script>

“en_US” should match the client language.

Page 22: How to separate the f2 e and sde in web development for_taobao

I18N For Template

<@easySC.i18nMsg key=“feed.userinfo” arguments=“Charlie” />

It should get the key “feed.userinfo” from the i18n properties and pass the arguments to render the final content.

For example: feed.userinfo={0}&#39;s InfoThe result should be: Charlie’s Info

Page 23: How to separate the f2 e and sde in web development for_taobao

Biz Data Access

<@easySC.bizData name=“feed” service=“feed.feed_list” param=“{pageSize:10,pageIndex:0}” />

“service” should match the mockdata/biz/feed/feed_list.json (Mock Env)it as a Service Name on Production ENV.

“param” will be used by Production Env

“name” will be the returned value, a JSON Object from the .json mock data Or true data.

Then, we can use the variable “feed” to access the data, such as: feed.status, feed.message, feed.result.

Page 24: How to separate the f2 e and sde in web development for_taobao

Biz Data Access For AJAX Call

bizcall.ext [.do, .php, .asp(x)]

All Ajax call point to the JSONRPCHandler.ext, and post a field: Name: bizcall Value: {name:“feed”, service:“feed.feed_list”, params:

{pageSize:10,pageIndex:0}}

Then, on the SDE side, they still can use the easySC.bizData’s Handle, on F2E side, they can use the unique mock data.

Tips: you can build the request as a utility function. Such as “bizCall”

Page 25: How to separate the f2 e and sde in web development for_taobao

ENV Data Access

<@easySC.envData name=“username” key=“currentuser.username” />

“key” should match the property “currentuser.username” in mockdata/env/env.txt (Mock Env)

“name” will be the returned value: “Charlie Du”

Then, we can use the variable “username”

Page 26: How to separate the f2 e and sde in web development for_taobao

Directive can be implemented any way with different languages!

The core is:

Access txt file and parse the content to a JSON Object on Mock Env

Assembling true data to a JSON Object on Production Env They should provide least 2 types of return value : JSON

Object and JSON Text (For Template and Ajax Call)

Page 27: How to separate the f2 e and sde in web development for_taobao
Page 28: How to separate the f2 e and sde in web development for_taobao
Page 29: How to separate the f2 e and sde in web development for_taobao

Recommended