Digital Development Java EE 7 Workshop – London – June 2016 – Agenda

May 4th, 2016 No comments

Several people have wondered about workshop / training course on Java EE 7 development with a modern web architectural focus, in particularly, I know some people have asked for information on building sustainable and adaptive software digitally.

I am announcing a two day training course in London on Monday 6th and Tuesday 7th June 2016 course. The content is loosely based on my recent book Digital Java EE 7. Attendance is limited. It runs just before Devoxx UK conference. If you are attending in London, you could be also interested in this workshop / training course. I will need to numbers of interested / registered ASAP to fire ahead.

London Workshop Agenda

Here is the prototypical agenda:

  • This so-called Digital New World Order
  • Java EE Fundamentals
    • Modern digital web architecture
    • Inversion of control including CDI
    • Interceptors
    • Writing controllers
    • Java EE Persistence
    • Transactions
  • Remote Endpoints
    • Java RESTful Services including JAX-RS
    • WebSocket
  • Testing Java EE code like a Pro
  • Integration testing
  • View Technology
    • HTML5 JavaScript CSS
    • JavaServer Faces, Facelets and UI templating
    • Bean Validation
    • Client side Validation
    • AJAX
    • Modern JavaScript and JavaScript Frameworks
    • Single page architecture applications
    • Java EE 8 MVC
  • Professionalism in IT
    • Hints and tips on dealing with Agile business in your team
    • Dealing with fearless change – Getting good and then becoming great
    • Coping with failing Agile project with a big “A”
  • Essential architecture and principles

The workshop costs £555 excluding VAT (United Kingdom 20% tax) per day. This is the introductory offer and it is the only offer! I will need to have at least four delegates to confirm the training course. There are 10 places to secure, first come, first served.

Please contact me or register with me on peter (dot) pilgrim (at) gmail (dot) com for further information.

You will need to bring your own professional grade workstation laptop. I would strongly suggest the following profile:

  • Microsoft Windows 7 or 10, Apple Mac OS X Yosemite or better; or working modern Linux
  • 8GB of RAM is adequate, 16GB would be fantastic
  • Fast hard disk drive; solid-state disk is terrific
  • At least 10GB of free disk space
  • Download or install Java SE 8 (JDK 1.8) from Oracle
  • Use an IDE, I strongly recommend Jetbrains IDEA, you can work with NetBeans or Eclipse – your choice
  • Update your web browsers to the latest standard: Chrome or Firefox – you need the developer plugins tools
  • Pre-install Git version control system beforehand
  • Finally, let’s have a clean and ready-to-go laptop, please defragment your working drive beforehand, reduce any overbearing background processes and tasks

References

I am the author two books available from Packt Publishing:

I am of course the instructor of the course and a Java Champion #91. I have been developing professional Java software since 1997/1998. I am also VAT registered with a trading UK limited company.

 

Anecdote

Signetics_NE555N

The 555 timer was and is an silicon integrated circuit (IC) chip with eight pins. It was popular for beginners, secondary school children and undergraduate students learning about practical electronics in the 1970s and 1980s. Originally invented by Hans Camenzind, in 1971 if was the one of the best loved devices, because it was economical, general and versatile oscillator and a great little electronic timer, built by Texas Instruments. The 555 Timer IC was so great that other manufacturers copied its design, there was a even model produced in the USSR behind the iron-curtain at the height the Cold War.

The timer chip was able to produce sound through an oscillator, transistor amplifier and a small 3″ loudspeaker. The timer acted as a very sensitive a switch through a bistable circuit called a Schmidt Trigger, you build an elementary burglary alarm with a photoelectric resistor. The timer chip could even count button presses one by one and if you wired it up specially through special breadboard you could create your microelectronic “disco” with red LED lights. The 555 IC was fun to experiment with, and it was terrific for electronics novices like me. Once upon I time, I was also a beginner. That is the entire point of the reminiscence and also the price of the workshop/course.

Amazingly, the 555 is s still available, it is still being manufactured in the 21st century, so you can still buy one for about £1.50p from several online electronic stores. The BBC produces a design and technology description of the 555’s internal operations. Go and find your inner electronics dreams!

+PP+

 

The Next Digital Transformation Engagement

April 27th, 2016 No comments

This is just a note to say, get in touch, especially, if you are looking for help with Java modernisation, moving from Java 7 to 8 and beyond and digital transformation of services. I am available for contract hire from May 2016.

See my Linked-in Profile (new windows) for more information and how my strong adaptive development skills could be appropriate for your current needs.

 

ADDENDUM

