Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate tutorial/start.md #73

Merged
merged 2 commits into from
Oct 30, 2018
Merged

translate tutorial/start.md #73

merged 2 commits into from
Oct 30, 2018

Conversation

ice-zjchen
Copy link
Collaborator

@ice-zjchen ice-zjchen commented Oct 21, 2018

a task of #65

@ice-zjchen ice-zjchen added the translation Translate zh_CN to English label Oct 21, 2018
@ice-zjchen ice-zjchen changed the title translate tutorial/start.md #65 translate tutorial/start.md Oct 21, 2018
@ice-zjchen ice-zjchen self-assigned this Oct 22, 2018
categories:
- tutorial
---

San,是一个 MVVM 的组件框架。它体积小巧(13K),兼容性好(IE6),性能卓越,是一个可靠、可依赖的实现响应式用户界面的解决方案。
San is an MVVM component-based framework. Its compact size (13K), good compatibility (supports IE6), and excellent performance make it a reliable and dependable solution for implementing responsive user interfaces.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的dependable感觉多余了,也让句子读起来很别扭


San 通过声明式的类 HTML 视图模板,在支持所有原生 HTML 的语法特性外,还支持了数据到视图的绑定指令、业务开发中最常使用的分支、循环指令等,在保持良好的易用性基础上,由框架完成基于字符串的模板解析,并构建出视图层的 [节点关系树](https://github.com/baidu/san/blob/master/doc/anode.md),通过高性能的视图引擎快速生成 UI 视图。San 中定义的数据会被封装,使得当数据发生有效变更时通知 San 组件,San 组件依赖模板编译阶段生成的[节点关系树](https://github.com/baidu/san/blob/master/doc/anode.md),确定需要变更的最小视图,进而完成视图的异步更新,保证了视图更新的高效性。
San declaratively renders data to the DOM using an HTML-based template syntax. In the process, San compiles string-based templates to [ANode](https://github.com/baidu/san/blob/master/doc/anode.md), builds UI view quickly by high-performance view engine. Apart from raw HTML features, all San templates implement HTML-data binding, and usual syntaxes such as branching, loop, etc. Combined with the reactivity system(two-way binding and [ANode](https://github.com/baidu/san/blob/master/doc/anode.md)), San is able to intelligently figure out the minimal number of components to re-render asynchronously and apply the minimal amount of DOM manipulations when the app state changes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

builds UI view quickly -> instantly


组件是 San 的基本单位,是独立的数据、逻辑、视图的封装单元。从页面角度看,组件是 HTML 元素的扩展;从功能模式角度看,组件是一个 ViewModelSan 组件提供了完整的生命周期,与 WebComponent 的生命周期相符合,组件间是可嵌套的树形关系,完整的支持了组件层级、组件间的通信,方便组件间的数据流转。San 的组件机制,可以有效支撑业务开发上的组件化需求。
Component, the basic unit of San, is an independent unit of data, logic, and view. From a page perspective, a component is an extension of an HTML element; from a functional mode perspective, a component is a ViewModel. San components provide a complete lifecycle, which is part of the Web Components Spec. Also, San components can be tree-nested and communicated each other which are notably cross-component data flow. Therefore, San's component mechanism can effectively support the componentization needs of business development.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

communicated each other -> with each other
which are notably cross-component data flow -> via cross-component data flow
needs -> requirements


San 支持[组件反解](https://baidu.github.io/san/tutorial/reverse/),以此提供[服务端渲染](https://baidu.github.io/san/tutorial/ssr/)能力,可以解决纯前端渲染导致的响应用户交互时延长、SEO 问题。除此之外,San 还提供了一些周边开源产品,与 San 配合使用,可以帮助开发者快速搭建可维护的大型 SPA 应用。
Based on the [component-reserve](https://baidu.github.io/san/tutorial/reverse/), San provides server-side rendering feature that can be SEO friendly, loading the initial page faster, and other pros client-side rendering can not works. Meanwhile, the ecosystem of San offer a series of modern tooling and supporting libraries. In short, San is perfectly capable of powering large-scaled maintainable Single-Page Applications.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

component-reserve -> component reversion
San provides server-side rendering feature that can be SEO friendly, loading the initial page faster, and other pros client-side rendering can not works -> San provider server side rendering features through which we can create SEO friendly apps with faster initial page rendering and other pros compared with pure client side rendering

@@ -33,18 +33,16 @@ var myApp = new MyApp();
myApp.attach(document.body);
```

We create our San app by several steps as followed:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by several steps as followed -> following steps below


`tips`:It is unfriendly for maintenance if Writing HTML snippets in JavaScript. We can manage it through WebPack, AMD plugin, asynchronous request, etc. The example here is for convenience.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if Writing HTML snippets -> to write

@andycall andycall mentioned this pull request Oct 30, 2018
54 tasks
@otakustay otakustay merged commit 24e7ba1 into baidu:master Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation Translate zh_CN to English
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants