Download presentation
Presentation is loading. Please wait.
1
Think about Lecture 11
2
When you write code Follow the Java conventions. JavaDocs should also include text written by YOU. Semantic information beside the syntactic information. Use the OOD knowledge you have encountered during this and previous courses. Don’t write one class that solves all the world’s problems. MVC rules on this course. Separate and decouple into separate classes with distinct responsibilities.
3
When you write a report Test your user guide so that it actually works. Write comments beside your test runs, to explain anomalies and what happens. Make it easier for the supervisor to understand how you have solved the problem. A class diagram or algorithm may explain important perspectives of your solution, in conjunction with well written text.
4
When the report is corrected by your supervisor Go get feedback A.S.A.P. so that you may finalize your solution/report, and move on. This is about respecting the valuable time of your supervisors. They expect you to visit them soon unless you got a G immediately.
5
Assignment 2b MVC again
6
MVC “You must create a design that follows the MVC design pattern” View related vs Control related flow Index-jsp contains both server side, and client side data manipulation From the client side the user will invoke both view-related, and control- related requests.
7
DTD It is not mandatory to validate your XML- Document inside your servlet. But your XMLDocument (stored in the session object), will be tested against the DTD by the supervisors, so you must make sure the XMLDocument fulfills the DTD.
8
Tomcat examples Notice that the tomcat installation comes with a simple index.jsp http://machine.cs.umu.se:#####/ A simple servlet http://machine.cs.umu.se:#####/servlet/Hello So that you can get basic contact with the jsp and servlet framework. Tomcat also works on Solaris machines. Don’t run on the “main” servers (peppar, salt etc.) http://Support.cs.umu.se contains lists of unix machine names in the computer laboratories
9
JavaBeans Chapter 8
10
JavaBeans summary Is a component model, similar to Microsoft’s ActiveX. A framework for creating reusable Java classes platform independent Why a component model/architecture? Developers wants to build up a portable, reusable code base. Is there a market for JavaBeans? Yes. Reusable software components that can be manipulated visually in a builder tool, a.k.a. beanboxes. Beanboxes uses the Reflections API to inspect the beans.
11
JavaBeans summary Swing components are JavaBeans compliant. There is no common superclass or interface for JavaBeans to extend/implement. It is a matter of adhering to a set of programming conventions For Methods, properties and events. E.g. naming conventions: getX -> X is a property AddXXXListener() -> XXX is an event. See figure 8-2 p551. A beanbox uses the Reflections API to investigate the features of a JavaBean.
12
JavaBeans summary A bean must implement “Serializable”. Uses the same event model as Swing components. Properties may be “bound” i.e. the property has listeners.
13
JavaBeans vs. EJB JavaBeans and Enterprise JavaBeans does not resemble each other very much. They are both component models, but their purpose and packages (base types and interfaces) are completely different. What is Enterprise JavaBeans? EJB is an API specification for building scalable, distributed, component- based, multi-tier applications. Components built on the EJB specification are interprocess components that live in multiple address spaces as distributed object. These components are used as transactional business objects that are accessed as remote objects. JavaBeans Components built on the JavaBeans specification are intraprocess components that live in one address space and are typically used for Graphical User Interface (GUI) as visual widgets like buttons, tables, HTML viewers, etc.
14
JavaBeans and EJB Where can I find more information on EJB and J2EE? The book, Chapters 8 and 14. http://java.sun.com/products/ejb. http://java.sun.com/j2ee/.
15
Bean Builder We can build an application with the Bean Builder, more or less. Build the interface “visually” Set object properties Associate objects with each other Create event handlers Let’s create a simple app that fills a list box with strings. Without writing a single line of code!
16
Bean Builder
17
This model should be associated with the JList object
18
Bean Builder Creating Event Adapters
19
Bean Builder Test run. Not a single line of code was written.
20
And finally
21
My last lecture This conclude my series of lectures for this course Main focus has been on giving you tools to be able to complete assignments Plus some extra stuff. Next week I will start my new job in Ö-vik 10km away. Which means that my day-time office hours will end here (at least if we talk day time hours) I will be available via email as usual I will still have the examination responsibility, and will have frequent communication with Erik and Emanuel. Guest lectures Monday, Tuesday. Set Norman: J2ME, Java 1.5. Be there. I would.
22
Assignment 3 (last assignment) Frogger Specification is published on Monday Minor adjustments from last year Due date… 1 August That is the super final due date. No postponement of that date. Final corrections must be completed before August 10. If you haven’t gotten “G” on all assignments by then, you will have an extra opportunity in November / December (se below) We do have limited time resources to spend on a course. Do your homework now, and get a well deserved vacation in July. Reassignments from this course will be done during 2nd period next fall. (“Programmeringsmetodik B, 4p ”) Erik and Emanuel is likely to be supervisors on that course too.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.