Matt RaibleMatt Raible is a Web Developer and Java Champion. 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.

[NFJS Denver] Howard Lewis Ship and Creating Tapestry Components

Tapestry - "we try to make the simplest approach the correct approach." I haven't been blogging much of this session b/c I'm just sitting back and soaking it up. It's a good session and Howard is a good speaker. I'm learning a lot about Tapestry and it's philosophy about web development. I especially like the line-precise error reporting - it's something that all frameworks need to do better.

Tapestry looks very cool. You basically write an abstract Java class that has abstract methods for properties you define in an XML file. Tapestry them implements this class and its abstract methods. The class that Howard wrote to handle a login form is very simple - it's only about 7 lines long - and 4 of those are abstract methods! The HTML form is cool too - not much of the HTML has changed since it was bare-bones HTML. He's merely added some a few "jcwid" and "listener" attributes to some of the elements.

Tapestry is a large system of subsystems, all implemented behind interfaces. It ships with its default behavior (i.e. page/template pooling), but you can (supposedly) easily change this behavior or implement custom classes. Internationalization is a first-class citizen in Tapestry - no surprise here since it is in most MVC frameworks. Tapestry 3.1 will embed Hivemind at its core and will provide much easier integration with tools like Hibernate and Spring.

Tapestry's "Validation Subsystem" looks very rich - providing both client side and server side validation. It uses Field decorations to highlight both labels and fields when validation fails. By default, it promotes using CSS to change colors, backgrounds, etc. There are a couple of Helper Beans for validation: the Validation Delegate and the Validator. It's pretty neat that you can bind a label to a field in XML. Since HTML already allows binding <label>'s to form elements - you'd think that Tapestry could harness this by parsing the template. I suppose it's just easier to require the XML binding - then you don't have to worry about the user writing invalid HTML.

Howard is trying something new in this presentation - real-time coding. I use this in my presentations and it works pretty good. He's having some serious issues b/c he can't mirror his laptop's monitor with the projector. This obviously makes it difficult to code since the slide show is his monitor. I try to use pre-canned code (i.e. IDEA Live Templates) so there's less chance of fat fingering things. I also use a Mac - on which mirroring works great.

The "Page" object is pretty cool in that it contains a bunch of lifecyle methods you can override. Most frameworks don't have lifecycle methods. I guess Spring's SimpleFormController does with onSubmit, onBind. Lifecycle methods are a Good Thing IMO. The formSubmit() method is always called, regardless of validation errors. Therefore, you have to get the IValidationDelegate and check if it has errors before continuing. I wonder what the logic behind this is? Most frameworks seem to support automagical validation - with no further work required by the programmer. I guess it's kinda cool b/c you can continue with validation errors if you want to. Choice is always a good thing.

Howard just showed us a client-side validation example. The wicked cool thing is that the client-side script is configured in a .page file rather than in the HTML template. Most frameworks I've seen (that support client-side validation) require you put something into your template. This was a good talk, I'm definitely interested in Tapestry and excited to start learning it in the next couple of months.

Posted in Java at May 22 2004, 06:18:47 PM MDT 1 Comment
Comments:

One of the reasons that I've not as yet tried a serious evaluation of Tapestry is that there seems to be quite a lot of support files that need configuring. As I understand it, there's an Eclipse-plugin (Spindle, IIRC) that helps a lot, but as I'm not prepared to switch from IDEA to Eclipse so that doesn't help in my situation. As a result, I'm currently sticking with Niggle/Freemarker, although evaluating Barracuda...

I'll be interested to read how you get on though!

Posted by Gwyn Evans on May 26, 2004 at 04:33 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed