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.

My Review of Java Studio Creator (a.k.a. Rave)

I attended a Rave Demo at Sun in Broomfield today. The meeting actually had two parts - the first hour was a marketing schpeel about Sun's Enterprise Java System and the second hour was a demo of Java Studio Creator. The first hour was boring and very marketing esque - they did have an interesting price point though - $100 per employee. This is small business friendly, which is nice to see.

The Rave (a.k.a. Java Studio Creator) Demo was when things got good. Here's my notes from Dan Robert's presentation, followed by my impressions and comments. Dan is the Product Manager for JSC and was seemed to be very in tune with the tools marketing (i.e. all the good stuff from Intellij and Eclipse - and how JBuilder sucks).

What is it?

  • New Java Development Tools initiative
    • For the corporate developers who write code, but don't understand all of the complexity of J2EE and just need to get their job done.
  • A full fledged Java IDE
    • Visual Design Tools, 2-way editing, Editor, Debugger, Repository Management, and Project Management
    • Cool new Look and Feel
  • Complementary to NetBeans and Java Studio
    • Even Enterprise developers can use it for Rapid Prototyping
    • Use Java Studio or any other tool to add persistence layers (heh, this is b/c they think that persistence can only be EJBs ;-))

What does it do?

  • Quickly builds web applications that solve time-critical, real world problems
    • Complete web application creation for departments, workgroups and businesses of all sizes
    • Focus on easy to understand, event driven coding model
    • Simplifies access to existing infrastructure
    • All Java-standards based servers, all databases, all Web services, all desktops
    • Their main goal is to do web applications well, they'll catch up with the rest later

Standards-based solution for all developers

  • A development solution based on 100% Java standards
  • Delivers "Write Once, Run Anywhere"TM benefits: portable apps, portable developer skillsets
  • Quickly solves time-critical app development needs
    • Drag and Drop, rapid visual access to databasess and web services
    • consistent UI look/feel/behavior across all apps

Visual features to speed development

  • Palette for widgets, custom graphics, code clips, etc...
  • Query Editor

Simplified Access to Existing infrastructure

  • Use any JDBC Compliant Database (3.0)
    • Drag in and automatically create DB connections to data-aware components
  • Web Service Consumption
    • Easily pull in existing web services from Enterprise wide solutions or business partners

Java Studio Creator Roadmap

  • Hammerhead:
    • 2-tier dynamic content web applications based on JSP and JSF with Page Flow design tools
    • Releases: Early Access Spring 04 (today!), FCS Summer 04 (at JavaOne)
  • Thresher:
    • Minor Update Release
    • Focuses on Ease of Development and Stability
  • Mako
    • Extended Client Support

Download today from http://www.sun.com/jscreator. OS X version will be available shortly after the release (JavaOne).

After the PowerPoint, Dan started into the Demo. The first thing I saw that was cool was that when he clicked on the "Run" button, it actually deploys the app and opens the browser to run it. What you see in the browser looks very similar to what you see in the IDE. The IDE looks very simple. My current client went with me and he remarked that it "looks a lot like Eclipse."

The IDE has lots of palettes, and the UI essentially looks very clean. The pallets can be docked just like in IDEA - which I like. It looks a lot more like a native Windows application than it does like Swing. Here are the palettes it has:

  • Server Navigator
    • Data Sources
    • Web Services
    • Deployment Servers Palette
  • User Defined
    • JSF Standard Components
    • JSF Validators / Converters
  • Property Sheet
  • Project Navigator

Dan then dragged a drop down component and a table component onto the page. Secondly, he added a stylesheet and it visually changed the background and fonts on the page. I asked him if there was an imbedded browser. He said they took a look at using Mozilla, but it was too much and apparently one of the "real smart" engineers wrote the embedded browser component from scratch. Dan said it was the same guy who wrote the demo from scratch in 2 minutes at JavaOne last year. The thing I found very cool was that the HTML that is written into the JSP is XHTML - none of this Netscape 4.x support. Fuck Netscape 4.x - I'm glad Sun had the foresight to drop support for it.

After adding the stylesheet, Dan used the Data Sources navigator to grab a table and drag it to the drop-down. Then he did the same for another table and the data grid. Using the Visual SQL Query Builder (which looks a lot like M$ Access) he linked two tables and added a new column from a 2nd table to the grid. He then showed us that JSC has pretty good support for 2-way editing. Edit the code, the visual representation changes. Edit the visual, the code changes. This seems to be a big problem with WYSIWIG editors, especially when it comes to dynamic webapps. It appears that they've done a pretty good job to solve this.