I should have exactly said what I am looking for in my next contract:

  • Projects with Java 8 with a license [permission] to program with Lambdas
  • If Java is not available, I can also code professional in Scala, because I worked for GOV.UK on their illustrious examplar project, the Registered Traveller
  • I prefer to develop components over added more technical debt to a monolithic application that runs on an legacy application server
  • I will you modernise your system from the monolith with the provisio budget, person power and desire (the longer you leave it, the bigger the price will be.*
  • I can write a lot of server side Java EE  code, I dipped my toes in HTML5, JavaScript and CSS at Digitas LBi
  • I can coach and mentor others on Java EE, Java and effective unit testing
  • Although I have worked as a SCRUM master, I would help as an interim. A SCRUM master is suited to a full time project managers, especially if the scale and scope of your project is large to very large.
  • I am working my way to the chief engineer of something X so a little angle of technical leadership will helpful. I prefer to code over team management
  • I will participate in design arguments, decisions about frameworks and library. I can lend a hand in technical architectural discussions

 

Hope that helps (HTH)

 

*Modularisation with Modernisation

I believe the forthcoming Java 9 release including Project Jigsaw will eventually be the game-changer. Because, we, ultimately, can modulate your big backside legacy out of the picture if your application is modular. Because, the JDK and JRE will be module, we can finally remove ancient old code like java.util.Date and java.util.Calendar. In short, eventually, the most popular open source and close source projects, libraries and framework will take advantage of this exciting capability. However, if you are stuck with programming against Java 6 code, because of a hardwired third-party dependency and you choose not to upgrade, encircle or modernise, then I wish you the very best of luck in the your recruitment of future talented engineers in the new world of Java 9 and beyond. Finally, component design and implementations are the first steps to moving a monolith to a micro-services architecture (MSA). If you think actually that you can readily purchase a quality third-party off-the-shelf product that can immediately turn a good old application monolith into a MSA overnight, then DON’T BELIEVE HYPE.

+PP+

 

Categories: Agile, Contracting, Development, Digital, JavaEE Tags:

Digital Java EE 7 2016 Series 1 Episode 7 Debugging XenTracker AngularJS inside IDEA

March 5th, 2016 Comments off

This episode is a show-and-tell that you explains clearly and succintly how to debug the XenTracker AngularJS application inside JetBrain’s IDEA. You will learn how to configure the GlassFish server runtime configuration so that you benefit from JVM HOTSWAP, which is critical for fast interactive modern digital development.

 

 

+PP+

 

 

Feedback is always welcomed with comments or directly to me on @peter_pilgrim.

*PP*

 

Crested Butte, Colorado; Winter Tech Forum

 
 

Digital Java EE 7 2016 Series 1 Episode 6 Execute Arquillian Integration Test inside IDEA

March 5th, 2016 Comments off

Using the source code from the Java EE 7 Developer Handbook, I demonstrate how to execute an Arquillian integration test inside IDEA. You learn how to create a runtime configuration and with this knowledge you will be able to debug and verify functionality, and accelerate iterative engineering.

 

 

+PP+

 

 

Feedback is always welcomed with comments or directly to me on @peter_pilgrim.

*PP*

 

Crested Butte, Colorado; Winter Tech Forum

 
 

Categories: Course, JavaEE, javaee7, programming, testing, Training Tags:

Digital Java EE 7 2016 Series 1 Episode 5 Import Gradle Project into IDEA

March 5th, 2016 Comments off

Using the source code from the Java EE 7 Developer Handbook, I demonstrate how to import a Gradle project into IDEA 15.

 

 

+PP+

 

 

Feedback is always welcomed with comments or directly to me on @peter_pilgrim.

*PP*

 

Crested Butte, Colorado; Winter Tech Forum

 
 

Categories: Gradle, JavaEE, javaee7, Training Tags:

Digital Java EE 7 2016 Series 1 Episode 4 Mac OS X Gradle and Xen Tracker

March 1st, 2016 Comments off

A few of you have been waiting for an instructional video for building the XenTracker application from my first book. XenTracker is a fully compliant Java EE 7 web application that demonstrates AngularJS v1.0 invoking JAX-RS remote service endpoints.

I have recently upgraded the Gradle build system for Java EE 7 Developer Handbook to use a proper multiple-module structure.
So now it is much easier to get started. The following video explains for Apple Mac OS X users:

 

 

Feedback is always welcomed with comments or directly to me on @peter_pilgrim.

*PP*

 

Crested Butte, Colorado; Winter Tech Forum

 
 

Digital Java EE 7 2016 Series 1 Episode 3 Windows 10 Gradle

February 29th, 2016 Comments off

A few of you have been waiting for an instructional video for building the XenTracker application from my first book. XenTracker is a fully compliant Java EE 7 web application that demonstrates AngularJS v1.0 invoking JAX-RS remote service endpoints.

I have recently upgraded the Gradle build system for Java EE 7 Developer Handbook to use a proper multiple-module structure.
So now it is much easier to get started. The following video explains for Windows 10 users.

 

 

Feedback is always welcomed with comments or directly to me on @peter_pilgrim.

*PP*

 

Crested Butte, Colorado; Winter Tech Forum

 
 

Upgrade DeltaSpike, Gradle and CDI Container with Test Module

February 16th, 2016 Comments off

I am puzzled by the Java EE 7 Developer Handbook that I wrote about two years ago. Well I researched it in 2013 and published it. I was looking at the code for Chapter 2, which has an old example of Apache DeltaSpike, JBoss Weld and Gradle. I want to upgrade it to work with the latest stable releases circa 2016.

So where am I? I am stuck for once, because I received this exception whilst executing gradle build --stacktracer.

 

Feb 16, 2016 2:50:34 PM org.apache.deltaspike.testcontrol.api.junit.CdiTestSuiteRunner$LogRunListener testFailure
INFO: [failed] je7hb.standalone.CreditProcessorTest#null message: WELD-ENV-002000: Weld SE container STATIC_INSTANCE is already running!

java.lang.IllegalStateException: WELD-ENV-002000: Weld SE container STATIC_INSTANCE is already running!

	at org.jboss.weld.environment.se.WeldContainer.initialize(WeldContainer.java:138)
	at org.jboss.weld.environment.se.Weld.initialize(Weld.java:562)
	at org.apache.deltaspike.cdise.weld.WeldContainerControl.boot(WeldContainerControl.java:68)
	at org.apache.deltaspike.cdise.weld.WeldContainerControl.boot(WeldContainerControl.java:76)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareTestContext.applyBeforeClassConfig(CdiTestRunner.java:463)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$BeforeClassStatement.evaluate(CdiTestRunner.java:366)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$AfterClassStatement.evaluate(CdiTestRunner.java:393)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner.run(CdiTestRunner.java:142)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

 

They say always run on the command line, and so I did. I also verified this also issue inside IDEA 15.0.3.

The unit test code is actually the simplest in the book:

 

package je7hb.standalone;

import org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner;
import org.junit.Test;
import org.junit.runner.RunWith;

import javax.inject.Inject;

import static org.junit.Assert.*;

@RunWith(CdiTestRunner.class)
public class CreditProcessorTest {
    private @Inject @Economy CreditProcessor agent;

    @Test
    public void shouldInjectStreetCredit() {
        assertNotNull(agent);
        agent.check("12354678");
        System.out.printf("agent=%s\n", agent );
    }
}

 

I threw out my older AbstractCdiContainerTest implementation, because Delta Spike has replaced it with a new JUnit 4 Runner implementation. I upgraded to JBoss Weld 2.3.2 against Delta Spike 1.5.2.

At the moment, I am refactoring the Gradle build into a proper MULTI-MODULE build for all the students. There is something strange going on? The codebase is help on GitHub.

Extract of the build file is:

archivesBaseName = 'ch02-cdi-standalone'

dependencies {    
    compile     "javax:javaee-api:${javaeeVersion}"

    compile     "org.slf4j:slf4j-simple:${slf4jVersion}"
    compile     "org.apache.deltaspike.cdictrl:deltaspike-cdictrl-api:${deltaspikeVersion}"
    compile     "org.apache.deltaspike.cdictrl:deltaspike-cdictrl-weld:${deltaspikeVersion}"

    compile     "org.jboss.weld.se:weld-se-core:${weldSEVersion}"
    compile     "org.apache.deltaspike.modules:deltaspike-test-control-module-api:${deltaspikeVersion}"

    testCompile     "org.apache.deltaspike.modules:deltaspike-test-control-module-impl:${deltaspikeVersion}"
}

test {
    testLogging.showStandardStreams = true

    // set heap size for the test JVM(s)
    minHeapSize = "128m"
    maxHeapSize = "768m"

    // Ensure that the working directory for the test is the same as the project directory in order to run the Spike Delta container tests
    // *PP* 11/02/2016
    workingDir = project.projectDir
}

The dependencies are now set in the root Gradle project. Here is the extract:

allprojects {
    apply plugin: 'java'
    apply plugin: 'maven'
    apply plugin: 'eclipse'
    apply plugin: 'idea'

    // Define equivalent Maven GAV coordinates.
    group = 'uk.co.xenonique.javaee7handbook'
    version = '1.0-SNAPSHOT'

    ext {
        arquillianVersion                   = "1.1.11.Final"
        arquillianJunitVersion              = "1.1.11.Final"
        arquillianPersistenceVersion        = "1.0.0.Alpha6"
        arquillianGlassfishEmbeddedVersion  = "1.0.0.Final-SNAPSHOT"
        arquillianGlassfishManagedVersion   = "1.0.0.CR4"
        arquillianGlassfishRemoteVersion    = "1.0.0.CR4"
        deltaspikeVersion                   = "1.5.2"
        glassfishVersion                    = "4.1"
        hamcrestVersion                     = "1.3"
        javaeeVersion                       = "7.0"
        jodaTimeVersion                     = "2.2"
        junitVersion                        = "4.12"
        ozarkVersion                        = "1.0.0-m01"
        mockitoVersion                      = "1.10.19"
        shrinkWrapVersion                   = "1.0.1"

        //'org.slf4j:slf4j-api:1.7.14'
        slf4jVersion                        = "1.7.14"
        weldEEEmbeddedVersion               = "1.0.0.CR3" 
        weldSEVersion                       = "2.3.2.Final"
    }

    repositories {
        mavenLocal()
        mavenCentral()
        maven {
            url 'https://maven.java.net/content/groups/promoted'
        }
        maven {
            url 'http://repository.jboss.org/nexus/content/groups/public'
        }        
    }

    // Java version compatibility to use when compiling Java source 
    sourceCompatibility = '1.8'
    // Java version to generate classes
    targetCompatibility = '1.8'
...
}

This failure is a complete mystery, why code that worked in 2013 and no longer executes in 2016. However, I am sure that it will be revealed.

UPDATE

I was chatting on the DeltaSpike IRC and @os890 informed me about a trick that works around the issue.

You can also find a description in the Java EE 7 Tutorial about the @Priority annotation and Alternatives.


“The alternatives that you specify in the beans.xml file apply only to classes in the same archive. Use the @Priority annotation to specify alternatives globally for an application that consists of multiple modules …”

And also


“The alternative with higher priority value is selected if several alternative beans that implement the same interface are annotated with @Priority. You do not need to specify the alternative in the beans.xml file when you use the @Priority annotation.”

To work around the issue, I use the @Priority and Gradle builds everything fine.

@Alternative
@Priority(Interceptor.Priority.APPLICATION+100)
public class XenoniqueFoodProcessor implements FoodProcessor {
    @Override
    public String sayBrand() {
        return "Xenonique";
    }
}

I added the above annotation to the Weld specific project, then I executed the test successfully.

I do not believe DeltaSpike is broken and so the question remains, is the Java EE 7 reference implementation of CDI 1.1 specification correct or incorrect with respect with Alternative configured in a beans.xml?

I also created source code to exercise Open Web Beans container as a parallel sub-project, see standalone-owb in Github. Indeed removed the @Priority annotation from the XenoniqueFoodProcessor bean and Gradle builds successfully! Ah ha this is an issue with JBoss Weld 1.5.3! It is not respecting @Alternatives as CDI 1.0 specification according to my examples.

 

+PP+

 

Categories: Configuration, Gradle, javaee7 Tags:

Digital Java EE 7 and Development Handbook Double e-Book Promotion Offer

February 2nd, 2016 Comments off

My publisher, Packt Pub, has very kindly proposed a promotional offer for both of my Java EE 7 e-books. You can get a copy of Digital Java EE 7 and Java EE 7 Developer Handbook now.

 

IMG_2229_960x1280

OFFERBuy either of the eBooks for 50% off and a 50% off on the purchase of both the e-Books together

You have until the 1st March 2016 to take advantage of this offer. Get them whilst they are hot! That is the whole of the month of February to get involved, get into it with Java EE 7. You know it makes sense!

On Packt Pub website, add the books to your shopping cart and in the checkout process apply the promotion code: XENONIQUE50 to get the discount.

See here or:




Also stay tuned for more announcements soon.

IMG_2180_960x1280

 

+PP+

 

Categories: Book, JavaEE, javaee7, Writing Tags:

Skill Up Offer with Digital Java EE 7

December 22nd, 2015 Comments off

Until 2016, every single PacktPub eBook including Digital Java EE 7 is available for just £4 (GBP) [$5 USD ]! This is a Packt Pub Special Offer!

Digital Java EE 7 Web Application Development

Front cover of my book

Merry Christmas

 

+PP+

 

Categories: Book, Development, JavaEE Tags: