HTML takes about half an hour to learn the basics. If you want to do advanced stuff, you can always (er, usually) look at the source to see how its done.
Once you know HTML, learning the basics of XML takes about another 5 minutes. Learning all about parsers and doms and all that could take a lot longer, but if you know some basic Java String manipulation, you can fake it from the 5 minute point (minus, it may (or may not) be more 'brittle') (plus it will run a lot faster, and if you wrote it it should be easy for you to maintain) (NB: the String class does the heavy lifting) (NBNB: this is in the context of small chunks of XML passed around as 'messages', not huge 100mb databases, mkay?)
Once you know HTML and Java String manipulation (ie what you get for free on the String class, not the abomination that is regex), it is a very very short leap to Servlets. The big hurdle for Servlets (and, in fact *all* web programming) is that they are stateless.
There's just no getting around this. Even with things like ASP.NET you still need to get over this hurdle. Its hard. The good news is, that everyone else has to jump the hurdle, and that in Java there is an easy way to do most things, so its the only real hard bit. (You can self inflict painful ways of doing things on yourself if you want - see JSP and all the myriad of JSP frameworks, masochists only need apply)
Use Apache/Tomcat/Netbeans to get up and running with Servlets fast. Most other Appservers are a collossal pain in the butt to install and configure (on the order of *weeks* as compared to *hours* for Tomcat).
As a programmer, you will probably find it easiest to do your HTML layout in Tables. Go and learn the table, tr, and td tags now if you don't already know them. You might also want to have something like a menu or menu bar, so in your next coffee break pick up an HTML book and learn frames.
Avoid JSP (why learn three languages (Java + JSP + HTML) when two (Java + HTML) will do???). Avoid any of the frameworks that build on JSP.
Learn JDBC. If you know SQL and ODBC this should be fairly easy. If you don't know SQL, invest in an SQL prototyping tool (such as MS Access - you can quickly mock up your tables, and then drag between them till you get the query you want, and then copy and paste the SQL into your code. If you don't know JDBC, look at the vendors help files for how to configure and call their particular flavour of JDBC driver. (NB: do not use any MS database to *store* your data - MS Access is flaky, and SQL Server likes to corrupt its indexes)
Total Time:
Time taken to learn Java + Time taken to grok stateless programming + 1-6 hours.
Todays lesson:
(a) JSP sux
(b) there is an easy way to do everything, use it
(c) JSP sux |