Skip to content

HamishPatel/se325-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOFTENG 325 Examples Repository

This repository contains example code demonstrating various concepts introduced in SOFTENG 325 at the University of Auckland.

Index

  • Example 01: Contains a simple example of how to send raw data over a TCP connection.

  • Example 02: Contains an example of how to serialize Java objects and send them across a network connection or convert them into a byte array.

  • Example 03: Contains an example of a simple Java Servlet.

  • Example 04: Contains a simple "hello world" SOAP service written in Java.

  • Example 05: Contains two REST services written using JAX-RS.

  • Example 06: Contains several examples showing how to use Jackson to serialize / deserialize JSON from our Java programs.

  • Example 07: Extends our parolee service running example with support for a custom data format - Java serialization.

  • Example 08: Extends our parolee service running example with support for JSON, without having to manually write out JSON strings.

  • Example 09: A simple example showing JPA and Hibernate usage.

  • Example 10: A much more complex JPA / Hibernate example, showing entity-entity relationships of various cardinalities, inheritance, and several examples of different kinds of JPQL queries.

  • Example 11: A more thoroughly implemented Parolee web service. Written without JPA / Hibernate, for comparison with example 12 below.

  • Example 12: Identical to example 11, but uses JPA / Hibernate for persistence.

  • Example 13: Shows how a rudimentary chat app can be build using JAX-RS support for asynchronous web services. Compare and contrast this with the WebSockets approach in Example 15.

  • Example 14: Builds on example 12, adding an asynchronous web method allowing users to subscribe to parole violations.

  • Example 15: Shows how a rudimentary chat app can be build using WebSockets. Compare and contrast this with the async web services approach in Example 13.

  • Example 16: Shows how we can integrate WebSockets with a larger application, by extending our Parolee web service with support for subscribing to parolee movements.

Bonus examples

  • Bonus 01: A "simple" program using Java Reflection to scan for, instantiate and invoke classes / methods with various annotations. Included to show some of the detail in how JAX-RS and other annotation-based libraries work behind the scenes.

  • Bonus 02: Another program showing off more aspects of reflection. In this example we can see how we can dynamically create proxy instances of interface types using Java's built-in Proxy class (part of its Reflection API). We can even create proxies of object types using the ByteBuddy package, which dynamically writes Java ByteCode for us. These techniques are used extensively in Hibernate for lazy loading and dirty checking purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.3%
  • Other 0.7%