外文翻譯---java學(xué)習(xí)過(guò)程_第1頁(yè)
已閱讀1頁(yè),還剩11頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p><b>  D 科技譯文</b></p><p>  Java Learning Path process</p><p>  Each person's study method is different, a person's method suits another person not necessarily, I only

2、can discuss own study method. Because I study Java am study independently completely, has not asked others, therefore the study process basically is completely oneself tries to find out. I did not know whether this metho

3、d is the quite good method, only could give everybody to provide refers. </p><p>  Studies Java first step installs good JDK, writes Hello World? Actually the JDK study is not so simple, has two questions ab

4、out JDK is very easy to puzzle the Java programmer continuously the place: Is the CLASSPATH question, actually said from the principle, is how must make clear JRE ClassLoader increase Class; Another question is package a

5、nd the import question, how seeks the kind of way question. These two questions tried to find out clear, eliminated has studied Java and uses JDK the bigges</p><p>  Second step is studies Java the grammar.

6、The Java grammar is kind of C++, the basically mainstream programming language is not kind of C, is kind of C++, does not have what new thing, therefore the grammar study, probably was the quite a while time is enough. O

7、nly needs to pay attention is has the key words usage which several is not easy to make clear, public, protected, private, static, when uses, why has to use, how uses, this possible need some people to direct, I initiall

8、y was own ponder ov</p><p>  Third step is studies Java the object-oriented programming language characteristic place. For instance inherits, structure, abstract class, the connection, the method are many co

9、ndition, heavy load, cover, Java exception handling mechanism. Said regarding a not object-oriented language background person that, I thought this process needs to spend the very long very long time, because studies in

10、front of Java does not have C++ the experience, only then the C experience, I was have probably spent </p><p>  Fourth step starts a familiar Java kind of storehouse. The Java foundation class storehouse act

11、ually is JDK installs under the table of contents jre\Lib\Rt.Jar this package. The study foundation class storehouse studies rt.Jar. Inside the foundation class storehouse kind are extremely extremely many. It is said so

12、me more than 3,000, I have not counted. But said the most core truly regarding us only then 4, respectively is </p><p>  Java.Lang.*; </p><p>  Java.Io.*; </p><p>  Java.Util.*; <

13、;/p><p>  Java.Sql.*; </p><p>  These four packages study, each package study all may write thick teaching material, but O'reilly also truly is does this. I thought if time quite tight, is impo

14、ssible through to read four books to study. I thought the quite good study method is such: </p><p>  First must read through entire package the frame, understood entire package class, interface, the exceptio

15、n constitution, should better be can find the introduction entire package frame the article. These introduced specially package of books the first several chapters should be these overall frame content introductions. Is

16、not must be familiar with each kind of usage to the package of overall frame assurance, which attributes remembers it have, the method. Wants to record also cannot remember. </p><p>  Fifth step, through abo

17、ve study, if study the quite solid speech, built the Java foundation, is left over the work which had to do is sweeps clean inside Documentation besides above 4 packages other some comparisons to have the use the kind. B

18、elieved progressed to this step, Java studies independently the ability already to raise, might to study Documentation directly horizontal. Besides must make the GUI programming, inside JDK other can have the use the pac

19、kage is these: </p><p>  Java.Text.*; </p><p>  Java.Net.*; </p><p>  Javax.Naming.*; </p><p>  These packages of inside real correct uses quite many kinds very are act

20、ually few, only then several, therefore does not need to spend the very much time.</p><p>  Sixth step, Java Web programming </p><p>  The Web programming core is the HTTP agreement, the HTTP ag

21、reement and Java irrelevant, if not familiar HTTP agreement, although also may learn Servlet/JSP programming, but cannot achieve extrapolates, by knowing one method you will know all boundary. Therefore the HTTP agreemen

22、t study is necessary. If has been familiar with HTTP agreement, also had the Java programming good foundation, studies Servlet/JSP is simply easy as pie, I study Servlet/JSP has used not to week-long time, then started

23、w</p><p>  In addition Java the Web programming study must place Web Application with emphasis in the design pattern, how carries on the service logic the analysis, and carries on the reasonable design, acco

24、rding to the MVC design pattern request, completes the different logical level separately using Servlet and JSP, how grasps carries on the flow between Servlet and JSP the control and data sharing, as well as how Web sho

25、uld Application dispose and the deployment.</p><p>  Seventh step, J2EE programming </p><p>  The above study process if is quite smooth, carries on to this step, the difficulty enhances suddenl

26、y. Because the above knowledge content all only involves an aspect, but likes EJB, JMS, core the and so on JTA J2EE standard often is several kind of Java technology synthesis utilization crystallization, therefore grasp

27、s the difficulty quite to be big. </p><p>  First certainly must study good JNDI, JNDI is App the Server localization server resources (the EJB module, Datasouce, JMS) searches the method, if to JNDI not fam

28、iliar, EJB, JMS these things cannot study nearly. JNDI actually is javax.Naming.* This package, utilizes is very simple. The difficulty lies in the server resources document the disposition. Regarding the server resource

29、s document disposition, needed to have a look the special documents to be standard, for instance web.Xml mode of writ</p><p>  Then may study JTA, mainly is must understand JTA regarding business control met

30、hod, as well as should use JTA in any situation. Here may simple cite an example, we knew the ordinary circumstances may carry on business regarding a database connection (conn.SetAutoCommit (false)....,Conn.Commit ()),

31、does is an atomic operation, but the supposition my service demand is needs to hold artificially to two different databases is an atomic operation, you can do to? At this time only could use JTA. The </p><p>

32、;  In studies in front of EJB must study the object sequence and RMI, RMI is the EJB foundation. Then studies JMS and EJB, said regarding EJB, most is essential is must understand how EJB is realizes through RMI to the f

33、ar-end object transfer, as well as must use in any situation to EJB. </p><p>  In studies EJB, after JMS these things, you possibly can realize must extremely anxiously study two domains the knowledge, is UM

34、L, another is Design Pattern. The Java enterprise software design takes the frame extremely (Framework) the design, a good software frame is the software develops the successful essential condition. In this time, should

35、start the study key point to place the design pattern and in the frame study, experiences through the study and the actual programming grasps EJB the de</p><p>  Inside J2EE standard, except EJB, JMS, JTA, S

36、ervlet/JSP, outside JDBC also has the very many very many enterprises technology, here 11 did not carry on introduced</p><p>  Moreover also has newest domain Web Services. Web Services also completely does

37、not have any new thing, it likes is one kind of adhesive, may unify the different service provides a unified transfer connection, said as the user, I so long as obtain the service provider for mine WSDL (to service descr

38、iption), has sufficed, I did not know completely the server tenderer provides actually the service is the EJB module,The Net module, any CORBA module, other any realizations, I do not need to know. We</p><p>

39、;<b>  JAVA學(xué)習(xí)過(guò)程</b></p><p>  每個(gè)人的學(xué)習(xí)方法是不同的,一個(gè)人的方法不見(jiàn)得適合另一個(gè)人,我只能是談自己的學(xué)習(xí)方法。因?yàn)槲覍W(xué)習(xí)Java是完全自學(xué)的,從來(lái)沒(méi)有問(wèn)過(guò)別人,所以學(xué)習(xí)的過(guò)程基本上完全是自己摸索出來(lái)的。我也不知道這種方法是否是比較好的方法,只能給大家提供一點(diǎn)參考了。 </p><p>  學(xué)習(xí)Java的第一步是安裝好JDK,寫(xiě)一個(gè)He

40、llo World,其實(shí)JDK的學(xué)習(xí)沒(méi)有那么簡(jiǎn)單,關(guān)于JDK有兩個(gè)問(wèn)題是很容易一直困擾Java程序員的地方:一個(gè)是CLASSPATH的問(wèn)題,其實(shí)從原理上來(lái)說(shuō),是要搞清楚JRE的ClassLoader是如何加載Class的;另一個(gè)問(wèn)題是package和import問(wèn)題,如何來(lái)尋找類(lèi)的路徑問(wèn)題。把這兩個(gè)問(wèn)題摸索清楚了,就掃除了學(xué)習(xí)Java和使用JDK的最大障礙。推薦看一下王森的《Java深度歷險(xiǎn)》,對(duì)這兩個(gè)問(wèn)題進(jìn)行了深入的探討。 </

41、p><p>  第二步是學(xué)習(xí)Java的語(yǔ)法。Java的語(yǔ)法是類(lèi)C++的,基本上主流的編程語(yǔ)言不是類(lèi)C,就是類(lèi)C++的,沒(méi)有什么新東西,所以語(yǔ)法的學(xué)習(xí),大概就是半天的時(shí)間足夠了。唯一需要注意的是有幾個(gè)不容易搞清楚的關(guān)鍵字的用法,public,protected,private,static,什么時(shí)候用,為什么要用,怎么用,這可能需要有人來(lái)指點(diǎn)一下,我當(dāng)初是完全自己琢磨出來(lái)的,花了很久的時(shí)間。不過(guò)后來(lái)我看到《Thinki

42、ng in Java》這本書(shū)上面是講了這些概念的。 </p><p>  第三步是學(xué)習(xí)Java的面向?qū)ο蟮木幊陶Z(yǔ)言的特性的地方。比如繼承,構(gòu)造器,抽象類(lèi),接口,方法的多態(tài),重載,覆蓋,Java的異常處理機(jī)制。對(duì)于一個(gè)沒(méi)有面向?qū)ο笳Z(yǔ)言背景的人來(lái)說(shuō),我覺(jué)得這個(gè)過(guò)程需要花很長(zhǎng)很長(zhǎng)時(shí)間,因?yàn)閷W(xué)習(xí)Java之前沒(méi)有C++的經(jīng)驗(yàn),只有C的經(jīng)驗(yàn),我是大概花了一個(gè)月左右吧,才徹底把這些概念都搞清楚,把書(shū)上面的例子反復(fù)的揣摩,修改,

43、嘗試,把那幾章內(nèi)容反復(fù)的看過(guò)來(lái),看過(guò)去,看了不下5遍,才徹底領(lǐng)悟了。不過(guò)我想如果有C++經(jīng)驗(yàn)的話(huà),應(yīng)該一兩天時(shí)間足夠了。那么在這個(gè)過(guò)程中,可以多看看《Thinking in Java》這本書(shū),對(duì)面向?qū)ο蟮闹v解非常透徹??上У氖俏覍W(xué)習(xí)的時(shí)候,并沒(méi)有看到這本書(shū),所以自己花了大量的時(shí)間,通過(guò)自己的嘗試和揣摩來(lái)學(xué)會(huì)的。 </p><p>  第四步就是開(kāi)始熟悉Java的類(lèi)庫(kù)。Java的基礎(chǔ)類(lèi)庫(kù)其實(shí)就是JDK安裝目錄下面j

44、re\lib\rt.jar這個(gè)包。學(xué)習(xí)基礎(chǔ)類(lèi)庫(kù)就是學(xué)習(xí)rt.jar?;A(chǔ)類(lèi)庫(kù)里面的類(lèi)非常非常多。據(jù)說(shuō)有3000多個(gè),我沒(méi)有統(tǒng)計(jì)過(guò)。但是真正對(duì)于我們來(lái)說(shuō)最核心的只有4個(gè),分別是:</p><p>  java.lang.*;</p><p>  java.io.*;</p><p>  java.util.*; </p><p>  java.

45、sql.*;</p><p>  這四個(gè)包的學(xué)習(xí),每個(gè)包的學(xué)習(xí)都可以寫(xiě)成一本厚厚的教材,而O'reilly也確實(shí)是這樣做的。我覺(jué)得如果時(shí)間比較緊,是不可能通過(guò)讀四本書(shū)來(lái)學(xué)習(xí)。我覺(jué)得比較好的學(xué)習(xí)方法是這樣的:</p><p>  首先要通讀整個(gè)package的框架,了解整個(gè)package的class,interface,exception的構(gòu)成,最好是能夠找到介紹整個(gè)包框架的文章。這

46、些專(zhuān)門(mén)介紹包的書(shū)籍的前幾章應(yīng)該就是這些總體的框架內(nèi)容介紹。</p><p>  對(duì)包整體框架的把握并不是要熟悉每個(gè)類(lèi)的用法,記住它有哪些屬性,方法。想記也記不住的。而是要知道包有哪些方面的類(lèi)構(gòu)成的,這些類(lèi)的用途是什么,最核心的幾個(gè)類(lèi)分別是完成什么功能的。我在給人培訓(xùn)的時(shí)候一般是一次課講一個(gè)包,所以不可能詳細(xì)的介紹每個(gè)類(lèi)的用法,但是我反復(fù)強(qiáng)調(diào),我給你們講這些包的不是要告訴你們類(lèi)的方法是怎么調(diào)用的,也不要求你們記住類(lèi)

47、的方法調(diào)用,而是要你們了解,Java給我們提供了哪些類(lèi),每個(gè)類(lèi)是用在什么場(chǎng)合,當(dāng)我遇到問(wèn)題的時(shí)候,我知道哪個(gè)類(lèi),或者哪幾個(gè)類(lèi)的組合可以解決我的問(wèn)題,That'all!,當(dāng)我們具體寫(xiě)程序的時(shí)候,只要你知道該用哪個(gè)類(lèi)來(lái)完成你的工作就足夠了。編碼的時(shí)候,具體的方法調(diào)用,是邊寫(xiě)代碼,邊查Documentation,所有的東西都在Documentation里面,不要求你一定記住,實(shí)際你也記不住3000多個(gè)類(lèi)的總共將近10萬(wàn)個(gè)方法調(diào)用。所以

48、對(duì)每個(gè)包的總體框架的把握就變得極為重要。第五步,通過(guò)上面的學(xué)習(xí),如果學(xué)的比較扎實(shí)的話(huà),就打好了Java的基礎(chǔ)了,剩下要做的工作是掃清Documentation里面除了上面4個(gè)包之外的其他一些比較有用處的類(lèi)。相信進(jìn)展到這一步,Java</p><p>  java.text.*; </p><p>  java.net.*; </p><p>  javax.nami

49、ng.*;</p><p>  這些包里面真正用的比較多的類(lèi)其實(shí)很少,只有幾個(gè),所以不需要花很多時(shí)間。 </p><p>  第六步,Java Web 編程 </p><p>  Web編程的核心是HTTP協(xié)議,HTTP協(xié)議和Java無(wú)關(guān),如果不熟悉HTTP協(xié)議的話(huà),雖然也可以學(xué)好Servlet/JSP編程,但是達(dá)不到舉一反三,一通百通的境界。所以HTTP協(xié)議的學(xué)習(xí)

50、是必備的。如果熟悉了HTTP協(xié)議的話(huà),又有了Java編程的良好的基礎(chǔ),學(xué)習(xí)Servlet/JSP簡(jiǎn)直易如反掌,我學(xué)習(xí)Servlet/JSP就用了不到一周的時(shí)間,然后就開(kāi)始用JSP來(lái)做項(xiàng)目了。 在Servlet/JSP的學(xué)習(xí)中,重頭仍然是Servlet Documentation。Servlet API最常用的類(lèi)很少,花比較少的時(shí)間就可以掌握了。把這些類(lèi)都看一遍,多寫(xiě)幾個(gè)例子試試。Servlet/JSP編程本質(zhì)就是在反復(fù)調(diào)用這些類(lèi)來(lái)通過(guò)H

51、TTP協(xié)議在Web Server和Brower之間交談。另外對(duì)JSP,還需要熟悉幾個(gè)常用JSP的標(biāo)記,具體的寫(xiě)法記不住的話(huà),臨時(shí)查就是了。 </p><p>  此外Java Web編程學(xué)習(xí)的重點(diǎn)要放在Web Application的設(shè)計(jì)模式上,如何進(jìn)行業(yè)務(wù)邏輯的分析,并且進(jìn)行合理的設(shè)計(jì),按照MVC設(shè)計(jì)模式的要求,運(yùn)用Servlet和JSP分別完成不同的邏輯層,掌握如何在Servlet和JSP之間進(jìn)行流程的控制和

52、數(shù)據(jù)的共享,以及Web Application應(yīng)該如何配置和部署。</p><p>  第七步,J2EE編程 </p><p>  以上的學(xué)習(xí)過(guò)程如果是比較順利的話(huà),進(jìn)行到這一步,難度又陡然提高。因?yàn)樯厦娴闹R(shí)內(nèi)容都是只涉及一個(gè)方面,而像EJB,JMS,JTA等核心的J2EE規(guī)范往往是幾種Java技術(shù)的綜合運(yùn)用的結(jié)晶,所以掌握起來(lái)難度比較大。 </p><p>  

53、首先一定要學(xué)習(xí)好JNDI,JNDI是App Server定位服務(wù)器資源(EJB組件,Datasouce,JMS)查找方法,如果對(duì)JNDI不熟悉的話(huà),EJB,JMS這些東西幾乎學(xué)不下去。JNDI其實(shí)就是javax.naming.*這個(gè)包,運(yùn)用起來(lái)很簡(jiǎn)單。難點(diǎn)在于服務(wù)器資源文件的配置。對(duì)于服務(wù)器資源文件的配置,就需要看看專(zhuān)門(mén)的文檔規(guī)范了,比如web.xml的寫(xiě)法,ejb-jar.xml的寫(xiě)法等等。針對(duì)每種不同的App Server,還有自己

54、的服務(wù)資源配置文件,也是需要熟悉的。</p><p>  然后可以學(xué)習(xí)JTA,主要是要理解JTA對(duì)于事務(wù)的控制的方法,以及該在什么場(chǎng)合使用JTA。這里可以簡(jiǎn)單的舉個(gè)例子,我們知道一般情況可以對(duì)于一個(gè)數(shù)據(jù)庫(kù)連接進(jìn)行事務(wù)控制(conn.setAutoCommit(false),....,conn.commit()),做為一個(gè)原子操作,但是假設(shè)我的業(yè)務(wù)需求是要把對(duì)兩個(gè)不同數(shù)據(jù)庫(kù)的操作做為一個(gè)原子操作,你能做的到嗎?這時(shí)

55、候只能用JTA了。假設(shè)操作過(guò)程是先往A數(shù)據(jù)庫(kù)插一條記錄,然后刪除B數(shù)據(jù)庫(kù)另一個(gè)記錄,我們自己寫(xiě)代碼是控制不了把整個(gè)操作做為一個(gè)原子操作的。用JTA的話(huà),由App Server來(lái)完成控制。 </p><p>  在學(xué)習(xí)EJB之前要學(xué)習(xí)對(duì)象序列化和RMI,RMI是EJB的基礎(chǔ)。接著學(xué)習(xí)JMS和EJB,對(duì)于EJB來(lái)說(shuō),最關(guān)鍵是要理解EJB是如何通過(guò)RMI來(lái)實(shí)現(xiàn)對(duì)遠(yuǎn)端對(duì)象的調(diào)用的,以及在什么情況下要用到EJB。 <

56、/p><p>  在學(xué)習(xí)完EJB,JMS這些東西之后,你可能會(huì)意識(shí)到要急不可待學(xué)習(xí)兩個(gè)領(lǐng)域的知識(shí),一個(gè)是UML,另一個(gè)是Design Pattern。Java企業(yè)軟件的設(shè)計(jì)非常重視框架(Framework)的設(shè)計(jì),一個(gè)好的軟件框架是軟件開(kāi)發(fā)成功的必要條件。在這個(gè)時(shí)候,應(yīng)該開(kāi)始把學(xué)習(xí)的重點(diǎn)放在設(shè)計(jì)模式和框架的學(xué)習(xí)上,通過(guò)學(xué)習(xí)和實(shí)際的編程經(jīng)驗(yàn)來(lái)掌握EJB的設(shè)計(jì)模式和J2EE的核心模式。 </p><p

57、>  J2EE規(guī)范里面,除了EJB,JMS,JTA,Servlet/JSP,JDBC之外還有很多很多的企業(yè)技術(shù),這里不一一進(jìn)行介紹了。</p><p>  另外還有一個(gè)最新領(lǐng)域Web Services。Web Services也完全沒(méi)有任何新東西,它像是一種黏合劑,可以把不同的服務(wù)統(tǒng)一起來(lái)提供一個(gè)統(tǒng)一的調(diào)用接口,作為使用者來(lái)說(shuō),我只要獲得服務(wù)提供者給我的WSDL(對(duì)服務(wù)的描述),就夠了,我完全不知道服務(wù)器提

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論