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.

Open Source CMS Evaluation - Part I: Installation

Today I began my journey in evaluating Open Source CMS applications. The motivation for this adventure can be found in my post titled "Building a website with an Open Source CMS". Basically, I'd like to find a good solution to build small-to-medium size websites. I want full-control over the design and features, and it shouldn't be too hard to configure, install or administer. I received many suggestions on my initial post, and thanks to these comments, I'm considering the following CMS solutions:

The reason OpenCms didn't make this list is because of Tim Howland's first demo (he left the link in a comment). As soon as he dropped into a shell, I gave up. I also tried OpenCMS a couple of years ago and couldn't get it to work. I still have a bad taste in my mouth from that experience.

Of this list, I was able to eliminate 3 options quite quickly: Bricolage, MeshCMS and AtLeap. Bricolage b/c their site was down for days when I first started looking at CMSs. In addition, it's written in Perl - of which I've never written a single line - and I don't feel like I'd be well suited to customize a Perl product. As for MeshCMS and AtLeap, both of these were eliminated b/c of the lack of mailing list traffic. This represents a small community IMO and I'd hate to start using a product that's not well supported or well documented. This is unfortunate b/c I could probably customize these products easier than the rest. Nevertheless, it's my customers that are important, not me.

This leaves me with three Java solutions (Alfresco, Daisy, Magnolia) and two PHP solutions (Joomla, Drupal). I'm not too keen on including Alfresco b/c I've never heard of it, but readers of my last post recommended it, as well as my colleague Bill Dudney (another friend who forgot how to blog). At first glance, there are a couple of major differences between the Java and PHP solutions. The Java ones definitely take the cake on download size:

  • Daisy 1.3.1: 59 MB
  • Magnolia 2.1: 13.4 MB
  • Alfresco 0.6 (with Tomcat): 30.3 MB
  • Joomla 1.0.1: 1.7 MB
  • Drupal 4.6.3: 447 KB

Yes, large downloads is the nature of Java applications - but it's interesting to see the wide discrepancy b/c the 3 Java options listed here. In addition, it's a little disappointing that I can't download Alfresco standalone - why does it *have* to come with Tomcat or JBoss? Looking through the Tomcat directories and files - there doesn't seem to be any Alfresco-specific settings or files. Why can't I just download the WAR?

My goal in this session was to install these different CMSs and see which were the easiest to install - as well as which had the features I need to continue evaluated them. What I found was that Daisy is out of the running. This is primarily because it's a wiki, not a CMS. No wonder the JSPWiki guy was impressed with Daisy a few weeks back. Furthermore, the number of things you have to do to get Daisy installed is very long.

Magnolia, on the other hand, was very easy to install. Drop two WAR files into Tomcat and 10 minutes later you have a CMS. Yeah, that's a little scary - it took 10 minutes (647740 ms to be exact) to startup Tomcat after installing Magnolia. While I appreciate the easy installation, I'm still interested to see what kind of data store Magnolia is using. Is it using an embedded database or what? I didn't have time to look, but rather played around with the admin console a bit. I was very impressed with the admin console - even though I didn't figure out how to edit the homepage. It appears to be using Ajax everywhere. Right-clicking to edit a page even brings up an application menu (rather than a browser menu). Magnolia is impressive at first glance and will be included in Part II of my evaluation.

Alfresco, with a 0.6 release, was almost off my radar. The version number makes it seem like a very immature product - and the fact that it requires JDK 5 makes it seem even more immature. Upon startup, it spit out a number of errors - but they seem to be well documented in its "README_tomcat_linux.txt" file. I used OS X and despite the errors - everything appeared to be working OK. However, when I pulled up http://localhost:8080/alfresco, I immediately understood why Bill likes it. It looks like it's using JSF, and I'm willing to bet it's using MyFaces (he's a committer on the project). The disappointing thing I noticed after pulling up the initial page is that it's a login page. I'd expect to see a reader view initially rather than an admin view. After logging in, the interface seems very nice and easy to work with. However, after 30 seconds of clicking on stuff, I can't figure out how to get the reader view to show up - so I give up. I'm going to let this CMS graduate to Part II, but only because I didn't spend much time with it - and also because the UI looks quite polished.

I installed and played around with Daisy, Magnolia and Alfresco all in a 3-hour period today. First of all, I'd like to give props to all the authors of these OS projects as each was installable according to its instructions and I didn't have to google for a single setting. I installed Joomla and Drupal last week - both in under 10 minutes. Joomla was definitely more impressive - mainly because it's default homepage (note: this can change every hour) looks pretty cool. Drupal, on the other hand, is a bit more plain jane. This is not a bad thing necessarily - as it might be easier to design with a clean slate rather than remove-features, then-design. I did have to install PHP4 on my Mac to run both of these packages, but Server Logistics made that super easy. I also tried to install Joomla 1.0 on my Windows box (which has Apache 4.0.7 and PHP 4.3.3 from BlueGlue), but it failed halfway through the install with errors that my user/pass for the database were wrong. Not a big deal, but frustrating since it works fine on the Mac (and yes, the user/pass I'm using are correct).

Watch this space. Part II will address customizing each CMS to use an already-created theme, as well as playing around with each's features. I'd prefer a package that has built-in support for multi-author blogs - so that might make Magnolia and Alfresco look bad. However, I'm not going to hold it against them since I'm a Roller fan and committer. I don't mind using a 2nd application for blogging - especially if the built-in package is less than full-featured.

Conclusion: Alfresco, Magnolia, Joomla and Drupal are the easiest open source CMS applications to install (of the ones I looked at). Daisy was easy to install according to its instructions (of which there were many), but it's more of a Wiki than a CMS.

Update on Saturday at 1:00 p.m. - Based on reader's feedback to this post, I went ahead and installed three more: Plone, eZ publish (gotta love the domain name) and OpenCMS. All the previous CMS applications I installed on OS X, and I installed these 3 on Windows XP. I installed OpenCMS first, and while the setup was easy, it took 18 minutes to finish its importing of data. My Windows machine is easily 2x as fast as my PowerBook, so my guess is this would've been quite painful on the ol' Mac. Regardless, it's a one time wait-fee, so I can't really ding them for that. I played around with the Admin UI for about 5 minutes and found it extremely easy to use - as well as intuitive. I dig how you can view the content and edit it very easily. I never had to read any documentation to figure out how to work this system.

Next up was eZ publish. It took a bit of fiddling to get the installation to work. I had PHP 4.3.3 installed with Apache 2.0.47, and I upgraded to PHP 4.4 before trying anything. While setting up eZ publish, it told me it didn't work with 4.4, so I backed down to 4.3.3, after which it told me I needed at least 4.3.4. Thankfully, PHP is easy to install and upgrade on Windows and I got it all working fairly quickly. Of the three (and all the CMS's in fact), eZ publish has the nicest installer. The whole application and process gave me the feeling that it was the product I was looking for. It's designed to help you setup a website, and allows you to choose templates, features, etc. along the way. At the end, it stalls for a couple minutes - probably b/c it's creating everything and populating the database. The first thing I didn't like was the URLs (/index.php/feature). I wonder if that can be changed to be more path-based? Having an extension followed by additional slashes just doesn't seem right to me. From there, I logged in as an administrator and started playing around with things a bit. The Weblog feature seems very inadequate and doesn't even seem to support RSS. In addition, I couldn't figure out how to edit any of the templates in my browser. But the worst part was the admin UI was sssllloooowwww. It could have been b/c I had other stuff running, but I don't think so. eZ publish seems like a good system to recommend to friends who want quick and easy websites, but I don't think it's one for me.

The last CMS I installed was Plone. It was easy to install on Windows, but only b/c it has an all-in-one installer. I found it a bit strange that it doesn't install in a web server, but rather contains everything as part of the package. This includes Python, its own web server, and its own database (I'm assuming). It's an easy install, but I like the idea of installing a CMS into an existing web server rather than having a CMS with an embedded web server. The admin UI is simple enough to use, but it's very boxy and seems like it would be difficult to customize into a corporate or small business website. Please let me know if you feel this to be untrue (pointing to existing nice-looking installations would help). I didn't like the fact that it highlights members quite prominently, but that can probably be fixed with some good template-tweaking. The most disappointing thing I found was that I was unable to edit "skins" within the admin console. You have to download a separate package, customize it yourself, and then install it. What a pain, especially since I'd really like to be able to 1) modify template, 2) save and 3) view - just like this site allows me to do. For this reason, as well as the embedded server feature, I'm going to have to pass on Plone as well.

