Tuesday, June 30, 2015

ODTUG KScope15: One week in a nutshell

Last week I visited ODTUG KScope15 in Hollywood Florida. In this post I will share my findings and hope that you can benefit from it.
My general impression of the conference is that it was to hot for me in Florida. At least to hot for a conference. If you can sit on the beach whole day long, it is a great place to be, but hey, I had to work.... From a content perspective, there was a whole lot of Mobile and Cloud, and just a tiny bit of ADF. We need to work on this for next year as per request of the attendees who really were asking for more ADF content.

Anyway, here is my week in a nutshell.
Saturday
Not much to do after an 18 hour trip. So when I arrived at the hotel the only thing to do was enjoy the view and get some Cuban food. What better place to do that then in Southern Florida. The food was good and I went there again during the week.


Sunday
The Sunday symposium was a very good one from an Oracle ADF Developer Perspective. The Sunday Symposium took a deep look at the impact of the cloud's platform on the role and capabilities of application developers. Oracle showed the latest and upcoming products for web and mobile application development and deployment in the cloud. There was also room for empowering business users with development capabilities through the cloud, with products such as MAX and ABCS (see later). There was a demo of MAX, aka Mobile App Accelerator. MAX is a part of Oracle Mobile Cloud Service in a demo. where a business user can actually create real mobile apps without coding.

The final session of the day was really worthwhile. In this session Brian Fry showed Oracle Application Builder Cloud (it is as easy as ABC) for the very first time publicly. Oracle ABCS enables you to drag-and-drop your way to enterprise-ready JavaScript and HTML web applications.

More details on the Sunday Symposium can be found here.

Monday
On Monday I attended an IoT hands-on lab. It used an APEX front end to show results, but for me the main content (IoT) was more important. I actually built my own thing and connected it to an Oracle APEX application. I used a circuit board, wires, capacitors, a wifi device, LEDs and a sensor. I wired them together into a real THING, connected to the internet and start communicating with an Oracle database. Because of the closed API for the REST Service they used I had to build an APEX application to control the thing and report on its data. Had it been an open API, I would have created an ADF or MAF app to do the exact same thing.

During Lunch I sat down at the MAF and ADF table discussing with my peers and also with Oracle Product Management. We also discussed the big announcements made by Oracle where from my perspective Mobile Cloud is the most interesting one. However there are many other clouds that we need to look into. Makes you wonder: Usually when I am that much in the clouds, I tend to call it foggy. I hope Oracle's Cloud Strategy is not foggy, but cristal clear. I know they have a plan, and I know there is a lot of work todo. We discussed the overlap we see in Mobile Cloud and Integration Cloud and also in Application Builder Cloud. Not sure if Oracle will take parts of those clouds and bundle them into a new one, or actually transfer stuff from MCS and ABCS to ICS, where it belongs. We will see.

In the after noon I had to work on a proposal for a Customer so no more sessions till 6.00 pm when the Oracle ACE reception started. It was outside near the pool but still it was very hot so we had to drink plenty of 'water'. After that I continued to the ADF Community night where we used the Wii to play games.

Tuesday
This was the day of my presentation. "Real Life MAF: The things you don't learn from Oracle's Developer Guide". I promised attendees to provide links to my demo's and also to my slides. So here they are:

1 and 2 are available here whereas you can find 4 here.
  1. Loading Images in the background
  2. Action Complete (Programatically showing popup) and fragment demo
    1. Files involved in action complete:
      1. Complaints.amx
      2. fha.js
      3. FlightAppBean.java
  3. Real Sliding Springboard (is provided as Sample App with Oracle MAF)
  4. Local Notifications
The whole presentation is available at slideshare.
After my session I had to run to the Lunch and Learn panel where I was in with co-ACE(D)s Lonneke Dikmans, Debra Lilley, Mia Urman and John Flack. As you can see, the women have the majority, which I think is not necessarily a bad thing. We discussed with the audience what they expect of the next ODTUG KScope, which by the way will be in Chicago! Min observation was that there was too much cloud and mobile and too little ADF. So here is something that we should think about for next conference. Next I joined Lonneke's session called "SOA made Simple". Using a waitress as an analogy for a service bus really makes ordering breakfast a whole other experience.

My afternoon ended with a hacking session with one of the attendees in my session. It was mainly about background threads and refreshing the UI in an MAF App. The only thing you need to do that is to call to flushDataChangeEvent() and it will refresh the UI with all changes from that background thread.
 AdfmfJavaUtilities.flushDataChangeEvent()  
I was even able to refresh the UI from two separate background threads. I will blog about that in a separate post.

My day ended with a great diner with a customer, or better a friend at GG's, a very nice place to have good seafood.

