More programming with Java

From Juneday education
Revision as of 11:50, 25 December 2018 by Rikard (Talk | contribs) (Java Language: Link to Java:Language_-_Optionals_-_Exercises)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This book is a work in progress

This book is being written and is not yet completed. Feel free to dive in and start reading anyway. Of course all feedback is welcome by the Authors.

Introduction

This book is a follow-up to our first book on Java, Programming with Java. It can be used for self-studies, or as course literature for a second Java course (a course which would follow an introductory Java course).

Regards from the authors: Rikard Fröberg and Henrik Sandklef

Before reading this book

Intended audience

Any one with basic knowledge of Java and programming, who wants to learn a little more about Java and some slightly more advanced topics.

Requirements

This book assumes you have knowledge of the Java programming language and some experience from writing programs using Java. If you feel that you need to freshen up your Java knowledge before starting with this book, we recommend our first Java book, Programming with Java. The chapters related to JDBC (database connectivity) require basic knowledge about SQL and SQLite. You can freshen up your SQL skills by reading our book Introduction to Databases.

As with all our teaching materials, we are using the command line and the Bash shell in our examples and exercises. Therefore, we recommend that you freshen up also your bash skills, before using the material presented here. We recommend at least Bash-introduction but it doesn't hurt if you look a little at also the Bash_Programming materials.

Chapters

Java standard API

Java Language

Java Language completeness

Topic/page Text and examples Meta-section Num. videos Num. exercises Slides
Java:Language - Arrays YES - 11 pages
when printed
NO 0 0 NO
Java:Language_-_Classloading_and_Object_intialization NO NO 6 0 YES - 19 pages
Java:Language_-_Enums YES - 8 pages
when printed
NO 1 2 YES - 14 pages
Java:Language_-_Collections YES - 10 pages
when printed
NO 8 7 Yes, 2
11+16 pages
Java:Language - Streams and Lambdas YES - 12 pages
when printed
NO 7 4 Yes - 31 pages
Java:Language - Ternary operator YES - 2 pages
when printed
NO 1 0 Yes - 8 pages
Java_assert YES - 2 pages
when printed
NO 0 0 NO
Java:Language_-_Optionals YES - 3 pages
when printed
NO 0 0 NO
Java:Language_-_SPI YES - 13 pages
when printed
NO 0 0 NO
Java:Language_-_==_vs_equals YES - 4 pages
when printed
NO 1 live 0 NO
Java:Language_-_Static_or_non-static YES - 4 pages
when printed
NO 4 0 Yes, 9 pages

Design patterns in Java

Design patterns completeness

Topic/page Text and examples Meta-section Num. videos Num. exercises Slides
Design patterns - introduction YES NO 3 1 YES - 22 pages
Object oriented principles YES NO 4 1 YES - 18 pages
Design patterns - Builder YES - 8 pages
when printed
NO 2 + 6 1 YES - 2
16 + 21 pages
Design patterns - Singleton YES NO 2 1 YES - 10 pages
Design patterns - Exceptions patterns YES NO 4 1 Yes - 18 pages
Design patterns - Factory YES NO 2 + 2 + 2 1 Yes 3
11 + 8 + 14 pages
Design patterns - Decorator YES NO 2 1 YES - 17 pages
Design patterns - Strategy YES NO 2 1 YES - 11 pages
Design patterns - Observer YES NO 3 1 YES - 23 pages
Design patterns - Dependency Inversion Principle YES NO 0 1 NO

Database and JDBC related

Extra lectures

GUI programming in Java

JavaFX

We'll add pages about JavaFX as soon as we have learned and used it enough ;-)

Swing

Statistics:

  • Current size: 16 pages with texts and examples when printed
  • 7 topic wiki pages
  • 5 lecture slides
    • 102 pages presentations (7+15+22+21+37)
  • 1376 lines of code in examples
  • 22 videos in 2 channels (so far)

Chapters:

Bonus/extra materials on Swing:

Swing completeness

Topic/page Text and examples Meta-section Num. videos Num. exercises Slides
Java-Swing:Introduction to Swing YES - 3 pages
when printed
Introductory page
N/A N/A N/A N/A
Java-Swing:Introduction to Swing - Introduction to JFrame YES - 2 pages
when printed
Could use examples.
NO 2 0 YES - 7 pages
Java-Swing:Introduction to Swing - Introduction to JButton YES - 2 pages
when printed
Could use examples.
NO 4 0 YES - 15 pages
Java-Swing:Introduction to Swing - Introduction to JTextField YES - 2 pages
when printed
Could use examples.
NO 4 0 YES - 22 pages
Java-Swing:Introduction to Swing - Introduction to JLabel YES - 2 pages
when printed
Could use examples.
NO 2 0 Yes - 21 pages
Java-Swing:Introduction to Swing - Introduction to Layout Managers YES - 3 pages
when printed
NO 0 0 NO
Java-Swing:Introduction to Swing - A GUI for the Address book assignment YES - 2 pages
when printed
Could use examples.
NO 10 0 Yes - 37 pages

Miscellaneous

Development tips

Logging (custom logger)

New stuff added to Java 7

Addresses Try-with-resources, multiple catch, Autoclosable, Paths, Files, etc.

Network programming

  • A Java Chat Server And Client 5 pages
    • TODO: find the chat server and client source code - you'll need it to give this lecture
    • TODO: Videos
  • Calling a service from a Java client
    • Description: Slides for a lecture on how to call a Servlet from a command line Java application, get either XML or JSON from the Servlet, and use a factory to get a parser for either XML or JSON, which creates a List<User> from the data. The main method gets the list, loops over it and prints each User to the standard out. 13 pages. (PDF, English)
    • TODO: Video
    • TODO: Wiki page (possibly add to existing wiki page)

Puzzles

Threads

Java tools etc

Chapters about the tools which come with your JDK installation (java, javac, jar, etc) and related Java tech stuff.

Tools completeness

Topic/page Text and examples Meta-section Num. videos Num. exercises Slides
Java:Tools:Java Short NO 0 0 NO
Java:Tools:Javac YES - 4 pages
when printed
NO 0 0 NO
Java:Tools:Javadoc Short NO 0 0 NO
Java:Tools:Javah Short NO 0 0 NO
Java:Tools:Jdb Short NO 0 0 NO
Java:Tools:Javap Short NO 0 0 NO
Java:Tools:Jar YES - 4 pages
when printed
NO 1 0 YES - 11 pages

Book companion - TBD

We might add some extra reading material here.