Conclusion 2: Alfresco, Magnolia, Joomla, Drupal and OpenCMS are the CMS applications I will continue to evaluate this weekend. I have to make a decision by Monday morning so I can start building a site with it. If any of these CMS'es don't allow me to customize its templates from a browser, please let me know so I can take it off my list.

Update on Sunday at 9:30 a.m. - I'm going to drop Alfresco and add MeshCMS for reasons stated here.

Posted in Open Source at Sep 23 2005, 05:39:04 PM MDT 38 Comments

JBoss Announcement next Tuesday

Any idea what the JBoss Announcement will be next Tuesday? Since he's laughing at Oracle, I'm guessing they hired a prominent MyFaces developer - or they've "acquired" a prominent database developer (i.e. PostgreSQL). What's your guess? Will it really be that impressive, or just impressive for JBoss employees?

Posted in Java at Sep 23 2005, 04:20:23 PM MDT 9 Comments

Hibernate Relationships with XDoclet Tutorial

I finally got around to finishing the Hibernate Relationships tutorial for AppFuse today. This initial version includes a howto for creating the UI with Struts. In the future, I'll add sections for creating the UI with Spring MVC, WebWork, Tapestry and JSF. Those should be easy now that the hard part is done. This is a first cut at this tutorial, so it's likely there's issues, bugs and things I did wrong.

Now it's your turn. If you have a chance, please try it out and let us know how we can improve it.

Posted in Java at Sep 23 2005, 11:51:50 AM MDT 2 Comments

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

The Display Tag Project is not dead

Despite the lack of support and code contributions, it's good to know the Display Tag project is not dead. Fabrizio has been doing a lot of refactoring lately, including Maven 2 integration and support for long lists. Nice work Fabrizio! In addition, it's good to see all the activity on the mailing lists. Thanks to all of you that've been answering questions.

Posted in Java at Sep 19 2005, 05:47:53 PM MDT 8 Comments

AjaxAnywhere

From Ajaxian.com:

AjaxAnywhere is designed to turn any set of existing JSP components into AJAX-aware components without complex JavaScript coding. In contrast to other solutions, AjaxAnywhere is not component-oriented. You will not find here yet another AutoComplete component. Simply separate your web page into multiple zones, and use AjaxAnywhere to refresh only those zones that needs to be updated.

This is one of the few Ajax projects I've seen that looks to provide a lot of value w/o a whole lot of work. Notice how much it enhances JSF with this cool demo.

Posted in Java at Sep 16 2005, 08:52:29 AM MDT 4 Comments

Jetty vs. Tomcat vs. Resin: A Performance Comparison

This morning, I did some comparisons between Jetty 5.1.5rc1, Tomcat 5.5.9 and Resin 3.0.14 (OS version). I ran AppFuse's "test-canoo" target, which tests all the JSPs using Canoo WebTest. I did this as a Servlet 2.4 application, and had to tweak some stuff in my web.xml to make it work on Jetty and Resin. Nothing big, just stuff that Tomcat let pass through and these servers didn't. One interesting thing to note that Resin requires you to use "http://java.sun.com/jstl/fmt" for JSTL's "fmt" tag URI, while Jetty and Tomcat require "http://java.sun.com/jstl/fmt_rt". This is with Resin's "fast-jstl" turned off - b/c everything blows up if it's turned on (I don't feel like coding my JSTL to Resin's standards, that's why I turn it off).

Below is a list of the average time it took to run "test-canoo" after I ran it once to compile all the JSPs.

  • Jetty: 19 seconds
  • Tomcat: 19 seconds
  • Resin: 29 seconds

In addition, I tested how long it took for each server to startup - including the initialization of AppFuse.

  • Jetty: 7 seconds
  • Tomcat: 8 seconds
  • Resin: 13 seconds

So what does all this mean? A number of things:

  • I need to clean up AppFuse's web.xml a bit for 2.4 applications.
  • Putting the database connection pool configuration in a Spring context file (vs. JNDI) makes AppFuse much more portable.
  • Jetty isn't as fast as Jetty-lovers say it is (or maybe Tomcat just caught up).
  • The open source version of Resin is much slower than the other open source servlet containers.
  • I should restructure the build.xml to pull out Tomcat stuff and allow users to specify server deployment settings (i.e. in a ${servername}.xml file).
  • Orion still doesn't support the Servlet 2.4 or JSP 2.0 specifications.

Posted in Java at Sep 15 2005, 10:52:50 AM MDT 12 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