
Short introduction to the course
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)
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
Coming Soon!
Using the pgAdmin tool to create and manage any and all database objects, beginning with login roles, databases, schemas, and tables.
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.
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!