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.

7 simple reasons to use AppFuse

IBM developerWorks published my "Seven simple reasons to use AppFuse" article today. Here's a summary:

Getting started with open source tools for the Java™ platform such as Spring, Hibernate, or MySQL can be difficult. Throw in Ant or Maven, a little Ajax with DWR, and a Web framework -- say, JSF -- and you're up to your eyeballs just trying to configure your application. AppFuse removes the pain of integrating open source projects. It also makes testing a first-class citizen, allows you to generate your entire UI from database tables, and supports Web services with XFire. Furthermore, AppFuse's community is healthy and happy -- and one of the few places where users of different Web frameworks actually get along.

While you're there, you might be interested in reading the "Introduction to Spring 2 and JPA" tutorial. I don't know if we'll get JPA support into AppFuse 2.0, but it's certainly a possibility.

As far as AppFuse 2.0, here's the current structure I've started on for Maven 2:

appfuse
    - data
        - hibernate
        - ibatis
    - service
        - pom.xml
        - src
    - web
        - jsf
        - spring
        - struts
        - tapestry

After code is moved into the directory structure above (or completely re-written), I'd like to move to working on creating single module archetypes and multi-project archetypes (data, service, web) with Maven 2.

After getting the Maven 2 structure checked in, hopefully we can start looking at replacing AppGen. Scott Ryan has done a fair amount of work on this so far with his AppFuse Maven Plugin.

I plan on documenting the plan of attack and milestone features for 2.0 sometime this week.

Update: I started working on the Maven 2 conversion last night. The above structure has changed slightly. Now there's a project in data and web (notice the pom.xml and src in these directories). These projects will contain the classes/files that are common to their sub-projects. The fact that these projects even exist will likely be transparent to the end user.

AppFuse 2 Structure

Posted in Java at Aug 08 2006, 01:14:15 PM MDT 17 Comments
Comments:

In the proposed Appfuse 2.0 structure, under appfuse -> web, does struts = struts? or does struts = webwork?

Posted by JR on August 08, 2006 at 07:57 PM MDT #

struts == webwork, or rather struts 2. No need to punish people into using Struts 1.x. ;-)

One of the things we hope to enable in AppFuse 2.0 is for framework authors to contribute. By having each framework isolated from each other, hopefully it'll be easier to change to do things the best way for that particular framework. On my personal radar: Stripes and Wicket support.

Posted by Matt Raible on August 08, 2006 at 08:03 PM MDT #

Does your codegen generate the ui like the scaffold thingy in RoR?

Posted by Srgjan Srepfler on August 08, 2006 at 11:00 PM MDT #

I think things like this put newbies in dangerous positions. Pitching something as "you don't need to understand what's going on, we'll take care of it" is just asking for trouble imho. I have a good friend who has worked with html/javascript/css for a few years and knows it very well - he has been gradually spending more and more time doing java development over the past year and I am constantly frustrated when he asks for help and doesn't understand what is going on under the covers. The reason he doesn't understand is that frameworks have made it easy for him to skip the step of understanding what is happening. Whilst frameworks are essential to developing at any sort of pace, so is understanding how the frameworks fit together and what each framework is responsible for.

Posted by Dmitri Colebatch on August 08, 2006 at 11:02 PM MDT #

On the other hand a badly engineerd app is worse than an well engineered one, even if a developer has no klue how does it work underneath.

Posted by Srgjan Srepfler on August 08, 2006 at 11:25 PM MDT #

Srgjan - yes, the code generation is similar to Rail's scaffolding (AFAIK). You can see a video of it in action at http://demo.appfuse.org/appgen.html. If you like, you can also right-click, save-as the movies from http://static.appfuse.org/movies.

Dmitri - I agree. I've said for the longest time that AppFuse isn't for Rookies. However, it does simplify setup so much for people new to Java development, that we find a lot of newbies to Java on the mailing list. I'm starting to reverse my attitude on "not for rookies" and instead try to embrace rookies and show them how to use all these frameworks. Granted, it's tough to see the benefit of frameworks when you haven't developed without them, but we can't tell people to go away just because they don't understand the details of the underlying architecture. In fact, the best thing we can do is likely write good documentation so users understand what they need to know in order to be productive. Isn't this what Rails does?

Posted by Matt Raible on August 08, 2006 at 11:27 PM MDT #

