I am a Java developer. Should I know about DIV ?

by Veerasundar on December 3, 2008

in Java

Recently one of my colleague asked me the question

“I am a Java resource. Is it necessary for me to learn and understand the web design?”

I’ve seen many newcomers to Java language has been discussing this topic with themselves when they are given training in HTML and web design. For many of those folks, JavaScript is the another name for a nightmare. They just don’t understand the necessity for a Java developer to learn HTML. This happens mainly for the people who are switching from a AS400/Mainframe or any other non-web technologies to Java. If these developers are going to design a web site without the proper understanding of web design techniques, they simply fail or got struck even for a simple mistake in the HTML code.

In my opinion, knowledge about (at least in a basic level) HTML/JavaScript/CSS is a must for any Java developer, unless you are completely going to work in Java SE. For all those Java developers, I would like to give some tips from my own experience in reviewing some Java developers page design markup:

  • Close all the HTML tags properly:
    If all the HTML tags are closed properly (i.e. inner tags are closed first and then the outer) most of the page layout problems will be solved. Most Java developers would be using a CSS written some other web designers and a template HTML page. When they want to modify or add any data to the HTML page, they usually cut and paste HTML tags and forgetting to close them properly. This may affect CSS styling and the page layout may collapse. Properly closing the HTML tags may save lots of HTML debugging time to those Java developers.
  • Never use inline CSS styling / Scripting:
    This is the frequent mistake I’ve seen most of the Java developers doing while designing the page. They just embed <font color=’Red’> in the servlet/JSP page itself. Avoid this kind inline definitions. Externalize styling and scripting. It makes the page to be re-designed easily without much effort. and helps us to organize the code better.
  • Learn basics of CSS / JavaScript:
    By learning this, you need not to wait for a web designer to come and fix your page for a proper layout. Also it helps you to add two more technologies to your resume. :-) )
  • Use Firefox and Firebug:
    I would recommend this combination to a seasoned web designer, but it is also good for the beginners to know about this. Firebug is the best thing that happened to JavaScript ever. With this little Firefox plug-in debugging JavaScript becomes much easier. Inspecting DOM elements also possible in Firebug, so finding out which CSS style affects which HTML element is no longer harder.

Above simple tips, if followed, could save lots and lots of time for a web design beginner.

Would you like to add anything to it? What are your tips / suggestions for a Java developer turned web designer?

Follow me on Twitter to get notified whenever I update this blog.

{ 1 trackback }

Are you following these simple best practices in your web design? [part 1] | Java Blog | Veerasundar
July 6, 2009 at 10:37 PM

{ 13 comments }

Ryan December 4, 2008 at 3:56 AM

- Use classes where possible (as opposed to inline CSS for tags)
- Don’t use the FONT element. Use SPAN or DIV
- Follow XHTML markup, which is like XML (e.g. instead of ) Hhopefully this markup gets encoded when I post…

Ryan December 4, 2008 at 3:57 AM

Ooops.

“[br /] instead of [br]” (sub > and < where applicable)

raveman December 4, 2008 at 8:38 AM

Lately I heard podcast and guy said that on job interviews he askes j2ee programmers do they know difference between span and div. Yep, I also think that is not a programmer. I think HTML/CSS knowledge wont hurt, but i think its optional.

Veerasundar December 4, 2008 at 8:48 AM

Hi Ryan,

Thanks for adding few more tips. I’ve also seen the non-closing BR and HR tags in many HTML files. If the developers are using some IDE, then I think IDE will validate this kind of small mistakes.

Only point is, developers should not ignore IDE’s HTML warnings. :) )

Veerasundar December 4, 2008 at 8:48 AM

I agree with your point, Raveman.

Dan Howard December 4, 2008 at 12:42 PM

Check out Jolene. Provides a true separation of concerns for Web developers / designers.

Dan Howard December 4, 2008 at 12:42 PM
David Daniel Hofmann December 4, 2008 at 4:05 PM

100% agree, there is no way a web programer can think he/she is doing well without understaning basic html/xhtml/css design

Sudhir December 19, 2008 at 12:37 PM

Basic knowledge of HTML/CSS/Javascript is must for all the programmers. its all about user experience. Honestly, I also belongs to the category, you just wrote about, but recently my perception has changed.

Sudhir December 19, 2008 at 12:37 PM

Basic knowledge of HTML/CSS/Javascript is must for all the programmers. its all about user experience. Honestly, I also belongs to the category, you just wrote about, but recently my perception has changed.

veerasundark December 19, 2008 at 2:25 PM

// but recently my perception has changed.//

It's the experience that makes us perfect. More and more we design/code we come to know the best practices in that technology.

veerasundark December 19, 2008 at 2:25 PM

// but recently my perception has changed.//

It's the experience that makes us perfect. More and more we design/code we come to know the best practices in that technology.

Infernoz November 21, 2009 at 2:37 AM

Try ZK, it does all the DIVs, and AJAX for you.

Comments on this entry are closed.

Previous post:

Next post: