Posts Tagged ‘training’

Practical Roo

Thursday, August 19th, 2010

I have the pleasure of introducing another training course: Practical Roo! Huge discount to whoever guesses what the course is about. Actually no, there’s no discount, but I’d be happy to send my personal well done note.
Now, to the course itself. It is a two-day course, you will need some Java experience, it will help if you have done some Spring and AspectJ coding, but it is not strictly necessary. The modules we are covering are:

Introduction

  • What is Roo, what does it solve and why do we need it?
    • Roo is a code generator
    • The generated code follows contemporary Java/Spring style
    • It is easy to modify / add to the generated code
    • Roo can re-synchronise with the modified code
    • It is easy to remove Roo
  • What Roo isn’t?
    • Not a multi-module, general purpose tool
    • Not a one-way code generator

[10:00]

Hello, World

  • Show Hello, World Roo application (generate & run)
  • Go through the commands we issue (project, persistence, entity, controller)
  • Explore the generated source code (the directories, Maven dependencies)
  • Building Roo applications
  • The apps don’t build using javac? WTF?

[10:40]

Spring Framework Primer

  • What is Spring?
  • What does it solve?
  • Its main components

[12:30]

Food!

AOP Primer

  • Why do we need AOP when we have OOP?
  • Cross-cutting concerns
  • Pointcuts, Advices, JoinPoints and Aspects
  • Dynamic weaving (proxies, subclasses)
  • Static weaving (load and compile-time)

[14:30]

Architecting Hello, World

  • Roo is not just one-way generator
    • It is very difficult to separate out custom code from the generated one
    • Roo splits the generated code from the custom code
    • It uses IDT aspects to simulate .NET’s partial classes
    • Roo can re-examine our code and keep its model of the application up to date
  • Domain objects have persistence methods (just like RoR and Grails)
  • Domain objects are the core of the application
  • Controllers use the domain (and the persistence) to manipulate the data
  • Maven maintains the dependencies and configures the build process (ajc)

[16:00]

Extending Hello, World

  • Add a service
  • Add a handler method to the controller
  • Use & see DI

[17:00]

Sweet, sweet sleep

More AOP

  • AspectJ syntax
  • Mixins
  • Compile-time static weaving using the ajc compiler

[10:00]

Exploring different fields

  • See strings, integers, booleans, dates & friends
  • Declarative validation, custom validation rules

[11:30]

Associations

  • Have a Blog and Post relationship
  • Explore the details of different associations (many-to-one, many-to-many)

[13:00]

Food!

Exploring the web tier

  • Improve the standard data scaffolding
  • Structure of the generated pages, tiles
  • Explore the style sheets, JavaScript and AJAX
  • Roo and REST

[14:30]

Roo and the team

  • What if you have more people working on the same Roo application
  • How to share the Roo code, how to keep the generated code and the Roo sources synchronized
  • Automated builds and tests
  • [16:00]

    Q&A

  • Interesting goodies for exceptional attendees
  • Questions
  • Pet projects

[17:00]

Get booking!

Memory management module updated

Wednesday, March 17th, 2010

I have made significant updates to our memory management and garbage collection training module. Previously, I left out the details of the memory manager in the OS and some of the hardware details of the UMA platforms. I also skipped the low-level details of the JVM and covered just strong, weak, soft and phantom references.

With the new version of the module, the first attendees are going to explore how deep the rabbit hole really goes! I talk about the various types of memory in a computer, then show how the operating system presents this memory to user processes (see Figure 1).
Low-level memory overview
I then take a plunge into memory management in user processes. I start with the simplest memory management strategy: reference counting. Even though it is not applicable to Java and [safe] .NET code, it is still widely used strategy.
Once the reference counting is out of the way, I look at true managed environments. I explore the operation as well as management of the managed heap. The example slide in Figure 2 shows what the JVM does to allocate an object on the heap.
Managed heap
Next, I show what happens when the JVM frees some objects and I don’t skim on the details. You will learn about the defragmentation strategies and you will understand exactly why generational heaps are an excellent idea (see Figure 3).
Heap compacting
But that’s not all. Lifecycle of Java objects is not simply active -> freed; Java objects can be finalizable, in which case, the garbage objects fester around until the finalizer thread deals with them. (Does ‘festering’ sufficiently convey the fact that finalizers are generally not a good idea? Yes? Good!)

Obviously, I did not remove the content on the reference types and their operation and typical usage. So, after taking this module, you will have a good understanding of what the OS and the JVM does to manage memory. You will also be able to use this knowledge to make your Java programs perform much better by configuring the garbage collector and using the appropriate references in your code.

A word of warning, though: this module is complex and you may be wishing that you did not sleep through those hardware architecture and discrete mathematics lectures!

Spring 3 training course

Monday, November 30th, 2009

It is my pleasure to announce that we now have Practical Spring 3 training course. It is a four-day course aimed at beginner Spring developers.

So, if you’re experienced Java developer and want to learn about the Spring Framework, book the course and, in four days’ time, you will be able to create three-tiered Spring 3 web application.

The course outline is

Anatomy of Spring application

Why Spring and how does Spring fit into your application.

What does Spring do?

Dependency injection and AOP; we explain the dependency injection concepts, bean lifecycle, we sprinkle it with the Spring annotations, including SPEL! We then press on with aspect-oriented programming, showing AOP support in the Spring Framework.

The workers

Understand how Spring fits into the data access and middle tiers. We go from JDBC to Hibernate and sprinkle it with a bit of Spring transaction management.

The web

Overview of modern web applications; understanding how Spring’s MVC support makes web programming really easy and efficient. We wrap up with REST support!

The goodies

If there is still some time left at the end of the course, we can include large-scale data processing (using JDBC batching and job monitoring); after which, we show that Spring Batch 2.0 offers the solution out of the box!

Base training

Sunday, September 14th, 2008

The racing season is over, the nights are drawing in and it isn’t raining as much as it did in the summer. It’s time to do a lot of base training. This means hundreds and thousands of kilometres over the next few months. The aim of the base training is to become much more efficient at fat metabolism; in other words, to be able to give as much power as possible using fat as the energy source. I will be doing low-intensity rides and measuring how much my power output increases.
The ultimate aim of this is to be able to use as much fat as possible during a race. At any moment, I have enough energy in fat for at least 20,000 km of easy riding. During a race to sustain the needed power output, the body uses sugar as main type of energy source. The problem is that even if I fully load my glucose stores (liver and muscles), it will only last for about 30 km. So, if I become more efficient at using fat, I will be able to give full power at 40 km time trial.