 |
My First Screencast: Visually build an RSS reader using NetBeans 6
Posted by joshy on November 02, 2007 at 11:40 AM | Comments (14)
With NetBeans 6 beta 2 out (and the final version going into High Resistance-"thou shall not break things" mode) I thought it might take the opportunity to show you some of the cool things you can do with it. I am a client guy, of course, so I'm very excited by the new features we've built to let you create and deploy desktop applications easily and quickly. I also wanted to try experimenting with screencasts. Since development of client apps is so visual I think a visual way of explaining them is good. This is my first screencast so please provide feedback of what you like and don't like.
The key to getting the most out of the new client tools in NetBeans 6 is the use of beans. Not just visual beans like Swing components, but also non-visual beans. When you wrap your functionality up as beans you can visually attach them together very easily.
In this screencast I will show you how to use a simple RSS reader bean to build a feed reading application with almost no code. The screencast is 12 minutes long, but I could build and deploy the app in about 4 minutes if I wasn't talking. That's how productive NetBeans 6 can make you.
Visually build an RSS reader with NetBeans 6, by Josh Marinacci
Here is the NetBeans project with all of the source and support jars.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Do you have a link to a larger screencast? It's really small...
Posted by: pollux007 on November 02, 2007 at 12:45 PM
-
I can provide a link to the full screen version, but a word of warning. It's really really big. I'll link to it when I get to my hotel.
Posted by: joshy on November 02, 2007 at 01:08 PM
-
Urgh! Quicktime? I'm not installing any of that Apple muck on my PC. It's not native looking and nobody uses it anymore. It’s this big heavyweight ball and chain. ;)
Posted by: osbald on November 04, 2007 at 07:52 AM
-
:)
actually, I'm interested in hearing which video formats you would prefer. flash?
Posted by: joshy on November 04, 2007 at 07:58 AM
-
I would prefer something played on a java player.
Posted by: denizoguz on November 04, 2007 at 10:35 AM
-
Quite like the parleys/bejug one for presentations although the netbeans.tv player seems appropriate here?
Posted by: osbald on November 05, 2007 at 03:09 AM
-
Actually I also would like to see the full screen version. Quicktime is perfectly o.k. for me btw.
Posted by: aoberthuer on November 06, 2007 at 10:48 PM
-
Here is a full screen version. It is about 60MB.
Posted by: joshy on November 07, 2007 at 02:21 AM
-
I would prefer something played on a java player.Indeed. Everytime I see flash or quicktime on java.net I can't help wondering if java on the desktop is something I should ever consider. Seems like a java media player is never going to be an option. What's next Microsoft Media Player?
Posted by: jseltzer on November 09, 2007 at 06:44 AM
-
Indeed a Java media player would be good. So good, in fact, that it's one of the new features coming in the Java 6 Update N release!
The exact details are still being worked out but I can tell you this: there will be a new Java media API which will have at least one cross platform high quality codec. Stay tuned for more details.
Posted by: joshy on November 09, 2007 at 06:51 AM
-
>but I could build and deploy the app in about 4 minutes
>if I wasn't talking.
Have you tried to do it without NetBeans?
I think same application can be built in 4 minutes even
without NB.
The statement "build without a single line of code" is a bit
speculative because it is not a fact that it is good. Probably
this sounds good for non-technical people or for the beginners.
But imagine you've build a larger application using visual binding
and OOPs not everything works correctly. Is it easy to debug it?
If you are beginner I'm not sure you'll easily figure out why the generated code looks so and you'll start spending a lot of time...
In any case I understand why you do it and support your
undertaking because it promotes Java, Swing, and NetBeans
among a certain target audience :) I think that initial success
of such development environment like Delphi was really
because of seeming simplicity: Drag-Drop-Click and that's it!
Posted by: maxz1 on November 09, 2007 at 10:30 AM
-
No, I don't think it would be possible to write and deploy this application in 4 minutes without the gui builder. I could probably write a basic JFrame with a list and use the beans binding from code to tie it to the RSSBean. However, I could not have run it, bundled it up as webstart, signed the jars, and uploaded to my website. I cannot overstate how important the new webstart support is. In the past I would have to manually modify a JNLP, then write a new ant target to properly bundle and sign everything. This typically took half an hour, which meant that for small prototype applications I was more likely to email someone a screenshot of the running app than an actual JNLP link. The fact that I don't have to muck with that anymore is huge.
The reason I'm highlighting the fact that I can write something without code is to show off what we can do if we have more properly written non-visual beans. I agree, production applications require coding and are a lot of work, but if you can get quite a ways without heavy coding then that is a good thing. It means you develop your prototypes faster, and iterate on those prototypes faster, which in the end means your product has a better definition and will result in better software in the long run. That is the value of Rapid Application Development. Iteration
Posted by: joshy on November 09, 2007 at 11:33 PM
-
>No, I don't think it would be possible to write and
>deploy this application in 4 minutes
Ok, ok :), really create Webstart and deploy it could take more than 4 minutes. I didn't take it into account because it is not so important
for me. May be this might be important for prototypes while in real applications Webstart packaging is done only once per build and it
does not make sense if I spent 4 or 10 minutes for creating scripts
for Webstart packaging because it is done once per project.
I also agree that typical UI should normally be build with GUI builder.
What I'm not sure about is visual binding. May be in simple cases it is ok. On the other hand, since all modern IDEs support code assist I have no problems of doing binding inside code editor and it can be even more productive because:
1. I can do everything with keyboard only.
2. I know what I write (With visual binding you always have to juxtapose what you have done visually and how your code looks like)
3. I have no limitations for non standard situations when it is not
enough with JavaBeans compliant functions or some data conversion is necessary. (e.g. In your presentation you've created getSelection method manually)
This of course finally arises a philosophical question about visual
development possibilities at all. I suppose you've worked with Visual AGE IDE when it was alive. They had really powerful visual binding possibilities I guess even more than in the NB6. But in practice
it was a real nightmare to maintain such code. In my projects I always try to follow such strategy that GUI element layout is created using as much as possible Visual IDE support
and remaining code (binding and business logic) is done manually
and if possible in isolated class files to utilize MVC benefits. I think
that it would be better IDEs better guided developer to use such mixed approach instead of pure: "without a single line of code".
Joshy, what do you think?
BTW How the generated binding code survive after code refactoring like changing bound bean property names?
Posted by: maxz1 on November 10, 2007 at 02:25 AM
-
I think the purpose of visual binding is to automate common tasks, primarily creating, editing, and deleting records in a database. The new tools in NetBeans 6 make this pretty easy. For more complicated things I have found that I end up using a combination of visual tooling and more direct code underneath. The great thing about NetBeans 6 and the new Beans Binding APIs is that you can do this. You can add code-driven bindings (or just use event handlers) without giving up the visual tool.
Posted by: joshy on November 11, 2007 at 12:49 AM
|