Wednesday
Today was actually a day where I followed several sessions. I started with some support (and coffee) for Lonneke who was talking about Choosing the Right Mobile Architecture. One bummer was the Oracle Mobile Cloud Service Hands On lab, which in the end was not a hands on, but a demo. Unfortunately even for Oracle Product Management there was no way to get access to MCS instances that can be used by the audience. I was really looking forward to get my hands on MCS but this ws not possible. After lunch I attended two more sessions. One of Joe Huang, outbound PM for Oracle MAF.He was talking about "New Core and Sync Services in the Oracle Mobile Application Framework: What Does It Mean for Developers". Nothing really new here for me. The other session of the afternoon was by Raghu Srinivasan. He is Director of Development in the Cloud and Mobile Development Tools, and responsible for Eclipse tooling (OEPE). His session was called "REST Easy with Oracle MAF: Building RESTful MAF Applications in Eclipse (OEPE)". It was a great session where I got to see the power of MAF in eclipse. I mainly (or should I say only) use JDeveloper but this was een eye opener. Amongst a lot of other things he showed how to use a RAML definition to generate all Java you need to work with REST/JSON services. I am convinced now. From now on I will use OEPE more for MAF Development. Great features!! A good tutorial if you just get started can be found here.

The day ended with the white party at Nikki Beach. Great food, great venue, but from the way I look at it, it was a pretty long trip (1 hour one way) for the party.


Thursday
It's a wrap. No time to attend the closing session. We had to be at the airport at 11:30. It was a great KScope again. I met some old friends and found some new ones. I missed several people who I hope to see soon. And I hope to be back next year.

Monday, June 29, 2015

IoT Hackathon Part II : Overview of Grove Pi sensors

In September (15th and 16th) we will be organising an IoT Hackathon together with Oracle. I preparation of that I will write several post here concerning IoT. This post gives you an Overview of Grove Pi sensors and some of the fun things that you can do with it. See also this two minute tech tip that is an intro to this post.

The GrovePi+ Starterkit
Connecting sensors to the Internet of Things (IOT) is really easy! No need for soldering or breadboards: plug in your Grove sensors and start programming directly. GrovePi+ is an easy-to-use and modular system for hardware hacking with the Raspberry Pi and the Internet of Things.

Here is what the kit contains:

  • The GrovePi+ Board
  • 12 Grove sensors
  • Grove cables for connecting the sensors to the GrovePi+ board.

The following sensors and lights are in the kit:
  • Grove – Sound Sensor
  • Grove – Temperature and Humidity
  • Grove – Light Sensors
  • Grove – Relay
  • Grove – Button
  • Grove – Ultrasonic Ranger
  • Grove – Rotary Angle Sensor
  • Grove – LCD RGB Backlight
  • Grove – Red LED
  • Grove – Buzzer
  • Grove – Blue LED
  • Grove – Green LED


It also contains a GrovePi+ Guidebook what all the stuff you need to setup your Sensorkit. Make sure to go trough this guidebook before you start. It can really save you some time.


Preparing your Raspi
The first step with your new GrovePi is to get it working with the Raspberry Pi. There are several ways to getting the Grove Pi communicating with the Raspberry Pi. You can configure your own image, download and use the modified Raspian image, or get an SD card from Dexter industries. All methods are described here.

I choose to use the modified Raspian image that is optimized for use with the GrovePi kit. A complete and precise description of all the steps involved in setting up the SD card can be found here. It worked for me, but be careful not to get fooled. Do not ignore this line SD card setup manual : Installation could take many minutes, and up to an hour depending on the speed of your SD card device and quality of the SD Card. Unfortunately, there is no indication of progress.


It really took me a long time. Because I was oblivious, I aborted the process several times, only to find that the SD card setup really was not finished.... It honestly took 1 hour and 20 minutes to finish the SD card creation. But once it was done, it worked great.
Don't forget to continue with the final step in the manual, expanding the filesystem on the SD card.

Creating your first thing
With the new and optimized SD card up and running, you can now go and create you first thing
Again, I found that there are many samples available. I decided to work with the Temperature and Humidity sensor. A very nice and simple setup which is described here.

I prefer to work with python because it is a very simple language which is easy to learn. I could simply copy and paste the code. The only change I had to make was to change the parameter module_type from 1 to 0 because I am using the DHT sensor and not the DHT pro. This is also part of the description. I also changed the filename to wheatherstation.py

 # grovepi_lcd_dht.py  
 # dht(pin,module_type), change module_type number to use other kind of dht  
 # module_type:  
 #       DHT11 0  
 #       DHT22 1  
 #       DHT21 2  
 #       DHT2301 3  
 from grovepi import *  
 from grove_rgb_lcd import *  
 dht_sensor_port = 7          # Connect the DHt sensor to port 7  
 while True:  
      try:  
           [ temp,hum ] = dht(dht_sensor_port,0)          #Get the temperature and Humidity from the DHT sensor  
           print "temp =", temp, "C\thumadity =", hum,"%"        
           t = str(temp)  
           h = str(hum)  
           setRGB(0,128,64)  
           setRGB(0,255,0)  
           setText("Temp:" + t + "C   " + "Humidity :" + h + "%")                 
      except (IOError,TypeError) as e:  
           print "Error"  

