There are few front-end web developers I know who actually use the Eclipse editor for development. Whether it’s the complexity of the IDE or simply resistance to change I cannot say. Working with Eclipse on enterprise apps has some serious advantages when it comes to working in multidisciplinary teams. And wrenching on a UI is no exception.
As of late HTML5 is beginning to bear the shine of a recently waxed Tesla Roadster. It’s hard not to want to jump right in and hit the gas. But wait, the HTML5 spec is still in draft. Is it safe to turn over the ignition? Well, it depends. But here are 5 reasons to start using HTML5 now.
Last year when Eclipse Helios was released HTML5 didn’t validate within the IDE. But somewhere between that release and the latest Helios service release, support was added for actual native* *HTML5 elements in Eclipse, no plugin required! And you don’t need to be running Aptana either. Awesomesauce!
The following instructions will help Eclipse newcomers and experienced client-side developers alike get started, kinda like a big smokey burnout.
To get going
- Fire up the IDE.
- Select a workspace and create or import a project. If you’re just starting off, try creating a new Static Web Project named
HTML5with the default values (
Static Web Project, then click
- Create a new HTML File (
HTML File) using the HTML5 Template, available by selecting
Nextafter naming the new file and choosing
New HTML File (5), and choosing
If prompted during the process, choose to switch to the Web perspective. Once complete, you should should see something similar to the following:
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> </body> </html>
If you’re not satisfied with the limited characters displayable by the Latin-1 character set you can change the default encoding type for new template-based files from the Eclipse preferences by going to
HTML Files and choosing something else (psst, go for the
Save the new file and run it by choosing
Run As >
Run on Server. By default the internal Eclipse browser will be used. To change the default browser select
Web Browser, and select a different browser from the list.
Your battery should now be fully charged and ready to lay some rubber as you race into the future with HTML5 in Eclipse. Now go take a HTML5 test drive and see if you can get sideways.