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 "css". 327 entries found.

You can also try this same search on Google.

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

Julie's House

For the last 3 months, Julie has been doing the "flip this house" thing. Today, it went on the market. Click on the image below to see the listing and pictures. She thinks the pictures look best in the 2D mode.

Julie's First Flip

Nice work darlin!

Update: Believe it or not, it's now under contract. Sold in under 8 hours!

Posted in General at Jul 13 2006, 09:45:53 AM MDT 7 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

[DJUG] Portlets and Portal Architecture with Scott Ryan

The genesis of this talk is Scott's has talked to a lot of developers about web development and most don't understand all the features you get from portal servers. A lot of developers don't know how to sell them to upper management. Typically, they're very expensive, but you get a lot of functionality and features for the price. Portal servers are not just glorified web applications.

You all know what portals are, right? Yahoo is probably the most famous. RockyMountainNews.com uses a portal server, so does Denver Post. The top commercial offerings are BEA WebLogic, IBM WebSphere, Plumtree, Vignette, ATG and Microsoft Sharepoint. The first version of WebSphere was based on Jetspeed 1 and it was a pretty bad implementation. Plumtree was bought by WebLogic and is apparently a combination of .NET and SOA. Microsoft claims they're adding more portal-like stuff, but currently it's very document-management centric (reminds me of Alfresco).

On the open source side, the players are Liferay, Jetspeed, JBoss Portal, Exo, Metadot, Plone, PHP-Nuke and Magnolia. I didn't know Magnolia was a portal server, must be a new feature. Liferay is Scott's favorite, Jetspeed is pretty good, but not much out of the box.

Portals all started because companies had disparate websites and wanted a way of combining them into a single dashboard. Pieces of a portal:

  • Single Sign-on with a unified security model.
  • Security/Administration: Portals usually have a content-management component, which allow delegated administration. It's difficult to organize this initially, because of the need to create a hierarchical organizational structure of permissions.
  • Personalization: out-of-the-box you can customize the look-n-feel. A lot of times these are driven by rules engines, particularly in the open source arena. Content can often be customized so you can add/remove items that you're interested in.
  • Content Management: always comes with a portal because a portal is usually responsible for displaying content. Some include workflow and administration features, like locking, version and administration. JSR-170 defines an interface for accessing CMS systems.
  • Collaboration: this is the hot thing this year. Forums, discussions, blogs, RSS feeds, real-time chat, etc.
  • Administration: Creation of users, groups and roles. Page and portal layouts, themes, skins and CSS. Selective rights to users to modify desktops and portal attributes.
  • Search: Federated search, content repository and meta data search. Web page, database and file system search.
  • Interaction Management: Rule-based personalization, campaign execution and management. Event and behavior tracking. Content/Product centric marketing.
  • Commerce: Catalog, shopping cart, etc.

For doing portlet development, Scott recommends using a more native technology (i.e. Struts, JSF, PHP, JSP, etc.) and enabled it as a portlet using bridges. Development interfaces are offered via the web or many commons IDEs. You will need some XML, HTML, JSP, CSS and graphics experience to totally enable a portal. Sounds similar to the stuff you need to know for Ajax, eh?

Portals require a mix of development and configuration skill sets. The mix of configuration and development is determined by the platform. Try to lean away from the proprietary features but don't run away from them. Look for pre-build portlets, themes, skins, etc.

One big gotcha of portlet development is source code management. When Scott started developing with portlets, there was no such dev/test/prod setup - vendors just expected him to modify prod. Vignette has a "car" file archive, Liferay has a "lar" archive. These files allow you to easily deploy the changes required for a portlet to work. Apparently, this is still a space that needs a lot of work to allow good source-code control and the ability to rollback updates.

When rolling out a portal for an organization, it's important to start small and build features incrementally.

At this point, my laptop died - as in it went completely black. I hit the power button and it started up again, complete with the loud "bong" for all to hear. A few seconds after restarting, it went black again, so I gave up. After Scott's talk finished, I opened up and tried again - and now it's working.

The rest of Scott's presentation was very cool - he did demos of Liferay's and WebLogic's portals. Liferay looks very cool and a lot of their features remind me of Netvibes.com.

