Advanced Java Programming
Semester V · BCA 303 · 3 credits
0 / 7
chapters done
-
The syllabus asks for
- The map of the Java platform
- Multithreading
- Streams and files
- Object serialization
- Collections and generics in a line
- Seeing the ideas: threads, streams and serialization
Key points
- A thread is an independent path of execution sharing the process's memory; shared mutable data needs synchronisation.
- Executors and futures are the practical way to run tasks concurrently and collect results.
- Java I/O is layered streams; try-with-resources and java.nio.file make file work short and safe.
- Serialization turns an object graph into bytes (and back) and underlies persistence and RMI; transient fields are not saved.
-
The syllabus asks for
- AWT and Swing
- Building a window
- Layout managers
- The delegation event model
- Models and the MVC architecture
- Dialogs, menus and other details
- JavaFX in outline
- Seeing the ideas: windows, layouts, events and MVC
Key points
- Swing components (J...) form a tree under a top-level container and are drawn by the event dispatch thread; long work belongs in a SwingWorker.
- Layout managers position components; nesting panels with different managers builds any layout.
- In the delegation event model a source notifies registered listeners; adapters and lambdas shorten the code.
- Swing separates models from views (MVC): changing the model updates every view through events.
- JavaFX offers a scene graph, binding, CSS and FXML as a modern alternative.
-
The syllabus asks for
- JDBC architecture
- Statements, PreparedStatements and ResultSets
- SQL injection and why we use PreparedStatement
- Transactions
- Batch updates and metadata
- RowSets: connected and disconnected data
- The DAO pattern and connection pools
- Seeing the ideas: drivers, cursors, transactions and pools
Key points
- JDBC defines database-independent interfaces; a vendor driver (type 4 today) implements them; the program loads the driver, connects, runs SQL and processes results.
- PreparedStatement is faster for repeated SQL and the cure for SQL injection; ResultSet is a cursor and metadata describes its columns.
- Transactions make groups of statements atomic through commit and rollback; batching reduces round trips.
- RowSets offer disconnected, scrollable data; the DAO pattern and connection pools separate persistence from the rest of the application.
-
The syllabus asks for
- Addresses, ports and URLs
- TCP sockets
- UDP sockets
- HTTP in Java
- Design notes for network programs
- Seeing the ideas: addresses, sockets, datagrams and HTTP
Key points
- A TCP socket is a reliable byte-stream connection; the server accepts connections and typically serves each in its own thread; the client connects, writes and reads.
- UDP sockets send independent packets without a connection or guarantees.
- The JDK includes an HTTP client and a small HTTP server; URI/URL split names into their parts.
- Real programs need timeouts, framing, TLS, validation and cleanup.
-
The syllabus asks for
- Distributed objects and RMI
- Parameters: by value or by reference
- A complete RMI program
- CORBA
- Seeing the ideas: stubs, copies, wire bytes and failures
Key points
- RMI lets a client call methods on an object in another JVM through a stub; a registry maps names to stubs; the transport is TCP (JRMP).
- Serializable arguments are copied (so the server cannot change the caller's object), remote objects are referenced; the object's state stays on the server.
- Distribution adds failure modes, so remote methods declare RemoteException and callers must handle partial failure.
- CORBA offers language-neutral distributed objects with IDL, an ORB and IIOP but is obsolete in the JDK; REST and gRPC are today's choices.
-
The syllabus asks for
- Web applications and containers
- The servlet lifecycle
- GET and POST, forms and parameters
- Session management
- Filters, listeners and the request dispatcher
- Security basics for servlets
- JavaServer Pages (JSP)
- The MVC pattern with servlets and JSP
- Seeing the ideas: containers, sessions, filters and JSP
Key points
- A servlet container runs Java servlets that turn HTTP requests into responses; one instance handles all requests concurrently, so state must not be kept in fields.
- The lifecycle is init once, service per request, destroy once; HttpServlet routes to doGet and doPost.
- Sessions overcome HTTP's statelessness with cookies, URL rewriting or HttpSession; filters and listeners add cross-cutting behaviour.
- JSP pages are translated into servlets; EL and JSTL keep Java out of the page; MVC separates controller servlet, model classes and JSP views.
- Escaping output, prepared statements, HTTPS and careful session handling are the basic defences.
-
The syllabus asks for
- What is a JavaBean?
- Beans in JSP and in frameworks
- POJO, bean, DTO and EJB
- The enterprise Java map
- Seeing the ideas: beans, events, serialization and the enterprise map
Key points
- A JavaBean is a serializable class with a no-argument constructor and private properties exposed through getters and setters; tools discover these by introspection.
- Bound properties announce changes; constrained properties let listeners veto them before they take effect.
- Beans connect the layers of an application (DAO, servlet, JSP, GUI) and are the basis of form binding in frameworks.
- The enterprise Java stack (Jakarta EE, Spring) builds on the same ideas: servlets, JDBC, beans, injection and transactions.
No chapter matches. Try another word.
The paper
TU assessment: 60% final examination set by the university, 40% internal (assignments, lab work, attendance). Confirm the split in your college's notice.
Where the hours go
Teaching hours are the board's guide to how much of the paper each part carries.
- Unit 2 · GUI Programming: Swing, Layouts and Event Handling10 h
- Unit 3 · Database Programming with JDBC9 h
- Unit 6 · Servlets and JavaServer Pages9 h
- Unit 4 · Network Programming with Sockets and HTTP7 h
- Unit 1 · Foundations for Advanced Java: Threads, I/O and Serialization6 h
- Unit 5 · Remote Method Invocation and CORBA6 h
- Unit 7 · JavaBeans and the Enterprise Java Landscape5 h