|
1 |
| ---- |
2 |
| -title: Vue.js 1.0.0 Released |
3 |
| -date: 2015-10-26 10:00:00 |
4 |
| ---- |
5 |
| - |
6 |
| -> Hi HN! If you are not familiar with Vue.js, you might want to read this [blog post](http://blog.evanyou.me/2015/10/25/vuejs-re-introduction/) for a higher level overview. |
7 |
| -
|
8 |
| -After 300+ commits, 8 alphas, 4 betas and 2 release candidates, today I am very proud to announce the release of [Vue.js 1.0.0 Evangelion](https://github.com/vuejs/vue/releases/tag/1.0.0)! Many thanks to all those who participated in the API re-design process - it would not have been possible without all the input from the community. |
9 |
| - |
10 |
| -<!-- more --> |
11 |
| - |
12 |
| -### Improved Template Syntax |
13 |
| - |
14 |
| -The 1.0 template syntax resolves a lot of subtle consistency issues and makes Vue templates more concise and more readable in general. The most notable new feature is the shorthand syntax for `v-on` and `v-bind`: |
15 |
| - |
16 |
| -``` html |
17 |
| -<!-- short for v-bind:href --> |
18 |
| -<a :href="someURL"></a> |
19 |
| - |
20 |
| -<!-- short for v-on:click --> |
21 |
| -<button @click="onClick"></button> |
22 |
| -``` |
23 |
| - |
24 |
| -When used on a child component, `v-on` listens for custom events and `v-bind` can be used to bind props. The shorthands using child components very succinct: |
25 |
| - |
26 |
| -``` html |
27 |
| -<item-list |
28 |
| - :items="items" |
29 |
| - @ready="onItemsReady" |
30 |
| - @update="onItemsUpdate"> |
31 |
| -</item-list> |
32 |
| -``` |
33 |
| - |
34 |
| -### API Cleanup |
35 |
| - |
36 |
| -The overall goal for Vue.js 1.0 is to make it suitable for larger projects. This is why there are many API deprecations. Except for ones that are barely used, the most common reason for a deprecation is that the feature leads to patterns that damages maintainability. Specifically, we are deprecating features that make it hard to maintain and refactor a component in isolation without affecting the rest of the project. |
37 |
| - |
38 |
| -For example, the default asset resolution in 0.12 has implicit fallbacks to parents in the component tree. This makes the assets available to a component non-deterministic and subject how it is used at runtime. In 1.0, all assets are now resolved in strict mode and there are no longer implicit fallbacks to parent. The `inherit` option is also removed, because it too often leads to tightly coupled components that are hard to refactor. |
39 |
| - |
40 |
| -### Faster Initial Rendering |
41 |
| - |
42 |
| -1.0 replaces the old `v-repeat` directive with `v-for`. In addition to providing the same functionality and more intuitive scoping, `v-for` provides up to **100%** initial render performance boost when rendering large lists and tables! |
43 |
| - |
44 |
| -### More Powerful Tooling |
45 |
| - |
46 |
| -There are also exciting things going on outside of Vue.js core - [vue-loader](https://github.com/vuejs/vue-loader) and [vueify](https://github.com/vuejs/vueify) have received major upgrades including: |
47 |
| - |
48 |
| -- Hot component reloading. When a `*.vue` component is edited, all of its active instances are hot swapped without reloading the page. This means when making small changes, e.g. tweaking the styles or the template, your app doesn't need to fully reload; the state of the app the swapped component can be preserved, drastically improving the development experience. |
49 |
| - |
50 |
| -- Scoped CSS. By simply adding a `scoped` attribute to your `*.vue` component style tags, the component's template and final generated CSS are magically re-written to ensure a component's styles are only applied to its own elements. Most importantly, the styles specified in a parent component **does not** leak down to child components nested within it. |
51 |
| - |
52 |
| -- ES2015 by default. JavaScript is evolving. You can write much cleaner and expressive code using the latest syntax. `vue-loader` and `vueify` now transpiles the JavaScript in your `*.vue` components out of the box, without the need for extra setup. Write future JavaScript today! |
53 |
| - |
54 |
| -Combined with [vue-router](https://github.com/vuejs/vue-router), Vue.js is now more than a library - it provides a solid foundation for building complex SPAs. |
55 |
| - |
56 |
| -### What's Next? |
57 |
| - |
58 |
| -As what 1.0.0 usually suggests, the core API will stay stable for the foreseeable future and the library is ready for production use. Future development will focus on: |
59 |
| - |
60 |
| -1. Improving `vue-router` and make it production ready. |
61 |
| - |
62 |
| -2. Streamlining the developer experience, e.g. a better devtool and a CLI for scaffolding Vue.js projects and components. |
63 |
| - |
64 |
| -3. Providing more learning resources such as tutorials and examples. |
| 1 | +--- |
| 2 | +title: Vue.js 1.0.0 Released |
| 3 | +date: 2015-10-26 10:00:00 |
| 4 | +--- |
| 5 | + |
| 6 | +> Hi HN! Jika kau tidak terbiasa dengan Vue.js, kau mungkin ingin untuk membaca [post blog](http://blog.evanyou.me/2015/10/25/vuejs-re-introduction/) untuk tingkatreview yang lebih tinggi. |
| 7 | +
|
| 8 | +Setelah 300+ commits, 8 alphas, 4 betas dan 2 kandidat perilisan, hari ini saya sangat bangga untuk mengumumkan perilisan dari [Vue.js 1.0.0 Evangelion](https://github.com/vuejs/vue/releases/tag/1.0.0)! Banyak terima kasih untuk semua yang berpatisipasi pada proses design ulang API - hal ini tidak akan mungkin terjadi tanpa semua input dari komunitas. |
| 9 | + |
| 10 | +<!-- lebih banyak --> |
| 11 | + |
| 12 | +### Template Syntax yang Lebih Baik |
| 13 | + |
| 14 | +Template syntax 1.0 memperbaiki banyak isu konsistensi dan membuat template Vue lebih concise dan lebih dapat dibaca pada umumnya. Fitur baru yang paling terlihat adalah syntax singkatan untuk `v-on` dan `v-bind`: |
| 15 | + |
| 16 | +``` html |
| 17 | +<!-- singkatan untuk v-bind:href --> |
| 18 | +<a :href="someURL"></a> |
| 19 | + |
| 20 | +<!-- singkatan untuk v-on:click --> |
| 21 | +<button @click="onClick"></button> |
| 22 | +``` |
| 23 | + |
| 24 | +Saat digunakan pada komponen child, `v-on` mendengar untuk event buatan sendiri dan `v-bind` dapat digunakan untuk mengikat properti. Penggunaan singkatan pada komponen child sangatlah ketat: |
| 25 | + |
| 26 | +``` html |
| 27 | +<item-list |
| 28 | + :items="items" |
| 29 | + @ready="onItemsReady" |
| 30 | + @update="onItemsUpdate"> |
| 31 | +</item-list> |
| 32 | +``` |
| 33 | + |
| 34 | +### Pembersihan API |
| 35 | + |
| 36 | +Tujuan keseluruhan dari Vue.js 1.0 adalah untuk membuatnya cocok dengan projek yang lebih besar. Karena itulah banyak pembatalan API. Kecuali untuk API yang jarang digunakan, Alasan paling umum untuk pembatalan API adalah fitur-fiturnya yang menuntun ke pola kerusakan pada proses pemeliharaan. Khususnya, kita membatalkan fitur yang membuat API susah untuk di pelihara dan refactor sebuah komponen isolasi tanpa mempengaruhi isi lain dari proyeknya. |
| 37 | + |
| 38 | +Sebagai contohnya, Resolusi kegunaan awal pada 0.12 mempunyai reaksi negatif ke parent pada pohon komponen. Hal ini membuat aset-aset dapat digunakan pada komponen yang bersifat tidak deterministik dan bagaimana subjek digunakan saat runtime. Di 1.0, semua aset sekarang diselesaikan pada mode ketat dan sudah tidak ada lagi reaksi negatif ke parent. Opsi `inherit` juga dihapus, karena sering menuntun ke komponen yang berhubungan erat yang susah untuk di refactor. |
| 39 | + |
| 40 | +### Render Awal Lebih Cepat |
| 41 | + |
| 42 | +1.0 mengganti `v-repeat` lama searah dengan `v-for`. Sebagai bonus untuk menyediakan fungsi yang sama dan ruang lingkup yang lebih intuitif, `v-for` menyediakan sampai dengan **100%** peningkatan performa render awal saat merender daftar yang besar dan tabel! |
| 43 | + |
| 44 | +### Alat yang Lebih Kuat |
| 45 | + |
| 46 | +Ada juga hal-hal menarik yang terjadi di luar Vue.js core - [vue-loader](https://github.com/vuejs/vue-loader) dan [vueify](https://github.com/vuejs/vueify) telah menerima peningkatan utama yang termasuk: |
| 47 | + |
| 48 | +- Memuat ulang komponen panas. Disaat komponen `*.vue` diedit, semua instansi aktif yang panas bertukar tanpa memuat ulang halaman. Hal ini berarti saat membuat perubahan kecil, atau mengutak-atik style atau template, aplikasimu tidak perlu sepenuhnya dimuat ulang; keadaan komponen aplikasi yang ditukar dapat dipertahankan, meningkatkan pengalaman pengembangan secara drastis. |
| 49 | + |
| 50 | +- Ruang lingkup CSS. Cukup dengan menambahkan sifat `scoped` ke tag komponen style`*.vue`mu, komponen template dan hasil akhir CSS secara ajaib ditulis ulang untuk memastikan komponen style hanya di terapkan di elemennya sendiri. Yang paling penting, style khusus di komponen parent **tidak** turun ke komponen child yang nested di dalamnya. |
| 51 | + |
| 52 | +- ES2015 secara settingan awal. JavaScript sedang berevolusi. Kau bisa menulis kode yang lebih rapi dan ekspresif menggunakan syntax terbaru. `vue-loader` dan `vueify` sekarang mentranspile JavaScript di `*.vue` mu, komponen di luar kotak, tanpa dibutuhkannya pengaturan ekstra. Tulislah masa depan JavaScript hari ini! |
| 53 | + |
| 54 | +Digabung dengan [vue-router](https://github.com/vuejs/vue-router), Vue.js sekarang lebih dari sekadar library - ia menyediakan pondasi kuat untuk membangun SPAs rumit. |
| 55 | + |
| 56 | +### Apa Selanjutnya? |
| 57 | + |
| 58 | +Seperti 1.0.0 biasanya menyarankan, inti API akan tetap stabil untuk masa-masa mendatang dan librarynya telah siap untuk penggunaan produksi. Perkembangan kedepan akan fokus pada: |
| 59 | + |
| 60 | +1. Mengembangkan `vue-router` dan membuatnya siap produksi. |
| 61 | + |
| 62 | +2. Memperlancar pengalaman developer, misalnya alat pengembangan yang lebih baik dan CLI untuk Perancangan projek dan komponen Vue.js. |
| 63 | + |
| 64 | +3. Menyediakan lebih banyak sumber pembelajaran seperti tutorial dan contoh-contoh. |
0 commit comments