...It's now 9:07 and we're waiting for the first session of the first day to start. First impressions? Good so far:
- Wireless internet available across the board? - Check
- Good range of geeks? - (Worryingly) yes
- Free pens and t-shirts lobbed at us? - check. Also the old pre dot-bomb stress balls are back. I get one by answering a question. That's 3 I have now...
- Wishing I had a Mac laptop with a fluorescent keyboard? - Yes
The first session has kicked off... Octavian [Somebody] - The Director of Netbeans Engineering welcomes us and runs down some basics:
- It's looking good. Roman Strobl is to do the first session. That was not on the agenda sent out.
- First off is the Netbeans strategy. (also JRuby gets its first mention on a slide)
..."It's also fully supported - Sun are also selling piece of mind"
Now we have a Roadmap:
- Netbeans 6 goes beta in May 2007. FCS mid Nov. Preview for JavaONE
- NB 6.1 start mid October, release may 2008
- NB 6 to support scripting and dynamic language support. AJAX and more heterogeneous language dev.
- And exitingly at milestone 7 we got Ruby support.
Roman Strobl Demo 1 - Swing Application Framework and Swing Data Binding
To kick off he gets the crowd onside with a joke about the pain of GridBagLayout. He then does his first demo - Matisse and NB6's support for 2 JSR's: 295 (Swing data binding) - which allows you to bind a data source to a component and the Swing applcation framework (I don't know the JSR)
He then does a demo of both (note that this an the other demos are freely available at the Netbeans World Tour Wiki):
- New project type - Java Desktop application
- Choose application template - two are available now
- Select the db connection and table and columns
- Choose data view layout
- The NB IDE will then generate a simple application for you (entity class, and swing frame menu with icons, "about" box, actions and menus)
- Roman then shows the app running. If you resize columns and window. close and reopen and it remembers it. Cool
- We then see data binding: examing field properties and dialog pops with binding. Roman adds new component (slider) and resizes it. He then selects "bind", selects the binding in drop down in dialog and runs the app again.
- Roman says it has full CRUD support. Double cool.
- He then Creates a new record. (New car; a Skoda) and persists it.
- To examine the car he then drags a new bean (car pic) and bind to db again (colour, moderness).
- He runs the app again, moves the new "moderness" slider and the car shape changes. Getting even cooler.
- Roman points out that property change listeners are created automatically. If you change something and it just happens.
- Finally he adds a check box. (Roof window) , binds it to the picture and runs again.
Now we look at the source:
Car.java has been created. Its a Java EE 5 entity class (POJO with annotations used to specify mappings.) Encapsulation and change listeners are automatically generated in code.
Roman also points out that the Swing Application Framework supports actions. If you add a button and link it to an existing action (or create a new one) it lets you set button, label, method name etc. in a single dialogue. - Impressive
All in all this is massively exiting. The only problem is that you can't try this functionality yet. It will be in the next NB milestone (8). There was a visible sense
Roman Demo 2 - JRuby
Roman asks who in the room uses Ruby? I'm the only developer in the room who admits to using it. (I get a free stress ball). That's interesting. I wonder what the response will be in a year's time?
He then asks who should care? - He brings up a table showing data from Tiobe. Java is #1. But it is not growing. Ruby is only language growing rapidly.
He points out that Sun recently hired the JRuby developers. He says the aim is to create a bridge between the Ruby and Java worlds. Time for another demo...
How do we get it? From the NB update centre. This demo will focus on the editing. He trails the fact that there will be more demos tomorrow in the Netbeans Extreme session.
- Code completion (with RDoc) V hard to do. Can see docs inline
- End block completion
- CTRL-Shift-F reformatting (and to use 2 space indents - Ruby standard)
- Regex has code completion too - Sweet!
- If you add a string reference and if you have not declared it, the editor adds it for you.
- Roman then adds a unit test . Unused variables are shown greyed.
- Marking appearances also works.
- In place renaming - Super cool. That produced a general sharp intake of breath...
- Code completion on imports
- Right click- run file.
BlueJ (guys from Kent University) - Mike Kolling, Ian Utting
These guys work in the University of Kent Computing Lab. They have been working for a few years on BlueJ
They point out that BlueJ is a development environment. NB is another. They point out that how do you go about learning OO? It is a paradigm shift even if you can already code procedurally.
They introduce the debate around whether you should you use an IDE at all? Yes they say - just use an IDE which does what you want it to.
BlueJ was specifically designed to teach OO concepts. They estimate that it takes 18 months to make the mental model switch. Traditional IDEs do not support this. The size of things such as NB itself can be intimidating - the number of options etc.
But even if you have something like BlueJ how do you then move across to Netbeans at a later stage? With the help of Netbeans BlueJ edition. (There is also something for schools teching called Greenfoot - out of scope of this presentation)
Then they start the demo. BlueJ has a very simple UI. You start by opening a project and it's UML classes are shown on a central canvas. The IDE has four main buttons - New class, Extends, Uses, Compile
If you right click on a class you can create an object from the class and it appears in a new canvas below the main one. We can now see all the methods by right clicking on the object. There are some on our demo object (a shape) like "make visible", "move right" etc. If you click a method it runs. If you click one with a parameter then you must enter this via a dialogue. There are also packages
So you can use and inspect methods. You can also see all the values of fields an objects. You can move an object on the run canvas by changing its state (e.g. v. position) You then see the object move on the run canvas and its atttributes change in the object inspector in real time.
They point out that we have so far totally avoided the semi colons and "public static void main". Before the Java syntax we learn classes, objects and encapsulation. This is how to learn OO.
Then we finally drop down to code. All code is based around allocating behaviour to an object.
They then make the point that one of the hardest things to explain to their students is the difference between a class and an object. Looking at the code they frequently think it is both. But what you show on screen is what they will think about. If you want to show interacting objects, show them interacting objects.
They say that you should start with this to teach object orientation. But there is more. There is a debugger. You can still write and execute code. They use this at University level for 1 year. It runs on the standard SDK. There is no point which can be reached when you need to move up to a next IDE. It is a matter of choice.
They make a few more points. You can automatically invoke any public method stand alone. You need not hava a main method again. You can also round trip between code and diagram. If you create a class then the template code is automatiically generated. They also use it to teach concepts of unit testing. You simply create a test class which automatically creates a JUnit test for you. You then use BlueJ to record a series of UI interactions to use for the Junit test. E.g. yuo call a setter to set a value, and then a corresponding getter to see it was set and there is an assert box to check that this is correct. You then stop recording and then run the tests. You can see the green bar. Its just like a fully blown IDE. They note that you can also run just tests for a single class or even just a single method.
So that was BlueJ. What about Netbeans BlueJ Edition?
Picasso (paraphrased) - "Its not finished when you can't add anything else. Its finished when you can't take anything else out."
So where do you go from here? NB BlueJ is based on 5.0. Its like straight NB but with a lot fewer menu items, and panes. At this phase the confusion is still a problem they note. J2EE is cut out completely. Other stuff is present but switched off using the module system.
They also point out that this version understands BlueJ projects directly. They open a BlueJ project view (next to projects view) to demo this.
When first transitioning a student may want to move back and forward between Netbeans BJ and BlueJ for Java they say. It can do this. They can still go back to BlueJ at any time (e.g. to use the test recording)
Now we want to start to add some IDE features. This uses NB module management. They enable something using the standard Tools ... Module Management dialog. Initially they show that there is no refactoring enabled in BlueJ NB Edition. The refactoring menu appears straight away without NB stop/start.
They point out that this avoids the cognitive overload of not having menu items which you don't yet use. Again it avoids the "what the hell does public static void main mean?" question. If you don't want to introduce it yet, don't show it. But then you also want to add it easily when you do want to cover it.
They then add a "player" to their Zuul Game demo. There is now a BlueJ set of file types in the "New File" dialogue. We need to give our students the the boiler plate for free - don't give your students a blank page. In Java there is a lot of boiler plate they point out. A beginning student is not equipped to differentiate this from the important stuff. BlueJ templates are simply added to NB. They are sucked out of the BlueJ instllation so again synch is maintained with the other tool.
They conclude - "Allow your students to transition to their eventual IDE step by step."
Session 3 - Subversion and the Netbeans IDE
To be honest this session was pretty dull. It didn't help that the delegate came along in a suit and tie. How to lose a developer audience in one easy step... The interesting points are as follows:
- SVN was developed for the web. Designed for distributed dev. SVN always sends only the deltas across the wire providing better performance than CVS which may send the whole thing.
- Versioned directories which support versioned renames
- Versioned metadata
- Atomic commits (change set) - good for when your network fails
- Global revisions
- Support for both models (concurrent and block based) for parallel development
- Support for WebDAV - the whole team can use it
- Choice of network layers, back-ends and client applications
- All files treated as a string of bytes - equally efficient with word doc or ascii file (over wire and back end)
- Branching and tagging are not seperate concepts. SVN has more of a file-system-like paradigm. There are files which are on or off. You the developer decide to mark something as having a tag or being a branch. It is therefore far quicker than CVS to tag or branch a large project
- You can easily diff two branches - Do a recursive diff between two version trees. Netbeans supports this in the UI, as does Tortoise
- Merging branches support - there is a wizard dialogue
- Searching history and diffing - again visually supported
- support in NB - http://www.collab.net/webinar14
Q: How easy to migrate to SVN?
A: Collabnet does a lot of work in this area. Problem is knee-jerk response is to want full version hostory migration. This is impossible. Also it takes a lot of effort. The question then is how far back in history do you go? Go to a stated point and then leave the rest in e.g. CVS. It is harder to do with Clearcase. The design is far more divergent (i.e. branches at the element level). How do I map it to SVN?
Java EE 5 - Did you get your tools with that? (Brian Leonard)
This session was an introduction to EE 5 but using NB as the demo IDE.
- WS 2.0
- JSF - now part of the spec.
It leverages annotations, uses POJOs and dependency injection and relies on more and better defaults (effectively the Ruby "principle of least surprise" thing)
He notes that
- Java EE5 is backwards compatible with J2EE 1.4
- Deployment desciptors are still there if you need them. Gets over the "annotations are in code" problem. External edits to these files override annotations.
The demos were very simple (thought they did go wrong because Brian had to borrow Roman's Czech laptop) and I won't go into detail here other than to make the following points which I found interesting:
- If you just mark a POJO with @WebService then it will be a Servlet Web Service. It only becomes a Session Bean backed Service if you also add @Stateless or @Stateful
- JPA 1.0 is not a persistence provider. It is just an abstraction layer. You are not tied to your persistence provider. I mention this as there is a common misconception that JPA is basically Hibernate / Toplink / etc. etc. depending on your heritage.
- We see auto generating a basic JSF CRUD app with only an pre existing set of database tables. First we auto gen the Entity beans from the DB tables. Then we generate the JSF web app using the Visual Web Pack. Again this is a few simple steps in a wizard. All the code generated is standards based and ANT projects
There were two more sessions after I ran out of battery. Roman went through a very swift overview of the extension packs available for NB. Profiler (interesting, load generation is coming in NB 6.0 with integration of JMeter), C/C++, Enterprise Pack. HE had to rush and little new was revealed.
Finally we had a talk and demo on the Mobile Pack. I don't know much about mobile development (though I have done some fiddling) but this was very impressive. We saw support for SVG, on device debugging, connecting mobile apps to Web Services, and how to develop your application for more than mobile platform at any one time (you can swap the platform you are coding from a simple drop down. The pieces of your code which will no longer work on the chiose platform are shown. You can add special comments to either remove this problem codewhich was demoed or provide alternative code blocks to do something different for your platform. Netbeans manages the complexities of all this from this point onwards.) It was very impressive.
Although we ran out of time I was very impressed in what I saw this morning. No demos were canned. Contrary to expectations they had flown in some of the real "rockstars" of Netbeans (Roman and Brian) and they delivered the goods. It is only a shame that they could not have used this in the marketing for the event. These guys might have managed to draw an even bigger crowd.
It's also good to see the UK getting a bit of Java love. Does this mean that Sun sees bespoke development becoming more of a big thing over here, closer to how it is perceived in the US? Possibly. They're certainly bullish about their offerings and competition (within the standards) is always good. More tomorrow. Including James Gosling.