--- tags: Junior --- # 新鮮人升級工程師 成為優秀軟體開發者的養成之路。 建議你先閱讀過以下文章: * [每個程式設計師都必讀的12篇文章](https://www.techroomage.com/%E6%AF%8F%E5%80%8B%E7%A8%8B%E5%BC%8F%E8%A8%AD%E8%A8%88%E5%B8%AB%E9%83%BD%E5%BF%85%E8%AE%80%E7%9A%8412%E7%AF%87%E6%96%87%E7%AB%A0/) > 要真正學好程式設計需要一輩子的時間,持續規劃的學習與練習。 > > — Ron Jeffries 等,《極致軟體製程:專案應用》 > ## 安裝篇 * IDE * [JDK DownLoad](http://www.oracle.com/technetwork/java/javase/downloads/index.html) * [Spring Tool Suite™](https://spring.io/tools/sts) * [Eclipse](http://www.eclipse.org/downloads/eclipse-packages/) * [IntelliJ](https://www.jetbrains.com/idea/) * DataBase * [Docker](https://www.docker.com/) * [Oracle XE 11g](https://hub.docker.com/r/alexeiled/docker-oracle-xe-11g/) * [安裝 Docker for Windows](http://blog.miniasp.com/post/2016/08/01/Docker-for-Windows-1-12-Released.aspx) * [Oracle SQL Developer](http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html) * Revision control * [Mysql](https://hub.docker.com/_/mysql) * [Subversion(SVN)概念與工具介紹](http://www.cc.ntu.edu.tw/chinese/epaper/0020/20120320_2002.html) * [TortoiseSVN](https://tortoisesvn.net/downloads.html) * [Maven](https://maven.apache.org/) * Eclipse 已內建,除非要使用 `mvn` 否則非必要 * [STS安裝Maven](https://spring.io/blog/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/) * [Gradle](https://gradle.org/) * Android Studio 以及 STS 已內建,除非要使用 `gradle` 否則非必要 * [Eclipse安裝Gradle](http://www.vogella.com/tutorials/EclipseGradle/article.html) * 文字編輯器 * [VS Code](https://code.visualstudio.com/) * 編輯器以上,IDE未滿 * 開發前端利器!! * [Sublime Text](https://www.sublimetext.com/) * [Notepad++](https://notepad-plus-plus.org/) * [Atom](https://atom.io/) * [Git](https://git-scm.com/) * [Git概念](https://www.slideshare.net/lambmei/git-44632221) * [TortoiseGit](https://tortoisegit.org/) * [SourceTree](https://www.sourcetreeapp.com/) * [30天學會Git](https://github.com/doggy8088/Learn-Git-in-30-days/blob/master/zh-tw/README.md) * [Cmder](http://cmder.net/) * [介紹好用工具:Cmder ( 具有 Linux 溫度的 Windows 命令提示字元工具 )](http://blog.miniasp.com/post/2015/09/27/Useful-tool-Cmder.aspx) * [m2e](http://www.eclipse.org/m2e/) ## 開發環境設置篇 ### 開發使用 * [CheckStyle](http://eclipse-cs.sourceforge.net/#!/) * 程式碼風格檢查 * [Sonarlint](https://marketplace.eclipse.org/content/sonarlint) * 程式碼風格檢查 * [Subversive - SVN Team Provider](https://marketplace.eclipse.org/content/subversive-svn-team-provider) * Eclipse 整合 SVN * 安裝好重新啟動時會需要選取 SVN Connectors,選擇 SVN Kit * 若無法安裝則手動加入 update site <http://community.polarion.com/projects/subversive/download/eclipse/6.0/update-site/> * [Properties Editor](https://marketplace.eclipse.org/content/properties-editor) * Eclipse Update Sites: <http://propedit.sourceforge.jp/eclipse/updates/> * 方便編輯 `.properties` 工具 * [Eclipse Properties 顯示中文字](https://coffee0127.github.io/blog/2016/08/15/eclipse-poperties/) * [Lombok](https://projectlombok.org/setup/eclipse) * 省去寫 Getter / Setter / equals / ... 等好工具 * [Lombok 安装、入门 - 消除冗长的 java 代码](http://www.blogjava.net/fancydeepin/archive/2012/07/12/lombok.html) ### 測試使用 * [MoreUnit](http://marketplace.eclipse.org/content/moreunit) * 快速建立單元測試程式 * 測試程式跟實作程式快速切換 * [EclEmma Java Code Coverage](https://marketplace.eclipse.org/content/eclemma-java-code-coverage) * 計算程式碼覆蓋率 ### 非專案使用 *純粹個人推薦* * [Emmet](https://emmet.io/) * [Sublime text 極速應用教學](https://www.slideshare.net/banPrint/sublime-text-51689543) 第15張投影片開始 * [Eclipse plugin](https://marketplace.eclipse.org/content/emmet-ex-zen-coding-eclipse-plugin) * 不過會跟 `ctrl + D` 快捷鍵衝突,需要修改 * [Cheat Sheet](http://docs.emmet.io/cheat-sheet/) * [EasyShell](https://marketplace.eclipse.org/content/easyshell) * [Run-Jetty-Run](https://marketplace.eclipse.org/content/run-jetty-run) * [Eclipse Code Recommenders](http://marketplace.eclipse.org/content/eclipse-code-recommenders/) * Eclipse 4.3 之後內建 ### workspace 設置 * 更改編碼為 UTF-8 * General > Workspace * Text file encoding 改為 Other: UTF-8 * 忽略資源 (避免 commit 不必要檔案至 SVN) * Preferences > Team > Ignored Resources * add the following patterns: ``` .classpath .project */.settings */target */classes */.checkstyle ``` * 將 Tab 字元改以 4 個空格輸出 * Preferences > General > Editors > Text Editors * Displayed tab width: 改為 4 * 勾選 `Insert spaces for tabs` * Preferences > XML > XML Files > Editor * 勾選 `Indent using spaces` * Indentation size 改為 4 * Java Coding Style * Preferences > Java > Code Style > Formatter * Import the [JavaStyle.xml](https://www.dropbox.com/s/hfikamjv1u1xk8f/JavaStyle.xml?dl=0) * Preferences > Java > Editor > Save Actions * 勾選下列選項 * Perform the selected actions on save * Organize imports * Additional actions * 點選 Configure * Code organizing * Remove trailing whitespace & All lines * Code Style * Use blocks in if/while/for/do statements 及 always * Missing Code * 全勾 * Unnecessary Code * Remove unused imports * Remove unnecessary casts * Remove redundant type arguments * 啟用 Eclipse Check Style * 匯入 [CleanCode Checkstyle.xml](https://www.dropbox.com/s/i4ojidehh8n526i/Eclipse%20ccd-checkstyle.xml?dl=0) * [使用教學](http://surpendchen.blogspot.tw/2013/04/checkstyle.html) * 於專案右鍵 -> Properties -> Checkstyle -> 勾選 Checkstyle active for this project 並確認 Rule 為剛剛匯入的 CleanCode Checkstyle ## 學習篇 ### 基礎篇 * [JPA](https://www.tutorialspoint.com/jpa/) * [CRUD Operations with JPA](http://www.objectdb.com/java/jpa/persistence/crud) * Hint: 可試著將現有 Hibernate 專案改為 JPA 專案 * [JPA Criteria API Queries](http://www.objectdb.com/java/jpa/query/criteria) * Goals * JPA 是什麼?跟 Hibernate 的異同? * CRUD * 各種查詢方法的寫法 (JPQL、NativeSQL、CriteriaQuery) * [Spring Framework](http://projects.spring.io/spring-framework/) * [IoC](https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans) * Goals * Spring Bean 的生命週期、Scope * 如何建立 Spring Bean (via XML or annotation) * Dependency Injection * [AOP](https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#aop) * Goals * PointCut、Advice、Aspect 等指什麼 * 如何建立 Aspect / Advisor (via XML or annotation) * [SpringData JPA](http://projects.spring.io/spring-data-jpa/) * [Spring Boot + Spring Data JPA + Oracle example](https://www.mkyong.com/spring-boot/spring-boot-spring-data-jpa-oracle-example/) * [官網範例](https://github.com/spring-projects/spring-data-examples/tree/master/jpa) * 查閱 [example](https://github.com/spring-projects/spring-data-examples/tree/master/jpa/example) 及 [query-by-example](https://github.com/spring-projects/spring-data-examples/tree/master/jpa/query-by-example) * [Reference](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/) * 5.3.1. Query lookup strategies * 5.3.2. Query creation * 5.3.3. Using JPA NamedQueries * 5.3.4. Using @Query * 5.3.5. Using Sort * 5.3.6. Using named parameters * 5.5. Specifications * Goals * [如何建立 Repository 實體](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.create-instances) * 現有程式碼改用 SpringData 實作 * [SpringMVC](http://www.mkyong.com/tutorials/spring-mvc-tutorials/) * [Spring Security](https://projects.spring.io/spring-security/) * [Spring Batch + Quartz](https://www.mkyong.com/spring-batch/spring-batch-and-quartz-scheduler-example/) * [Spring Batch](http://projects.spring.io/spring-batch/) * [Quartz](http://www.quartz-scheduler.org/) * Web Service (JAX-WS) * [Building Web Services with JAX-WS](http://docs.oracle.com/javaee/6/tutorial/doc/bnayl.html) * 如何使用 `@WebService`、`@WebMethod`、`@WebResult`… 等建立 Web Service Server 端 * 使用 [wsimport](https://docs.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html) 建立 WebService Client 端 * SOAP handler (Web Service 的 filter) * [JAX-WS : SOAP handler in server side](http://www.mkyong.com/webservices/jax-ws/jax-ws-soap-handler-in-server-side/) * [@HandlerChain](http://tomee.apache.org/examples-trunk/webservice-handlerchain/) * [使用 Apache CXF、Spring 整合 JAX-WS](http://cxf.apache.org/docs/springboot.html) * [Configuring an Endpoint](http://cxf.apache.org/docs/jax-ws-configuration.html) * Goals * [SOA是什麼](http://www.cc.ntu.edu.tw/chinese/epaper/20070620_1008.htm) * [什麼是 Web Service](http://www.dsc.com.tw/newspaper/46/46-1.htm) * SOAP、WSDL是什麼 ### 進階篇 * [POM Relationships](https://maven.apache.org/pom.html#POM_Relationships) * Goals * 如何加入 `dependency` * `groupId`, `artifactId`, `version` 用途 * [Dependency Mechanism](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html) * Goals * 各 `scope` 之間差異為何 * `dependencies` vs `dependencyManagement` * OS * Windows * [Linux](http://linux.vbird.org/) * CentOS * Ubuntu ### 如果還有時間 * 資料結構 * 演算法 * 計算機組織 * 設計模式 > 要真正變成資深工程師,你除了持續規劃的學習與練習。 > > 還必須懂得思考,工具、框架到底是甚麼?怎麼運作。 > > 不要變成只會使用工具和框架的’工具人’ ### 未來能如何走 * 第一條路線:JS(前端) 你已經有良好的OOP基礎,轉職到JS領域不會太難,主流的React,Angular,Vue + nodejs 這些可以快速上手 PS 只是JS的概念都是函數編程,需要多加學習 * 第二條路線:Python Java轉Python幾乎可以說無痛,後面呢AI,BigData,ML任君挑選, PS 但是如果想走好ML這領域,數學不可少喔 * 第三條路線:Go 這個就比較有挑戰性,不過可以應用的地方也很多,影音串流,微服務,還有許多可以挖掘的領域 * 第四條路線:CloudNative SpringCloud,可以說是Java唯一僅存的一個大領域,依靠大樹,往CloudNative發展,微服務結合DevOps ## 附件 * [Yahei Consolas Hybrid 中英等寬字體](https://www.dropbox.com/s/co44hfvv16ww7je/Yahei.Consolas.1.13.ttf?dl=0) * [Eclipse 快捷鍵](https://www.dropbox.com/s/mgnxudcpnle38m5/Eclipse%E5%BF%AB%E6%8D%B7%E9%8D%B5.txt?dl=0) * [Java 命名慣例](https://www.dropbox.com/s/gavpdfn049tnbpf/%E5%91%BD%E5%90%8D%E6%85%A3%E4%BE%8B.txt?dl=0)