Matt RaibleMatt Raible is a Web Developer and Java Champion. 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.

RE: AppFuse, 'tool' of experts

I'm please to say that I've been biled yet again. The first time wasn't so bad, and this time seems pretty mild too. There's no mention of asshat, chozgobbler or turdburglar in the whole post, which is somewhat disappointing. Nevertheless, it's what I've come to expect from a guy who sallies car bombs and dances like a sissy.

Regardless of the lack of bile in Hani's post, he does bring up some good points. Let's take a look at them individually:

  • IzPack and MyJavaPack: the progress bar doesn't work, and the installer downloads everything rather than just including/installing it all.
    • To be honest, I didn't know it was possible to pack up everything and skip the internet download part. I'll definitely look into fixing this.
  • You must have Tomcat installed to work with AppFuse.
    • This is true, and I've thought about changing it to be Resin friendly, or possible Orion friendly, but there simply hasn't been any demand. Of course, Orion isn't that attractive to many folks because it doesn't even support Servlet 2.4. Maybe you should crackin' on that Hani! Or maybe you just like living in the dark ages with your affections for EJB 2.1, Servlet 2.3 and WebWork 1.4.
  • When creating a new project, you get prompted for the package name twice.
    • This is true, and something we should fix. The major reason we haven't is because I didn't want to distribute a 2MB BeanShell JAR that would support the 3 lines of code to fix the problem. I guess I should bite the bullet and add the bloat, or figure out a more elegant way to fix the problem. Issue #75.
  • Project generation auto-detects MySQL when you don't have it installed.
  • I'm a web monkey.
    • True, but that's cool now with Ajax and all.
  • Half the build targets don't work.
    • I think this is more like a handful don't work, but good effort. I agree we should remove the install-* targets when installing a web framework. Issue #76.
  • Every object creates builder objects in hashCode and toString.
    • This is true, and I've seen no performance implications from it. In reality, these are a product of the commons-lang project, as well as Commonclipse. We should probably change these to use smarter methods like the ones IDEA generates. It'd be nice if Eclipse has hashCode() and equals() method generation like IDEA.
  • The project's directory layout is bound to confuse a seasoned webapp veteran.
    • The directory structure is largely based off the example app in Java Development with Ant. Since AppFuse uses Ant, I figured it was a good idea to use a "best-practices" structure like Erik describes in his book. I've often thought about consolidating the 3-source tree, 3-test tree directory structure to one, but users are very attached to the current setup. Maybe for 2.0.
  • XDoclet generates web.xml.
    • I agree that using 11 XML fragments to generate 1 XML file is a little ridiculous. You're right - developers should know how to write a web.xml and what goes where. Issue #77.

Thanks for the feedback Hani - sounds like I owe you a car bomb or two at JavaOne. ;-)

Posted in Java at Jun 22 2005, 10:41:03 PM MDT 17 Comments
Comments:

Why does the guy insult his own readers at the end of the article? He has valid points but I don't think getting appfuse to run is nearly as hard as he proclaims. I have to agree that the directory structure needs some work, and getting prompted for the package name twice isn't good.

Posted by Dan Q. on June 23, 2005 at 02:06 AM MDT #

I hit the web.xml issue as well trying to figure out how the security worked. Great that you'll fix it! Also, move to Acegi for 'remember me' functionality, the security stuff is a little complex.

Posted by Mathias Bogaert on June 23, 2005 at 02:32 AM MDT #

Matt, the Tomcat thing is a bit of a bummer. Itsnot just dependent upon Tomcat, but a specific version 5.0x. I have 4.1.x installed, but I had to go and download Tomcat 5.0x just to build. I get the same issue with Equinox. I don't think it will be solved by making Resin or Orion friendly. Why not simply bundle Jetty? the jar is like 350K, and then nobody needs to go through the hassle of setting environment variables or installing Tomcat. I'd also make this stuff an optional build target, certainly not mandatory.

Posted by Lee on June 23, 2005 at 03:28 AM MDT #

Move on guys - don't you know that Ant and Java are ancient history?! Ruby on Rails is where it's at! :) Rails itself is already mostly what AppFuse provides. Directory structure is already taken care of for you, as well as unit testing code structure. And no more of this silly Ant stuff... Rake is king! :P

Posted by Erik Hatcher on June 23, 2005 at 06:56 AM MDT #

Matt,

You probably haven't seen performance hit from using commons builders for hashCode() and equals() because you haven't run specific performance tests. Try to put your objects into (reasonaby large) Collection and perform, for example, sort operation on it - at minimum you would see 20% perforance hit which can reach as high as 200% if you're using reflection builders.

Posted by Dmitri Maximovich on June 23, 2005 at 07:46 AM MDT #

Also notice, not a single girl anywhere close to the guy on the dance floor.

Posted by Greg Jones on June 23, 2005 at 08:06 AM MDT #

I found AppFuse a bit of a dog to get up and going alright. Then I found equinox and thought that was good. However I must say this, I don't think I would have learned spring and hibernate without these applications. They are good sample applications and have good examples. Anybody new joining my team I make them download and have a look at these applications. So if the aim of appfuse and equinox is to help people learn then I think it achieves that, but learning isn't easy so that's where the setup comes in.

Posted by reddeagle on June 23, 2005 at 08:28 AM MDT #

i'm looking to intro spring and hibernate into our environ and am looking to appfuse to help make this happen. no sooner did i sell the boss on the idea than i saw hani's bile. will have to see for myself. the car bomb picture recalls the last time i had several of those: cousin's wedding in washington state. he's a navy guy. most the guests were navy guys. while i'm proud to say no drinks were sallied, it was really dumb (given hindsight) to try and keep up with bunch of navy guys at the bar. twas a looong flight home the next day. :)

Posted by erickreid on June 23, 2005 at 09:05 AM MDT #

Thank you for the pictures, they started my day off with a great laugh

Posted by Steven Citron-Pousty on June 23, 2005 at 09:37 AM MDT #

I'd like to second what reddeagle said. We needed a jumpstart for doing Spring and Hibernate and equinox was the perfect learning example for that. Having gone through that exercise, our application has certainly diverted from that basic structure into it's own entity, but I'm sure we would not have gotten up to speed as quickly. Our build.xml looks nothing like either the appfuse or equinox ant files. I continue to look forward to new versions of appfuse not as a toolkit for building applications, but for a learning environment for piecing together disparate java web technologies and making them work together.

Posted by Rossi on June 23, 2005 at 10:01 AM MDT #

Hi Matt,

You are doing an absolutely incredible job with Appfuse. You heavy lifted Appfuse off the ground yourself and it has taught 1000's of developers (based on download numbers) the basics of how java, struts, spring, hibernate, etc. fit together. Thanks from one of those developers!

I know you've already had several "What's Next For Appfuse" threads on the appfuse mailing list. It seems like appfuse will continue to grow and evolve.

Personally, I would like the directory layout to more closely match what Idea does for it's web directory layout and build process. This would allow faster edit build reload cycles for me with tomcat reading the exploded build directory directly. I believe this is how MyEclipse and other web development environments work. If I had your time management skills I would rewrite appfuse to do this. Perhaps later in the year :)

Regards,
Phil

Posted by Phillip Hershkowitz on June 23, 2005 at 10:44 AM MDT #

Dammit, you're too nice for me to not offer actually useful advice (to be ignored if you want!)

Anyway, since this isn't the bileblog, here are some helpful ideas:

For IzPack, build an offline installation. The download size is bigger, but it's less flakey than the net install, and you can define different packs for webwork/struts/whatever support. Even nicer for the target audience you have in mind would be to let them specify stuff like what database they want to use (and maybe even ship with hsqldb for an better out of the box experience)

Prompting for package name twice: Why is this hard to fix? I'd suggest writing a custom ant task where you can put in whatever logic you want. Not as sexy as bsh or groovy or whatnot, but far more suitable and functional for the job at hand.

Non-tomcat specific: Clever use of the <available> task in ant should allow you to detect tomcat and behave accordingly. For tasks that require it, you can have a <target name="blah" depends="check.tomcat">, with the check.tomcat target failing if the tomcat classes aren't in the classpath. That way users can still get stuff done if they're doing tomcat specific stuff, and if they do want to deploy or whatnot, they get a helpful message saying why it isn't possible. For people wanting resin/orion/jetty/whatever support, it'd be easy to just write more tasks to do it. Most users are likely to be comfortable with a war file being spit out, so a built-in deployment step isn't that vital anyway.

Consolidation of directories: While the directories are fairly intuitively named, it is a bit much to navigate for a first time user, especially given the target audience of webapp newbies

BaseObject: providing (or even mandating) hashCode via an interface is a bad idea generally, because there isn't really a generic way of modelling domain specific objects to provide meaningful hashcodes. Relying on the generic one from Object.class is perfectly adequate. Same goes for equals, you're not gaining anything by defining this since it's still a non-domain aware solution.

Posted by Hani Suleiman on June 23, 2005 at 11:24 AM MDT #

Hahhahah ... I was laughing in tears reading that log. :-) Definitely, not everyone will use AppFuse as a base for their project, but learing from it is invaluable. Thanks Matt!

Posted by Doug Pham on June 23, 2005 at 02:09 PM MDT #

RE: Nevertheless, it's what I've come to expect from a guy who sallies car bombs and dances like a sissy. Or maybe you just like living in the dark ages with your affections for EJB 2.1, Servlet 2.3 and WebWork 1.4. +1 for Matt

Posted by Rick Hightower on June 23, 2005 at 10:02 PM MDT #

Well, it is called the BileBlog. Obviously not intended to be read by the thin-skinned when they are criticized. Note the quote in the top right corner; "If you have nothing bad to say, say nothing."

Posted by Rusty on June 24, 2005 at 11:41 AM MDT #

It's not exactly hard to hook in JBoss to AppFuse either. I did this (look in my blog) and submitted it for inclusion into AppFuse. I can bounce between the two servers by changing two lines in build.xml. I have to check it again w/ the latest version of AppFuse to see if Acegi security needs anything special though. I was working on the Websphere switchability, but got caught up in its lack of an easy way to use a JDBC source for a user repository since it doesn't support JAAS for this.

Posted by Ken Yee on June 24, 2005 at 01:20 PM MDT #

Well just curious as to why Hani didn't include his suggestions (like he as done here) into the BileBlog in the first place

Posted by Allan on February 26, 2007 at 10:06 PM MST #

Post a Comment:
  • HTML Syntax: Allowed