Wordoid – for finding new domain names

Finding a new domain name is a pain in the back-side, right? I’ve been writing a new app and trying to find an available domain name that would be suitable for it took ages, probably as long as it took to write the damn app.

Wordoid is a nice domain name creator that helps a bunch. The words it creates are much more sensible and memorable than those that other creator sites come up with.

On a related note, how annoying is it when you’ve found the perfect domain name only to find that someone has already got it and just left it parked and doing nothing?

Netbeans is a great editor for working with XML

I’ve been using Netbeans for a long time for Java and PHP work. Until today, I’d never even considered using it when working with XML and DTD files.

Today was a revelation.

I’ve gone from wasting hours building XML in GEdit and using Firefox to check it validates against the DTD to using the Netbeans editor and having awesomeness served to me on a plate.

  • Netbeans reads the DTD that you specified in an XML document and when you start typing an element name it will auto-complete for you or give the possibles if it can’t auto-pick one.
  • It can auto generate a CSS file from a DTD
  • It can auto generate an HTML documentation file from a DTD
  • It validates the XML for you

And no doubt a bunch of other stuff I haven’t found yet. My XML workflow just got a hell of a lot simpler and quicker.

Java FUD

There’s a great article sys-con.com called: Why Do ‘Cool Kids’ Choose Ruby or PHP to Build Websites Instead of Java?

I’ve been developing desktop and web apps in Java for a fair few years and I’m no Java-basher by any means. But when I’ve built stuff in my spare time I’ve always used PHP, so I guess I kinda fall into the article’s cool kids category. Before I give my reasons for not using Java for spare-time projects I thought I’d post some of the great FUD from the cool kids article:

PHP and Ruby etc are cool for building pages, but they are not ideal candidates for building middleware logic. Given that Java covers the “high end” of the spectrum well (where sophisticated processing is needed), wouldn’t it be great to use Java all the way?

PHP, Ruby etc not good for middleware logic? I’d say that as languages, Ruby and Python are ahead of Java in terms of functionality – they both have rock-solid OO support and functional programming features like closures that are still not in Java. PHP is a bit behind but as of version 5 it also has sold OO capabilities. It’s simple enough to write well-structured classes and build code using well-known design patterns using Ruby, Python or PHP so I really can’t see how they are not suitable for middleware.

Is it Java as a programming language too difficult to use, comparing with those scripting oriented interpreted languages? Yes, this maybe the reason.

WHAT THE FUCK? On syntax alone I’d say that Ruby is the most difficult to pick up. The only reason I would consider Java more difficult to learn is that it’s strong-typed and a beginner would have to learn about casting, generics and so on. And I guess the insistence on abstracting everything to the nth degree does make for more verbose and more difficult to learn and remember syntax. This is Java-snobbery in action.

JavaServer Faces: JSF is the new kid on the block. Is it going to make building websites easier? Probably not. It is designed for simplifying building form-based applications.

If there’s one thing that turned me off from Java web development it’s JSF. I just cannot buy into it at all. How anyone can say that JSF simplifies anything is beyond me. I know JSF2.0 fixes a lot of 1.x’s problems but boy were there a lot of problems. Tons of Javascript injected into in each page just to make the basics work. POST requests for everything, this beggar’s belief, it breaks basic navigation and made it impossible to bookmark a page. Duh.

The scripting languages are pretty easy to learn, and lack the complexity of Java (generics being an exquisite example of that). To learn Java, it’s not like just picking up a book and having all you need to begin developing. This is the polar opposite of scripting languages, where a short book or online tutorial will provide all you need to begin. After all, many people would rather die than learn something new. And Java takes some effort to master. Whereas with a scripting language, the basics are easy and then one simply needs to learn about other “packages” or plug-ins.

This is a snippet from the first comment and this is real FUD-gold. Generics an exquisite example of complexity? I think the commentor, raysea, needs to go and find out why generics don’t exist in Python, Ruby, etc. The rest of this comment is again pure Java snobbery.

OK, a lot of websites are fairly simple, mainly composed of markup pages, scripts and some lightweight logic on the server side, where PHP and Ruby are good for. Java maybe an overkill for such websites. But there are a lot of websites that are much more sophisticated than “lightweight” logic on the server side. For example, FaceBook was relatively simple initially, but now with FaceBook API and Platform, its complexity is growing. Why not use Java for such websites?

He uses Facebook as an example of a sophisticated Java app but this is such an extreme example it’s not worth thinking about. How many people are using Java to build sites with Facebook’s complexity and scalability requirements? Next to none. So where is this extra sophistication that Java provides being used? People use the example of intranet sites with lots of controls. Is that harder in Ruby? Nope. And besides, same question as before: how many people are building intranet sites versus extranet ones? I find it hard to see many examples where I would need Java to build a site.

So why do the cool kids shun Java web dev?

For me, it’s simple: Because the cool kids what to get things done quickly and cleanly and they know full-well that their Ruby, Python or PHP app running on Apache will fly. The other reason is that Java web frameworks have mostly become bloated monsters that abstract everything to the nth degree and required a lot of XML config whereas Rails, CakePHP and Django have mastered the art of quick and painless web dev.

