8 Things Web Application Developers Should Know

There are many things that a good developer should know, especially when developing web-based applications for large companies, probably even for smaller companies. When I am looking to hire someone with experience, I usually have a few prerequisites. Here is my short list of those things.

1. SQL and more (PL/SQL, Transact-SQL etc.)

Learn to write a query in standard SQL. If you are a developer, especially these days, all of that crazy SQL code may be masked by some sort of ORM layer, but if you have the opportunity or can make the opportunity, learn some SQL. It comes in handy when you are unit testing your persistence layer or trying to find test cases that meet certain criteria. I know you are a developer, but you may be asked to do these things every once in a while.

2. Database Administration

Learn enough database administration to be able to set up a development instance of a database on your own machine. Know how to create indexes and constraints. You can get copies of virtually any database for development purposes legally and for free, so do so and learn the basics.

3. Linux or Unix

Download a few distributions of Linux or if you have access to Unix systems, use that access to learn a few things. Learn how to get around in the file system. Learn how to change permissions on files, do searches, download and install packages and if you are brave enough, learn how to compile some downloaded source code.

Learn a shell scripting language and gain at least a cursory knowledge of grep, awk, and vi.

4. Perl / PHP / Python

If you are developing Web applications in one of these languages already, then ignore this, you already know it (obviously). If you are a Java developer, keep reading.

Learn one of the P’s. Sometimes you come accross things that are much easier done in a script and may be possible in a shell script, but lots of times these things are easier in a language like Perl, PHP, or Python. If you get really brave, build a simple website in one of the P’s, probably not Perl.

5. TCP/IP

Learn what TCP/IP is. Learn how the internet works. Know what DNS stands for. Basically learn enough so that if you get a new laptop you aren’t pestering the system admins for the first few hours because you can’t connect to the internet.

6. HTML/CSS

Often times you will need to do some basic styling on your pages. Make sure you can read HTML source code (and who can’t these days? Even my cat has a blog) . Know some CSS, nobody is asking application developers to be web designers, but being able to make some simple changes to make your application look good is nice knowledge to have.

7. Javascript

Every non-trivial web application is going to require some javascripting and don’t expect an HTML-wizard to be able to help you out. Most of the time the javascript you’ll need to know is outside of their experience. With JSF frameworks and tools like ADF and JDeveloper, the amount of Javascript you’ll need is less and less with every release, but at some point you will find the need. Plus once you’ve learned Html/CSS and Javascript, think what you could do to your Facebook page ;-)

8. Troubleshooting

I think what might be the point of all this is that as a web application developer, many, many things can go wrong. Applications aren’t all built in C anymore, they consist of Javascript / HTML / CSS / Some-server-side-language-of-choice / Probably an Application Server or HTTP Server / SQL / and a database. If your page isn’t displaying, you need to know if it is because you have an error in one of your components or if your query didn’t return any data.

If you don’t have the opportunity to learn such things on the job, then find a cheap machine in a junk pile somewhere, install a linux distro on it along with a database, the Apache web server, and a decent version of Perl and go nuts. I am always disappointed if I ask a potential candidate if they have Linux installed on a machine at home and they say no. If they say yes, it’s a plus, if they say yes and it is installed on their Wii, then I hire them on the spot.

That’s my list. What types of things do you feel a Web Application Developer needs to know these days?

Share/Save/Bookmark

Girl Talk - Not Your Typical ‘Mash-Up’

Time for another music review/tirade/lesson. As you will eventually guess if you stick around this blog long enough, I have somewhat diverse taste in music. I listen to everything from Hip-hop to Punk Rock to Alternative Country to Electronica and anything in-between.

About a year ago I learned of a guy who records under the nom de plume of Girl Talk. He is really a DJ and Mash-Up artist and not so much a singer/songwriter or a musician but in some cases he makes some great music just the same.Girl Talk - Secret Diary

Though his latest album is a masterpiece, some of his earlier stuff is pretty bad. “Secret Diary” from 2002 is difficult for me to listen to. If you want to hear something really awful or feel like punishing your cube-mates, blast some of that, really it doesn’t matter which song.

With “Secret Diary” and on into “Unstoppable” you can see the seeds of what eventually became “Nightripper” which he released in 2006. With “Nightripper”, Greg Gillis aka Girl Talk combined all of those great samples he must have catologued in that head of his into something musical. With the first album, he had some great samples but wasn’t really sure how to put them together musically and instead strung them together with lots of noise, a lot of times sounding like someone was turning a radio dial, and sometimes sounding like someone running their nails across a chalkboard. Like I said earlier, this one can be painful to take.

Girl Talk - NightripperOn the other hand, if you want to listen to an example of what Mash-Up artistry really is take a listen to “Night Ripper”. This album combines riffs and samples from a huge variety of songs, from Elton John and Cyndi Lauper to 2 Live Crew and Eminem, into one cohesive collection of actual musical noise. In my opinion it is really a work of genius that can only be fully explained by listening to it. In this album he takes all those great samples and instead of putting them together with random noise, incorporates them into actual songs. I’m pretty sure I said that he wasn’t a musician, but anyone who can write songs like this has got to be classified as a musician, don’t you think?

Share/Save/Bookmark

Groovin’ with ADF

Another great feature of ADF is the addition of Groovy scripting to the ADF framework. The Tech Preview for ADF 11.0.0.0 includes version 1.0 of Groovy. Groovy scripts can be used in all the different tiers of the application, from performing validation on the presentation layer to doing foreign key checks on the Entity layer.

Steve Muench’s blog has a post with tips and tricks for ADF 11g and one section is devoted to the use of Groovy script in ADF. In it he makes mention of some of the more useful keywords and names available to you via Groovy expressions in ADF.

Some useful expressions:

#{securityContext.userName} : Get the user’s name from the Security Context

#{bindings.permissionInfo['PageAPageDef'].allowsView} : Determine if a user has permission to view a page

#{controllerContext.currentViewPort.exceptionData.message} : Display the message from the current exception.

There is also a handy expression builder that can be brought up wherever you can input an expression as an argument to a property.

Additional information on the Groovy scripting language can be found on the Groovy homepage.

Share/Save/Bookmark

Determining Selected Table In ADF Faces

There are many niceties that JDeveloper/ADF provides, but as all things in programming and in life, the 80/20 rule typically applies. Putting master and detail tables on a page and syncing the two is a relatively easy process. You create the form, make sure that the selection listener on the table is set to use the data control to execute “makeCurrent” on the view, and set the detail table to do a partial page refresh based on the id of the master table. It’s great that it is such an easy thing to accomplish.

What isn’t great is what you need to do to actually determine which table is selected on the page all because of a quirk in the selection event on the table itself. It seems the selection listener only gets called when the selection in the table changes. So, if you select row 1 from table A, then select row 2 from table B, if you go back and select row 1 from table A again, the selection listener doesn’t get called because it was the same row that was originally selected. This makes it more challeging than simply adding code to the selection listener.

To keep track of the table that is selected, I elected to create a hidden input variable on the page, and then a javascript function that updated that variable with a parameter that is passed in. That function is then called by the selection listener.

The javascript funtion looks like this:

function tableClicked(var value) {
var selected = document.getElementById(”selectionMade”);
selected.value = value;
}

The hidden input value on the page is then tied to a backing bean. The method that needs to make a decision based on which table is selected simply checks the selectionMade value of the backing bean.

In order to get the table to call the javascript function, go to the source of the JSP file and add the following:

<af:clientListener method=”tableClicked(’tab1′)” type=”click”/>

One thing to look out for is that this particular way of doing things will not work if you want to check the value of the backing bean from an action that is performed with imediate=”true”.

Share/Save/Bookmark

A spot for Observer/Observable

One of the targets of object-oriented programming is the separation of truly re-usable code from application specific code. We have all experienced the unfortunate intermingling of these two parts of the development process. There are occasions where the left hand needs to know of some things that are happening deep inside the inner workings of the right hand. In these cases, inter-project dependencies can be minimized by use of the Java Observer interface and Observable class.

Most software development projects will include some sort of utility project tailored to the needs of the development team, and this project may be used as a common  node of communication among the isolated projects incorporated in the overall development project. Here is a slot for the Observer interface and Observable class. A singleton Observer can provide a simple, extendable nexus for broadcasting updates from the Observable classes from functionally and physically isolated sub-projects, allowing for ‘development in isolation’, certainly a need of all software development projects in this age of parceled development and out-sourcing.

Share/Save/Bookmark

What’s Life Without Music?

So, since many may have found my last post to be pretty drab, all about ADF and all, I decided I’d spice up this blog by every now and then letting you all in on what music I’m listening to. If I get crazy enough, maybe I’ll even take the time to post a last.fm widget up here so you can get the latest info on what I’m listening to (come on, you know you want to).

My musical tastes are fairly varied, in the last hour while I’ve been sitting here, I’ve been listening to Jay-Z (his first, Reasonable Doubt), Kittie (their latest), and Feist (The Reminder). All good stuff, but I really have a soft spot for female-lead punk rock, and the more they don’t fight the poppiness of punk the better.

The Dollyrots - Because I'm Awesome

That being said, the album I’ve probably spent the most time listening to over the last month, the cd that has been in my car since I got it, is the latest album by The Dollyrots, Because I’m Awesome. I like it because it is pretty much pop-punk the way it should be, a lot of tongue-in-cheek in both the lyrics and the music. I was a pretty big fan of The Donnas years back, but as they’ve gotten older, and especially on their newest releasse, they just seem to take themselves too seriously. The Dollyrots, on the other hand, still do not, not with lyrics like “I don’t need you cause I’m neato and I beat you, ’cause I’m awsome.”

So if you are in the mood for some good ole pop-punk check out the Dollyrots, they won’t disappoint.

Share/Save/Bookmark

Fun with Oracle’s ADF

We’ve been doing a lot of work here lately with Oracle’s ADF framework. It is a framework based on JSF, though to anyone who asks, I usually tell them that Oracle’s ADF Faces is to JSF just as Oracle Forms is to C. It may be based on JSF, but knowing JSF isn’t going to help you too much.

Before I go on, I should specify. Oracle’s ADF Framework actually consists of a front-end called ADF Faces and a back-end, ADF Business Components. Despite that it is theoretically possible to create ADF based applications in any IDE, if you are using ADF Faces and ADF Business Components, it really doesn’t make sense to not use JDeveloper. The current production release of JDeveloper (and ADF) is 10.1.3, but 10.1.3 doesn’t quite provide everything that we need for the project we are working on, and so we are working with JDeveloper 11g (TP3).

ADF Faces in itself is actually just a set of JSF tags, previous versions of which have been donated to the Apache MyFaces project. The new set of tags which are referred to by the name, ADF Rich Faces provide some great functionality with all sorts of AJAX tricks built-in.

The ADF BC Layer itself is no slouch either. It is another persistence layer and it attempts to tackle some of the more interesting problems that come up when you are in the business of translating client-server applications to web-based applications.  It consists of an Entity layer for objects that need to update the database and a View layer which consists of Views based on Entities or Read-Only views based on SQL queries.

Since the Entity Layer is cached on the server-side, it performs nicely and it allows you implement some long-running transactions that would otherwise be more difficult to implement in a multi-tiered environment.

Of course, all of these benefits don’t come without a cost, but we can talk more about that later.  For now, if you are interested in taking a look at what’s out there that can help you with that next enterprise application you are building, take a look at the latest release of Oracle’s ADF.  Be sure to check out some of the ADF blogs for some  good tips and tutorials.

Share/Save/Bookmark