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 "java". 1,588 entries found.

You can also try this same search on Google.

Going to Redmond

I've decided to attend the Microsoft Conference in a few weeks. The good news is I got approval (from Microsoft) to blog the whole thing - even during the event. So you, my dear readers, will know as much as I do after this shindig. Furthmore, they agreed to let me cut out early. My sister's birthday is St. Patty's day (Thursday) and she's going to pick me up so we can head to my parents (in Oregon) for the weekend. A couple days with the folks and then I fly back to Denver on Saturday. Sounds fun.

Posted in Java at Feb 21 2005, 03:02:05 PM MST 2 Comments

RE: Ruby on Rails Koolaid

David Geary on Ruby on Rails:

Interestingly enough, ROR creates default views for your db tables. Cool. But after I thought about it for a minute, I came to the conclusion that that feature is certainly close to useless: It's nice to get you up and running, and great for seductive demos and articles, but you're going to override at least 100% of the views that ROR generates. And therein lies the rub...

...because views in ROR are a mixture of HTML and Ruby scriplets! We've been there before, of course, in the early days of JSP with HTML mixed with Java scriptlets. No thanks, I'll pass on that giant step backwards.

I've thought about this myself. I think David is right, but only to a certain point. Ruby on Rails (and its scriptlet-ridden views) will work until they get HTML designers in their writing Ruby code. Furthermore, when companies start off-shoring their Ruby development, that's when it gets ugly. JSP scriplets were a disaster because you had HTML developers writing Java code, and using if statements that exceeded the 64K block and such. JSP scriplets are hard to maintain when they're used and abused. I've seen a lot of code (especially the off-shored stuff) that has very ugly and unmaintanable scriplet code. However, using scriptlets in JSPs isn't a bad thing - it's only bad if you're coding business logic and/or, using lots of Java code in them, or having JSPs that are scriplet-only pages.

However, I believe Rails is a bit different. Not only does it enforce MVC from the get-go, but you can't use the views stand-alone (can you?). With JSPs and Servlets, you have the opportunity to use JSPs only - which encourages scriptlets. I do wish that Rails' templates used the ${...} syntax that JSP, Velocity and FreeMarker enjoy - the <% %> syntax brings bad bad thoughts of 1000+ line JSPs.

Oh, and one last thing - for David and Rick (the JSF-is-the-best-thing-since-sliced-bread-duo). At least Rails allows HTML in its view templates. JSF developers don't even get to see HTML anymore - poor guys. ;-)

Posted in Java at Feb 21 2005, 09:55:25 AM MST 4 Comments

Why doesn't AppFuse use Maven?

My newest reply for why AppFuse doesn't use Maven is going to be this link. Ant rocks. I still need to update AppFuse's build.xml to use all the Ant 1.6 stuff - that's scheduled for next week's late nights.

Posted in Java at Feb 17 2005, 10:38:30 PM MST 9 Comments

Microsoft Conference for Developer Community Leaders

I received the following e-mail in my inbox last night:

You are cordially invited to participate in an open forum designed to generate many questions and provide some answers to the tough issues you may face in your daily work life. You have been selected due to your influence in the developer community. You have established yourself as a force in your community, with your pen, or in your leadership. We want to start a dialog with you regarding our products. Our hope is that these dialogs that will encourage both questions and comments, as well as give us a chance to get to know you.

What: 1st Annual Technology Summit for the Developer Community Leaders

When: March 15-18, 2005

Where: Corporate Campus -- Redmond, Washington

Complete travel and expenses will be covered by your sponsoring Developer Evangelist from Microsoft. In addition to the intense 2 1/2 days of technical content, we will be hosting evening "Simply Seattle" events to showcase some of the best Seattle has to offer and to provide time to get to know one another and your Microsoft hosts.

I'm thinking about doing it because it sounds like a heckuva opportunity with some pretty smart folks. Looks like March is shaping up to be a month of conferences, with TheServerSide Symposium starting two weeks from tomorrow.

Posted in Java at Feb 16 2005, 03:56:55 PM MST 11 Comments

Is Shale ready for primetime?

Is Shale ready for prime-time and use in production applications? David Geary seems to think so:

My consulting job is pretty exciting. I'm using Shale heavily now, especially for wizards. Our application has both static wizards, for creating a new account, for example, and dynamic wizards that are generated from a description of an online-document.

Not only that, but he's going to be talking about it on the No Fluff Just Stuff tour this year.

To start the year, I'm doing three new presentations: "Shale: the next Struts", "Felix: a bag of tricks for JSF", and "Design Patterns: Tales from the server-side". Later on, I'll add two more presentations: in the near term, Killer Web UIs with Tiles and SiteMesh and a little later, a session on Laszlo.

I'm a huge believer in Shale. I have no doubt it's destined for great things, so I'm super-excited about the Shale session.

Now that I've talked about this, I'll probably be accused of caring more about Struts than the other web frameworks I use. In reality, I prefer most of the other frameworks in AppFuse and Equinox to Struts. However, at my current gig we're afraid to move from Struts because we're the only development group that hasn't fallen victim to the Big Blue umbrella. They've tried to make us use WebSphere, but we fought that off and continue to use JBoss. The fear is that if we don't use Struts, and use some lesser-known framework, they'll use that against us. That's why I like Shale - because it might be a way for me to use a more WebWork/JSF-type framework.

Posted in Java at Feb 15 2005, 07:52:33 AM MST 8 Comments

Ruby on Rails vs. Struts

Brian McCallister has put together a nice tutorial titled "Rails for Struts-ters (Part 1)". In it, he compares a Struts Action to a Rails ActionController (I think that's the right link).

After looking at the various introductory tutorials for RubyOnRails, a lot of people seem to come away thinking it is a simple CRUD framework -- mostly because of Scaffolding. A common theme seems to be, "well, it looks fast for slapping together a prototype, but when you need control, you it ain't there." I can see why people think that way, after watching the 10-minute video, and the reading the ONLamp tutorial. So here is a stab at a guided tour, using Struts as a point of reference.

Good stuff Brian - can't wait for the next tutorial.

Posted in Java at Feb 15 2005, 07:44:54 AM MST Add a Comment

Programmer Shirt

I received a great new shirt in the mail yesterday. It was from one of the ApacheCon organizers b/c re-imbursement got somewhat messed up. I guess it was some sort of apology. Here's what it says:

$> cd /pub
$> more beer

I dig it!

Posted in Java at Feb 11 2005, 05:29:04 AM MST 7 Comments

Context Reloading in Tomcat 5.5.7

Today I started using Tomcat 5.5.7 instead of 5.0.28. It was fairly easy to install on my PowerBook - I just had to add the xerces and jmx JARs from the compat package to get things working. The one thing I noticed that's different from Tomcat 5.0.28 is that when I deploy any file, it reloads the context. This can be a pain when I'm just copying JSPs into the webapps directory. I'm willing to admit it could be a problem with my "maven deploy" goal, but since this didn't happen on 5.0.28, I suspect it's the newer version of Tomcat. On 5.0.28, the context was only auto-reloaded when I updated files in the classpath.

The main reason this was frustrating is because we look up a bunch of data from a web service on app startup. The API we're talking to is nice and slow and it takes almost 50 seconds to start our application. Rather than go back to the older version of Tomcat, I wrote some code to serialize all the ServletContext variables to disk, and then check for that file on startup. If the file exists, it deserializes it and puts all the objects back in the ServletContext. Works pretty good and certainly speeds up my development environment. After all this, I'll probably downgrade to 5.0.28. Auto-reloading when classpath files change seems like a better way to go.

Posted in Java at Feb 10 2005, 05:47:21 PM MST 5 Comments

[DJUG] JUG Central and BPEL

Last night, I attended Denver's JUG meeting. Below are my notes from the event.

I'm at DJUG listening to Christian and Kris (from Adigio) talk about their experience with using Spring, WebWork, Hibernate, Lucene and SiteMesh to develop JUG Central (I wonder if they knew this name and concept already exists?). JSPs are for the view and MySQL powers the data. This presentation is designed to explain a bit about each framework, and also tips/tricks and pitfalls they experienced when developing the site. They started working on the application in August of last year and deployed it into production in December.

Christian said they weren't going to go into the how for each framework, but Kris has had quite a few slides on SiteMesh so far. I don't blame him - it's a great tool and only a handful of folks (of about 50-60) have heard of it.

SiteMesh Pitfalls: Poor integration with Velocity and some other frameworks. BTW, if you're using Tapestry - Erik Hatcher recently created a JIRA patch with a Tapestry Decorator.

Now Kris is talking about WebWork and since he's a framework junkie, apparently this is going to be the largest part of the presentation. I think one of the nicest parts of WebWork is its auto-type conversion. The only other frameworks I've seen that have this is are JSF and Tapestry. For those that like WebWork and don't like JSF - you might find it disturbing that the WebWork actions (and their tests) in AppFuse are very similar to the JSF managed beans. I would take it as a compliment if I were a WebWork developer.

One nice thing about XWork's action configuration is you can specify a "method" parameter for a particular action. Struts recently added this with its MappingDispatchAction. I'm using this on my current project and it works quite well. Kris really likes WebWork's front-page controller pattern - where you use the <ww:action> tag to execute the action when the page is loaded. Personally, I don't have a problem with going through actions to get to my view templates. Kris finished up his WebWork piece with a plug for AppFuse (thanks!) and WebWork in Action. Congrats to all the authors - wonder if it'll be published before WebWork Live?

Now Christian is talking about Hibernate and its mapping files - and how you can generate your database schema from them - or generate your mapping files from a database. They used XDoclet to generate the mapping files in this particular project.

Hibernate Pitfalls: Think about lazy-loading early. Problems arise when you try to share Hibernate-managed objects across (Hibernate) sessions transparently. Christian mentions that Spring's OpenSessionInViewFilter is a nice way to solve the problem.

Hibernate Tips: Spring simplifies using Hibernate and makes declarative transactions easy. Read Hibernate in Action before starting development. Plan to spend some time learning how to express your data model with Hibernate relationships (one-to-one, one-to-many, many-to-many, etc.).

Christian is now talking about Spring and how it works. After thinking and writing about Spring so much in the last year, I'll just skip over regurgitating this part. ;-) His main recommendation: use real injection instead of appContext.getBean("beanName").

Other tools used: Lucene for searching and POI for indexing Word, Excel and PowerPoint files. Velocity used for templating e-mail messages.

Service-oriented Architecture (SOA) with Business Process Execution Language (BPEL)
Presented by Kevin Geminiuc and Owen Newnan from Policy Studies

This point of this presentation is to communicate what it's like to implement BPEL in a J2EE Container. BPEL is a layer on top of web services. BPEL is a programming language that you can use to program business processes. Allows you to divorce your business process from being human-centric to being document-centric. At Policy Studies, they're using iLog JRules rules engine and Oracle's BPEL implementation.

Benefits:

  • Process Visiblity
  • Process Agility
  • Powerful Language
  • Open
  • Backed by "the Big Boys" (BEA, Microsoft, IBM)

History: Formerly knows as BPEL4WS, WSBPEL. Open standards based. Orchestrates web services with SOA.

Where we are today: Emerging technology (prepare to bang your head against the wall). .NET and Java products exist, as well as J2EE container integration.

BPEL is: BPEL is not:
  • A programming language for business processes
  • A language for specifying e-business transactions
  • XML-based layer atop WSDL
  • A declarative and procedural language
  • Designed for human workflow
  • A JSR spec (207 and 208 are related though)
  • Mature Technology
  • Your typical web services application
    • asynchrony as well as synchrony
    • callbacks
    • composite synchronous services

BPEL & WS Standards: BPEL, XPath, WSDL, WS-Addressing, SOAP, XML-Schema, WSIF (Axis), TBD (WS-ReliableMessaging and JSRs 207/208). Note that since BPEL depends on web services (which is not a truly reliable service). Because of this, there are some proprietary extensions available.

At this point, I became bored with the presentation and quit taking notes. While the speakers had good intentions with their knowledge sharing, their delivery needed some work. The code walkthrough and demos were presented with a monotonous and unexcited tone, and a handful of folks left during this part. In summary, BPEL looks like a good way to orchestrate your various business processes. It allows you to call web services, EJBs and whatnot simply by defining their locations and methods in XML.

In his demo, Kevin used Oracle's BPEL Designer, which is an Eclipse plugin that has a nice drag-n-drop editor for managing your BPEL XML files. He also used Oracle's BPEL Process Manager, which seemed to be a lot like Jetspeed - you just drop in the .ear and then deploy your processes to it. The only bad part about the Process Manager is it's administration/deployment interface only runs in IE.

If you're using BPEL in your projects, I'd be interested to hear the tools you're using. As far as open-source BPEL process engines, they mentioned Twister and ActiveBPEL.

Posted in Java at Feb 10 2005, 07:05:39 AM MST 5 Comments

JTidy Filter

For those folks looking for pretty HTML when doing a "view-source", they might want to check out the JTidy Filter. I tried to integrate this into AppFuse, but no dice. It never prettied up the HTML - maybe it's a SiteMesh conflict or something, who knows. I doubt I'll add this to AppFuse. Mostly because no customer/project has ever asked for this and because I couldn't get it to work (failed the 10 minute test, but I actually spent an hour on it).

Posted in Java at Feb 09 2005, 09:11:59 AM MST 9 Comments