I don’t doubt that Java running on Tomcat will outperform PHP on Apache but unless you are writing the next Twitter it really doesn’t matter – unless your app becomes super popular you are never going to reach the limit of a scripting languages performance.

Well, I’m going back to Java from PHP

Java’s saviour has arrived. The Play framework takes the best ideas from Rails etc and offers a Java framework that eschews complexity, configuration and bloat and lets you concentrate on the job in hand: building great webapps.

Rounded CSS corners in IE with no images and no Javascript.

Rounded corners are supported in Firefox and Safari using each browser’s custom CSS properties. IE doesn’t have one of those, so adding rounded corners to IE isn’t that easy.

The CSS3 spec does include a border-radius property, you can wait several years until all browsers support CSS3 and use that.

Or you can use this awesome solution from Benogle.com – it uses several DIVs with differing margins to produce the rounding effect. Really clever idea and is much simpler and quicker than using either Javascript or images.

http://blog.benogle.com/2009/04/29/css-round-corners/

Building a website: It’s all the little things

Developers always have an overly-optimistic view of how long something will take to code. Faced with a question of, “How long will it take to build a website that does X” the answer is more often that not, “Pffff, that’s easy, nothing complicated, two weeks”.

Yeah…….right.

Jeff Atwood wrote about this a while back after people were claiming that they could clone Stack Overflow in a weekend. His post talked about getting the user experience right as well as getting the code right.

I’ve been working on a new site over the last 6 weeks or so. It’s my first web app as such, everything I’ve built before is really just content delivery.

Of the 6 weeks I’ve spent on it – not full time, a couple of hours here and there in the evenings – a big percentage of my time has been spent doing non-coding stuff and coding around getting the user experience right. Getting the actual application bits of the site right was the quick part – all the stuff around it is what took the time.

It’s been an eye opener as to all the little things that are needed to get an app out into the wild:

  1. Buy or find a CSS/HTML theme.
  2. Buy a logo
  3. Find hosting
  4. Set up hosting
  5. Set up components on hosting (PHP, database, Apache, caches, directories, users, etc)
  6. Test on all supported browsers
  7. Secure code and server
  8. Security test
  9. Test failure of components (mainly DB gone away)
  10. Functional testing
  11. Deployment
  12. Tweak CSS/HTML/Javascript for browser compatibility
  13. Minify JS and CSS
  14. Create other graphics, screen shots
  15. Test performance
  16. Get Beta test feedback
  17. Marketing/PR

16 Cheat Sheets for web designers and developers

Cheat sheets has several benefits from saving you a lot of time  to also helping you improve your skills and productivity in that certain task.

They provide a great and quick reference and also helps your learn faster by showing all the necessary information needed. There are documentations, but they can sometimes be a hassle.

It is pretty hard to remember everything and thankfully, there are cheat sheets. So, here are the list of some of the most essential cheat sheets every web developer and designer should have.

The cheat sheet list on Pro Blog Design.

IllegalStateException: javax.faces.component.UIData. Perhaps you’re missing a tag?

If you are creating JSF pages and are getting an error like this:

java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@2c02699b not expected type.  Expected: javax.faces.component.UIData.  Perhaps you're missing a tag?
	com.sun.faces.taglib.html_basic.DataTableTag.setProperties(DataTableTag.java:265)
	javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:604)
	javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1126)
	com.sun.faces.taglib.html_basic.DataTableTag.doStartTag(DataTableTag.java:372)
	org.apache.jsp.steve_jsp._jspx_meth_h_005fdataTable_005f0(steve_jsp.java:125)
	org.apache.jsp.steve_jsp._jspService(steve_jsp.java:83)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
	com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
	org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

Then you need to make sure that you are surrounding your database-aware JSF controls with a <f:view></f:view> pair.

As a simple fix add <f:view> before the <html> tag and </f:view> after the </html> tag.

Thinking beyond the relationals

Relational databases, such as MySQL, PostgreSQL and various commercial products, have served us well for many years. Lately, however, there has been a lot of discussion on whether the relational model is reaching the end of its life-span, and what may come after it.

Should you care? Which database technology should you be using?

http://thinkvitamin.com/dev/should-you-go-beyond-relational-databases/

Create Vimeo-like top navigation

This tutorial shows you how to create a navigation bar like Vimeo’s. I’m not a big fan of drop-down menus on websites but I do really like the search box that’s created here – it has a drop-down menu that allows you to select the categories that you want to search in. It’s really clean and would save people having to click through to a advanced search page – I guess as well as having category options on it you could also include specifies like case sensitive, match phrase, etc.

http://www.jankoatwarpspeed.com/post/2009/01/19/Create-Vimeo-like-top-navigation.aspx

100 Free High-Quality XHTML/CSS Templates

If SmashingMagazine.com was a woman, I’d marry her, if it was a stray dog I’d take him in, feed him and give him a warm bed by the fire. I freaking love that website, it has so many useful posts and links it’s almost embarrassing.

This time we’ve got a great selection of free templates:

http://www.smashingmagazine.com/2008/12/01/100-free-high-quality-xhtmlcss-templates/