Daily Tasks – Thursday, 04.12.2014

  • Lecture: 3 hours (double session)
  • Literature:
    • Java EE Tutorial: Introduction to Facelets (Chapter 8): http://docs.oracle.com/javaee/7/tutorial/doc/javaeetutorial7.pdf

Lecture

In today’s lecture each student presented their learning units for our round 2 of evaluation. This time, we should pick up some video- or audio-based units.

Even if we didn’t have slides in this lecture, I could learn a lot on oral presentations and the special requirements for our learning unit evaluation reports. First I noticed how important it is to prepare for the presentation (this might sound obvious, but due to the variable quality of the oral presentations, it’s worth to think about). As the reports follow a standard form, also the oral presentation should follow the same logical structure. That doesn’t irritate the audience. You should also know the learning unit that you describe very well so that you can navigate through it during your presentation confidently.

Regarding the contents, I also noticed how important it is to keep being neutral.  The goal of the evaluation is it to analyze offered learning units – that contains criticism, of course, but it should be constructive. We should learn how to develop better learning units instead of only criticising.

So let me sum up the learning goals as usual:

  • The learner is able to prepare oral presentations following a standard form.
  • The learner can write reports that fulfill academical criteria, such as neutral language.

 

Literature

The literature today wasn’t related to our “Didaktics” course, but I read it to improve our Java Enterprise (JEE) project in the module “Web Applications”.

The JEE Tutorial is a really detailed documentation of nearly all components within JEE applications that run on an JEE application server. Today, I focused on the Java Server Faces (JSF) technology to get more benefit from it. I already knew the basics and was really pleased about features such as the automatical binding of backend models to JSF views, but didn’t know about further features that I could use.

So I wanted to learn on how you can create JSF components for specific input fields, so that you don’t have to duplicated view logic in different places. For example, looking at the definition of an username input field in our application, you can define a single JSF file to define the pair of labels, the input field itself and all the validation processing that is related to this field. That means, you define it in one central place and can reuse it everywhere.

On the other side, I wanted to add compelte HTML5-compatibility so that the browser also does a lot of validation before the JSF validators are called after the request. HTML 5 offers a lot of attributes on input fields to allow validation without having the need to write javascript, such as the new pattern – attribute. There, you can define patterns to validate the input – and because we have JSF validator classes in our backend, we could easily extend our own validator interface, add a getPattern()-method and offer a unique pattern that will be rendered as HTML5 pattern attribute. So we have one pattern for both frontend and backend validation. Isn’t that a nice example for cross-platform development – even if it is a small example? I like the special capabilities of JEE here. Especially, if you think about the fact that each validator instances is managed by the application container – so the instances will be kept in a pool and can be reused. That allows to avoid the initialization work.

So let me summarize the learning goals:

  • The student is able to develop reusable JSF components to encapsulate view code to define input fields and related code.
  • The student is able to add HTML 5 support to JSF components.