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 "framework". 558 entries found.

You can also try this same search on Google.

Seam

I have to admit, there's something about Seam that intrigues me. Maybe it's because they put up a really nice-looking demo (I'm a sucker for eye-candy), or maybe it's because it seems to be well documentated, or maybe it's the fact that it's based on J2EE standard technologies (EJB3 and JSF). It could also be that I greatly respect the work of Gavin King (who's always been respectful to me when I asked Hibernate questions back in the day).

It could be the lack of configuration, but I think it's the simplicity that gets me. A POJO (Entity Bean), a Session Bean for your business logic, and a view page (w/ Facelets no less, which is very cool). Other new frameworks this year include Wicket and Stripes. While these frameworks look cool, I really like the idea of a full-stack framework much better (I do use AppFuse after all). Well done Gavin - Seam looks very cool IMO.

On a related note, I upgraded AppFuse to MyFaces 1.1.0 yesterday w/ minimal effort. You can grab the latest from CVS if you'd like to get started with MyFaces quickly.

Posted in Java at Sep 21 2005, 10:00:28 AM MDT 15 Comments

Subversion options for open source projects?

I've been using Subversion on quite a few projects lately and I have a hard time switching back to CVS. I currently use CVS for most open source projects, particularly AppFuse and Equinox - which I work on the most. A discussion started this morning on the AppFuse Mailing List about moving to Subversion. While I'd love to do this, I'd prefer to do it at java.net - so I don't have to completely abandon our hosted environment there. However, I don't think java.net is planning to offer Subversion anytime soon. If we move source control to somewhere else, we're pretty much just using it for the mailing list. Then again, the mailing list archive kinda sucks and you can't get it archived by mail-archive.com.

That being said, it might be nice to host everything ourselves. This might allow us to get something like Jive Forums setup. WebWork uses it and it has a pretty cool feature that the mailing list and forums are integrated (messages go to both). While the idea of self-hosting sounds appealing, it also sounds like it might be a lot of work. For hosted SVN options, it seems that there's JavaForge, Codehaus (which I believe is invite-only) and CVSDude. Any other options you know of?

Posted in General at Sep 21 2005, 08:15:54 AM MDT 16 Comments

Should I change AppFuse's default web framework?

Currently, the default web framework in AppFuse is Struts. It's nothing fancy like Shale or Struts Ti, but rather Struts Classic. Even though Struts is not dead it's a pain in the ass to work with compared to other MVC frameworks like Spring MVC and WebWork. Yesterday, on the AppFuse Mailing List, I kicked off an informal poll about switching to a different default web framework. I think most of the people that choose Struts w/ AppFuse are choosing it b/c it's the default. Making another framework the default would likely same quite a few users a lot of headaches.

So which one should I make the default? Here's my thoughts from the mailing list thread:

I like Spring MVC and WebWork better than Struts, but I believe that WebWork is much easier to understand and develop with. Unfortunately, it's not well documented or marketed, so it's a bit difficult when you run into snags. Of course, if you contact the user community via forums or e-mail, answers flow quickly.
...
I'd like to use the framework that's simplest to understand. Right now, in my eyes, that's WebWork. I think JSF and Tapestry are excellent too (as component-based frameworks), but Tapestry's learning curve is difficult and JSF has a lot of issues (like everything is a post). Hopefully things will get better with JSF 1.2, but it's probably another 6 months before MyFaces supports 1.2 - let alone the app servers.
...
Maybe we should just drop Struts altogether - or replace it with Struts Ti? Unfortunately, it'll probably be a while before it's ready for production (I doubt it's that useable now).

Of course, if a WebWork Book was out - this move would be a lot easier. I did talk to Patrick Lightbody on IM yesterday and he said "it's done" and supposedly he has copies, but I haven't seen anything on the WebWork Blog to prove this.

A related question: how much would it hurt AppFuse if I dropped Struts altogether and went with something like Wicket instead? I'd like to keep that cap at 5 web frameworks. If I dropped Struts and added Wicket, I might lose potential users, which might not be a bad thing. ;-)

Posted in Java at Sep 15 2005, 07:32:51 AM MDT 32 Comments

Biled Again, this time because my design sucks

Looks like I've been biled again. Unlike the last time, this time Hani doesn't offer any specifics, he merely says that my OSS efforts don't do anything other than the "very very basics".

Java, specifically, goes a long way towards ramming down a set of design principles. Said principles are followed fairly blindly by most practitioners. The OSS world is awash with examples of people who have read the right books, but have absolutely no skill or talent at conceptualising or grokking the underlying principles behind the books. To them, the design pattern is an end goal, not a tool. To pick one example (out of thousands), look at Matt Raible's OSS efforts. It has inheritance! It uses PATTERNS! It is LIGHTWEIGHT! Yet, I'd argue that it's very badly designed (if you don't believe me, just try getting it to do anything other than the very very basics.)

I'm assuming that Hani is speaking about AppFuse and Equinox, because my other efforts in OSS are minimal (Roller, Display Tag, XDoclet and Struts Menu). The reason I'm writing this post is because I'm curious to know what Hani tried to do that didn't work? Was it AppFuse/Equinox that failed? Or was it the underlying framework? Did he try to do indexed properties with WebWork or modify build.xml to deploy to Orion? Is the feature he's looking for something we can fix?

As a defense of my use of patterns, lightweight containers, etc. - it's not so much my doing that these happen to exist - they're more of a reflection on what user's want. It's a problem with Java developers in general - if you're not using patterns - users want to know why. Furthermore, most of the J2EE patterns in AppFuse are from the underlying frameworks, not from anything that I did.

As far as the design of AppFuse, I agree it could use some work. There's a lot of stuff in AppFuse that I don't use - so when I start a project with it - I usually rip out about 20-30% percent of it's features b/c I won't use them. Unfortunately, it's not that easy for others to do this b/c they don't know what they'll break if they remove a bunch of stuff. I'd like to move to a more modular, plug-in type architecture - but I have a feeling that that's the path to over-engineering. Even so, it would be pretty cool if it was possible to turn on/off features (even the use of a particular web framework) by changing a properties file.

Posted in Java at Sep 14 2005, 08:58:58 PM MDT 8 Comments

Building a website with an Open Source CMS

I think the open source community has done an excellent job of figuring out how to create frameworks for developing web applications. But what about websites. You know, the web presence that every company wants - for minimal cost. For most companies, it's nothing more than 5-10 pages that tells a bit about the company, show some management folks and tells you how to get to their offices.

I've developed many websites over the years, many that were static, but more that were dynamic. The unfortunate thing about all of them is they required someone technical to update them. Often, the client had to contact me if they wanted anything new on the site. I've often thought there was a better solution - and I think I'm at a point where I know what customers want, and I know how to provide it. The solution is a Content Management Solution (CMS). One of the biggest problems with static websites is they're not dynamic enough. A CMS can alleviate this problem by reducing the bottleneck that a traditional "webmaster" creates.

In my mind, there are a couple of things that make a good CMS: 1) it's open source (to minimize costs to the client) and 2) it's easy to customize. On the customization front, my demands are a bit more rigorous - mainly because I know what many folks want in a website. Here are my main criteria for a good open source CMS - when it's used to power a regular ol' client-updateable website:

  • Design customization: I should be able to customize all the (X)HTML that's generated using one or two files (like SiteMesh allows). It should be possible to change the look and feel of *everything* by modifying some CSS. It should also be possible to use Mike Stenhouse's CSS Framework to simplify layout choices for clients. Ideally, a web designer or regular ol' HTML person could do the customization.
  • Static-looking URLs: The site should look like a static site. The URLs should be all lowercase and end with .html. It should be possible to modify all the URLs to look as if all pages are static. Apache's mod_rewrite and the URL Rewrite Filter are great tools for making this happen, but it'd be nice if the administration of the application allowed for setting these rules.
  • It shouldn't look like a CMS: No login links, no registration links, etc.
  • Ability to easily add dynamic content: It should be easy to add dynamic content - such as RSS Feed headlines to pages.
  • Menu Customization: In the application, it should be possible to create menus (both main and local navigation) and configure a page to highlight a menu when a particular page is shown.
  • Versioning of pages: In case someone messes something up, it should be easy enough to revert back to a previous version.
  • Easy to use: It should be possible to train a marketing person (with little technical knowledge) how to use the system in 10-15 minutes.

For technical companies (such as Virtuas), there are a few additional requirements I'd like to see:

  • Articles with syntax highlighting: It should be easy to publish articles with code that's colorized. The Java2HtmlPlugin for JSPWiki is a good example of this. I currently don't know of any for XHTML, XML or scripting languages like Ruby or Python.
  • File Upload: For uploading white papers and other technical publications.

So I've started looking at open source CMS's that fill my requirements. Last weekend, I wrote a solution that fills all of these requirements using SiteMesh, JSPWiki, CSS Framework, Acegi Security and the URL Rewrite Filter. It only took me about 6 hours to complete, but after completing it - I started wondering if I really wanted to start another open source project and maintain it. The answer is no, I don't want to create something new - I want to use something that's already out there. However, since I do have something that satisfies all my requirements, I will use it if I can't tweak an existing OS CMS enough.

Here are a list of CMS's that I'll be looking at in the next week or so. If you're associated with any of these projects, please leave a comment and let me know how many of my requirements you satisfy.

I'm a bit hesitant on Daisy b/c it requires XSLT knowledge for design customization. Magnolia has long URLs and doesn't appear like a static site - and the PHP ones often have .php in their URLs. It should be an interesting investigation to see if these (seemingly) heavyweight solutions can solve a few simple requirements.

Posted in Open Source at Sep 12 2005, 11:48:14 AM MDT 49 Comments

Stripes

Greg Hinkle writes about a new JDK 5-only Java web framework called Stripes.

Stripes is a presentation framework for building web applications using the latest Java technologies. The main driver behind Stripes is that web application development in Java is just too much work! It seems like every existing framework requires gobs of configuration. Struts is pretty feature-light and has some serious architectural issues. Others, like WebWork 2 and Spring-MVC are much better, but still require a lot of configuration, and seem to require you to learn a whole new language just to get started.

I dig the fact that someone is trying to create a web framework that requires less configuration. It's also very cool that they've released it as 1.0 (rather than 0.1 as many OS projects do) and it also seems to be well documented. Unfortunately, it doesn't look like there's any support for Spring or dependency injection.

Personally, I don't mind the configuration required by WebWork or Spring MVC - but then again, I use AppFuse and tend to generate most of the configuration code using AppGen. Even so, it would be nice to get away from the configuration requirement. Hopefully more framework authors will find ways to reduce or even eliminate the XML hell we have in Java web frameworks. Kudos to the Tapestry developers for doing this in their 4.0 release.

I like the convention over configuration that Rails uses. It's this same mantra that I've been trying to develop AppFuse with for the past few years. The problem with Java web frameworks is developers want configuration choices - even if they never bother to use them.

Posted in Java at Sep 06 2005, 09:56:41 PM MDT 6 Comments

Using Acegi Security for Remember Me and SSL Switching

I spent some time yesterday converting AppFuse's homegrown Remember Me and SSL Switching system to using Acegi Security. Thanks to Justin Spears, who provided the original motivation. It was much easier than I thought it would be, and resulted in the deleting of 7 classes in AppFuse. Not only that, but only one of them had a test for it, so the test coverage has naturally gone up as well. I'll trade 40 lines of XML for 1214 lines of Java any day - especially when I can get the support of an open-source framework. ;-)

