JavaOne – you got your browser in my virual machine

“You got your Browser in my virtual mchine! Leveraging sophisticated browser programming modes in your Java applicaion”

Speaker: Ean Schuseller

For more blog posts from JavaOne, see the table of contents


He started by showing a video of the Sophia (and Einstein) robots. They look surpisingly humanoid. Not the video but this is the robot. Relevant in that we need better interfaces than have now. Future: “that was the best customer service person; very patient and immune to me getting angry”

Web Extensions

  • Plugin for browser
  • Needed to use C in the past
  • Browser agnostic APIs
  • Write in JavaScript
  • Have access to browser components like history and open pages
  • Works on Firefox, Chrome, Opera and Edge. Works a bit different on Edge” [not safari yet]
  • Contains manifest.json, html and javascript code for UI, background js (runs when browser opens and state stays until close browser) and content js (what see)

Isomorphic Apps

  • Code that can run on both client and server
  • Ex: Validation logic, business logic

JavaScript in your server
Nashorn is faster in Java 9
[glad I wrote the “throwaway” chapter on Nashorn for our book. Learned a lot]

APIs

  • WebWorkers –
    Don’t want intensive logic in main UI thread. WebWorker runs message/task in background.
  • indexedDB transactional persistent data store

It takes a lot to get users to install an app because of trust. Web/online mobile “apps” continue to grow as get more powerful. Will need to have reall good reason to have an app. [irony wih the JavaOne conference app?]

Evolution in JavaScript
Frameworks, immutables reactive, functional programming, etc. Lots of ibraries. Now that more mature, Java can cherry pick from JavaScript.

Libraries

    React – UI model from Facebook. Very data intensive programming
  • Reducers – Virtual DOM is rerendered based on state change and then diffed against real DOM
  • Redux – extends to single immmutable state. reducer functions “modify” state
  • Helps debugging/testing because can replay actions from older state. Also helps with undo because can just go back a few states

Filter Bubble

  • Cognitive bias from friends, reading, etc. Disagreeable facts never reach us
  • Social networks and search enginges feed us information they think we will like. Not even concious of the bias. Disparity – they know more than you about what you see
  • You trust your spam filter – it controls whether you see a message
  • Filter Bubble web extension – determines where you spend time so you know too. Uses word frequency analysis

My take: Nice to see Oracle is open minded about having JavaScript content at JavaOne. There was even a bit of Java in this talk. Good first session. A mix of things that I didn’t know, things that I knew at one point and forgot. Plus some things I know. Happy to start the day with learning!

JavaOne 2017 – Live Blogging

First time at JavaOne! This post will be updated over the next 4 days with links to all the posts while I’m here. Also, see my pictures.

Sunday

Monday

Tuesday

Wednesday

Thursday

maker faire and heat plan

Is there something with every other year and Maker Faire weather. In 2013, we exercised our rain plan and had a giant goldfish bowl of rain! In 2015, we used our rain plan again. Last year, it rained overnight, but not during the event. This year in 2017, I was excited about the weather. It was going to be shorts weather with not a cloud in the sky.

Turns out there’s a downside to that. It was too hot for the robots. On Saturday, the robots started overheating and we were caught by surprise. The RoboTigers made a sunhat for their robot:

On Sunday, we let the teams know what to expect. In particular to make sure the robots took breaks in the shade and not just the humans. The problem was there wasn’t much shade. So I made some with tablecloths. Elegant looking robots:

The Brooklyn Blacksmiths needed to cover a part of the robot so the motor didn’t overheat when running. They had a work glove around so added that. Then the robot became a high five robot!

We also brought a water cooler that we kept refilling so water was handy. Finally, when people around us left early, we expanded into their space. Good for us to have more space. And good for Maker Faire to not have that gap.

And we won a ribbon. In shorts and all!