Good points Matt, but you are crazy to think that the current offerings of Java Web Frameworks offer anything close to the Rails stack...

Posted by Ryan on August 09, 2006 at 01:34 PM MDT #

I agree Ryan. I don't even know if I'd consider AppFuse a Rails competitor. Rather, I consider it a solution for those who choose to use Java - which many companies still do.

Posted by Matt Raible on August 09, 2006 at 01:39 PM MDT #

So to use AppFuse 2 I'm gonna have to learn Maven??? You're been such an Ant guy, it's hard to hear you're moving to Maven.

Posted by Erik Weibust on August 09, 2006 at 07:00 PM MDT #

Erik - one of the nice things about Maven 2 is it's IDE-project-file-generation plugins are actually quite good. So in reality, you will only need to run a Maven command or two, and then you'll be able to operate completely from w/in your IDE. This is probably the biggest reason for moving to Maven 2 - to allow users not to use a build tool - but rather their IDE.

As far as why I'm moving from Ant to Maven? Here's a quote:

"The main reason that AppFuse uses Ant over Maven is speed."

I still think that Maven 1 sucks because it's slow (although it's much better now that I have a MacBook Pro). However, Maven 2 is as fast, if not faster than Ant. Also, it's the closest thing us Java developers have to RubyGems. If you're still not convinced, check out the Maven 2 Plugin for Eclipse. I still have dreams of supporting Ant in a release beyond 2.0, but don't know if it'll be worth the effort.

Just like AppFuse simplified using Ant, we hope to make Maven simpler to use as well. ;-)

Posted by Matt Raible on August 09, 2006 at 07:43 PM MDT #

Hi Matt, Sorry if this question is off topic, but does codegen always part from a db instance? I'm asking this as I already have my model (jpa based) and it might be an overkill. I've looked at the demo with no sound so I don't know if you actually addressed that issue.

Posted by Srgjan Srepfler on August 09, 2006 at 08:17 PM MDT #

I think Maven is a great idea. It frees Matt up from packaging up special combos of each framework. Hopefully, it'll also make the framework examples more independent of each other as well, so they can be upgraded/improved more easily. And it gets rid of AppGen :-)

Posted by Ken Yee on August 09, 2006 at 08:50 PM MDT #

Srgjan - the codegen can operate from a POJO or from a database table. Currently, everything works off of XDoclet tags in the POJO. Hopefully the 2.0 version will be able to key off of annotations to generate code.

Posted by Matt Raible on August 09, 2006 at 09:10 PM MDT #

It maybe a dumb question, but I will ask it anyway ;)

Appfuse2 would be the main folder? Or it will be in, for example, "src/main/java/org/appfuse2"?

Cause it's strange to find a maven project with that kind of structure (it's almost the same structure that's now in appfuse with ant).

Nice to see that the maven step has come ;-).

Thx

Posted by Orlando on August 10, 2006 at 12:07 AM MDT #

Orlando,

The dream with AppFuse 2.0 is that it's an archetype, with only a couple AppFuse dependencies that pull in the other frameworks. For example, here's a sample pom.xml for a Hibernate + Spring + Struts 2 application.

    <dependency>
      <groupId>org.appfuse</groupId>
      <artifactId>hibernate</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.appfuse</groupId>
      <artifactId>struts</artifactId>
      <version>2.0</version>
    </dependency>

From there, you'll create your classes like you do now (extending AppFuse base classes). The "struts" dependency is actually a WAR that will overlay your WAR and include all the default features in AppFuse.

In a future release, hopefully we can create a plugin API that allows you to add and remove features.

Posted by Matt Raible on August 10, 2006 at 01:13 AM MDT #

Matt and the AppFuse community have done a great service to developers delivering a pollished, secure and scalable application. I work with Spring (I recommend it), but was quickly overwhelmed by (what about Security, what about Hibernate, what about the look & feel). Frankly the tutorials I found to perform the integration where typically many revisions behind! AppFuse has moved rapidly with revisions and provides essential components in a testable framework. The User Forum is excellent. Great work Matt and team. Excellent article.

Posted by John Schwitz on August 10, 2006 at 06:56 PM MDT #

I am a friend of John Schwitz, trying to locate him, as he has dropped off my radar screen!. Does anyone have a contact?

Posted by Remy Charmoz on December 07, 2007 at 08:37 PM MST #

Post a Comment:
  • HTML Syntax: Allowed