Submit Search
Upload
使用 switch/case 重構程式碼
•
17 likes
•
8,593 views
Weizhong Yang
Follow
KKBOX 內部分享
Read less
Read more
Software
Report
Share
Report
Share
1 of 19
Download now
Download to read offline
Recommended
Oct 20, 2018 iPlayground@NTU
Mixing Objective-C, Swift and Japan
Mixing Objective-C, Swift and Japan
TingTzu Chang
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Weizhong Yang
App 工程師有時候也得要點一下前端開發技能。
給 iOS 工程師的 Vue.js 開發
給 iOS 工程師的 Vue.js 開發
Weizhong Yang
In this tutorial on Kotlin Jetpack, we will learn why Jetpack compose, What is Kotlin Jetpack compose, and How does compose works?. We will also learn about Composable function, Layouts, and material design. At last, we will have a look at the List and animations. What is Kotlin Jetpack compose? Why Jetpack compose? How does the compose work? Composable function Layouts Material design List and animations
Kotlin Jetpack Tutorial
Kotlin Jetpack Tutorial
Simplilearn
Code review in TFS is an important concern. In this presentation we will learn now to implement best practices while doing code review with TFS.
Code review
Code review
Abhishek Sur
This presentation provides an overview of many of the user interface classes available for your use within UIKit, Apple's user interface framework for iOS.
Intro to UIKit • Made by Many
Intro to UIKit • Made by Many
kenatmxm
Input Method Kit
Input Method Kit
Weizhong Yang
On this slide, I explained how the virtual DOM algorithms work and how reactjs uses it under the covers.
The virtual DOM and how react uses it internally
The virtual DOM and how react uses it internally
Clóvis Neto
Recommended
Oct 20, 2018 iPlayground@NTU
Mixing Objective-C, Swift and Japan
Mixing Objective-C, Swift and Japan
TingTzu Chang
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Weizhong Yang
App 工程師有時候也得要點一下前端開發技能。
給 iOS 工程師的 Vue.js 開發
給 iOS 工程師的 Vue.js 開發
Weizhong Yang
In this tutorial on Kotlin Jetpack, we will learn why Jetpack compose, What is Kotlin Jetpack compose, and How does compose works?. We will also learn about Composable function, Layouts, and material design. At last, we will have a look at the List and animations. What is Kotlin Jetpack compose? Why Jetpack compose? How does the compose work? Composable function Layouts Material design List and animations
Kotlin Jetpack Tutorial
Kotlin Jetpack Tutorial
Simplilearn
Code review in TFS is an important concern. In this presentation we will learn now to implement best practices while doing code review with TFS.
Code review
Code review
Abhishek Sur
This presentation provides an overview of many of the user interface classes available for your use within UIKit, Apple's user interface framework for iOS.
Intro to UIKit • Made by Many
Intro to UIKit • Made by Many
kenatmxm
Input Method Kit
Input Method Kit
Weizhong Yang
On this slide, I explained how the virtual DOM algorithms work and how reactjs uses it under the covers.
The virtual DOM and how react uses it internally
The virtual DOM and how react uses it internally
Clóvis Neto
Jetpack Compose simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.
Jetpack Compose - Android’s modern toolkit for building native UI
Jetpack Compose - Android’s modern toolkit for building native UI
Gilang Ramadhan
Try Jetpack Compose
Jetpack compose
Jetpack compose
LutasLin
This article is about aspect oriented programming (aop) in spring. the related example of an application with aop support is in the following address : https://github.com/ghorbanihamid/SpringBoot_AOP_JPA_Example
Spring aop
Spring aop
Hamid Ghorbani
The "Intro to React" session from the Kuali Days 2016 DevCon (http://kualidays.com)
Intro to React
Intro to React
Eric Westfall
同時開發及維護兩個平台的 Mobile App 並不容易,但選擇跨平台技術開發卻常有效能不佳的問題。如何用一個語言開發雙平台應用,同時保有各平台原生的操作體驗及效能,成為跨平台開發者最關注的議題。在這場分享里,將會介紹由 JetBrains 團隊推出的 KMM 技術,運用 Kotlin Native 跨平台開發的特性及在 KMM plugin 的輔助下,開發兩種平台的 Mobile App,並輔以實際案例,讓聽眾對 KMM 的開發工作流程有基本的認識。
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
Shengyou Fan
Droidcon Berlin 2021 - With coroutines being the de facto way of exposing async work and streams of changes for Kotlin on Android, developers are obviously attempting to use the same approaches when moving their code to Multiplatform. But due to the way the memory model differs between JVM and Kotlin Native, it can be a painful experience. In this talk, we will take a deep dive into the Coroutine API for Kotlin Multiplatform. You will learn how to expose your API with Coroutines while working with the Kotlin Native memory model instead of against it, and avoid the dragons along the way.
Coroutines for Kotlin Multiplatform in Practise
Coroutines for Kotlin Multiplatform in Practise
Christian Melchior
NYSwifty 2023 Slides: https://bit.ly/3ooZcK0
Lessons-Learned-SwiftUI.pptx
Lessons-Learned-SwiftUI.pptx
Mohammad Azam
Talk presented during the DevFest Sul 2019, at ACATE - Florianópolis, SC.
Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack Compose
Ramon Ribeiro Rabello
What is AngularJS AngularJS main components View / Controller / Module / Scope Scope Inheritance. Two way data binding $watch / $digest / $apply Dirty Checking DI - Dependence Injection $provider vs $factory vs $service
AngularJs presentation
AngularJs presentation
Phan Tuan
Spring framework core
Spring framework core
Taemon Piya-Lumyong
自從 Android 團隊推出 Jetpack Compose 後,為 UI 開發打開了一條新路線。既然 Jetpack Compose 是由 Kotlin 打造,支援多平台就變得可能。透過 JetBrains 與 Google 兩方的團隊合作,Compose for Desktop 成為開發桌面軟體的新選擇。在這場分享裡,將模擬桌面軟體的開發,使用 Declarative 的風格實作 UI,並討論 Desktop 與 Mobile 的平台差異,以及開發過程中需要注意的細節。聽完這場分享後,會對 Compose for Desktop 的應用及實作方式有基本的認識。
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
Shengyou Fan
React Native
React Native
React Native
Fatih Şimşek
A simple front end project with angular. Its show how to create your first components, include bootstrap templates, create routes and build the project to production.
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
Jadson Santos
In this session you will learn: Understand Spring framework overview & its salient features Spring concepts (IoC container / DI) Spring-AOP basics Spring ORM / Spring DAO overview Spring Web / MVC overview For more information, visit: https://www.mindsmapped.com/courses/software-development/java-developer-training-for-beginners/
Java Spring
Java Spring
AathikaJava
The Spring Framework has always embraced testing as a first class citizen. Spring-based components should be modular, easy to wire together via dependency injection, and therefore easy to test. In fact, when well designed following a POJO programming model, a component in a Spring application can be unit tested without using Spring at all. And when you take the step toward developing integration tests, Spring's testing support is there to make your job easy. Join Spring Test component lead Sam Brannen in this talk to learn about the basics for Spring's unit and integration testing support. This talk will provide attendees an overview of the following topics: unit testing without Spring, integration testing with Spring, loading application contexts (with and without context hierarchies), injecting dependencies into tests, transaction management for tests, SQL script execution, testing Spring MVC and REST web applications, and more.
Testing with Spring: An Introduction
Testing with Spring: An Introduction
Sam Brannen
프로덕션 환경에서 클라이언트 사이드 렌더링을 고집하기란 힘든 일입니다. 서버를 통해 웹사이트를 제공하면서도 React의 편리함을 누리려면 서버 사이드 렌더링(SSR)을 구현해야 하는데요. Create-React-App을 그대로 유지하면서 SSR을 구현하는 과정을 보여드리고자 합니다. TypeScript로도 가능합니다!
Create-React-App으로 SSR을 구현하며 배운 점 (feat. TypeScript)
Create-React-App으로 SSR을 구현하며 배운 점 (feat. TypeScript)
LanarkSeung
Android Jetpack compose completely written in Kotlin, Declarative UI, new way of UI designing in Android. This presentation tells you what it is Jetpack Compose? Why it was introduced? How to implement it? How it works? What happens behind the scenes?
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI
Ajinkya Saswade
Introduction to wonderful Spring Boot framework. Presented by Rasheed (http://se.linkedin.com/pub/rasheed-waraich/46/113/72/) Co-founder Aurora Solutions (http://www.aurorasolutions.io/) & FixTelligent (www.fixtelligent.com)
Spring boot introduction
Spring boot introduction
Rasheed Waraich
Software development best practices & coding guidelines. How to write maintainable, readable code. Following coding standards
Software development best practices & coding guidelines
Software development best practices & coding guidelines
Ankur Goyal
Overview of types of data binding in Angular and HTML 5 background concepts
Angular Data Binding
Angular Data Binding
Jennifer Estrada
使用 Flutter 開發藍芽應用
Flutter BLE
Flutter BLE
Weizhong Yang
放置地圖 Widget 新增 Marker 新增 Polyline 計算 zoom level 顯示 information window 移動地圖、設定樣式 其他…
怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google Maps
Weizhong Yang
More Related Content
What's hot
Jetpack Compose simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.
Jetpack Compose - Android’s modern toolkit for building native UI
Jetpack Compose - Android’s modern toolkit for building native UI
Gilang Ramadhan
Try Jetpack Compose
Jetpack compose
Jetpack compose
LutasLin
This article is about aspect oriented programming (aop) in spring. the related example of an application with aop support is in the following address : https://github.com/ghorbanihamid/SpringBoot_AOP_JPA_Example
Spring aop
Spring aop
Hamid Ghorbani
The "Intro to React" session from the Kuali Days 2016 DevCon (http://kualidays.com)
Intro to React
Intro to React
Eric Westfall
同時開發及維護兩個平台的 Mobile App 並不容易,但選擇跨平台技術開發卻常有效能不佳的問題。如何用一個語言開發雙平台應用,同時保有各平台原生的操作體驗及效能,成為跨平台開發者最關注的議題。在這場分享里,將會介紹由 JetBrains 團隊推出的 KMM 技術,運用 Kotlin Native 跨平台開發的特性及在 KMM plugin 的輔助下,開發兩種平台的 Mobile App,並輔以實際案例,讓聽眾對 KMM 的開發工作流程有基本的認識。
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
Shengyou Fan
Droidcon Berlin 2021 - With coroutines being the de facto way of exposing async work and streams of changes for Kotlin on Android, developers are obviously attempting to use the same approaches when moving their code to Multiplatform. But due to the way the memory model differs between JVM and Kotlin Native, it can be a painful experience. In this talk, we will take a deep dive into the Coroutine API for Kotlin Multiplatform. You will learn how to expose your API with Coroutines while working with the Kotlin Native memory model instead of against it, and avoid the dragons along the way.
Coroutines for Kotlin Multiplatform in Practise
Coroutines for Kotlin Multiplatform in Practise
Christian Melchior
NYSwifty 2023 Slides: https://bit.ly/3ooZcK0
Lessons-Learned-SwiftUI.pptx
Lessons-Learned-SwiftUI.pptx
Mohammad Azam
Talk presented during the DevFest Sul 2019, at ACATE - Florianópolis, SC.
Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack Compose
Ramon Ribeiro Rabello
What is AngularJS AngularJS main components View / Controller / Module / Scope Scope Inheritance. Two way data binding $watch / $digest / $apply Dirty Checking DI - Dependence Injection $provider vs $factory vs $service
AngularJs presentation
AngularJs presentation
Phan Tuan
Spring framework core
Spring framework core
Taemon Piya-Lumyong
自從 Android 團隊推出 Jetpack Compose 後,為 UI 開發打開了一條新路線。既然 Jetpack Compose 是由 Kotlin 打造,支援多平台就變得可能。透過 JetBrains 與 Google 兩方的團隊合作,Compose for Desktop 成為開發桌面軟體的新選擇。在這場分享裡,將模擬桌面軟體的開發,使用 Declarative 的風格實作 UI,並討論 Desktop 與 Mobile 的平台差異,以及開發過程中需要注意的細節。聽完這場分享後,會對 Compose for Desktop 的應用及實作方式有基本的認識。
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
Shengyou Fan
React Native
React Native
React Native
Fatih Şimşek
A simple front end project with angular. Its show how to create your first components, include bootstrap templates, create routes and build the project to production.
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
Jadson Santos
In this session you will learn: Understand Spring framework overview & its salient features Spring concepts (IoC container / DI) Spring-AOP basics Spring ORM / Spring DAO overview Spring Web / MVC overview For more information, visit: https://www.mindsmapped.com/courses/software-development/java-developer-training-for-beginners/
Java Spring
Java Spring
AathikaJava
The Spring Framework has always embraced testing as a first class citizen. Spring-based components should be modular, easy to wire together via dependency injection, and therefore easy to test. In fact, when well designed following a POJO programming model, a component in a Spring application can be unit tested without using Spring at all. And when you take the step toward developing integration tests, Spring's testing support is there to make your job easy. Join Spring Test component lead Sam Brannen in this talk to learn about the basics for Spring's unit and integration testing support. This talk will provide attendees an overview of the following topics: unit testing without Spring, integration testing with Spring, loading application contexts (with and without context hierarchies), injecting dependencies into tests, transaction management for tests, SQL script execution, testing Spring MVC and REST web applications, and more.
Testing with Spring: An Introduction
Testing with Spring: An Introduction
Sam Brannen
프로덕션 환경에서 클라이언트 사이드 렌더링을 고집하기란 힘든 일입니다. 서버를 통해 웹사이트를 제공하면서도 React의 편리함을 누리려면 서버 사이드 렌더링(SSR)을 구현해야 하는데요. Create-React-App을 그대로 유지하면서 SSR을 구현하는 과정을 보여드리고자 합니다. TypeScript로도 가능합니다!
Create-React-App으로 SSR을 구현하며 배운 점 (feat. TypeScript)
Create-React-App으로 SSR을 구현하며 배운 점 (feat. TypeScript)
LanarkSeung
Android Jetpack compose completely written in Kotlin, Declarative UI, new way of UI designing in Android. This presentation tells you what it is Jetpack Compose? Why it was introduced? How to implement it? How it works? What happens behind the scenes?
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI
Ajinkya Saswade
Introduction to wonderful Spring Boot framework. Presented by Rasheed (http://se.linkedin.com/pub/rasheed-waraich/46/113/72/) Co-founder Aurora Solutions (http://www.aurorasolutions.io/) & FixTelligent (www.fixtelligent.com)
Spring boot introduction
Spring boot introduction
Rasheed Waraich
Software development best practices & coding guidelines. How to write maintainable, readable code. Following coding standards
Software development best practices & coding guidelines
Software development best practices & coding guidelines
Ankur Goyal
Overview of types of data binding in Angular and HTML 5 background concepts
Angular Data Binding
Angular Data Binding
Jennifer Estrada
What's hot
(20)
Jetpack Compose - Android’s modern toolkit for building native UI
Jetpack Compose - Android’s modern toolkit for building native UI
Jetpack compose
Jetpack compose
Spring aop
Spring aop
Intro to React
Intro to React
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
Coroutines for Kotlin Multiplatform in Practise
Coroutines for Kotlin Multiplatform in Practise
Lessons-Learned-SwiftUI.pptx
Lessons-Learned-SwiftUI.pptx
Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack Compose
AngularJs presentation
AngularJs presentation
Spring framework core
Spring framework core
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
React Native
React Native
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
Java Spring
Java Spring
Testing with Spring: An Introduction
Testing with Spring: An Introduction
Create-React-App으로 SSR을 구현하며 배운 점 (feat. TypeScript)
Create-React-App으로 SSR을 구현하며 배운 점 (feat. TypeScript)
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI
Spring boot introduction
Spring boot introduction
Software development best practices & coding guidelines
Software development best practices & coding guidelines
Angular Data Binding
Angular Data Binding
More from Weizhong Yang
使用 Flutter 開發藍芽應用
Flutter BLE
Flutter BLE
Weizhong Yang
放置地圖 Widget 新增 Marker 新增 Polyline 計算 zoom level 顯示 information window 移動地圖、設定樣式 其他…
怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google Maps
Weizhong Yang
我對於義務役役期的想法
關於延長役期這件事情
關於延長役期這件事情
Weizhong Yang
Cocoaheads Taipei March 2021
Dart null safety
Dart null safety
Weizhong Yang
GDG DevFest 2019
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
Weizhong Yang
Oct 17 2019. Cocoaheads Taipei.
Github Actions
Github Actions
Weizhong Yang
iPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing Aids
Weizhong Yang
2018/12/13 Cocoaheads Taipei
CocoaPods private repo
CocoaPods private repo
Weizhong Yang
Flutter 踩雷心得
Flutter 踩雷心得
Flutter 踩雷心得
Weizhong Yang
2018 iPlayground Keynote
那些年被蘋果 Ban 掉的 API
那些年被蘋果 Ban 掉的 API
Weizhong Yang
MOPCON 2017
苦集滅道:透過開發客製 Sketch Plug-in 改善產品設計流程
苦集滅道:透過開發客製 Sketch Plug-in 改善產品設計流程
Weizhong Yang
不要寫 if。如果非要寫 if,不要亂寫 if。
怎樣寫出比較沒有問題的 Code
怎樣寫出比較沒有問題的 Code
Weizhong Yang
貪食蛇
貪食蛇
Weizhong Yang
Aspect Oriented Programming
Aspect Oriented Programming
Weizhong Yang
AVFoundation 與 Core Audio 簡介
Mac OS X 與 iOS 的 Audio API
Mac OS X 與 iOS 的 Audio API
Weizhong Yang
Html 5 native drag
Html 5 native drag
Weizhong Yang
Retina mac
Retina mac
Weizhong Yang
Python 的文件系統
Python 的文件系統
Weizhong Yang
我所知道的 Refactoring 小技巧 :)
Refactoring
Refactoring
Weizhong Yang
Core animation
Core animation
Weizhong Yang
More from Weizhong Yang
(20)
Flutter BLE
Flutter BLE
怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google Maps
關於延長役期這件事情
關於延長役期這件事情
Dart null safety
Dart null safety
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
Github Actions
Github Actions
iPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing Aids
CocoaPods private repo
CocoaPods private repo
Flutter 踩雷心得
Flutter 踩雷心得
那些年被蘋果 Ban 掉的 API
那些年被蘋果 Ban 掉的 API
苦集滅道:透過開發客製 Sketch Plug-in 改善產品設計流程
苦集滅道:透過開發客製 Sketch Plug-in 改善產品設計流程
怎樣寫出比較沒有問題的 Code
怎樣寫出比較沒有問題的 Code
貪食蛇
貪食蛇
Aspect Oriented Programming
Aspect Oriented Programming
Mac OS X 與 iOS 的 Audio API
Mac OS X 與 iOS 的 Audio API
Html 5 native drag
Html 5 native drag
Retina mac
Retina mac
Python 的文件系統
Python 的文件系統
Refactoring
Refactoring
Core animation
Core animation
使用 switch/case 重構程式碼
1.
Switch/Case Fika Time zonble
2.
很多時候你不該⽤用 Boolean,⽽而是 Enum
3.
你真的需要 這麼多 Boolean 嗎?
4.
其實你需要的是 Enum
5.
其實你需要的是 Enum • ⼀一起聽只有:未連線、台長、聽眾,三種狀狀態 •
⽤用三個 Bool 會變成八種狀狀態,但有五種狀狀態不可能出現 • 如果進入這五種狀狀態,就是 Bug
6.
⼀一個需要分段載入的畫⾯面 ⽤用了了多個 Bool 表⽰示「是否初次載入」、 「是否載入中」、「是否還需要改入更更多資料」…
7.
⼀一個需要分段載入的畫⾯面
8.
需求往往不是⼀一次提出來來的… • ⼀一開始沒做載入中動畫,為了了呈現載入進度,所以多⼀一個 Bool 判斷… •
⼀一開始沒做錯誤處理理,為了了呈現錯誤,所以多⼀一個 Bool 判 斷… • ⼀一開始沒做 Empty Set,所以多⼀一個 Bool 判斷… • 但,放任歷史的遺跡殘留留,就會讓程式碼失控
9.
UI Stack •Ideal State •Empty
State •Error State •Partial State •Loading State
10.
⼀一個需要分段載入的畫⾯面
11.
加上⼀一點 Swift 特性
12.
⼀一個需要分段載入的畫⾯面
13.
⼀一個需要分段載入的畫⾯面
14.
測試 case 也好寫了了 •
測試某些 Action 是否會讓畫⾯面進入某個 State • 測試某個 State 下 Layout 出來來的畫⾯面是否符合預期
15.
歌曲辨識 其實就是: Empty State Loading State Ideal
State Error State
16.
什什麼可以⽤用 Switch/Case 改寫?
17.
FizzBuzz
18.
根據不同時段給不同圖片
19.
Tuple
Download now