Matt RaibleMatt Raible is a writer with a passion for software. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.
You searched this site for "netbeans". 49 entries found.

You can also try this same search on Google.

Java is more complicated than .NET ... unless you use AppFuse

From Java to .NET, Back To Java Again, My Little Impression of The Two:

Having said all these, integration of various java projects together really do take a lot of Java people's time, it's no joke, but it's not desperate. For example, the open source project "AppFuse" does a fantastic job integrating various frameworks for us, I strongly encourage everyone to give it a shot and see how much time it saves you.

So which platform do I like? My impression is Java offers a lot flexibility and choices, but at the same time introduced the "Paradox of Choices", having so many things and integrate them together is no easy task, it simply overwhelm the human brains. .NET on the other hand is in a controlled environment, less choices, but easy to develop.

In other words: Java development is way more complicated than .NET ... unless you use AppFuse. ;-)

Posted in Java at Feb 20 2007, 09:25:15 PM MST 5 Comments

Database Profiles in AppFuse 2.0

Last night, I added several database profiles to AppFuse 2.0 and its archetypes. What does this mean? It means AppFuse should work out-of-the-box with several databases, including:

  • H2
  • HSQLDB
  • MySQL
  • PostgreSQL
  • SQL Server

For example, here's how to test a new AppFuse project works with H2:

mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=1.0-m4-SNAPSHOT -DgroupId=com.mycompany -DartifactId=myproject
Yeah, I wish there was a way to shorten this command (or prompt for choices) too.

After doing this, you can cd into the "myproject" directory and run mvn integration-test -Ph2. AppFuse 2.0 projects are configured for MySQL by default, so if you want to permanently activate one of these profiles, you can add the following between the <id> and <properties> section of the profile.

    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>

In addition to the profiles listed above, I tried to get Oracle Express and embedded Derby working. No dice on either one. I took a brief look at DB2 Express as well, but with a 400 MB download and 3 JARs required for its JDBC Driver - it seemed like a lot more trouble than it was worth.

Maven 2's build profiles are a powerful feature that we hope to make easy to use. For example, to test your new project with H2 and JBoss, you can simply run mvn integration-test -Ph2,jboss. Thanks to the power of Cargo, this will download JBoss 4.0.5, install it, and run all the Canoo WebTests within it. Of course, this will take a while the first time - especially since JBoss is a 77MB download. Fortunately, we allow you to change one small setting in your pom.xml and use an existing install instead.

Maven 2 is a kick-ass build/deploy/test tool once you figure it out. With AppFuse 2.0, we're doing all the "figuring out" for you. ;-)

NOTE: I would add more server profiles, but Cargo's Maven Plugin (version 0.2) has issues with Geronimo 1.1, Jetty 6.x and Resin 3.x. Strangely enough, Jetty's Maven Plugin version 6.0.0 works great, but 6.1.0 throws stack traces.

Update: Support for Oracle and Derby (in networked mode) has been added. We'll consider adding support for DB2 if IBM can figure out how to package their JDBC Driver into a single JAR.

Posted in Java at Feb 14 2007, 05:41:37 PM MST 27 Comments

AppFuse 2.0 Status

Better than Tots We're working hard on AppFuse 2.0. The good news is things are coming along really nicely. There's quite a few developers working on the project now and they've been a tremendous help. If I knew the move to Maven 2 would've inspired so much help, I would've done it a long time ago! We've got most of the archetypes created and we just need to work on documentation for the 2.0 release M1 release. As far as the roadmap is concerned, we've finished most of the code for an M2 release, but we still need to do documentation. I'm hoping to release 2.0 M1 on Thursday of next week.

If you want to try it, you can checkout the Hello World with AppFuse 2.0 video. After that, feel free to take it for a test drive using the QuickStart Guide.

New features in AppFuse 2.0:

  • Maven 2 Integration
  • Upgraded WebWork to Struts 2
  • JDK 5, Annotations, JSP 2.0, Servlet 2.4
  • JPA Support
  • Generic CRUD backend
  • Full Eclipse, IDEA and NetBeans support
  • Fast startup and no deploy with Maven Jetty Plugin
  • Testable on multiple appservers with Cargo and profiles

Speaking of goodies, I uploaded a bunch of AppFuse desktop backgrounds to Flickr. Thanks to Max Hays of Timberline Group for creating these.

Only 26 days left until the AppFuse 2.0 Release Party! Location TBD. :-D

Posted in Java at Jan 06 2007, 01:18:38 AM MST 3 Comments

[TSE] Rapid Web Application Development with Rob Harrop

There's a couple of other sessions I should probably go to, namely Juergen's talk on Transactions and Mark Fisher's Message Driven POJOs Rock! However, transactions is generally a pretty boring topic and I don't see myself developing any MDPs in the next two weeks. If you don't use your knowledge in two weeks, you generally lose it, so I'll wait to learn more about MDPs until someone pays me to. I know a fair bit already, so I don't know that there's a whole lot more to learn.

I'm attending Rob Harrop's Rapid Web Application Development Essentials talk. With any luck, I'll learn some new tips that we can use in AppFuse.[Read More]

Posted in Java at Dec 08 2006, 11:42:37 AM MST 7 Comments

Continuum, Luntbuild, Pulse and NetBeans

Last night, I did a bit of playing with technologies new to me. First of all, I got AppFuse 2.0 running on Continuum. This was was easy enough, I just had to add <scm> information to each pom.xml. Thanks to those who recommended this approach. I thought it was a silly solution until I realized "mvn site" produced the wrong information when <scm> wasn't present for sub-modules.

Since I was playing with Continuous Integration tools, I decided to give Cerberus, LuntBuild, and Pulse a spin. My goal was to give each server the old "college try" and see if I could get them running with minimal effort. I don't know where I heard about Pulse, but it was somehow included in my tests.

Cerberus didn't work with my Cygwin/Ruby setup, so I was done with it quickly. LuntBuild worked pretty well, but the interface and configuration seemed kinda clunky. I also found it strange that it uses a 4.x version of Jetty - seems kinda old. I was surprised to see that it uses Tapestry for its web framework. Pulse was the nicest one with a kick-ass (ajaxified) user inferface, powered by Acegi, WebWork and Hibernate (according to its JARs). It was definitely the easiest to setup and use. While Pulse isn't free for commercial use, it is free for open source projects, as well as small teams.

Summary: Continuum, LuntBuild and Pulse seem to be the best tools for building Maven 2 projects. While CruiseControl works, and works well, it does require you to customize XML from the command line, whereas these tools allow you to do everything through a web interface.

Toward the end of the night, I downloaded NetBeans 5.5 and installed its Maven 2 Plugin. I was surprised at how full-featured this plugin is. I was able to build, test and run the AppFuse web modules in the embedded Tomcat without issues. It's definitely a cool plugin. As for NetBeans, it seemed pretty sluggish and I couldn't figure out how to get Ctrl+Shift+R functionality, which is a must for me these days. Also, I couldn't get the JSF support working for the AppFuse JSF Module, seemingly caused by the Maven plugin (project properties only has Maven options). Since NetBeans works so well with Maven 2, and it's much more full-featured than Eclipse, it seems natural to recommend it to AppFuse 2 users. Of course, I like IDEA a lot more, but there's no Maven 2 plugin that I know of.

Posted in Java at Nov 03 2006, 10:31:19 AM MST 17 Comments

IDEA 6 on OS X and Out of Memory Errors

Ever since I upgraded to IDEA 6.0.1 on OS X, I've been getting Out of Memory errors like no tomorrow. It seems like it's leaking memory when I'm not even using it. Today, I went to lunch shortly after opening IDEA to do some work. When I came back, I was created with the following dialog:

OOM Error Dialog

I've set my Info.plist to have -Xms256m -Xmx512m -XX:MaxPermSize=256m, but it doesn't seem to help. How has your IDEA 6 experience been on OS X? Are you running out of memory? I haven't had any issues on Windows - maybe it's a problem with the MacBook Pro?

I fully expect the IDE zealots to say "use NetBeans or use Eclipse". Eclipse doesn't support hierarchical projects, so that won't work. I'm willing to try NetBeans if I can run something like "mvn netbeans:netbeans" and if it supports hierarchical projects like IDEA does.

Posted in Java at Nov 02 2006, 08:06:39 PM MST 15 Comments

GenericRCP - A GUI for your Hibernate Domain Objects

Peter Schneider-Manzell is an active contributor to AppFuse's documentation and mailing list. Yesterday, he posted a message to the mailing list announcing the 0.3.0 release of GenericRCP.

We (a good friend of mine and myself) started a SpringRichclient based project, called "GenericRCP". With this tool, you can edit your DB directly via your classes and Hibernate. The GUI (Panels / Binding etc...) is generated dynamically out of a JAR, containing the classes and hbm.xml files.

For AppFusers: You only need to import your <.....>-dao.jar, and you can start to edit the values.

You can use this project as a starting point for a customized editor with CRUD functionality and add customized panels / attribute editors for different classes / attribute types, and combinations of them.

Yesterday, I tried GenericRCP with the appfuse-dao.jar from 1.9.4 (XDoclet-based), as well as the appfuse-data-common-2.0-SNAPSHOT.jar (annotations-based) and it worked with both. Nice work Peter!

GenericRCP Screenshot

Posted in Java at Oct 31 2006, 02:01:51 PM MST 2 Comments

RE: Five things I hate about AppFuse

Karsten Voges has written a nice critique of AppFuse titled Five things I hate about AppFuse. I started a new JSF+Hibernate project with AppFuse yesterday, so I definitely feel some of his pain. Let's examine his points one-by-one:

1. It's nice to choose between the usage of JSP 2.0 or before, but making the changes (to all jsps and the web.xml) every time I build my app sucks.

I absolutely agree. I spent a good hour modifying build.xml, web.xml, etc. to switch my app from JSP 1.2 to JSP 2.0 yesterday. You can modify your build.xml to permanently switch to JSP 2.0, but it doesn't get everything. I'll create a separate script for 1.9.3 and the upcoming 1.9.4 to make this cleaner.

2. Seperating the classes in web, services and dao is good, but I hate the building of jar-Files for the different layers. Just take the classes under dao and service and copy them into the war or move them over to the webapps folder as it is done with the web classes!

Yeah, I've proposed doing this a couple of times on the user mailing list. It always gets shot down by existing users. I'm sure it'd be possible to write a script to do this, but it'd be no fun to write.

3. Eclipse crashed with OutOfMemory errors. Always when trying to open the build file. The build file is really, really long, with lots of stuff in there. IMO 50% of it could be deleted.

Hmmm, I rarely have OOM errors with Eclipse, but I also used Bruce's tip for increasing Eclipse's available memory. If you're using Windows, here's how to bump up Eclipse's memory.

4. Generation of Hibernate-Mapping files. I really hate it to look within a jarfile how the Hibernate mapping file looks like. It is nice to get it generated, but I prefer to be able make adjustments to it by hand to try out things quickly. And it is quite hard to enter special SQL statements in an Hibernate file, if it gets overwritten all the time.

You can create/modify the Hibernate mapping files by hand if you prefer. From the FAQ:

If you have an @hibernate.class tag on a POJO - hibernatedoclet will generate the mapping file into build/dao/gen. If you have a mapping file (*.hbm.xml) file for your POJO in the src/dao/**/model/* directory, it will overwrite the generated version. If you don't want to worry about the two conflicting - just remove the @ sign from @hibernate.class in your POJO and put your hbm.xml file in the model directory.

No build.xml modification are need for this to work. The "package-dao" target will include these mapping files. If you want to get rid of the hibernatedoclet process, you can do that- but make sure and run it first - and then copy all of the generated hbm.xml files into your model directory.

5. I don't like to get my struts.xml merged from many sources. I like to have one struts-config file holding all my struts configuration.

I agree this is kinda painful, but so is developing with Struts. ;-) You should be able to move the generated struts-config.xml into web/WEB-INF and remove the <strutsconfigxml> from build.xml to get the behavior you're looking for.

As far as throwing out the build.xml, I'm actually planning on doing that with my current project. I will keep it in place for the development phase, but I hope to move the application into a large build system once I'm done. Since it's all Java code and XML in the end, this shouldn't be hard to do. I did it when migrating to Maven 2, so I know it's possible. As far as Karsten's opinion of Maven 2, he may be right - but I hope to make a strong effort to make it very useable when using AppFuse. In fact, I hope to make it possible for users to use their IDE their entire time, with no need to run any Maven commands. Of course, that could be a pipe dream - only time will tell.

As far as sounding like the BileBlog, the more you rag on AppFuse, the better. Remember, screaming users are a good thing.

Posted in Java at Oct 06 2006, 08:03:58 AM MDT 10 Comments

RE: What Web Application framework should you use?

Tim O'Brien has an interesting post titled What Web Application framework should you use?. The first thing I noticed about this post is the permalink. It looks like he started with "Isn't Rails supposed to change...", which makes me wonder what the rest of the title was. In this post, he rags on Java Web Frameworks and the lack of a clear path for choosing one. He ends up predicting that many will stick with Struts 1.x (poor bastards) and those that aren't tied to Java should move to Rails. I don't have a problem with folks moving to Rails, but I would like to comment on the Java Web Framework space and Tim's comments.

He says:

Prediction: The confusion over what is happening over at Struts is going to discourage people from continuing to use it. The Struts team did the right thing in recognizing that Struts 1.x was a dead-end, but that project needs a single public message. Is it Struts Action or is it Struts Faces? Or is it two frameworks capitalizing on the Struts brand name?

I think what is going on in the Struts project is definitely two frameworks capitalizing on a brand name. That was a concious choice on the project's part when they chose to start creating sub-projects. The interesting thing about Struts Shale is it's largely a prototype for JSF 2.0. Furthermore, it was rejected by many Struts developers as becoming Struts 2.0. Why? Because JSF sucks. Especially when used with JSP - which is what most folks are doing.

JSF continues to be the most over-hyped under-used framework in Javaland. If you read the blogs of first-time users, you'll find many complaints and issues on how things work. Granted, most of these problems are with JSP and the implementation, but still. If I were in charge of JSF, I'd dump JSP altogether, bundle Facelets with it and allow more flexible page navigation (including controller-to-page). Don't get me wrong, I like the ideas behind JSF, I just don't like the implementation (or the fact I have to wait years for things to be fixed in the spec).

That being said, I've yet to meet an unhappy WebWork fan. If you find someone that still likes Struts, ask them if they've used WebWork. Chances are they'll say no. As far as Tapestry is concerned, the learning curve is too high. It's been rejected time and time again by my clients because of the learning curve. Are they going to fix this? Yep, they're going to re-write the whole damn thing - again! Every major point release of Tapestry throws backwards-compatibility out the window. Furthermore, I've heard once you get over the learning curve, it's a joy to work with. I've also met people at conferences that've used it over a year and say they're still struggling with its concepts.

Spring MVC - I wish I had bad things to say about it, but I don't. It (obviously) has the best Spring integration, but I've found WebWork much more pleasurable to work with. Sure, Spring has a ThrowawayController, but with a name like that, you can tell it's a second-class citizen.

Inspired by Tim's post, here's my prediction:

Struts Action 2 will be the best choice for developing Java-based web frameworks. Not only does it support JSF, but it's easy to learn, test and use. Furthermore, it seems to be the most often used framework in major software products and web sites.

How's that for a clear message? Struts Action 2 is the shiznit, now let's get back to developing applications.

Disclaimer: This is my opinion with a lot of stuff thrown in to get folks riled up. I've never put a JSF, Tapestry or Spring MVC application into production (except for AppFuse of course), so most of my opinions are likely without foundation. In wonder how many applications Mr. O'Brien has put into production with these frameworks?

Posted in Java at Jun 20 2006, 08:32:41 AM MDT 57 Comments

JavaOne 2006 Begins

After 3 hours of sleep, I'm up bright and early - attending the JavaOne Keynote. They're still shuffling people in, and have this awesome reggae-type band jamming. They're really good - I hope they're here later this week. The wireless sucks (as usual), so I'm using bluetooth to connect. Watch this post, I'll update it as the good announcements come.

We're starting off with a 10 minute overview of the Schedule Builder and how to use it. For those sessions that are full, apparently they'll schedule a 2nd showing. Most most sessions, there's already available online in PDF. After the show, most sessions should be available online in video form. Everyone should act like a Brazilian at this conference - meet people you don't know and learn as much as you can.

Jonathan Schwartz is on stage, dressed in a suite, talking about how they're offering a now offering a "Free Kit" on their website. Apparently, you can now get their Niagra servers for free. Sounds wierd, who knows if it's true. This JavaOne is the largest JavaOne ever, as apparent from this exhibition hall. "The Java community has never been more vibrant." The JCP has 1052 members. Of these, Jonathan says there aren't enough individuals on this committee. Everyone should go out and join. The community defines the future of Java.

Now there's a guy from Motorola on stage. He's the guy who originally introduced Java at this conference 11 years ago. The next few years will be just as crazy as the last 10 years for Java - only it will happen on a high-speed mobile network. In the mobile space, their are a lot of proprietary things going on. By encouraging and using Java, applications can be developed and deployed easily across many mobile devices. Motorola is selling 200 million phones this year. They've shipped 90 million in the last 6 months. Java needs to stay unified so write-once, run anywhere works on all devices. Motorola is publishing many open source projects for Java and Linux on http://opensource.motorola.com. To summarize, Motorola alone out-ships the PC industry.

Mark Shuttleworth from Canonical, Inc. is now on stage. Mark is deeply involved in the Ubuntu community. As of today, Java will be directly available to Ubuntu, Gentoo, Debian, etc. Apparently, this is because Sun has made some changes that allow it to be distributed with Linux. They're talking about Linux on Niagara - it sounds like there might be some announcements around this during the week. There's still no announcements about open-sourcing Java or re-licensing.

Mark Fluery has now been invited up on stage. He's got a red beret on. The Red Hat deal closes on May 31st. JBoss is joining the NetBeans community. Mark seems to think the next big thing in Java is Tools. Seems like a publicity stunt since they're talking about Netbeans. It will be interesting to see if JBoss becomes heavily involved in IDE development. Expect more innovation. You should expect more from the future, from the companies that provide Java, and from the community that uses it. Jonathan's first act of congress in his new post was to ask someone to return to Sun. Rich Green is the Executive VP of Software for Sun. He's been back at Sun for a week and a half, and he's been in meetings the entire time.

"Are you going to open source Java?", asks Jonathan.

"It's not a question of whether, it's a question of how." replies Rich.

So there you have it. They're going to open source Java, it's simply a matter of getting through all the politics and compatibility-issues to make it happen. Rich is now on stage by himself, encouraging the audience to get more involved in Java. Java EE 5 was recently approved. Now they've invited the Java EE Expert Group on stage. Everyone has a company sign to show. My name is on the slide, but it doesn't look like individuals were invited. Oh well, it's not like I contributed anything.

Jeff Jackson, Senior VP of Java Enterprise Platforms and Developer Products is now on stage. Java EE 5 is the big thing at the conference this year, and has all the right stuff: Ease of Development, simplified programming model with annotations, EJB 3.0 support for POJOs, new Java Persistence API, Web 2.0 Support, .NET Interoperability, Simplified SOA. NetBeans 5.5 supports Java EE today, so Jeff recommends you download it today.

Jeet Kaul is now on stage and he's going to do a demo of developing an application with Java EE 5 and NetBeans. He's using a nightly build from May 10th. I'm not sure if it's a nightly build of NetBeans or Glassfish that he's using. The demo he showed is pretty cheesy. He added an "author" column to a table, added a property to an Entity bean and then added an input field to the UI. This was followed with a web services demo and an Ajax demo. The Ajax demo was kinda cool - NetBeans allows you to drag and drop JSF components into a page. It drops in code rather than using a WYSIWYG view. I'm not sure if a WYSIWYG view is an option, as they didn't demo or mention anything.

Today Sun is donating their Java Message System (JMS) and NetBeans Enterprise Pack (UML, collaboration, etc.) to the open source community.

Craig McClanahan is on stage, He's got a slide with Duke holding a beer stein. The beer stein, and the Sierra Nevada that Craig pulled out are to represent the real reason we're here: The Beer. Craig is doing a demo with Java Studio Creator and creating a Pub Locator application that utilizes built-in GoogleMaps components. Craig deployed and showed a demo locating all the pubs near Moscone center. Then he turned "boss mode" on and clicked on a link to the Thirsty Bear. This took him to the new Java Ajax portal at developers.sun.com/ajax. Craig's demo was followed with a demo of the new Pet Store - with Ajax/Dojo enhancements.

Sun will be donating Java Studio Creator to open source (at netbeans.org) in the near future. In case you're not aware, Sun has recently released a number of other products on netbeans.org: NetBeans Profiler, NetBeans Mobility Pack, NetBeans Matisse.

Now there's a guy from Microsoft on stage talking about .NET and Java EE 5 interoperability. There's a "Tango" project that has a runtime that provides the interoperability between platforms. Now they're doing a demo with NetBeans 5.5 and its BPEL engine; all running on Open ESB. They demonstrating using WFC and Vista on the Windows side to connect to a web service on the GlassFish side. The Tango project has been renamed to Web Services Intererability Technology (WSIT) and is available on java.net at http://wsit.dev.java.net.

There's some new guys on stage now and they're talking about "Simplified SOA" with NetBeans Enterprise Pack using BPEL. While the BPEL tools in NetBeans look cool, they're definitely starting to lose the audience; people have started streaming out of the auditorium. More open source contributions: BPEL Engine into Open ESB and Sun Java System Portal Server.

Big Announcement: all of the technologies mentioned today will be under the umbrella of the OpenJava EE project.

Richard Blair (Swing Engineer from Sun) and Romain Guy have come on stage to demonstrate a Java SE Swing Web 2.0 Mashup. The demo uses Mustang and starts with showing a Swing client that connects to Flickr and allows you to browse photos. The slideshow feature is very cool and allows you to do 3d rendering and angling of images. It's one of the slickest-looking desktop apps I've ever seen. After showing the photo feature, they're showing how you can integrate this will a Google Map-looking service to show pictures on a map. All of the components in this demonstration are open source or simply customized Swing components. They ended the demo with showing a preview feature. The preview creates an applet that runs in a web browser (even when you're disconnected) and draws Roman's trip on a map, playing music and fading in pictures as the trip progresses. I was blown away at this point and would love to get my hands on this application. Hopefully it will be made available online, or maybe as a Flash movie?

There you have it folks. Sun is going to open source Java, just like I predicted a couple of weeks ago. It's not a matter of when, it's a matter of how. ;-)

Posted in JavaOne at May 16 2006, 09:40:33 AM MDT 5 Comments