
Short introduction to the course
Explore Spring Boot fundamentals, confirm Java installation, and follow the quickstart with variations, including Spring initialization, while understanding Maven's role in managing, building, and deploying Spring Boot projects.
Spring Boot simplifies bootstrapping applications built on the Spring Framework, reduces boilerplate through dependency injection and inversion of control, and supports swapping JPA or Hibernate derivatives via the same interface.
Learn to start a Spring Boot project with the spring.io quickstart, choose Maven, optionally Gradle, pick a Java version, then generate a hello world app ready to run.
Follow the Spring Boot quickstart to run the app via platform-specific commands, start Tomcat on port 1880, and verify the server is running before endpoints are mapped.
Explore Spring Boot quickstart project structure, including root directory, target with jars, and the Maven pom.xml managing dependencies like Spring Boot Starter Web and Spring Boot Starter Data JPA.
Master spring boot quickstart by configuring the application directory, test and main branches, and properties for port 8082 and mappings; build a hello world rest controller with dispatcher servlet routing.
Explore the Spring Boot quickstart by creating a new project, initializing it, and running it from the command line while separating the app from its controllers for clarity.
Learn how maven integrates with your IDE and how re-importing maven projects in IntelliJ or updating the project in Eclipse fixes missing dependencies and red errors.
Embrace Maven's convention over configuration by learning the default directory structure: src/main/java, src/main/resources (static, templates, html files, application properties), and src/test/java.
Learn how Maven coordinates—groupId, artifactId, version, and packaging—along with dependency scopes, manage your project and its libraries, using the pom.xml and the effective pom in Spring Boot projects.
Discover how Maven plugins drive the build lifecycle, from the compiler and clean plugins to release and deploy, and learn to view the effective palm to see all plugin executions.
Explore Maven archetypes to scaffold new apps quickly, using mvn archetype:generate or your IDE's new project wizard in IntelliJ or Eclipse, with filtering options like web or Spring.
Explore Maven basics, including the project object model, dependency management, life cycles, and multi module projects, with recommended resources for deeper study.
Get a quick peek at JPA integration by extending a DTO with JPA annotations, creating an entity and repository, and using CRUD repository methods for create, read, update, and delete.
Create a JPA entity from the DTO aircraft type by annotating it with @Entity, @Table, @Id, @GeneratedValue, and @SequenceGenerator to map fields to database columns.
GP repositories map GP entities to CRUD statements against tables. Extend a JPA aircraft type repository from the Spring Framework Library; auto wired and use save and find by ID.
Examine the service layer by defining an aircraft type service interface and a JPA implementation that uses a repository to find all, find by id, save, and delete, using DTOs.
Explains how the aircraft type rest controller uses class-level and method-level mappings for get, post, put, and delete. Shows using a service, response entities, and optional ID handling.
Learn to call a database service with postman and a browser, using get, put, post, and delete endpoints to manage aircraft type data in a Spring Boot H2 setup.
Implement global Spring Boot exception handling to translate SQL exceptions into user-friendly messages for browser-based clients, guiding users with clear feedback.
Build a client user interface against the FBOs database and web service with Angular, a JavaScript framework for reactive single-page apps that dynamically load only changing data.
Install Node JS and NPM to use the angular cli. The lecture demonstrates Windows GUI and Linux command line installation options for setting up the angular command line interface.
Install Node.js on Windows with a GUI installer, or use a command line package manager as on Linux, then verify installation with node --version and npm --version.
Install node.js on Linux using a package manager across Linux flavors, with the Red Hat example sudo dnf module install node.js 14, and verify using node -v and npm -v.
Develop an Angular app that fetches aircraft type data from a Spring Boot REST service, supports create, edit, delete, and routing between home, list, and edit views.
1.6.3.2: Typescript Concepts: aircraft-type-list.component.ts
TOPICS
-Data Types, Modifiers and Scope
-constructor() and injection
-Class Methods
--Declaration
--Modifier (public or private; public is the default)
--Name
--(Comma-separated list of typed argument names)
--Return type
--{ Body
--Local variable declarations
--Optional try-catch blocks
--Return statement
--}
-ngOnInit() and Lifecycle methods
-HttpClient and calling external webservices
1.6.3.3: Typescript Concepts: aircraft-type-list.component.HTML
Notes and Slides
-Data binding: 1-way and 2-way
--Structural Directives:
--*ngIf [Boolean success/failure]
--*ngFor [="let instance of instances"]
--model.field [instance.shortName]
Data Binding
= Communication between your TypeScript code and your HTML template
Components consist of a Typescript file, an HTML template file and an optional stylesheet file, all with the same root name and different extensions.
Dynamic data is defined in the .ts file and may then be injected into the output HTML via data binding syntax in the HTML template.
Data Binding in aircraft-type-list.html
String interpolation <th width="20%">Select from existing {{ title }}</th> ... <td >{{instance.longName}}</td>
Property Binding
(Out of scope for this discourse; see 1.7)
Event Binding
(Out of scope for this discourse ; see 1.7)
Complete the read-only Angular database app by finalizing the home component, which shows a button linking to the aircraft type records list via the router link.
Topics:
Event Binding, Property Binding, 2-way Data Binding
[routerLink] vs. routerLink (without the square brackets = single element or literal)
Observable
ActivatedRoute
Asynchronous programing (HttpClient methods etc.)
Promises and Observable.toPromise()
async/await
Local References
Template-based Forms
Explore asynchronous programming with observables and promises, how the http client returns observables, and how subscribe, unsubscribe, and toPromise prevent memory leaks.
Explore Angular template-based forms to implement a data maintenance edit screen that inserts and updates business entity data via a web service, emphasizing the forms module import.
Examine the aircraft type edit component in an Angular app, detailing its TypeScript class, create versus update via HTTP post and put, and two-way data binding with ngModel.
Install PostgreSQL and explore pgAdmin and the SQL command line interface. Prepare for schema design with DDL, creating tables, indexes, primary keys, and foreign keys across Windows, Mac, and Linux.
Install PostgreSQL on Windows by downloading the Windows x86_64 installer from postgresql.org, set a data directory, create a password, select English United States locale, and finish after skipping Stack Builder.
Coming Soon!
Using the pgAdmin tool to create and manage any and all database objects, beginning with login roles, databases, schemas, and tables.
Design the database schema and ddl to create all objects for the aviation scheduling demo app, laying the foundation for later web service and ui development.
Explore schema design with a logical data model for aircraft type and aircraft, detailing identifying relationships, inherited keys, and unique constraints to support a Spring Boot and Angular database app.
Master-Detail modules with references to a third Entity
Departure and Destination Airports for a scheduled Flight
Flight and Aircraft
Supporting Aircraft module with two child blocks on the same entity, one for each relationship.
Flights, Aircraft and QUALIFIED Pilots
Enforcement: Physically impossible to violate the business rule in the database
Facilitation: Based on a design pattern that may be interpreted, not necessary to hard-code for each case
Supports Master-Detail Flight module with Flight Crew Member references to Pilot; Enhanced Master-Detail Pilot module with Certifications AND child Flight Crew Member references to Flight.
Transform the logical data model into a physical model tailored for postgres by generating a physical schema, validating, and inspecting tables, keys, and data types.
Generate PostgreSQL DDL from a complete physical data model, producing create table statements, primary and foreign keys, constraints, and indexes, with an interactive wizard and SQL preview.
Execute PostgreSQL DDL in pgAdmin to clean the schema, set the search_path, run a SQL script, manage dependencies and foreign keys, and verify tables before continuing app development.
Discover why PostgreSQL triggers matter for data integrity and derived values, including before insert and instead of triggers on views, with PL/pgSQL examples generating aircraft IDs and flight identifiers.
Learn to develop enterprise applications with a relational database back end, a Java Spring Boot webservice middle tier and an Angular/Typescript client user interface app.
This introductory course demonstrates building out a complete 3-tier application operating upon one single database table; then designing and building an increasingly sophisticated schema of tables and views for a demo Aviation scheduling app.
Future advanced courses based on this one will flesh out the webservice and client UI apps to operate upon all of the tables in the demo app schema and navigate their relationships: Identifying and non-identifying foreign keys; One-to-many (1:M) and Many-to-Many (M:N) relationships; associative/cross-reference entities; set-based business rules.
This course assumes some basic knowledge of Java, HTML and SQL but will take you from Zero on Spring Boot, Maven, Angular/Typescript, ER/Studio and PostgreSQL.
The course is evolved from my 2012 book "Java Web Database Application Development" and is based on nearly 30 years of real-world, hands-on professional experience. It is the course I WISH I could have taken when I needed to learn this stuff.
TOPICS INCLUDE:
Demo App: “FBOAce” Aviation Scheduling System
Spring Boot
Spring Boot 101 / Hello World
Maven 101
H2 In-memory database
Java Persistence API (JPA)
Data Model Entity Beans, a.k.a. Data Transfer Objects and JPA Annotations
Webservice architecture: Components (Controllers, Services, Repositories)
Inversion of Control, Dependency Injection, Autowiring
JSON
Postman
Exception Handling
Input validation
Client UI HTML independent of technology
Angular/Typescript:
Angular 101 / Hello World
Node, npm, Angular cli
ng serve
Modules and components
Essential Angular directories, files and/or components:
src/main.ts, src/index.html, src/app/app-module.ts, src/app/app.component.ts/html/css
Typescript imports, @NgModule, export class, @Component decorator…
Calling webservices with HttpClient
Strict Mode
Reading Configuration Parameters (from json file)
Data Types, Modifiers and Scope
constructor() and injection
Class Methods
ngOnInit() and other Lifecycle methods
Typescript Data Types (most common): Primitives, Arrays, Objects (instances of Classes or Interfaces), any and unknown, Enums
Explict vs. Implicit Declarations
async, await() and Promise
Data binding: 1-way, 2-way
Structural Directives: *ngIf (boolean), *ngFor (loop)
Routing: <router-outlet>, ActivatedRoute, the routerLink Directive
String interpolation
Property Binding
Event Binding
The Home component and application components
Listing instances of business entities / database records
Template-based forms: Editing and submitting instances of business entities
Observables
Asynchronous programing
Promises and Observable.toPromise()
Local References
PostGreSQL 101
Installation
Using PgAdmin to navigate databases, schemas, tables, views and more
Using psql (command-line tool)
Application data queries and metadata queries
CasE sEnsiTIVity in PostGreSQL
Executing DDL to create schema objects
PostgreSQL PL/pgSQL Programming: Trigger functions and triggers that call the functions
“Instead-of” triggers on API Views
Relational Database Design, Theory and Practice
Schema Design (for complete/advanced demo app) and SQL DDL (data definition language statements)
Logical and Physical Data Models
ER Studio Demo
Attributes/Columns
Primary keys, alternate unique indexes
Identifying and non-identifying relationships/foreign keys
One-to-many (1:M) and Many-to-Many (M:N) relationships; Associative/cross-reference entities
Multiple relationships between/among the same entities
“Super” unique keys
SQL data types
Set-based business rule facilitation and enforcement
Database (API) views and the “driving” table
And more!