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!
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 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.
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!
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.
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:
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: |
---|---|
|
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.
I attended the Java User Group meeting tonight and managed to document a good portion of it. I hope to post it in the morning when I wake up. After the meeting, a number of us headed to the local brewery and enjoyed some brewskis together. We left around 11:20 and I made it home (riding my bike) at midnight. While it was 19°F when I rode to work this morning, the 26°F on the way home seemed a lot colder. Maybe it was the beer. Anyway, it's good to be home. Let's hope it warms up before I ride back in in 5 hours.
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).
Adrian Sutton hits the nail on the head:
...for seasoned veterans who understand (its) technologies well, AppFuse should be a big time saver. I can see a lot of beginners getting into very deep water with it though.
AppFuse can help you get started quickly, but it won't help you really learn how to use the different technologies. Its tutorials are designed to show you how to CRUD a simple object, but that's about it. For learning the different frameworks, that's what books are for. Technical authors put a lot of time and energy into writing. A good way to show your appreciation is to buy their books.
My Recommendations:
Technology blogs are boring for the most part. Sure it's cool to read about someone configuring or trying something out for the first time. However, if you run a technology blog and you read through your archives, chances are there's not much in there that peaks your interest anymore. Part of the reason I started this blog is so I could look back over the years and see what was going on in my life. This is one of those posts. One of those posts that I'll look back on and appreciate.
2005 has been a pretty good year so far. This is largely in part to the fact that I don't work from home anymore, and therefore get some interaction other Java junkies. Another thing that's made it really nice is riding to work. I've ridden my bike to work every day since I started doing it. My goal is to ride everyday but those when it's raining in the morning, or when I have one of those "Oh shit!" mornings and I'm late for a meeting. I think I can ride all but 5 days this year. The past couple of weeks, it's been pretty cold (20-30°F), but it's actually been quite nice. It's a lot like skiing - you just have to dress for it.
Another reason I've been enjoying myself a lot is b/c I haven't been working on the weekends or late nights. I've been sleeping in, going to bed before midnight, and having a good time with Jack and Abbie. Last weekend, Abbie I went to Ocean Journey and the Colorado Crush game. Apparently she had a good time b/c when I asked her if she was excited about the DU Hockey Game this weekend, she said "Football!". Looks like we might be going again.
Jack is growing up fast and is already in 9-month outfits and he's only 5 months old. Since Holly moved in, he's been "Happy Jack", which is nice considering he cried 12 hours/day for the first couple of months. He's smiling a lot, squirming like a madman and even rolled over a couple of days ago. Before we know it, he'll probably be crawling and chasing after his big sister.
Last, but not least, I'm learning that I need to take advantage of my contracter status more. Today I took the day off to work on Spring Live. I hope to start doing it more often, as well as taking days off to work on AppFuse. My strategy for that is: go in early and work 4 10-hour days per week. If I'm in the office by 6, I can be home by 6 and hardly anyone notices.
Speaking of AppFuse, it continues to be popular and has the most mail traffic on java.net. While that's great, it's tough to keep up with the mailing list. I've started to not reply b/c I need to get other things done. The last two weeks of this month, I plan on pumping out new AppFuse and Equinox releases, so I'll likely get back into it then. Developing open-source projects is a lot of work, but it's a nice way to show clients your knowledge.
That's pretty much it. Julie continues to be the woman of my dreams and it's awesome living in a new/big house in the heart of Denver. I don't know how much I'll update this blog in the next few weeks - sometimes it's just better to quit e-mailing and blogging and get some work done.
If you've heard of iBATIS, but never had the time to look into it, there's a good intro article on ONJava.com: Object-Relational Mapping with SQLMaps. iBATIS continues to be my persistence framework-of-choice when Hibernate doesn't mesh with the database schema. Now if we could just get someone to write a Middlegen Plugin to generate POJOs and SQL Maps from database schemas.
From the WebWork Mailing List, I learned that the Eclipse Plugin for WebWork has released its first version - and it looks pretty nice (demos). To install using Eclipse Update Manager, use http://eclipsework.sourceforge.net/install/site.xml.
Larry Williams points out how to monitor Tomcat 5.5.x with JMX.
To monitor your Tomcat instance with JMX start Tomcat with the following JVM parameters.
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9000 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
I'm posting this hear so it's easier to find when I get time to try this out.