Now you are ready to start your program and the see the reading on your LCD
 sudo python weatherstation.py  


Some notes to help you when you run into errors:
1) If you get import errors you probably run into one of the weird and slightly confusing things about the awesome library of GrovePi scripts. A lot of these scripts import other scripts that are in the same directory. We need grovepi and grove_rgb_lcd as imports, but in order to do this without errors I had to copy grove_rgb_lcd.py into the same directory as my weatherstation script.
2) If you see some weird reading (like I did, humidity = 1800%), you probably did not change the module type parameter to indicate what DHT sensor you are using, which is explained here.

Autostart ?
Now the weatherstation works like a charm, but if the Raspi is rebooted, you need to manually restart the python script. That is not the way I want this to work. In a next post I will describe how to make the weatherstation start on reboot.

IoT Hackathon Part I : Setting up your Raspberry Pi

In September (15th and 16th) we will be organising an IoT Hackathon together with Oracle. I will write several post here concerning IoT, starting with this one where I tell you how to do the default setup of your Raspberry PI. See also this two minute tech tip that is an intro to this post.

For configuring your raspberry Pi there are several options. I prefer to use a keyboard, monitor and mouse so I can actually see what I am doing. The Pi has several USB ports and also an HDMI port.



So if you have a monitor, keyboard and a mouse available, you can plug those into your Raspberry Pi and you are all set. Connect to the power and the Pi will boot into an initial setup screen that allows you to select your preferred OS. That is of course only if you inserted an SD card in the Pi that contains the various available OS's. Select your preferred OS and click install so that the Operating System gets installed. After a short while, the installation is complete.



Once the install has finished you need to confirm by clicking OK, the system reboots, and you will automatically enter the Raspberry Pi Configuration Tool (raspi-config)


One of the things you should do is to enable SSH so you can actually enter your raspi from a different computer. I'm not sure if it is enabled by default, but just go into the raspi-config, select Advanced Options (8) and go into A4 SSH to enable it.
You can also change the default password (which is raspberry) and the default name of the device (which is raspberrypi).

Reboot one more time to activate the changes, and you are ready to start programming.

If you are happy with commandline interface, you can go wild on that one, but if you prefer to work in a GUI, you will be able to change that by using raspi-config. Open raspi-config by typing:
 sudo raspi-config  
The config menu opens, and you can change the boot option by selecting option(3). So enter this option, change the setting and reboot the Raspberry Pi. It will enter GUI mode and you will have a nice Graphical UI that you can work with.


That will be all for now. I will continue posting about our IoT Hackathon. More info can be found here. 


Sunday, June 21, 2015

ODTUG KScope15: Sunday Symposium

Sunday symposium took of at 8:30. Unfortunately i had to skip the first two session due to some work That had to be done first. The first session I really got to attend was Brian Fry's session on Oracles Developer Cloud Service.

JDeveloper, Eclipse or Netbeans was the way you would work with Oracle Developer Cloud. Now there is a new feature (not publicly available) that is a browser based IDE. It is a full development environment. It is a very flexible, responsive and quick UI. it has an integrated out of the box GIT repository. It can be used for both JavaScript, and Java EE and java SE. Oracle uses the DevCS to build the DevCS with over 145 developers using 27 GIT repositories. So oracle now is drinking their own champagne, which sounds much better then eating their own dog food by the way.  


The demo was nice and showed the power of the Javascript editor and the integrated support with GIT. also the Java editor looked very promising. We will have to sit and wait for this to be publicly available.

After lunch Lynn Munsinger, talked about Mobile Cloud Service aka MCS. She explained some of the concepts of mobile development and Mobile Backend as A Service. (MBaaS). Somewhere during this session there was a small hint about MCS being released maybe tomorrow during a live webcast. Next Lynn showed Oracle Mobile Cloud Service in a demo. finally as a bonus, there was a demo of MAX, aka Mobile App Accelerator. MAX is a part of Oracle MCS where a business user can actually create real mobile apps without coding. I have seen this before, but now it is going really close to being production. It might even be part of the first MCS release, that might be release tomorrow.

The final session of the day was really worthwhile. In this session Brian Fry showed Oracle Application Builder Cloud (it is as easy as ABC) for the very first time publicly.



ABCS is a tool for the Citizen Developer. It is targeting non technical business users to rapidly build web and mobile apps. The key features of ABCS are the following (amongst others):

- UI First Experience
- Desktop and Mobile
- Zero Install
- Codeless Drag and drop development
- No Deployment
- HTML5/Javascript UI supporting ALTA UI or Simplified UI



I certainly hope there is more to come soon.
For you the get a glimpse of what ABCS can do, you can look at the two video's I created.

Here is the first one:



Here is the second one: