Persistence-Tutorial-Companion-Document
39 pages
Slovak

Persistence-Tutorial-Companion-Document

-

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
39 pages
Slovak
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

Ecli pse and Jav a: Introd ucing Persiste nceComp anion Tutorial Docum entVersion 1.3 (Febru ary 5, 2008)By M ark Dext erTable of Co ntentsIntrod uction & Setup..............................................................................................................2Playing the L essons........................................................................................................................2C losed C aptions and Lesso n Table of Co ntents.................................................................................3Tutorial Target Aud ience.........................................................................................................3Tutorial Obj ectives.................................................................................................................3Tutorial Appro ach..........................................................................................................................3Getting The Most From This Tutorial.......................................................................................4D ownloading an d Insta lling Ec lipse...........................................................................................4Lesson Outlin es..................................................................................................................................5Lesso n 1 ........................................................................................................................... ...

Informations

Publié par
Nombre de lectures 102
Langue Slovak

Extrait

Ecli pse and Jav a: Introd ucing Persiste nce
Comp anion Tutorial Docum ent
Version 1.3 (Febru ary 5, 2008)
By M ark Dext er
Table of Co ntents
Introd uction & Setup..............................................................................................................2
Playing the L essons........................................................................................................................2
C losed C aptions and Lesso n Table of Co ntents.................................................................................3
Tutorial Target Aud ience.........................................................................................................3
Tutorial Obj ectives.................................................................................................................3
Tutorial Appro ach..........................................................................................................................3
Getting The Most From This Tutorial.......................................................................................4
D ownloading an d Insta lling Ec lipse...........................................................................................4
Lesson Outlin es..................................................................................................................................5
Lesso n 1 ............................................................................................................................5
Lesso n 2 ................5
Lesso n 3.............................................................................................................................5
Lesso n 4................5
Lesso n 5................6
Lesso n 6............................6
Lesso n 7................6
Lesso n 8................7
Lesso n 9................7
Lesso n 10................7
Lesso n 11........................................................................................................................................7
Lesso n 12............................................................................................................................7
Ad ditional Res ources...................................................................................................................8
Lesso n-Spec ific Resources.....................................................................................................8
Genera l Resources.......................................................................................................................8
Ecli pse W ebsites..............................................................................................................8
Ja va W ebsites.................................................................................................................................8
Ja va Books ..........................................................................................................................9
Alphabetical Index b y Lesson.....................................................................................................9
C ode Sna pshots................................................................................................................12
Lesso n 1 – Scrapbook.............................................................................................................12
Lesso n 2 – AllT ests.................................................................................................................12
Lesso n 2 – M yUtilitiesTest (in process) ........................................................................................12
Lesso n 3 – M yUtiltiesTest (test saveStringT oFi le) ......................................................................13
Lesso n 3 – M yUtilties (Auto-ge nerated metho d stubs from Quick Fi x).....................................13
Lesso n 4 – M yUtilties (saveS tringToFil e complete) .......................................................14
Lesso n 4 – Optio nal Scrap book E xamples.....................................................................14
Lesso n 5 – M yUtilities (saveStringT oFi le() and g etStringFromFile() comp lete) .......................15
Lesso n 6 – M yUtilitiesTest ( with createM yLibrar y() method) ........................................................16
Cop yright © 2007 Mark Dexter . Licensed under the Educational Co mmunity License version 1.0. Page 1 of 39Ecli pse and Java: Introduci ng Persistenc e
Tutorial Comp anion D ocument
Lesso n 7 – M yUtilitiesTest ( with convertToXML() metho d).............................................17
Lesso n 7 – M yUtilities ( with completed convertToXML() an d convertFromX ML() methods) .....19
Lesso n 8 – M yUtilities ( with cd saveM yLibrar yToXMLFi le() and
getM yLibrar yF romXMLFil e() methods) ........................................................................................20
Lesso n 8 – M yUtilitiesTest ( with completed saveToXMLFi le() method) .......................................21
Lesso n 9 – M yUtilities (co nvertToXML() and co nvertFromXM L() methods mod ified) ..................23
Lesso n 10 – manifest.t xt file ..................................................................................................25
Lesso n 10 – M yLibr ary (w ith updated main() method) ..............................................................25
Lesso n 11 – Fi nal M yUtilitiesTest ( with saveT oSerialFile() meth od) .................................28
Lesso n 11 – M yUtilities (w ith sa veM yLibrar yToSerialFile() method) ........................................30
Lesso n 12 – Fi nal Book C lass......................................................................................................32
Lesso n 12 – Fi nal M yLibrar y Cl ass..................................................................................33
Lesso n 12 – Fi nal M yUtilities Cl ass............................................................................................36
Lesso n 12 – Fi nal Perso n C lass................................................................................................38
Lesso n 12 – Fi nal AllT ests Cl ass............................................................................................39
Introduction & Setu p
This docum ent is designed to accompany the “Ecl ipse And Ja va: Intro ducing Persistence” video
tutorial, w hich is a vailable at http://eclipsetutor ial.sourc eforge.net/ . Before startin g this tutori al, please
download the following fil es from the w ebsite:
● Persistenc e-T utorial-Com panion-D ocument.PDF – this document.
● persistencetutorial.zip – zip file for importi ng the Ec lipse PersistenceTutorial pr oject. This is
done as part of Lesso n 1.
● persistence-le sson0 1.zip through p ersistence-l esson12.zip – zip fil es for the 12 less ons in the
tutorial
Playing the Lessons
1.Unzip each le sson's zip fil e into a directory on y our system.
2.Find the file ca lled “l essonxx.h tml”, where xx is the lesso n number 0 1-12.
3.Open this file w ith your browser (e.g., Intern et Explorer or Firefo x) and press the lar ge pla y
button on the video thumbnail. The lesson sh ould p lay ins ide the bro wser. Note that you need
to have the Ad obe Flash pl ayer insta lled o n your system. This can be d ownloaded from Adob e
at http:// www.adobe.com/products/flashp layer/.
Alternativel y, you can just ope n the fil e “lessonxx.s wf” w ith your br owser. In W indows Internet
Explorer you might get a securit y w arning a nd need to click a nd select “All ow block ed content”. If you
open the lessonxx.swf file dir ectly (as opposed to l essonxx.h tml), you can resiz e the video to any
desired size, makin g it l arger or smal ler. Note that playing the v ideo from the less onxx.html file w ill
provide the clear est ren dition of the v ideo but does not allow resiz ing.
Cop yright © 2007 Mark Dexter . Licensed under the Educational Co mmunity License version 1.0. Page 2 of 39Ecli pse and Java: Introduci ng Persistenc e
Tutorial Comp anion D ocument
Closed Captions and Lesson T able of Contents
The aud io track of each l esson can b e accompanied b y clos ed captio ns (subtitles), which display in
the lo wer portion of the video. Press the “CC” button in the l ower rig ht cor ner to togg le them on and
off. Each le sson als o contains a tabl e of contents that allows you to jump to a specified point ins ide
the v ideo. To acc ess the tab le of co ntents, click o n the Table of Conte nts ico n in the lower right corner
of the video. Nex t to the Table of C ontents control is the V olume control. The controls are shown
above.
Tutorial T arget Audience
This tutorial is targete d for pe ople wh o have com plete the tutorial “Ecl ipse an d Java for Total
Beg inners” or w ho have some fami liarity w ith Ecl ipse an d Java.
Tutorial Objectives
The obj ectives of this tutoria l are to:
 D emonstrate how to save Java objects to disk files, using e ither XM L or ob ject serialization
 D emonstrate how to use the JUn it 4.0 unit testin g framework in Ecl ipse and h ow to convert
from JUn it 3.8 to 4.0 in Eclips e
 D emonstrate time-saving Ecli pse features relate d to Java development
 D emonstrate usi ng Eclips e to explore the Java cl ass libraries
Tutorial Approach
The tutorial is org anized around the following activities. W e w ill start wi t

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents