RSS ? Recent Blog Posts

Blogs » Archive for May, 2005

The Grand Tour: A crash course in Java-less JSP

by Kevin Yank

It’s time to take the Java out of JavaServer Pages.

In the last instalment of my “Grand Tour” of Java Web application technology, we split our to-do list Web application into three parts: the model, classes that manage the data at the heart of our application; the controller, servlets that process incoming requests and then send display values to the view; and the view, JSP files that generate Web pages from those display values.

While this separation generally did a good job of separating the Java application logic from the HTML user interface code, it still left us with some Java code in our JSP file(s). This code was needed to grab the values supplied by the controller and massage them into our HTML interface. We’ll call this display logic.

This time around, I’ll show you how to get rid of the Java code in your JSP files, and implement that display logic with a simpler and more powerful alternative.

Let’s start by reviewing just what the Java display logic in our example’s JSP file does. First it gets the list of items supplied by the controller:

List toDoItems = (List)request.getAttribute(”toDoItems”);
Iterator it = toDoItems.iterator();

Then it checks if there are any items …

 

Firefox Dev Widgets

by Alex Walker

One of the things I really enjoy about using Firefox is the constant flow of new and groovy extensions. Taking a few minutes to trundle through the extension list always brings back that ‘lollyshop feeling’ I had as a kid — ‘Umm,.. I’ll have one of those,… and…one of those,… Ooo! That one! Definitely one of those!’. So I thought I’d write up a quick run-down of some of my current webdev favorites.

Firstly, I’m not going to write up anything on ‘Web Developer Toolbar’ — I’ve talked about it before and to me, it’s like your wallet - shouldn’t leave home without it.

1) Link Checker 0.1.2 - Kevin A Freitas

A very clever piece of work. Simply right-click on any page, scroll down to ‘Check Page Links’ and watch in awe as, one by one, the background of each link turns to green (the link works), yellow (blocked) or salmon (bad link). It takes a little while to get through big pages, but the idea of being able to spot a bad link in a page at a glance is awesome.

2) ColorZilla 0.8.2 - Alex Sirota

So small, yet so powerful. Colorzilla was a winner when it …

 

Tracking URLs Tool

by Dan Thies

Ed (Haystack) Kohler posted a link to a very nice tool on the High Rankings forum today. This tracking URL creation tool for Google Adwords takes a list of search terms and keyword matching options (exact, phrase, broad), maximum bid amount, and base URL as input. It then generates a keyword list that can be copied and pasted right into an Adwords campaign.

Managing and optimizing PPC campaigns is a lot easier when you can readily determine which keyword bids generated click-throughs and sales, and this tool makes the tracking URLs very easy to set up.

As a demonstration, I loaded two search terms into the tool, “keyword research” and “keywords.” I used www.example.com/ad.php as my base URL, and a maximum bid of $0.25. Here’s the generated output:

keyword research ** .25 ** http://www.example.com/ad.php?source=gaw&kw=keyword-research-br
“keyword research” ** .25 ** http://www.example.com/ad.php?source=gaw&kw=keyword-research-ph
[keyword research] ** .25 ** http://www.example.com/ad.php?source=gaw&kw=keyword-research-ex
keywords ** .25 ** http://www.example.com/ad.php?source=gaw&kw=keywords-br
“keywords” ** .25 ** http://www.example.com/ad.php?source=gaw&kw=keywords-ph
[keywords] ** .25 ** http://www.example.com/ad.php?source=gaw&kw=keywords-ex

This set of tracking URLs would pass two variables to my ad.php script.

The “source” variable would be useful if we used the same script (ad.php) to track other campaigns. If the same keywords are used in more than one Adwords campaign, the value could be changed from “gaw” …

 

Request for Comments - CAN-SPAM Act

by Blane Warrene

The Federal Trade Commission (US) has opened up a window (http://ftc.gov/opa/2005/05/canspamfrn.htm) for public comment on the CAN-SPAM Act introduced in 2003.

The FTC is seeking to clarify definitions in the act, such as person, sender and some guidelines on postal addresses for opt-out procedures (in addition to the electronic opt-out options).

There are also some other areas being proposed for modification based on some rulemaking notices in 2004.

For those that deal with email marketing, bulk mail or simply want to learn more, extensive coverage for consumers and business is available related to the act.

I have covered spam and email platforms in Open Sourcery and continue to see this as a serious issue not only for the end user but for administrators as well. This is worth a read and possibly some thoughtful comments regardless of where you reside.

There are some guidelines:

If filing on paper, comments should refer to “CAN-SPAM Act Rulemaking, Project No. R411008”, and should be included both in the text and on the envelope, and should be mailed to the following address:

Federal Trade Commission, CAN-SPAM Act, Post Office Box 1030, Merrifield, VA 22116-1030.

If filing electronically, they should be submitted by clicking on the following Web link:

https://secure.commentworks.com/ftc-canspam/

and following the instructions …

 

DNS Techniques, network troubleshooting and more

by Blane Warrene

Someone passed along a great link this week for those who grapple with networking issues. This fairly exhaustive guide offers a solid base of TCP/IP education, DNS knowledge and additional tips and techniques helpful to anyone managing networks large and small.

Authored by Charles M. Kozierok, the guide was most recently updated in 2004, current considering most TCP/IP changes have some age on them.

Even after having dealt with networks, both from an architecture and administration perspective, I found some excellent kernels of information to add to my “black book” of tips, hacks and how-tos.

I particularly liked the coverage of (and refresher course for some) the various layers of the networking model. For simple web development, this is not necessarily always critical, but as one delves deeper into complex web applications and has to identify areas of support, knowing what is occurringon different TCP or IP layers can be important.

For those new to topics like caching, proxies or IP6 - this is a good introduction to those areas of networking.

Some additional sites I have used over the years:

Wikipedia

IBM Redbook on TCP/IP

A classic primer on networking

 

Staying Current on MySQL

by Blane Warrene

If you work in any way with MySQL and do not have a free account on the company site for notifications and newsletters - you are missing out.

Yes - this sounds like a shill for MySQL - but it is unofficial. Simply I have found that aside from the expected marketing fluff to toss out once in a while via e-news, MySQL is publishing some excellent heads-up on products and usage along with some great tips on documentation deep with the site.

Recent newsletters have focused on version 5 - with fantastic in-depth links to how-tos with solid technical methods for setup, migration, tweaking and more.

Check out some recent newsletters here, and definitely sign up for notifications when registering as well, as some of the best material comes out on-demand in those communications.

 

Stay the course

by Andrew Neitlich

I’m finishing up some projects as I write this, looking out to how to keep my pipeline full (not that I need to; this year has been FANTASTIC and I could take the rest of it off; but I love what I do).

The answer is simple: Stay the course. I have a focused target market, and need to continue reaching out. So my plan is:

- Pitch ideas to two current prospects who I know from other client work;

- Play tennis with a top referral source and work with him to create some opportunities;

-Turn on my online marketing efforts to my target market, with an emphasis on new educational, valuable materials for this market.

- Experiment with a new target market, closely related to the current one, but different enough to be worth some testing.

The key is to not panic, not flounder, but keep building on what I already know works fine.

Are you staying the course?

 

Products: Are you taking action?

by Andrew Neitlich

This blog piggy backs on the last Sitepoint Tribune, specifically an article by Brendan Sinclair about taking action. In that article, he describes how he has generated over $1 mm from selling products over the Internet. The key? Taking action and testing.

While his article still leaves one wanting examples and more specifics (e.g. what products? what marketing tactics), the point about taking action is key.

Here’s my point of view: Technology today is largely a commodity. You can get coding services just about anywhere dirt cheap. Open source has only accelerated this trend.

If this assertion is true, then when it comes to products, here is the 3-pronged way to succeed:

1. Testing. Knowing how to test products and services in ways that minimize your downside risk (e.g. test inexpensively and expand what works while eliminating what doesn’t).

2. Being agile. Be fast, and keep testing until something takes off.

3. Marketing. Learn how to market in a way that makes people want to buy from you. The most successful professionals will differentiate themselves by marketing. This applies to service and product firms.

The above applies to products. What do you think?

Part Two: In terms of services, #3 (marketing) still applies. However, the keys to NOT …

 

Sweeten your source with the best monospaced fonts

by Kevin Yank

Programmers like me spend all day looking at code, so it makes sense to take a few minutes to find the font that works best for you. The problem is that, for whatever reason, monospaced fonts (the fonts used to display code, in which all characters have the same width) have always been difficult to track down.

Thankfully, Trevor Lowing has done the hard yards and assembled comparative bullet-point reviews of what he considers to be the top monospaced fonts. You can read his assessment of each font, preview it in a code-oriented screenshot, and even compare the fonts side-by-side.

Download links are provided for all the fonts he reviews, which suggests he has confined his review to freely available fonts.

His top choice of Bitstream Vera Sans Monospaced is a little narrow for me, but Apple’s Monaco (4th place) is certainly a pleasant change from Courier New. jEdit, my editor of choice has never looked better!

Which is your favourite?

 

CSS Formatter & Optimiser

by Alex Walker

Just a quick one.

I tend to use a couple of text editors depending on what I’m doing. jEdit is my current pick of the crop for ‘ ‘down’n'dirty’ texting (but how bad is the placement of that Download button?).

However I also tend to keep a couple of really small, fast-loading editors handy for making little changes, edits and mistakes as you spot them. EmEditor and Crimson Editor are great, but there are hundreds of them out there.

One of the main features I miss in those small editors is a good code formatter. I may have a solution now.

I’m not sure why it’s on the CDBurnerXP website, but this CSS Formatter and Optimiser is pretty handy. Cut and paste your code into the text box, select a setting between readability and compression, choose your sorting options and hit ‘Process CSS’. It even preserves my favorite ‘IE!important’ hack.

Looks promising.

 

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.