Simian Design

Tony Stephens in his corner of the web.
minimize

Java Server Pages

The IDEs(Integrated Development Environments) of Mac

Posted in Coding, Java Server Pages, Mac on March 3rd, 2003 by Tony – Be the first to comment

O’Reilly Network has a good article on the IDEs(Integrated Development Environments) of Mac, from the Mac DevCenter.

Covers a bunch of stuff. JBuilder, IDEA, Project Builder, JEdit, CodeWarrior, NetBeans, Eclipse .

Simple Sample MVC Model App.

Posted in Coding, Java Server Pages on January 6th, 2003 by Tony – Be the first to comment

The Java Boutique has what I’ve been looking for. A very simple MVC example. You can find about 5 gazillion pages on the theory of MVC coding. Try and look for a simple sample app showing this methodology. You can’t. Or at least, I couldn’t. Maybe I was searching for the wrong things. (doubt it, but the chance is alwasy there.)

Anyways, if you code JSP’s, you should really look at this coding methodology. It’s the way to go. I’m not going to get into the details on MVC theory, but suffice it to say that it seperates out your business logic, presentation and data access. (Model, View, Controller).

JSP Null Queries Update

Posted in Coding, Java Server Pages on November 21st, 2002 by Tony – Be the first to comment

Okay. I was wrong in my earlier post.

<br />

if ( rs.first() == false ) {....}<br />

That will check for a null query.

Okay. But now for the goofy part. This will move the recordset from BEFORE the First Record to the First Record. Make sense? So now, when you do your

while rs.next()

, it will start where? The SECOND record.

Solution: put

rs.beforeFirst();

BEFORE your

while rs.next()

and it will start right back at the beginning.

It was incredibly painful to find this simple information. Why Java doesn’t have a RecordSet.Count or something along those lines, I just do not know. It’s stupid. That’s right. STUPID. You simply have to be easily be able to check for null queries. How else can you have dynamic, database-driven sites with conditional logic?

Thanks to Nash Foster for the help in figuring this out. He dug up the information that was freaking buried at the Java Sun Site.

Checking for Null Queries in JSP’s

Posted in Coding, Java Server Pages on November 15th, 2002 by Tony – Be the first to comment

Okay. I was just beating myself up on how to do this. Bear with me. I had a series of nested queries. Inside I wanted variable logic based upon the recordset. IF the query was empty… You get the idea.

if ( rs.wasNull()) { .... }

Where rs is the RecordSet of the Query. Finding out that command kicked my butt. But it allows to check for Null Queries. Which opens a lot of doors.…for me.