If you're interested in using this code over 1.8.2, you can checkout the latest code from CVS (or download it from http://appfuse.org/nightly). The only other change currently in CVS is changing from "tomcat" to "user" as the default User role. Below is a list of classes that were removed as part of this move to Acegi:

  • src/dao/org/appfuse/model/UserCookie.java
  • src/service/org/appfuse/util/RandomGUID.java
  • src/web/org/appfuse/webapp/action/LoginServlet.java
  • src/web/org/appfuse/webapp/filter/LoginFilter.java
  • src/web/org/appfuse/webapp/taglib/SecureTag.java
  • src/web/org/appfuse/webapp/util/SslUtil.java
  • test/web/org/appfuse/webapp/action/LoginServletTest.java

I should also mention that I owe a big thanks to Virtuas - who pays me to work on AppFuse these days. :-D

Posted in Java at Aug 29 2005, 09:25:37 AM MDT 11 Comments

[ANN] AppFuse 1.8.2 Released

This release is mostly a bug fix release with no new features. It also includes upgrades to Acegi Security and the Spring Framework. Thanks to all the sponsors who have contributed products and free hosting to the AppFuse project.

To see how AppFuse works, please see the following demos:

Comments and issues can be sent to the mailing list or posted to the AppFuse Issue Tracker.

P.S. I have the Acegi integration done for Remember Me and SSL Switching in another project, so that support should be in CVS sometime next week. Thanks to Justin Spears for his help on this issue.

Posted in Java at Aug 27 2005, 06:42:06 PM MDT 12 Comments

Using CruiseControl with Subversion

This morning, I had the pleasure of setting up an AppFuse-based project to run under CruiseControl. Normally, this is very easy to do because I have the CruiseControl setup files and instructions. However, this project uses Subversion instead of CVS. Luckily, Subversion is easy to use and I was able to modify things to work quite easily. Below are the steps you can take to modify your AppFuse project to run under CruiseControl and Subversion.

  • Download svant and extract it to your work directory.
  • In build.xml, change your "cvs" target to "svn" and change the tasks appropriately.

        <path id="svn.classpath">
            <fileset dir="svnant-1.0.0-rc1/lib" includes="*.jar"/>
        </path>
            
        <taskdef resource="svntask.properties" classpathref="svn.classpath"/>
        
        <target name="svn">
            <delete dir="checkout/appfuse"/>
            <svn>
                <checkout url="https://svn.java.net/svn/appfuse/trunk" 
                    revision="HEAD" destPath="checkout/appfuse" />
            </svn>
        </target>
    
  • Modify the "test" target in build.xml to depend on "svn".
  • In config.xml, change the <modificationset> to be <svn LocalWorkingCopy="/home/cc/work/checkout/appfuse"/> instead of the <cvs> equivalent.

The instructions have been documented on the wiki and checked into AppFuse's CVS.

Posted in Java at Aug 24 2005, 10:24:26 AM MDT 4 Comments

What do you want to see at Java in Action?

I'm presenting two sessions at Java in Action in October. The first one is a 3-hour tutorial on Comparing Java Web Frameworks, while the second is about Developing Next Generation Web Applications with Ajax in Spring. I'm in the process of writing both of these, and I'm interested to see what Java developers would like to see in these talks.

The tutorial is probably the toughest one because my normal presentation usually only takes about an hour to deliver. For a similar presentation, see Craig McClanahan's The Evolution of Web Application Architectures. I could talk about the history like Craig does, or I could talk about the different frameworks and their features like I usually do. However, I want something more interactive and fun for attendees. I was thinking of live-coding for 20 minutes with each framework, and showing the differences, but that's not a whole lot of fun either. Maybe I could divide the class into 5 groups, educate each of them on features of the framework, and then we could have some sort of debate? Showing code is always something that developers are interested in, so I'll have to figure out how to work that in as well. If you're planning on attending this tutorial - I'd love to hear suggestions.

I'm also curious on what you'd like to see in the 2nd presentation? I was planning on using Equinox (or possibly AppFuse), to show how to use DWR, Prototype and script.aculo.us. A couple of examples I'm thinking of showing are in-page updates and sortable/pageable tables. Any other cool effects or tricks you'd like to see?

Sorry for the cross-post from JRoller, but I wanted to reach the largest possible audience. Please leave comments on the JRoller entry.

Posted in Java at Aug 22 2005, 10:23:34 PM MDT