The Pragmatic Craftsman :: Simplicity from complexity :: | Home | About Me |

You are here: The Pragmatic Craftsman > April 2008

Core JavaServer Faces April 29, 2008
CSS Notes: Layouts April 25, 2008
10 Ways to "Stay on Top" April 2, 2008

Core JavaServer Faces


Core JavaServer Faces (2nd ed)
by David Geary, Cay S. Horstmann
ISBN 0131738860
Date Read 1/2008

My Rating

One Minute Review
Positives
* Lot of examples -- with complete source code
* Excellent writing style
* Focus on helping the reader

Negatives
* Some chapters deviate from others: only snippets of code and no complete examples

Summary
If you want to learn JavaServer Faces (JSF), this is the book to learn it from! What is the best technique to learn a new technology? By examples, in my opinion. This book takes that approach to the extreme, by giving you full source for the discussed examples! This really helps to see the big picture. I really liked that style.

This book comes from the creators of JSF, so the material in the book is well researched. And it shows. You'll learn many tips that the authors have learned from writing the first edition of the book and by revising the JSF itself.

This is really an excellent book, and a true reference for JSF. When reading this book, I got a sense that the authors really care about the reader: they do the hard work so that the reader will have an easier time implementing/understanding JSF. This is really what sets this book apart from many others.

Reference
This review on Javalobby -- yes, as part of the book-review team, I get to keep the book and get published on Javalobby.org


CSS Notes: Layouts

I'm reading an excellent book on CSS - Stylin' with CSS (highly recommended). I finished reading roughly half of it and I'd like to summarize some of the things I learned.

CSS Layouts
I am used to creating page layouts with HTML tables. It's easy to do and you can get any layout you want. But doing it that way is no longer recommended, and it's an ugly way of doing layouts. The "new" way of doing layouts is with pure CSS. It's cleaner and more concise. However, it's more complicated for a novice html guy like me. To really get this, you need to have some experience.

So how do you do it? Let's look an an actual example first.

<div id="main_wrapper">
<div id="header">
    <div id="header_inner">Header</div>
</div>
<div id="nav">
    <div id="nav_inner">Left nav</div>
</div>
<div id="content">
    <div id="content_inner">Main content...</div>
</div>
</div>

and here's the style for it:

<style>
#main_wrapper {
    width: 840px;
}
#header {
    
}
#nav {
    width: 20%;
    float: left;
}
#content {
    width: 80%;
    float: left;
}
#footer {
    clear: both;
}
</style>

Nice and simple. With this technique you can put together any layout you want.

Why the inner divs? Because CSS is weird. Even though you have a div with a certain size, by adding padding, margins, and border, the width actually changes! So, sure,you can go with just a top-level div, but you have to keep in mind that the size will change when you add those settings. How do you get around that? By using an inner div. The outer div controls the sizing and floating. Inside the inner div, you can then add padding, margins and border and the size of the outer div will not change: this is really how it should work. By using an inner div, you actually simplify your life!

Reference
Stylin' with CSS: A Designer's Guide, Charles Wyke-Smith


10 Ways to "Stay on Top"

If you consider yourself a good programmer, great! But is this going to hold true, two years, five years from now? If you are not going to learn new things, I can safely say that you're going to be "out of date."

If you want to stay still, you have to continue moving: being a good programmer means learning new things constantly.

Here are 10 Ways to Learn New Things by Philosophical Geek. Follow at least some of these and I think you'll be covered.

1. Read books.
2. Read Code.
3. Write Code - Lots of it.
4. Talk to other developers.
5. Teach others.
6. Listen to podcasts
7. Read blogs
8. Learn a new language
9. Learn the anti-patterns
10. Be Humble

Reference
10 Ways to Learn New Things in Development | Philosophical Geek


© 2001-2009

Random Quote

Topics

Architecture & Design :12
Better Coder :30
Books :50
Books I Recommend :21
Career :25
Craftsmanship :17
Java :16
Quotes :25
Recommended :11
Software Engineering :3
Uncategorized :34
Web Development :2

Archive

May 2009 (2)
April 2009 (3)
March 2009 (1)
February 2009 (3)
January 2009 (2)
December 2008 (1)
May 2008 (1)
April 2008 (3)

...since January 2002

Currently Reading

Shelfari: Book reviews on your book blog

:: The Pragmatic Craftsman recommends

:: The Pragmatic Craftsman book reviews

Info

© 2001-2009 Stanley Kubasek About me :: Contact me