Next he showed us some cool features of the components. For the table, there is an "enable paging" checkbox - and for the drop-down, you can right-click and select "auto-submit on change." He then set a couple of converter types on the drop-down and had to hand-code the event handler for the drop-down. Two lines of very simple code and he was done. The code was simple enough that you could have guessed the syntax. Code completion popped up nicely as well. Apparently the JSF coding style is that each page (JSP) is backed by a Bean that contains different event handlers. The code looked pretty simple and all the data was retrieved via RowSets.

Bill Dudney was there and asked about testing tools (i.e. Cactus or JUnit). Dan's response was that these are usually used by more advanced Java developers and there's talk of it, but nothing has been done yet. Now he pulls up a very cool page navigation creator which he uses to drag and drop buttons and links to point to different pages. Then someone asked about cost - and here's what makes it great. Under $300. They also hope to have lots of add on components for JSF by JavaOne. Unfortunately, there's no tooling for building JSF components in Java Studio Creator. For more information checkout http://developers.sun.com/jscreator.

The main reason I really like Java Studio Creator was that you literally never had to see any JSF code - and you get all of the features I like to use in webapps. Furthermore, I've been training a couple of guys all week on JSPs and using JSTL's SQL tags to do CRUD on a database table. While it's simple stuff, since they've never done web development before, it's a bit advanced. I'm sure their eyes will glaze over tomorrow when I start showing them how to write JUnit Tests, DAOs and how to use Hibernate to CRUD an object. They'll probably fall asleep by the time I show them how to wire the DAOs to Hibernate using Spring. When they saw this demo today - there eyes lit up and they got inspired to do their projects again. It looks easy for them now. All they need is a JDBC 3.0 driver for DB2 and they should be able to rapidly develop webapps with Java Studio Creator. I don't blame them for wanting to use this tool - it greatly simplifies things.

After the meeting, I asked Dan about transactions and if it was possible to use Hibernate instead of the RowSet stuff. He said that since JSC is based on NetBeans, you could probably write a plugin to use Hibernate instead of RowSets. As far as I know, the main reason you'd use Hibernate is for caching - but rowsets probably have that too. I know that the spec lead for JSF is talking to the Spring developers about JSF-Spring integration, so maybe that will be a future option as well.

Another thing that's not currently supported is the use of great technologies like Tiles or Sitemesh. Sitemesh integration would likely be pretty easy - you'd just never see your decorated UI in the IDE. Tiles is definitely something on the roadmap, but they don't have a solution yet. Dan indicated that using "includes" in your JSPs should work just fine - rendering in the IDE as they would in your browser. Good stuff - I hope we start using it at my current project - I think it'll do wonders for productivity. Since it's based on standards (JSF and RowSets) - the generated code looked pretty clean too.

Posted in Java at Apr 08 2004, 10:12:34 PM MDT 20 Comments

Eclipse Plugins updated for 3.0 M8

At my current client, I'm teaching a class this week on developing Java-based webapps. I'm starting simple with basic JSPs and JSTL's SQL Tags. Later, I plan to teach them how to write JUnit tests, DAOs, Actions, etc. I hope to show them how Hibernate and Spring can reduce the pain of J2EE.

The main problem is that it's kinda tough to teach this stuff to people that have no webapp development experience. How can you tell them Hibernate is soooo much easier, when they've never used JDBC? How can you show them that Spring simplifies things when they've never developed a complicated app?

Anywho, back to the point of this post. As part of the first day, I had the class (actually, there's only 2 students) setup their development environments (JDK, Eclipse and Tomcat). I decided to go with the latest Eclipse 3.0 M8 b/c I'm an upgrade junkie and I firmly believe that it's best to teach the latest and greatest stuff. Because we're using M8, I had to update a bunch of plugins and decided to package it up and release it. So without further ado, I give you Eclipse Plugins 1.1. [Download, Release Notes]

Here's the current list of plugins included in this package:

NOTE: I updated most of these plugins because older ones didn't work with Eclipse 3.0 M8. I haven't tested all of these, but they are the latest versions (as of yesterday).

I still use Eclipse on Windows, but I sure am getting used to using IDEA on the Mac. Now if I could only figure out some slick ways to pre-program keys-to-code. The Flex guy in NYC last weekend would press one key and a whole block of text would appear. I think that'd be a nice touch for next week's presos in Florida. It'd be cool to write a JUnit Test, DAO Interface, and DAO Implementation in a matter or keystrokes (i.e. one for each method).

Related posts: 1.0 Release.

Posted in Java at Apr 08 2004, 12:37:23 AM MDT 17 Comments

[ANN] Struts Resume 0.9 Released!

Struts Resume 0.9 is a major improvement over 0.8. Not only did I upgrade all the code to use AppFuse 1.4 (release notes), but I also removed Struts from the services layer. Moreover, you can actually enter almost all of the pieces of a resume and render it in HTML and Word format. The resume-entry piece (and sections you can enter) is largely based on what Monster.com uses. I may add other sections in the future (i.e. awards and publications).

The main reason this is not a 1.0 release is because an administrator is the only one who can edit the HTML template - and the Word/RTF template is not editable online. Allowing a user to override the default template(s) will be the primary goal in 1.0.

Here's a specific rundown of all the changes from the changelog:

Download (~10.5 MB for src, ~5.4 MB for bin), Online Demo and Homepage.

Posted in Java at Apr 05 2004, 05:02:22 AM MDT 12 Comments

Carpal Tunnel

When I finished hacking away on Roller this past Saturday, my fingers hurt from typing so much. Who knows why, I didn't add that much code. Must've been all the keystrokes to run Ant, start Tomcat, and test stuff. Yeah, we need more tests - but those won't help tweak CSS. Yesterday, all I did was review Hibernate in Action, so no coding, but a fair amount of typing. By the time I went on a bike ride yesterday afternoon - my left hand's left-most fingers were curled up naturally and my forearm was aching. Carpal Tunnel has set in quite nicely in my left forearm. I can still type, as evidenced by this post - but it definitely hurts and it seems like I could do some serious damage if I keep it up.

Herein lies the problem. I took this week off from my regular gig to concentrate on the Spring book. So I need to be typing like a madman all week - but my body is not cooperating. Rather, it's trying to tell me something - "you're not cut out for this this much coding/typing." So what should I do? I've had these same symptoms before - and when I did, I got a massage and took a couple of days off. That's a bit difficult this week with my livelihood depending on a pain-free left arm/wrist/fingers. I've booked a 10:00 massage - let's hope that gets me through the week. I definitely need a longer-term solution though. It'd be nice to write this book w/o typing, just talking.

Related: Carpal Tunnel in March 2006.

Posted in General at Mar 22 2004, 08:22:23 AM MST 13 Comments

OGNL 2.6.4 Released

OGNL 2.6.4 was released today. So you're asking - "Why do care? You don't use it?" You're right, I don't use it - but I will be soon. It's the Expression Language used in Tapestry and WebWork - which I hope to learn, beat and abuse in the coming months. I've also had some discussions with Drew about adding it as an EL option to the Display Tag. BTW, with the release of 2.6.4, XWork 1.0.1 and WebWork 2.1 will be released very soon - quoted from the WebWork mailing list.

A lot of the WW and Tapestry folks swear by it and claim it's vastly superior to JSTL's EL. As far as I can tell, it has some more advanced features (i.e. the ability to call a method), but it's not *that* much better. It's not going to revolutionize my webapp productivity - is it? Of course, Jason and Erik will argue that [ insert WebWork or Tapestry here ] is the real productivity enhancer. Personally, it's not the MVC frameworks that slow me down. It's the meetings, the requirements gathering and the UI tweaking (CSS and JavaScript) that takes the most time - as well as the occasional fumbling with Hibernate. That's unlikely to go away no matter what MVC framework I use.

That's why I use AppFuse - b/c most of the CSS and JavaScript I use on a project is already in there. A little massaging here and there, and the UI tweaking for the whole app can be done in a matter of hours. Of course, Tiles helps tremendously with this - as Sitemesh would I suspect.

I think what helps me the most about AppFuse is having a structured process for developing webapps. Create POJO -> Create DAO -> Create Manager, etc. I suspect that my process will stay the same with Tapestry and WebWork - so that's why I'm not afraid to learn them. The productivity-enhancing attributes of AppFuse will not go away with a new framework, but some parts may become a bit easier. Of course, you can bet that if I trip and fall along the way (which I likely will), you'll be able to hear about it here. Maybe someday this site will get as many hits for these frameworks as it does for Struts (up to 914 before this post).

Posted in Java at Mar 21 2004, 01:34:28 PM MST 1 Comment

A Day with Roller

I put a whole sh*tload of hours into Roller today - around 14 to be precise! My main goals where to get password encryption enabled and Remember Me re-implemented as a more secure feature. I managed to accomplish both and did so much typing in the process that my fingers hurt.

Other things I managed to accomplish:

  • Added ability to put a period (.) in a page name. Also modified BasePageServlet to set contentType appropriately for those "pages" ending in .xml, .js and .css. This should allow pages to be created for CSS and JavaScript, and then included in your pages with <link> and <script>.
  • Moved Calendar in Weblog editor to top right (was at bottom left) - making it easier to view and navigate to different days.
  • Fixed comments and spam stuff that Lance added.
  • Fixed pop-up Calendar on Weblog Edit screen to be properly positioned in IE and Mozilla.
  • Added up and down arrow buttons to allow expanding and contracting (taller and shorter) of weblog textarea. Persisted user's preference with a cookie.
  • Various UI enhancements to make the Editor UI look good in both IE and Mozilla (on Windows XP).

Phew - I'm ready for a beer! You can checkout our demo instance if you'd like to try out the latest code.

Posted in Roller at Mar 20 2004, 10:14:00 PM MST 24 Comments

[DisplayTag] Changing a row's CSS class based on values in the row.

One request I've seen on the displaytag-user list a few times is the ability to change a <tr>'s CSS class based on a certain value. While the displaytag doesn't have this feature out-of-the-box, it is possible (and fairly easy) to do. All you need to do is sprinkle a little JavaScript into the mix. Basically, the displaytag will render a well-formed HTML table - like the following:

Username First Name Last Name
mraible Matt Raible
tomcat Tomcat User

By adding an "id" attribute to your table (i.e. id="user"), your table will get an "id" attribute and now you can easily access it via the DOM. The following JavaScript will grab the table and search the first column for a value of 'mraible' - and if found, it will change the row's background color to red.

<script type="text/javascript">
<!--
    var table = document.getElementById("user");    
    var tbody = table.getElementsByTagName("tbody")[0];
    var rows = tbody.getElementsByTagName("tr");
    // add event handlers so rows light up and are clickable
    for (i=0; i < rows.length; i++) {
        var value = rows[i].getElementsByTagName("td")[0].firstChild.nodeValue;
        if (value == 'mraible') {
            rows[i].style.backgroundColor = "red";
        }
    }
//-->
</script>

You could easily change rows[i].style... to rows[i].className = if you want to assign a new CSS class. Now let's see it in action (and see if your browser supports it). This has only been tested in Safari and Mozilla on OS X.

Username First Name Last Name
mraible Matt Raible
tomcat Tomcat User

Other displaytag tips: Static Headers HowTo and Highlight and allow clicking of rows. The 2nd tip (highlighting) is available in AppFuse, in the userList.jsp page.

BTW, I also added support for the DisplayTag to render the results from JSTL's SQL Tag. I haven't committed it yet - I'm still waiting for more feedback.

Posted in Java at Mar 08 2004, 01:22:34 PM MST 10 Comments

Great CSS Designs

While reading the latest issue of A List Apart this morning, I got sidetracked and visited the CSS Zen Garden, finally landing on David Shea's blog. There I found his listing of Great CSS Designs. There's some very nice sites in there.

In other news, today is one of those days that sucks to work from home. I can see the snow falling out my window, and it's snowed almost 2 feet in the last 48 hours at Vail, Breckenridge and Winter Park. Urgghh, the slopes are calling, but so is my pocketbook. Note to self: get your priorities straight next year so this doesn't happen again. This is the first year in the past 5 that I haven't bought a ski pass and I won't do it again. Oh well, at least it'll be a good night for a hockey game.

Posted in The Web at Mar 05 2004, 07:45:05 AM MST 3 Comments

Cool Blog Design

I dig Dunstan Orchard's blog theme. I especially like his comment alert system and right-nav tabs (main, b-marks, b-roll). There some inspiring stuff here - adding a similar comment alert system and theme are on my Roller wishlist. Now if I could just find time to do them...

Later: Some more cool designs.

Posted in Roller at Feb 25 2004, 02:55:44 PM MST 6 Comments

Approved for Google Ads

After seeing that Tim Bray is making $500/month of Google Ads, I decided it was high time I try to get this site approved again. Low and behold it worked! So they've approved me, but I only want to show them when folks come from Google. As in, when the referer (yeah, I know that's spelled wrong, but it is in Java and JavaScript too) contains "google" - show the ads. Anyone know how to do this cleanly in Roller/Velocity? Or JavaScript? I tried the following, but it doesn't work:

if (document.referer != null 
    && document.referer.toString().indexOf("google") != -1) {
    // define variables
    document.write("<scr" + "ipt type='text/javascript' src='ads.js'><\/scr" + "ipt>");
}

Since Google is my top referrer - I think I'll get a fair amount of users seeing the ads, and it won't disturb the folks who come here just to read my ramblings.

Posted in Roller at Feb 03 2004, 08:10:33 PM MST 10 Comments