Posted in Java at Jun 14 2006, 07:15:31 PM MDT 4 Comments

[ANN] AppFuse 1.9.2 Released

This release includes CSS Framework integration, EMMA code-coverage support and AppGen sub-package support. Thanks to the CSS Framework Design Contest Winners, Doug Hays and Mika Göckel for their help with this release.

To install and configure AppFuse for development, see the QuickStart Guide. 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 (username: mraible, password: tomcat):

TIP: If you login as an administrator, you can change the theme by appending ?theme=themename to the URL. The default theme can be set in web/WEB-INF/web.xml.

Comments and issues can be sent to the mailing list or posted to JIRA.

NOTE: This release contains Acegi Security 1.0 RC2 rather than the recently released 1.0. This is because a couple issues were found with the 1.0 release. When Acegi Security 1.0.1 (or 1.1) is released, all AppFuse users are encouraged to upgrade.

This (hopefully) marks the last release from AppFuse 1.x. AppFuse 2.0 development should start shortly. See the roadmap for more details. I'd like to say it'll be done in the fall, but I already said it'd be done two months ago. ;-)

P.S. For those of you that won the CSS Framework Design Contest, I'll be contacting you within the week to get you your prizes.

Update: If you're building AppFuse on Linux, you should be aware of some non-English encoding issues. The solution is to add something like the following to your ~/.bashrc file.

export LC_CENGINE=en_US
export LANG=en_US
export LANGUAGE=en_US

Posted in Java at Jun 06 2006, 03:24:59 PM MDT 15 Comments

[ANN] AppFuse 1.9.2 RC1 Released

AppFuse The primary reason for this release is to integrate Mike Stenhouse's CSS Framework. Since this involves many UI changes, we're publishing a release candidate that uses Herryanto Siatono's "simplicity" theme. For the final 1.9.2 release, we hope to offer themes from all the CSS Framework Design Contest Winners.

To install and configure AppFuse for development, see the QuickStart Guide. Thanks to all the sponsors who have contributed products and free hosting to the AppFuse project.

To see how AppFuse in action, please see the following demos (username: mraible, password: tomcat):

Comments and issues can be sent to the mailing list or posted to JIRA (please use version 1.9.2). Hopefully we can release 1.9.2 final in the next week or so.

Update: I've finished a first stab at integrating the puzzlewithstyle and andreas01 themes. I've only tested these in Firefox so far, but you can see them in action on the demo site using the webwork and jsf flavors.

Update 2: 1.9.2 Final has been released.

Posted in Java at Jun 02 2006, 03:54:17 PM MDT 8 Comments

RE: Thoughts on the future direction of AppFuse

Sanjiv has some interesting thoughts on the future direction of AppFuse. To summarize: take on Seam head-to-head, but use Spring instead. Get rid of all the other frameworks except for JSF, Spring and Hibernate. Furthermore, focus on making Web 2.0 applications easy to create and use.

I like Sanjiv's ideas, but I'm not so hot on ditching all the other web frameworks in favor of JSF. I'm still not convinced it's the best solution for Java web development. The idea behind JSF is great, but the implementation has warts. Maybe that'll be fixed with JSF 1.2, but it will likely be quite a few months before MyFaces supports it. Yeah, I know there's the RI, but it is an RI and you remember the 1.1 version don't you? ;-)

I'd hate to give up WebWork support because I've used it on a couple of projects and really like it. Ditching Spring MVC would likely be a mistake as well since it's the most popular web framework among AppFuse users today. While I love what Tapestry brings to the table, it is harder (for the newbie) than JSF. Also, it seems to be the least-used web framework in AppFuse, which means I'm doing a lot of maintenance for no reason. AppFuse 2.0 will definitely make things simpler (JDK 5, Maven 2, standard directory layout, better IDE integration), but it will still be difficult to support 5 web frameworks and 2 persistence frameworks.

What do you think about Sanjiv's proposal? It sounds good to me. However, I'd rather see different lead developers for each framework and continue to support them all - except for Struts of course.

Posted in Java at May 22 2006, 08:16:53 PM MDT 28 Comments

Ajax on Rails with Stuart Halloway

There's a number of presentations I'd like to attend during this time slot. In particular, I'd like to attend Testing with Selenium and Simplified Ajax Development in Java with ICEfaces. However, Stuart Halloway is an excellent speaker and I'd rather hear him talk than learn something in another session. Hopefully other attendees blog about the aforementioned sessions so I can still learn something from them.

Agenda: Ajax, Libraries for Ajax (i.e. Prototype and Scriptaculous), Rails and Ruby.

There's probably 100 people in the room. Stuart did a survey of who is using Rails - I'd say the response was about 10%. He also asked who's considering it for future development. The response seemed to be around 25%. I'm sitting in the front of the room, so I probably didn't see the results as well as Stuart did. Regardless, it's interesting to see that most people in the room won't be using Rails, they're merely interested in it (or they wouldn't be in the room, right?).

The best way to play with Rails on Windows is called InstantRails. For OS X, there's Locomotive.

All the demos given during this session are available in the ajax_labs section at codecite.com.

Things we're going to look at: autocomplete, in-place Editing, searching, sorting, expando, drag and drop, sort, server-side validation, client-side validation, and prototype windows (Stuart prefers to call them divdows).

Stuart is talking a lot about how Rails works at this point, model objects, yml files, tests and sample data. One of the things that I find interesting about most CRUD-generation frameworks is they don't take tests into account. Ruby on Rails generates tests, so does AppFuse. If you work on a CRUD-generation project for web development, do you generate tests too? If not, don't be embarrassed, tell us. There has to be a good reason you're not doing this.

Now the audience is struggling with the concepts in Rails, how ActiveRecord works, etc. For example, one guy asked if it's possible to use JDBC with Rails. It's definitely a humorous question, but Stuart handled it quite well without ridiculing the guy. A couple of notes: Rails doesn't work well with stored procedures or composite keys.

Now we're looking at the view layer, in particular a show.rhtml template. It's pretty simple , but not very HTML-ish. Looks a lot like scriplets in JSPs. Autocomplete with Rails is mostly CSS-driven. To use it in a Rails view, you start with the following line of code at the top of your template.

<%= stylesheet_link_tag 'autocomplete' %>

In Rails, when you want to render an Ajax response in a controller, you use the following at the end of your method.

render :layout=>false

This turns off any page decoration. It'd be nice to have something like this in the Java world - so you could turn off page decoration from SiteMesh, Tiles, etc. It shouldn't be hard to implement this in SiteMesh, but it might take a bit of work for Tiles.

Partials are Rails' way of creating fragments that are designed to be populated and returned by Ajax calls. Their naming convention is to being the filenames with an underscore. For example <%= render :partial=>'search' %> looks for a _search.rhtml template.

For Ajax development with Rails, you're not tied to using Prototype or Scriptaculous. However, since Rails has helper methods that emit the JavaScript, it makes things much easier. If you'd like to use Dojo, you'd have to hand-code the JavaScript into your RHTML templates, or write helper methods for Dojo. Stuart would like to see a Rails plugin that allows you to switch the Ajax helpers from one library to the other.

The last thing Stuart showed was Prototype Windows. This looks similar to lightbox gone wild, except you get better styling around the modal window. If you haven't heard enough of what Stuart has to say, checkout blogs.relevancellc.com. One of the most interesting things lately is he's been posting reviews of the various Ajax books.

Posted in The Web at May 12 2006, 01:35:41 PM MDT 5 Comments

Ajax and Open Laszlo with Max Carlson

Max is the co-founder and Lean Runtime Architect for Laszlo Systems. Max doesn't look at all like I pictured him (do they ever?!). He looks like a heavy-duty engineer, long curly hair, a little rough around the edges. I respect him more already. ;-)

Laszlo Systems Background: company founded in 2000. Laszlo Presentation Server (LPS) released in 2002. Embraced open source; LPS became OpenLaszlo. 2005: it's been widely adopted (130,000 downloads to date). This year, they're extending OpenLaszlo to support multiple runtimes, including DHTML. The company makes money of training and support, as well as developing custom applications (i.e. Laszlo Mail) and modules.

On 2/1/2006, Laszlo Systems joined a select group of tech leaders in establishing the Open Ajax community. Jointly committed to "making it easier for an open source community to form and popularize Ajax."

Demo's: Laszlo Mail, Pandora, Barclay's and Gliffy.

Developing with OpenLaszlo: XML-based, use your favorite XML editor. It's source-control friendly and has a library mechanism (for modularization). It's a familiar methodology for software engineers. It has standard OOP features: attributes and methods, class definitions with inheritance, familiar design patterns apply. There's an emphasis on declarative constructs. Finally, there's an open source Eclipse-based IDE4Laszlo. Originally developed by IBM, among the most popular downloads on alphaWorks. It now contains a WYSIWYG tool and is hosted at http://eclipse.org/laszlo.

LZX: Laszlo's XML Application Description Language: Flash independent tags and APIs (no ActionScript, movieClips, etc.; no need for Flash development). This allowed them to easily port to a different runtime. With OpenLaszlo, you can interface with your server via XML over HTTP, SOAP, XML-RPC and Java RPC. It has a runtime constraint system, hierarchical data binding with XPath. It has media, streaming support (although the Flash runtime seems to load images real slow - see the DHTML vs. Flash demo on http://openlaszlo.org).

Now Max is going through the Laszlo in Ten Minutes tutorial. If you haven't seen this, you should definitely check it out. It's a good quick introduction to OpenLaszlo. One of the unique features of OpenLaszlo is its components are written in LXZ. Compare this to XUL (components written in C) and Flex (components written in Flash) and it seems a lot more open.

In order to solve the nested-for-loops problem with JavaScript and DOM-manipulation, OpenLaszlo uses XPath and turns for loops into simple URL-like expressions. For example:

<text datapath="dset:/employee/firstName/text()"/>

Noticed on Max's Firefox toolbar: a del.iciou.us menu.

For the last 1/2 hour, Max has been talking about LZX, how to handle events, etc. In other words, since I've already worked with OpenLaszlo a bit, I haven't learned anything new.

Now Max is talking about OOP and how you can declare classes with certain attributes and then re-use them. It's kinda like Spring's "abstract beans" where you can declare a template bean and override attributes in child beans. In addition to allowing classes to be declared with no parent, you can create classes that extend an existing class. A common usage is declaring default values and then overriding visual elements (i.e. border size, colors, etc.).

OpenLaszlo 4.0 (with Ajax support) is targeted for a release by the end of the year.

Personally, I think OpenLaszlo is a very cool technology. However, it definitely needs a better IDE IMO. The last time I tried IDE4Laszlo on my Mac, it wasn't even close to useable. From a development perspective, using OpenLaszlo was difficult to work with because I felt like such a moron. With HTML and CSS, I know how to program UIs and it's difficult to give up that knowledge and rely on something else to provide the look and feel of my UI. In reality, I'm simply frustrated with my OpenLaszlo skills and would likely feel different if I was paid to develop a real-world application with it. After all, getting paid to work with a particular technology is almost always the best way to learn it.

Max is a great speaker and did a good job of introducing OpenLaszlo. Furthermore, this was one of the most interactive sessions I've seen at this conference. There's definitely a lot of folks interested in this technology.

Posted in The Web at May 12 2006, 11:50:24 AM MDT 1 Comment

CSS Framework Design Contest: Final Results

20 people voted for the css design contest runoff. Of those, 3 people voted after the Tuesday midnight deadline. Here's the final winners of this contest:

  • 1st place: puzzlewithstyle by Mattias Fjellström
  • 2nd place: andreas01 by me (the question is: should I win or Andreas Viklund - the original designer?)
  • 3rd place: simplicity by Herryanto Siatono

The 3rd place winner was a close call: deliciouslyblue tied with simplicity, but 2 votes came in after the deadline. Congratulations to all the winners - and thanks for helping out with this contest.

Since I'm traveling in San Francisco this week and next, it'll probably take me a couple weeks to send out the prizes (iPods) to the winners.

Now for hard part: integrating the entries into AppFuse for 1.9.2. I hope to make all the winners AppFuse-compatible and ship them (or make them downloadable) as part of the release.

Posted in The Web at May 11 2006, 10:23:42 PM MDT 9 Comments