Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta. developer.okta.com

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.

NYC Seminar: Flex and WebWork

Christophe talked about Flex, it's architecture and built the data grid for the Flex pet store in a matter of minutes. After seeing this presentation, I definitely think Flex is wicked cool. It's too bad that it's price tag is $6K/CPU. However, Vic is probably right - this stuff should be the next generation of webapps. I'd order the developer CD but it sounds like something I'd play around with and never use. It looks so easy to use that I'm willing to bet I can wait until a client demands it - then learn it in a matter of days - or even hours. I did end up asking Christophe about unit testing these Flash UIs. They're working on it, but nothing exists yet.

Now Jason is up - the last session of the day.

What is WebWork 2.0?

  • The 2nd generation of WebWork
  • A web MVC Framework
  • a wrapper on top of a generic Command Pattern implementation (XWork)
  • A small but powerful tag library

XWork is where Jason spends most of his time. XWork is a generic command pattern implementation. Actions are command objects in XWork. XWork adds advanced features.

  • Interceptors: setting parameters, workflow, etc.
  • Results: includes one for chaing to another Action
  • Simple IoC container
  • Powerful expressional language (OGNL)
  • Flexible type conversion
  • Metadata driven validation framework

What does WebWork add?

  • Adapter for Http request/response
  • Integration of Session / Application Scopes
  • ServletDispatcher translates HTTP Requests into Action execution
  • Request parameters passed to Action Results
  • Supported view technologies: Velocity, Freemarker, XSLT Jasper Reports, JSP

Action is a simple interface with an execute method. ActionSupport is a useful base class.

I gotta say - one of my favorite things about WebWork is the fact that all its UI tags are built using Velocity. This means that you (the developer) have full control over what HTML is generated from the JSP tags.

Interceptors have been nicknamed "Domain AOP." Interceptors allow custom code into the call stack and much of the WebWork "magic" happens with Interceptors. WebWork has a number of built-in interceptors:

Setting Parameters

  • ParameterInterceptor
  • StaticParameterInterceptor
  • ChainingInterceptor
  • ConversionErrorInterceptor

Defining Workflow

  • DefaultWorkflowInterceptor
  • PrepareInterceptor
  • ServletConfigInterceptor

Preventing duplicate posts

  • 2 types of token interceptors

Interceptors can be grouped into named Interceptor Stacks (i.e. defaultStack, validationWorkflowStack).

2 types of actions possible: Model-Driven vs. Field Driven (merging of Action and ActionForm). ModelDriven Interface - public Object getModel(). Porperties of the model will be available as simple properties - "user.name" becomes "name". To use, you have to add ModelInterceptor to your WW config file.

OGNL (Object Graph Navigation Language). An expression and binding language for getting and setting properties of Java objects. Normally the same expression is used for getters and setters.

XWork Validation Framework

  • XML based. Validation file in the same package as the class. Defines one field validator and the error messages to add if it fails.
  • Bundled validators - supports required, range, email, url and OGNL Expressions (very powerful).
  • JavaScript support recently added for simple validators - nothing for expressions though (tough to do).

Doh! Jason's demo didn't work. I did a lot of demos in my preso so I couldn't help but say "shoulda used a Mac!" These PowerBooks might be a bit slow for development, but they're definitely nice for this traveling salesman thing.

This is where you get your money's worth: All the speakers and attendees comparing frameworks, talking about their problems and trying to figure out a better way.

Posted in Java at Apr 03 2004, 04:13:54 PM MST 8 Comments

Saturday Afternoon

I have a whole bunch of notes from watching all the speakers this morning, but there's no point in me regurgitating all the stuff that Jason has written. Unfortunately, I don't have unlimited bandwidth on my phone - so this post (and checking my e-mail) will probably cost me $20. I finished my talk about a half hour ago and damn it feels good. All my worrying from the last week is over. I'm done. Phewfta. ;-)

Below are my thoughts on the speakers so far. I'll update this for Vic (speaking now) and Jason as they speak.

Clinton Begin: - iBATIS. He actually works for ThoughtWorks in Calgary, which I didn't know. I've met Ted, Jason, Rod and Tom this morning. All very cool guys. It's funny to see Jason and Ted sitting at the same table - I thought they were mortal enemies. ;-) There's not a whole lotta folks here - approx. 30 right now. That's good since this room doesn't look like it'd hold much more than that.

Clinton wrote SQL Maps because Data Models are rarely perfect. He's actually using Hibernate right now - b/c his team has control of the database.

Clinton is toying with the idea of using something like XDoclet to generate SQL Maps.

Caching - on a single box OSCache is the slowest caching mechanism. It'll actually cost you more than it helps you. For distributed systems, however, it's the only choice. He doesn't know why it's so slow - it just is.

Rod Johnson - J2EE without EJB. Rod actually flew in from London just for this event. It's his first time to NY, as it seems to be for many speakers here. I took a lot of notes from Rod's presentation. He was mainly advocating that you can write fast, scalable J2EE apps without EJB. He didn't cover Spring much, but did point out that Spring offers most of EJBs built-in services. After watching Rod's presentation, the only reason I can see for EJBs is for distributed systems. However, these days it seems that more folks are using web services instead of RMI.

Ted Husted - Commons Chain. Ted's presentation was quick (1/2 hour) and I missed most of it, so I can't really comment on it.

Vic Cekvenich - basicPortal RIA. Vic's presentation was titled "basicPortal RIA" but that's not what he covered. He ended up talking about requirements, project management and good programmers. Damn, I've heard this talk before - nothing new here. It's good stuff though, and an enjoyable talk.

Vic's predication: in the next 12 months, declarative languages (like Flex, XAML and XUL) will be next generation of MVC frameworks. He thinks it's very liberating to not write HTML anymore. As I said yesterday - you're still writing XML, so as a developer I don't think you have to learn that much. He just showed us some Flex code - it's pretty simple stuff. 10 lines of code to declare a data grid (like the display tag) and load its data from a DAO.

I asked Vic if calling a DAO from the View (Flex page) is a bad thing. Isn't that like using scriptlets in your JSPs to call your DAO? I mentioned that the design pattern bigots would bash all over this. He said - "screw the design patterns, this works." I suspect the next guy (Christophe Coenraets on Flex) might promote cleaner design patterns. This should be fun - a bunch of open source fans about to be presented with a closed-source, expensive product.

Posted in Java at Apr 03 2004, 01:37:16 PM MST 1 Comment

Saturday in New York

It's a drab and dreary day in New York City - as evidenced by the picture below. The hotel is interesting - with rooms just barely big enough to fit the queen size bed, and hardly enough cold water to go around. That's right, there's no shortage of hot water - just a lack of cold. Oh well, at least it's not ice cold like that summer in Moscow when they turned the hot water off for 4 weeks. Braving the rapids we called it. The hotel has no high-speed internet, only dial-up. Thank God for the Starbuck's HotSpot across the street.

8th Ave and West 35th
8th and West 35th

Last night I hung out with Vic, Clinton and Steve. There were lots of discussions on Flex and rich clients. Vic thinks that rich clients like Flex are the next big thing. I don't disagree, but he thinks they'll replace all HTML clients - and eventually the browser. I have a hard time believing that - though it would be nice to see. To me, whether I'm writing HTML or Flex - it's all just angle-bracket syntax to create UIs. I'll do whatever my clients want - and I'm willing to bet that most won't care for a Flash UI for quite some time.

Posted in Java at Apr 03 2004, 05:57:50 AM MST 1 Comment