i'm a (pretty good?) web programmer by now, and i've amassed a bunch of skillz over my time served in the industry. i started working on perl cgi scripts in 1992 when nobody knew what the web was, let alone perl or cgi. i then moved on to java in 1995 when it arrived, and tried my hand at javascript in the first browsers that supported it. i remember creating my first site with frames and javascript rollovers back then, because the client wanted something modern and flashy. i coded a netscape server api library that accessed a database over odbc on a dec alpha running nt 3.51 when such things were cutting edge. you get the idea, i've been doing web applications for a long time now, over ten years anyway.
so, as you might have seen from the development environment posts, i'm also fluent in the latest java and java enterprise apis, and the associated libraries. things like struts, jsps, servlets, mysql/jdbc and so on. i'm even able to turn my hand to php when the need arises. what, though, can i do with this hard-won knowledge? i believe the official MBA term would be to monetize my skill set or something like that. oh, and i don't want to have to go to an office for 0900, wear a suit or interact with people on a daily basis.
the answer turns out to be freelance bit-work. i've been working from home on a web application for a friend's small business, and i thought there must be a lot of people in his situation. he wanted some custom software, but couldn't pay the tens of thousands of pounds for a full-scale j2ee solution, with oracle, weblogic, and all that kind of heavyweight server-based junk. i started looking at the rent-a-coder site to see what it was like, and found that there were plenty of likely candidates.
the other three sites that i'm registered on as a developer are: get a coder, get a freelancer and script-lance. so far, i have two projects active on rent-a-coder, and several projects that have reached the shortlist stage on get a coder. i'm not sure about the other two sites, but i'm bidding on them at the moment and will see what comes up. one problem i've noticed is that a lot of indian, chinese and eastern european developers and teams of developers use these sites. they seem to be able to put in extremely low prices, which is the benefit of offshore outsourcing, i guess, but makes it hard for me to be competitive and profitable.
anyway, i'm working on two projects right now, and the buyers seem really friendly and have been pretty clear about what they wanted, and accepted my advice about what was and wasn't possible. the sites encourage communication using their message boards/forums so that disputes and arbitration when a disagreement occurs about scope can be resolved by referring to what each party actually said. when a project starts, your IM alias is given out, and this makes simple back and forth chat easier, but i have been summarising any decisions on the site so there is a permanent record. one thing to watch out for is people trying to get their college assignments and homework done on the cheap. i worked for my degree (well, a little) and i have big problems with someone trying to submit work that they just paid someone else to do.
another type of project to avoid is the 'clone' request. this usually involves a (probably teenager) asking for a clone of amazon/ebay/myspace/insert-commercial-site-here and offering the princely sum of, say, fifty dollars. i wonder if they can even comprehend the amount of money that a company like amazon spends on their e-commerce web service? avoid! with regard to payment for real projects, the site will escrow the full bid amount from the buyer at the start. this means i am sure i'll get paid at the end (assuming i deliver an acceptable product...)
something i'd like to have clarified is the position on open source libraries. i believe that the GNU LGPL (lesser GNU public license) allows me to sell software that links to libraries with that license. also, since i provide source code for my app and unmodified binaries (which have freely downloadable source anyway) for libraries i use, i interpret the apache ASL (apache source license 2.0) as allowing me to distribute, say, jakarta commons httpclient with my application. i'd REALLY like to get this properly clarified.
the ebay sdk and api download seems to get away with distributing apache axis (the web services api, more on this and the ebay development platform some other time) and a whole load of jakarta commons libraries, so they must think it's legal, and in this case, i'm going to redistribute the ebay sdk anyway, so the licensing issues are theirs. it's a grey area though, and i need to be careful. i don't want richard stallman coming round to my house with a bunch of the FSF hired goons!
i'm really pleased with my discovery of rent-a-coder work, and i'm pretty sure it's a good way for me to make money doing something i enjoy. so far, admittedly, i haven't won any bids on the other sites so i'll just have to keep bidding, but at least i'm going to be productive. i'll update with some more information about my interactions with get a coder, get a freelance and script-lance when they happen, and also report on the outcome of my current projects when i'm finished.
the grkvlt irregular publishing mechanism - enterprise java, web development, information security, statistics and probability, gambling, book reviews and technology discussion, together at last!
01/03/2006
24/02/2006
fully organised
you may notice on my list of interesting links i have a pointer to a to-do list service. this is the rather splendid remember the milk site.
the site is one of the best to-do list managers on the web that i have come across. i have also looked at several others before making my mind up, and they each had their benefits. i mentioned tadalists from 37signals, and there is also voo2do. although these last two services provide task listings and management, both in a convenient AJAX-ified interface, where they fall down is integration.
anyway, i will go over the features and problems with all three services and explain my reasoning behind the choice of RTM as my to-do list manager in the following set of reviews:
i will start with Ta-da Lists, which is the first service i tried. it gives you a password protected custom URL to access your lists, as a sub-domain off their site. for instance, mine would be
the front page of your account shows you all the lists you have created, and these are marked with a bullet whose size indicates how many incomplete tasks are remaining in that list. from here you can add a new list or edit or delete existing lists. clicking on a list name takes you to the list of tasks. each task has an html form checkbox next to it, which will when checked, mark that item as completed immediately. an optional description can be added to a list to explain its purpose, and it is also possible to alter the order items are displayed, however that is as far as prioritising of individual items gets.
it is possible to share lists with other people, both publicly (read-only) and privately (full access). the person you are sharing with does not need a tadalists account, a special url is mailed to them for access. the other publishing options available are to email the list contents to your registered email address (only) and to export your list as an RSS feed.
to be fair, there are commercial offerings from 37signals, such as backapckit and bascamp hq, and they even have free trial versions available. these are more project management tools, and even the simplest, backpackit, just adds the ability to create notes and upload images, and doesn't improve on the todo list functions. basecamp is a much more complex product, and this actually gets in the way of managing simple lists, due to its concepts of milestones that must be assigned before being used.
although short, the FAQ list is a good resource, and there is also a page listing comments made about the application bu ysers, which should give you ideas on how to use it.
Remember The Milk is a much more polished application in terms of features, however it should be noted that it is apparently still a 'BETA' product. this, in and of itself, doesn't seem to mean much these days. google are forever producing applications like GMail and Groups that never seem to leave beta status but are perfectly usable. what it does suggest is that the creators are activley fixing bugs and seeking to improve and add new features, which can only be a good thing. the site was started in august v2004, and is run by a team of just three people.
your lists are accessed via a subdirectory from the main site, after you have logged in, and if you choose the 'remember me' cookie, you will always be redirected to your tasks overview page when you access the site. for those that find typing the whole url a pain, it can also be accessed as

a task can have as many tags as required added to it, to act as category filters or keywords when searching or grouping. it can also have a due date (which can be entered in english ('next tuesday', 'tomorrow') or as a standard date and time. tasks can also be set to repeat, using similar text options, and an estimate of the time required can be added. selected tasks may be prioritised from nothing through three different levels, and these are shown as coloured highlights. in addition tasks with date information will be formatted differently if they are due or overdue. you may also add text notes to a task with additional information, apparently without limit!
the smart list feature works the same as smart playlists in iTunes, and allows you to create a virtual task list of entries that fulfil some set of criteria, specified as a boolean expression. this is where tags are useful for assigning tasks to groups. usefully, on the overview page there is a 'tag soup' box, showing all tags attached to your tasks, sized according to number of tasks, priority and due data, giving you a quick visual reminder of what is most important.
the lists can also be shared, both publicly and with chosen subscribers, similar to tadalists, and also exported as an Atom feed. the feed can contain just a particular list, or all your tasks, and all feeds are auto-discoverable by most modern browsers. the most useful (for me) publishing feature is the iCal integration. this exports either all tasks, or just a particular list, as a webcal subscription for use by iCal on OS X. this means that your remember the milk tasks are then available on iSync and to any other application on your local computer that can access iCal. the shared feeds, webcals and your task pages are all protected by secure password authentication, unless you choose to make some of them fully publicly available.
as i mentioned earlier, due dates and times can be set for tasks, and RTM uses this information to send out reminders. it will send both a daily summary of your tasks, and also remind you just before the start time. this is all fully configurable in the settings page. additionally, reminders can be sent using IM (various clients and networks) and by text message (SMS) to mobile phones, including t-mobile in the UK. this raises the usefulness of the service by an order of magnitude. finally, if you don't like this technological nonsense, there is a weekly planner page, designed to be printed out with empty boxes to tick, and lots os space to scribble on with low-tech pencils! also, if you need to set up a new task while away from the web, you can email a message to a personalised address, and it will be added toy your tasks inbox for later editing.
really, the fact that there's a huge number of help pages rather than one short FAQ page (tadalists, i'm looking at you) should tell you all you need to know about the feature set, and if you look at the blog or forums you can find out what ever new features are planned and anything else you need to know. the current feature list is incredibly comprehensive, and should cover everything you want to do, however.
voo2do is the newest (i think) of the services i am reviewing, and was created by the authour for his personal use before making it publicly available. i discovered it while trying to find a better list service than tadalist, and was attracted to it because of the ajax type interface and the fact that it is project based, much like basecamp, but free and apparently simpler to use. the feature list has more in common with rememberthemilk, and tasks can be assigned priorities, due dates and have time estimates attached. however, they can also be allocated to a project. the project tasks can be managed by updating them with hours elapsed and setting current versus original duration estimates. these are used to track total time elapsed and remaining in a whole project composed of sub-tasks.
the task views are mainly arranged aroun due dates, and consist of historical (what you've done) and deadlines (what needs done this week). views, showing the tasks that fall due today, tomorrow etc. for each individual project are also available. the initial screen aggregates all of this information into a dashboard, showing all the high-priority tasks their dates with overdue items highlighted.
similarly to rememberthemilk, it is possible to email the server with a new task and have it added to a list. however, the area where voo2do excels over the other applications here is its programmability. it is the only application featured that allows REST web service access to all of its functions. this means that there are now a number of third party applications available that can poll your account for upcoming due tasks, or provide a windows GUI to add new tasks. the REST method of accessing a web service is also simple enough that it is possible to write basic scripts in shell, perl or python to access your task list. this makes voo2do potentially the most powerful application reviewed, although this is dependant on the userbase writing these useful add-ons and scripts, and we will need to wait and see whether this happens?
something that appears to be missing is automatic notifications, using any out-of-band mechanism. the only way to check task and project status is to log in, which is not always possible. the status diusplays are also very cluttered, with too many form controls visible, and lacking the smooth design that we have grown used to with most modern web applications. this mkay be a nescessity brought on by the complexity of the project and time tracking features, but a cleaner printout would have been easy to achieve with alternate stylesheets, rather than printing out the unnecessary screen chrome.
voo2do also makes use of keyboard shortcuts, and is very much a web 2.0 application, with new features being added all the time. there is a blog published with information and notes written by the author, and documentation on the API for programmers. however, i found it quite hard to get started using, mainly because new accounts are not initially populated with projects and it is unclear what the best way of implementing personal tasks are, since i don't usually assign shopping or tidying to a project. i can see this being useful to contracters or freelance workers who need to manage their time, and are willing to invest in setting things up. it should also appeal to anyone who wants to expand the features or integrate it into an existying project setup using the API.
after all these complex systems, sometimes the simplicity of a one-page web form is refreshing. HassleMe was first written as a script by the creators of mysociety to encourage them to update their development blog. this then mutated into a public site offering the same features. essentially it is a scheduled email reminder service, although not too scheduled, in case it gets too easy to ignore.
simply fill in the self explanatory (although there is a FAQ) form, and you will be reminded 'approximately' after every specified interval by an email with whatever you wanted hassled to do. the software took two afternoons to write, but does its one job perfectly, so there's little elso to say. it doesn't even require registration!
in my opinion, rememberthemilk is the best of these applications, particularly if you are a Macintosh user, due to the excellent iCal integration. the options for task settings and searching are well thought out, and the system is easy to use and understand, as well as being the most professional looking of the four (sorry, HassleMe!). since all of these systems are free, though, i would suggest you grab an account at each of them, have a play and see what suits you best.
and, if you think i'm wrong about rememberthemilk, or there are any other similar applications that i've missed, just add a comment and let me know...
the site is one of the best to-do list managers on the web that i have come across. i have also looked at several others before making my mind up, and they each had their benefits. i mentioned tadalists from 37signals, and there is also voo2do. although these last two services provide task listings and management, both in a convenient AJAX-ified interface, where they fall down is integration.
anyway, i will go over the features and problems with all three services and explain my reasoning behind the choice of RTM as my to-do list manager in the following set of reviews:
reviews of free web-based to-do list managers
i will start with Ta-da Lists, which is the first service i tried. it gives you a password protected custom URL to access your lists, as a sub-domain off their site. for instance, mine would be
http://grkvlt.tadalist.com/
which is easy to remember. the list functionality is fairly rudimentary, only allowing you to add tasks and attach notes. there is no concept of a repeating task or a due date. this functionality is available in thir commercial offering, backpack however. the user interface is simplicity itself, since there are very few functions, and the use of AJAX in-place editing makes adding and removing list items and lists incredibly easy. overall, the site design is very polished and attractive, and renders properly in all browsers that i tested it with.the front page of your account shows you all the lists you have created, and these are marked with a bullet whose size indicates how many incomplete tasks are remaining in that list. from here you can add a new list or edit or delete existing lists. clicking on a list name takes you to the list of tasks. each task has an html form checkbox next to it, which will when checked, mark that item as completed immediately. an optional description can be added to a list to explain its purpose, and it is also possible to alter the order items are displayed, however that is as far as prioritising of individual items gets.
it is possible to share lists with other people, both publicly (read-only) and privately (full access). the person you are sharing with does not need a tadalists account, a special url is mailed to them for access. the other publishing options available are to email the list contents to your registered email address (only) and to export your list as an RSS feed.
to be fair, there are commercial offerings from 37signals, such as backapckit and bascamp hq, and they even have free trial versions available. these are more project management tools, and even the simplest, backpackit, just adds the ability to create notes and upload images, and doesn't improve on the todo list functions. basecamp is a much more complex product, and this actually gets in the way of managing simple lists, due to its concepts of milestones that must be assigned before being used.
although short, the FAQ list is a good resource, and there is also a page listing comments made about the application bu ysers, which should give you ideas on how to use it.
Ta-da Lists
provides a very simple task list manager, which is suitable for static checklists, very easy to use, static lists only, limited export capability, no reminders
provides a very simple task list manager, which is suitable for static checklists, very easy to use, static lists only, limited export capability, no reminders
three out of five cats preferred tadalists
Remember The Milk is a much more polished application in terms of features, however it should be noted that it is apparently still a 'BETA' product. this, in and of itself, doesn't seem to mean much these days. google are forever producing applications like GMail and Groups that never seem to leave beta status but are perfectly usable. what it does suggest is that the creators are activley fixing bugs and seeking to improve and add new features, which can only be a good thing. the site was started in august v2004, and is run by a team of just three people.
your lists are accessed via a subdirectory from the main site, after you have logged in, and if you choose the 'remember me' cookie, you will always be redirected to your tasks overview page when you access the site. for those that find typing the whole url a pain, it can also be accessed as
http://rtmilk.com/
. once at the overview page, it is possible to see all your tasks, or view them in groups. the groups can simply be labels for a list of tasks or a 'smart' list, based on a saved search you specify. these are all shown in a familiar tabbed interface. once a tab is selected, tasks can then be added to that list. initially, no options are set for the new tasks, but it is possible to set these up later. one small issue is that selecting individual tasks by clicking on them is confusing - the checkboxes for other tasks are not deselected, and it is sometimes unclear which selected task will be edited when you only want to alter details on one. the rest of the user interface is fairly easy to understand, and accessibility features like keyboard shortcuts (c.f. GMail) have been added.)
sample rememberthemilk screenshot
a task can have as many tags as required added to it, to act as category filters or keywords when searching or grouping. it can also have a due date (which can be entered in english ('next tuesday', 'tomorrow') or as a standard date and time. tasks can also be set to repeat, using similar text options, and an estimate of the time required can be added. selected tasks may be prioritised from nothing through three different levels, and these are shown as coloured highlights. in addition tasks with date information will be formatted differently if they are due or overdue. you may also add text notes to a task with additional information, apparently without limit!
the smart list feature works the same as smart playlists in iTunes, and allows you to create a virtual task list of entries that fulfil some set of criteria, specified as a boolean expression. this is where tags are useful for assigning tasks to groups. usefully, on the overview page there is a 'tag soup' box, showing all tags attached to your tasks, sized according to number of tasks, priority and due data, giving you a quick visual reminder of what is most important.
the lists can also be shared, both publicly and with chosen subscribers, similar to tadalists, and also exported as an Atom feed. the feed can contain just a particular list, or all your tasks, and all feeds are auto-discoverable by most modern browsers. the most useful (for me) publishing feature is the iCal integration. this exports either all tasks, or just a particular list, as a webcal subscription for use by iCal on OS X. this means that your remember the milk tasks are then available on iSync and to any other application on your local computer that can access iCal. the shared feeds, webcals and your task pages are all protected by secure password authentication, unless you choose to make some of them fully publicly available.
as i mentioned earlier, due dates and times can be set for tasks, and RTM uses this information to send out reminders. it will send both a daily summary of your tasks, and also remind you just before the start time. this is all fully configurable in the settings page. additionally, reminders can be sent using IM (various clients and networks) and by text message (SMS) to mobile phones, including t-mobile in the UK. this raises the usefulness of the service by an order of magnitude. finally, if you don't like this technological nonsense, there is a weekly planner page, designed to be printed out with empty boxes to tick, and lots os space to scribble on with low-tech pencils! also, if you need to set up a new task while away from the web, you can email a message to a personalised address, and it will be added toy your tasks inbox for later editing.
really, the fact that there's a huge number of help pages rather than one short FAQ page (tadalists, i'm looking at you) should tell you all you need to know about the feature set, and if you look at the blog or forums you can find out what ever new features are planned and anything else you need to know. the current feature list is incredibly comprehensive, and should cover everything you want to do, however.
Remember The Milk
provides an excellent, full-featured reminders and tasks service, many useful notification options and methods, useful smart grouping and searching functionality, accessible using iCal, simple to use with extensive help, extras like sms/im notification and contact lists.
provides an excellent, full-featured reminders and tasks service, many useful notification options and methods, useful smart grouping and searching functionality, accessible using iCal, simple to use with extensive help, extras like sms/im notification and contact lists.
five out of five cats preferred rememberthemilk
voo2do is the newest (i think) of the services i am reviewing, and was created by the authour for his personal use before making it publicly available. i discovered it while trying to find a better list service than tadalist, and was attracted to it because of the ajax type interface and the fact that it is project based, much like basecamp, but free and apparently simpler to use. the feature list has more in common with rememberthemilk, and tasks can be assigned priorities, due dates and have time estimates attached. however, they can also be allocated to a project. the project tasks can be managed by updating them with hours elapsed and setting current versus original duration estimates. these are used to track total time elapsed and remaining in a whole project composed of sub-tasks.
the task views are mainly arranged aroun due dates, and consist of historical (what you've done) and deadlines (what needs done this week). views, showing the tasks that fall due today, tomorrow etc. for each individual project are also available. the initial screen aggregates all of this information into a dashboard, showing all the high-priority tasks their dates with overdue items highlighted.
similarly to rememberthemilk, it is possible to email the server with a new task and have it added to a list. however, the area where voo2do excels over the other applications here is its programmability. it is the only application featured that allows REST web service access to all of its functions. this means that there are now a number of third party applications available that can poll your account for upcoming due tasks, or provide a windows GUI to add new tasks. the REST method of accessing a web service is also simple enough that it is possible to write basic scripts in shell, perl or python to access your task list. this makes voo2do potentially the most powerful application reviewed, although this is dependant on the userbase writing these useful add-ons and scripts, and we will need to wait and see whether this happens?
something that appears to be missing is automatic notifications, using any out-of-band mechanism. the only way to check task and project status is to log in, which is not always possible. the status diusplays are also very cluttered, with too many form controls visible, and lacking the smooth design that we have grown used to with most modern web applications. this mkay be a nescessity brought on by the complexity of the project and time tracking features, but a cleaner printout would have been easy to achieve with alternate stylesheets, rather than printing out the unnecessary screen chrome.
voo2do also makes use of keyboard shortcuts, and is very much a web 2.0 application, with new features being added all the time. there is a blog published with information and notes written by the author, and documentation on the API for programmers. however, i found it quite hard to get started using, mainly because new accounts are not initially populated with projects and it is unclear what the best way of implementing personal tasks are, since i don't usually assign shopping or tidying to a project. i can see this being useful to contracters or freelance workers who need to manage their time, and are willing to invest in setting things up. it should also appeal to anyone who wants to expand the features or integrate it into an existying project setup using the API.
voo2doo
a project focussed task manager with excellent REST API based extensibility. initially cumbersome and aesthetically lacking, but has some very good time tracking and management features not found anywhere else, but no reminder facilities.
a project focussed task manager with excellent REST API based extensibility. initially cumbersome and aesthetically lacking, but has some very good time tracking and management features not found anywhere else, but no reminder facilities.
three out of five cats preferred voo2do
HassleMe
after all these complex systems, sometimes the simplicity of a one-page web form is refreshing. HassleMe was first written as a script by the creators of mysociety to encourage them to update their development blog. this then mutated into a public site offering the same features. essentially it is a scheduled email reminder service, although not too scheduled, in case it gets too easy to ignore.
simply fill in the self explanatory (although there is a FAQ) form, and you will be reminded 'approximately' after every specified interval by an email with whatever you wanted hassled to do. the software took two afternoons to write, but does its one job perfectly, so there's little elso to say. it doesn't even require registration!
summary
in my opinion, rememberthemilk is the best of these applications, particularly if you are a Macintosh user, due to the excellent iCal integration. the options for task settings and searching are well thought out, and the system is easy to use and understand, as well as being the most professional looking of the four (sorry, HassleMe!). since all of these systems are free, though, i would suggest you grab an account at each of them, have a play and see what suits you best.
- sign up for Tadalist
- sign up for Remember The Milk
- sign up for voo2do
- sign up for HassleMe
and, if you think i'm wrong about rememberthemilk, or there are any other similar applications that i've missed, just add a comment and let me know...
19/02/2006
development environment (two)
(note: this is part two of a series on developing java enterprise applications. part one deals with the tools used to set up your development environments.)
the current project i'm working on requires a number of external libraries for its functionality. i use open source projects from apache's jakarta and the jakarta commons projects for many of these features, but there is a lot of good, quality OSS code around. the application i'm working on is a web based service, running under tomcat. i will go through each of the packages it depends on and explain why i chose and use them.
apache struts is an MVC (model-view-controller pattern) framework. the current release version is 1.2.8 and it has been around for long enough that there are many good books available.
the struts project is currently undergoing a revision, and will be split into two frameworks, action (much like the current version) and shale (which will integrate with sun's JSF presentation layer) as well. currently, the 1.2.8 release is likely to remain useful and stable, and i would not recommend using any of the forked versions until they have more support and documentation avaialable.
in terms of books, the two i would recommend are both part of the o'reilly java series: jakarta struts cookbook
by bill siggelkow and programming jakarta struts
by chuck cavaness. the documentation and javadocs are available on the jakarta site.
struts implements the front controller pattern, and is mainly concerned with the C of MVC. the model and presentation layers are up to you. the controller is based on the concept of actions, which are invoked from the struts action servlet, usually by any URL ending in
in general, struts is a very nice framework, particularly since you can mix and match any other model and presentation frameworks you want. many, many commercial sites use struts - look for the tell-tale
this was a difficult choice. i knew that i didn't want anything to do with real J2EE and the mindless tedium that is developing EJBs (ie writing tons of boilerplate template code for home, remote, whatever interfaces) and anyway i don't want to be running a heavyweight app-server. Resin (a lightwight J2EE container from Caucho Software) and JBoss (the de facto standard OSS app-server) are overkill. i didn't contemplate BEA WebLogic, IBM WebSphere, Oracle AS etc. for even a moment - they are all hugely expensive too, as well as requiring more cpu power than i or my client have available.
basically, torque is a spin-off from the turbine project, and now forms part of the Apache DB project, which is an attempt to produce a completely open-source database system by the apache organisation. this includes DDL (the data description language), an XML dialect for specifying relational database schemas. the torque system parses a DDL definitionj file, and produces a java object model. the model is provided as a set of SQL files used to create the database tables in whichever dialect of SQL you require, and a set of java source files implementing the model. the generation of the model and SQL is easily autyomated, and a
the objects created follow the JavaBeans standards, and come in two types. there are the actual model objects, which have get/set methods for the database columns in whatever table the object is represented by, and peer objects, which implement finder methods. the peers use torque criteria objects to specify which bits of the model to retrieve from the database and populate the model with, and can handle complex 1:n, 1:1 and m:n relationships. it is also possible to feed straight SQL to a criteria. the model and peer objects are defined as super classes, and a set of empty sub-classes extending them are made available for you to use in your project, and add any convenience methods you require.
generation and runtime configuration are accomplished by
i particularly like torque because the only configuration required is the DDL, and the database connection details at runtime. the object model code is auto-generated, so you only need to write out your database definition once. for example, hibernate needs the database SQL to be written, the hibernate mapping configuration to be written in an XML file, and the model beans to be coded, which involves repeating the same list of fields three times, with different implementations, and hoping they all match. plus if you were to alter a table, those three files all need modified, with torque, just run the generator again after updating the DDL. spring just adds another configuration file representing the same data... (yes, i know things like xdoclet go some way towards solving this, but it's still complex, and just something else to learn.
i'm not sure how scalable torque is, but for a small webapp with a few users, i think it should be fine, and i believe turbine was designed as an enterprise class system, so you should be safe.
this is the best-of-breed standard java enterprise logging library. it is part of the Apache Logging project, available here. there are actually various implementations, in .NET, C++, Perl and several others, all using the same compatible API and output. configuring log4j can be problematic, since may j2ee containers and application servers also use it, and class-loader issues can prevent the library being loaded correctly. the onjava site has a good discussion of the problem, and it's solutions.
(note: this is not to be confused with commons logging, which is a super-api for many logging services. logging using log4j under the commons-logging framework will be covered later in this series.)
i need to have jobs that run, producing reports and emailing messages and information to users and administrators on a regular basis. quartz is developed by OpenSymphony and has been open sourced recently. it provides job/task scheduling for enterprise java systems, with facilities for triggers and schedules, including a cron-style trigger. this uses the same configuration options as the standard Unix crontab file, with a few extra selectors for ranges and last-n of month, third-m of month etc. i haven't added the scheduler to my current project, but this project appears to include everything i could ever need. there's also part of a soon to be published book, written by struts and j2ee developer and author chuck cavaness available for free download.
an important part of a webapp for businesses is reporting. it's all very well to present data in HTML tables, but this is not easily exported into other applications for analysis. sometimes formatting your data as a comma-separated or tab-separated file is sufficient, but i prefer to output Microsoft Excel workbooks directly, and so do most users. the apache POI project provides apis to manipulate and generate DOC, XLS and PPT files. i used the HSSF (horrible spreadsheet format, by the way) routines to produce excel sheets with tabular data returned by an SQL query on a database. the code is extremely simple if all you want is numbers and text in boxes, and often that's all that the users need - they can pretty it up themselves. the api allows a lot more than this, though, and in my current project i'd like to take this a step further and start formatting the cells appropriately, and maybe even insert formulas and colours/lines to produce a sheet that can be printed out or used immediately.
related to the generation of MS Office documents is Adobe PDF file generation. there are a couple of options here that i have yet to fully explore. the iText library seems fairly basic, but there is a lot of good documentation and tutorials. for a more complex solution, XSL formatting objects may be the way to go. the Apache FOP project implements this.
the next installment of this series will deal with some more libraries, including many of the Jakarta Commons sub-projects. hopefully you found this information useful, but let me know if you think i missed anything or got something wrong...
the current project i'm working on requires a number of external libraries for its functionality. i use open source projects from apache's jakarta and the jakarta commons projects for many of these features, but there is a lot of good, quality OSS code around. the application i'm working on is a web based service, running under tomcat. i will go through each of the packages it depends on and explain why i chose and use them.
struts
apache struts is an MVC (model-view-controller pattern) framework. the current release version is 1.2.8 and it has been around for long enough that there are many good books available.
the struts project is currently undergoing a revision, and will be split into two frameworks, action (much like the current version) and shale (which will integrate with sun's JSF presentation layer) as well. currently, the 1.2.8 release is likely to remain useful and stable, and i would not recommend using any of the forked versions until they have more support and documentation avaialable.
in terms of books, the two i would recommend are both part of the o'reilly java series: jakarta struts cookbook
struts implements the front controller pattern, and is mainly concerned with the C of MVC. the model and presentation layers are up to you. the controller is based on the concept of actions, which are invoked from the struts action servlet, usually by any URL ending in
.do
and are defined declaratively. in fact, the whole of the struts configuration is done this way, from a single (or multiple, if required) XML file. this specified the forms, their contents and the actions that process them, as well as any exceptions that may occur, message resources, plug-ins and forwards. forwards are struts mechanism for separating the presentation layer from the controller, and allow you to give a name to a a JSP or HTML file, that an action will then forward to. this way, you can change what the forward points to without re-coding your actions.in general, struts is a very nice framework, particularly since you can mix and match any other model and presentation frameworks you want. many, many commercial sites use struts - look for the tell-tale
.do
extensions on pages that perform the business functions in the site. for example, Blogger uses this, as do Sony Austrailia and Yell to name just three.torque
this was a difficult choice. i knew that i didn't want anything to do with real J2EE and the mindless tedium that is developing EJBs (ie writing tons of boilerplate template code for home, remote, whatever interfaces) and anyway i don't want to be running a heavyweight app-server. Resin (a lightwight J2EE container from Caucho Software) and JBoss (the de facto standard OSS app-server) are overkill. i didn't contemplate BEA WebLogic, IBM WebSphere, Oracle AS etc. for even a moment - they are all hugely expensive too, as well as requiring more cpu power than i or my client have available.
basically, torque is a spin-off from the turbine project, and now forms part of the Apache DB project, which is an attempt to produce a completely open-source database system by the apache organisation. this includes DDL (the data description language), an XML dialect for specifying relational database schemas. the torque system parses a DDL definitionj file, and produces a java object model. the model is provided as a set of SQL files used to create the database tables in whichever dialect of SQL you require, and a set of java source files implementing the model. the generation of the model and SQL is easily autyomated, and a
build.xml
ant file is provided that can be imported into your projects build process.the objects created follow the JavaBeans standards, and come in two types. there are the actual model objects, which have get/set methods for the database columns in whatever table the object is represented by, and peer objects, which implement finder methods. the peers use torque criteria objects to specify which bits of the model to retrieve from the database and populate the model with, and can handle complex 1:n, 1:1 and m:n relationships. it is also possible to feed straight SQL to a criteria. the model and peer objects are defined as super classes, and a set of empty sub-classes extending them are made available for you to use in your project, and add any convenience methods you require.
generation and runtime configuration are accomplished by
.properties
files, which specify the dialect of SQL used, and a connection to a database. at runtime, the only thing required is to call Torque.init(properties-file)
somewhere in your applications startup code. from then on, you can use the model and peer objects as desired, loading your data from the peer's finder methods, and calling .save()
on the model objects to update them.i particularly like torque because the only configuration required is the DDL, and the database connection details at runtime. the object model code is auto-generated, so you only need to write out your database definition once. for example, hibernate needs the database SQL to be written, the hibernate mapping configuration to be written in an XML file, and the model beans to be coded, which involves repeating the same list of fields three times, with different implementations, and hoping they all match. plus if you were to alter a table, those three files all need modified, with torque, just run the generator again after updating the DDL. spring just adds another configuration file representing the same data... (yes, i know things like xdoclet go some way towards solving this, but it's still complex, and just something else to learn.
i'm not sure how scalable torque is, but for a small webapp with a few users, i think it should be fine, and i believe turbine was designed as an enterprise class system, so you should be safe.
log4j
this is the best-of-breed standard java enterprise logging library. it is part of the Apache Logging project, available here. there are actually various implementations, in .NET, C++, Perl and several others, all using the same compatible API and output. configuring log4j can be problematic, since may j2ee containers and application servers also use it, and class-loader issues can prevent the library being loaded correctly. the onjava site has a good discussion of the problem, and it's solutions.
(note: this is not to be confused with commons logging, which is a super-api for many logging services. logging using log4j under the commons-logging framework will be covered later in this series.)
quartz
i need to have jobs that run, producing reports and emailing messages and information to users and administrators on a regular basis. quartz is developed by OpenSymphony and has been open sourced recently. it provides job/task scheduling for enterprise java systems, with facilities for triggers and schedules, including a cron-style trigger. this uses the same configuration options as the standard Unix crontab file, with a few extra selectors for ranges and last-n of month, third-m of month etc. i haven't added the scheduler to my current project, but this project appears to include everything i could ever need. there's also part of a soon to be published book, written by struts and j2ee developer and author chuck cavaness available for free download.
poi
an important part of a webapp for businesses is reporting. it's all very well to present data in HTML tables, but this is not easily exported into other applications for analysis. sometimes formatting your data as a comma-separated or tab-separated file is sufficient, but i prefer to output Microsoft Excel workbooks directly, and so do most users. the apache POI project provides apis to manipulate and generate DOC, XLS and PPT files. i used the HSSF (horrible spreadsheet format, by the way) routines to produce excel sheets with tabular data returned by an SQL query on a database. the code is extremely simple if all you want is numbers and text in boxes, and often that's all that the users need - they can pretty it up themselves. the api allows a lot more than this, though, and in my current project i'd like to take this a step further and start formatting the cells appropriately, and maybe even insert formulas and colours/lines to produce a sheet that can be printed out or used immediately.
related to the generation of MS Office documents is Adobe PDF file generation. there are a couple of options here that i have yet to fully explore. the iText library seems fairly basic, but there is a lot of good documentation and tutorials. for a more complex solution, XSL formatting objects may be the way to go. the Apache FOP project implements this.
the next installment of this series will deal with some more libraries, including many of the Jakarta Commons sub-projects. hopefully you found this information useful, but let me know if you think i missed anything or got something wrong...
16/02/2006
migration - new and improved
i've decided to change my weblog provider. the blog is now hosted by Blogger, a Google subsidiary, instead of livejournal. Blogger has a bit more of a 'serious' reputation than LJ (it doesn't keep asking about how i'm feeling, like an insecure teenage girl in the middle of a relationship crisis, for instance!) the customisation options also seem a lot better, and it has full API access via an Atom XML-RPC / HTTP interface.
the templates for page design are also much more flexible - the CSS / HTML is fully editable and i'm still tweaking the layout options. so far i'm very impressed with the functionality and customisation options. i expect to produce the same high quality random text that i always have, but with better fonts and prettier design.update your bookmarks for consonants to this URL:
i'll be continuing the development environment article here in the next few days...
the templates for page design are also much more flexible - the CSS / HTML is fully editable and i'm still tweaking the layout options. so far i'm very impressed with the functionality and customisation options. i expect to produce the same high quality random text that i always have, but with better fonts and prettier design.update your bookmarks for consonants to this URL:
http://grkvlt.blogspot.com
i'll be continuing the development environment article here in the next few days...
09/02/2006
interface or class?
this post is about some stuff i discovered is possible, using only standard 100% java, to add functionality to interfaces.
i'm assuming you all have a good grounding in OOP and understand inheritance and interfaces and so on. in particular, the java object model is a tree, starting with
since java only allows single-inheritance, interfaces are used to allow a class to extend some parent class and still conform to multiple other method signatures or contracts. however, if you have developed an interface that must be implemented by a large number of your classes, and these classes must also extend some different parent to inherit required functionality, it can be a pain to have to write the same implementation of an interface method many times. what you would like to do is have interfaces that don't just specify method signatures, but actually contain the code for an implementation of those methods that can then be called on any implementing class. sadly this is not possible - an interface cannot contain any Java code.
all is not lost, though, since it is possible to define a nested inner class as part of your interface. an inner class is just like a standard class definition, except it is nested in the code for another class. inner interfaces are also possible, but not discussed here. what i discovered is that it is possible to write a number of method implementations, fields, static initialisers and so on in this inner class, and when compiled, any object that implements the interface will also have access to them, and present them to other classes depending on visibility. here is an example... suppose we have an interface
but, we also want all
so, this interface now has the inner class added. in order to see how it works, we will need to write a test program that implements the interface and then try accessing some of the inner class methods. the implementation is simple, just write the body for the two methods declared by
with this class we ought to be able to call both the
and when compiled, the output from the
this is pretty much as expected. the inner class methods are called on the
i think this is probably an abuse of the java object system, and certainly not "best practice" for OOP in any way, but it may be helpful for some situations where you want to avoid repeated boilerplate code and need the benefits of inheritance for utility methods but your objects must descend from a library class, and interfaces are the only extension point available. one thing to bear in mind, however, is that the nested inner class methods are treated by the compiler as
happy coding!
i'm assuming you all have a good grounding in OOP and understand inheritance and interfaces and so on. in particular, the java object model is a tree, starting with
java.lang.Object
and descending down by way of child classes that extend this base or root class. these sub-classes can only extend one parent class, however they can implement several interfaces. an interface is a statement of an API contract that must be fulfilled by the implementing object. it usually consists of a number of public methods that will be written by the developer as part of the new object. for example, the java.lang.Runnable
interface (for thread creation) requires that the object have a public void run()
method. this means that any object where (o instanceof Runnable)
is true will be able to have o.run()
called on it. similar to interfaces are abstract classes, which are like ordinary objects, but with some methods declared using the abstract
keyword. these methods must then be implemented by any child classes that extend it.since java only allows single-inheritance, interfaces are used to allow a class to extend some parent class and still conform to multiple other method signatures or contracts. however, if you have developed an interface that must be implemented by a large number of your classes, and these classes must also extend some different parent to inherit required functionality, it can be a pain to have to write the same implementation of an interface method many times. what you would like to do is have interfaces that don't just specify method signatures, but actually contain the code for an implementation of those methods that can then be called on any implementing class. sadly this is not possible - an interface cannot contain any Java code.
all is not lost, though, since it is possible to define a nested inner class as part of your interface. an inner class is just like a standard class definition, except it is nested in the code for another class. inner interfaces are also possible, but not discussed here. what i discovered is that it is possible to write a number of method implementations, fields, static initialisers and so on in this inner class, and when compiled, any object that implements the interface will also have access to them, and present them to other classes depending on visibility. here is an example... suppose we have an interface
Kitten
which defines methods public String getText()
and public void doSomething()
. the code looks like this:public interface Kitten {
public String getText();
public void doSomething();
}
but, we also want all
Kitten
objects to have access to some utility methods public void doMore(String s)
and public String findOut()
. These could be added to the interface signature, and implemented by any class that implements Kitten
, but instead we will add an inner class called Helpful
and a reference to it in the outer interface, as follows:public interface Kitten {
public String getText();
public void doSomething();
public Helpful h = new Helpful();
public class Helpful {
private String THING = "java interfaces";
public void doMore(String s) {
System.out.println("doing more with " + s);
}
public String findOut() {
return THING;
}
}
}
so, this interface now has the inner class added. in order to see how it works, we will need to write a test program that implements the interface and then try accessing some of the inner class methods. the implementation is simple, just write the body for the two methods declared by
Kitten
, for instance:public class Potato implements Kitten {
// we could also add "extends Whatever"
public String getText() {
return "this is some text!";
}
public void doSomething() {
for (int i = 0; i < 3; i++)
System.out.println("stage " + i);
}
}
with this class we ought to be able to call both the
Kitten
and the Helpful
methods, so we should write a test class to demonstrate:public class Test {
public static void main(String[] argv) {
Potato p = new Potato();
System.out.println(p.getText()); // Kitten
p.doSomething(); // Kitten
p.h.doMore("string"); // Helpful
System.out.println(p.h.findOut()); // Helpful
}
}
and when compiled, the output from the
Test
class is as follows:$ javac Test.java
$ java Test
this is some text!
stage 0
stage 1
stage 2
doing more with string
java interfaces
this is pretty much as expected. the inner class methods are called on the
Helpful
instance h
that is part of the interface specification. they could also be called directly. for example, if there was a static method in Helpful
named doThis()
, it could be called from anywhere inside a class implementing Kitten
as Helpful.doThis()
or from anywhere else in your code as simply Kitten.Helpful.doThis()
.i think this is probably an abuse of the java object system, and certainly not "best practice" for OOP in any way, but it may be helpful for some situations where you want to avoid repeated boilerplate code and need the benefits of inheritance for utility methods but your objects must descend from a library class, and interfaces are the only extension point available. one thing to bear in mind, however, is that the nested inner class methods are treated by the compiler as
static
and there may be scope issues with access to the parent class. this could be worked around by passing a reference to this
into some of the methods, or similar tactics.happy coding!
08/02/2006
development environment (one)
i've been quite busy lately developing a web application for a friend's small business. in doing so, i've discovered (re-discovered) a good set of tools, and i think i now have the best dev-env that i can manage for free. so, this blog is a discussion and description of what my setup is like and what tools i'm using and why...
i use Apple Macintosh computers almost exclusively now (a G4 15" powerbook, from my friend gav, who died last year and left it to me. thanks. you're still remembered...) and the only thing that bugs me is the single-button mouse, and the fact that one has to control-click to access context menus etc. anyway, i recently invested in a microsoft notebook mouse, a small two button plus scroll-wheel optical USB mouse (about 33% the size of a standard mouse). this simply works just like you'd hope it would, ie. the right mouse button is the equivalent of control-clicking, and pops up the context menu for the item you click on, in the finder, java applications, eclipse, whatever. the scroll-wheel also works exactly like windows, and both of these features have raised my productivity no end. the trackpad on a laptop is inherently tricky as it is, and i'm glad to be rid of it.
in terms of software, i had always used vi on Unix systems, which i learned in university, and graduated on to vim eventually, since it's also available for XP. however I recently tried the Sun NetBeans 4.1 IDE and really liked it. i then got Eclipse 3.1 (originally from IBM) for OS X and installed it to try with my current project, since there seemed to be more plug-ins available for it. i really like both of them, having used Microsoft Visual Studio on XP, and find they are quite similar. (as an aside, although VS2005 is quite expensive, and the free .NET command-line tools provided with the SDK are OK, Microsoft have now made available Express Edition of VS for C#, VB and even C++ for free, as in beer, for at least the next year.) anyway, of the two open source IDEs, i think i prefer the way Eclipse works, with its views and perspectives and enormous collection of editor and environment plug-ins.
in my development setup, i use Eclipse with the standard set of web and enterprise plug-ins. these are all packaged together as the Web Tools Platform or WTP. this gives me XML, HTML, CSS, JSP, and many more editors and views. because of this, i can now edit all the files in my web application with an Eclipse native editor and integrated debugging, error reporting/detection and validation (except for JSPs, since the editor doesn't handle taglibs that are imported with a
directive in a sub-fragment included in the main page using a
directive. this is perfectly legal in the JSP spec, since the include directive is processed before compilation (like
tag and similar, which are processed at runtime. this means that my struts JSPs which use the html, bean and logic taglibs all show up with warnings, since the editor can't see the included taglib declaration. all quite annoying, and i had to turn off JSP validation, although that still doesn't always work. i tried a bunch of other plug-ins, but the better ones were all 30-day trials of commercial software (MyEclipse, EnterpriseWorkbence, ExpressWorkshop etc.) or poorly integrated and incomplete. the WST project is the official Eclipse set of J2EE/Web editing tools, originally the IBM Web Tools for Eclipse product, and is currently at version 1.5 and works fine for my purposes.
other Eclipse features i like are the ant integration and incremental compilation. i use Apache ant as my build mechanism because it allows me to do command-line builds and also deployment and other tasks in a repeatable way. i have tasks set up for compilation, war creation, database creation, code generation, revision control, backups and app-server deployment. Eclipse has an ant view that shows all available targets and an editor for your
the next plug-in i use, and the main reason for switching from NetBeans to Eclipse, is subclipse, which is a subversion revision control tool. it integrates into the package/file navigator view, showing me which of my project files is under revision control (currently the
(update the finder integration plugin is called SCPlugin)
one thing i haven't been using the Eclipse UI for is managing the application server or the database. i tend to view these components as infrastructure rather than part of my development environment, and usually control them using their native interfaces. i do have ant targets that allow me to deploy database schemas and upload web-app war files, but that's only as part of the deployment/build cycle. the app-server i'm using is Jakarta Tomcat 5.5.12. this version is usually built with the J2SE 5.0 runtime, but the version of OS X i have (10.3.9) doesn't have that available (although 10.4 does) so i'm stuck running 1.4.2 instead. fortunately, there's a compatibility package available that drops in on top of the Tomcat install to allow it to run on 1.4.2 Java environments. interestingly, the latest Tomcats all use the Eclipse Java incremental compiler, so only need a runtime not a full JDK deployment, although you can use javac or jikes if you want. to manage the Tomcat instance i just use the provided scripts, although i had to provide a
the database i use is MySQL 5.0 with the InnoDB tables, since they provide better transaction and relational support. my persistence engine manages most of the actual data and schema definitions and updates (more later ...) but i also downloaded MySQL Administrator from the MySQL site to configure and monitor the database server itself. they provide a .dmg disk image for the OS X version of the 5.0 server, which installs in
well, that's all for today. later this week i'll talk a bit about the libraries and other packages i'm using to actually write the application...
i use Apple Macintosh computers almost exclusively now (a G4 15" powerbook, from my friend gav, who died last year and left it to me. thanks. you're still remembered...) and the only thing that bugs me is the single-button mouse, and the fact that one has to control-click to access context menus etc. anyway, i recently invested in a microsoft notebook mouse, a small two button plus scroll-wheel optical USB mouse (about 33% the size of a standard mouse). this simply works just like you'd hope it would, ie. the right mouse button is the equivalent of control-clicking, and pops up the context menu for the item you click on, in the finder, java applications, eclipse, whatever. the scroll-wheel also works exactly like windows, and both of these features have raised my productivity no end. the trackpad on a laptop is inherently tricky as it is, and i'm glad to be rid of it.
eclipse ide
in terms of software, i had always used vi on Unix systems, which i learned in university, and graduated on to vim eventually, since it's also available for XP. however I recently tried the Sun NetBeans 4.1 IDE and really liked it. i then got Eclipse 3.1 (originally from IBM) for OS X and installed it to try with my current project, since there seemed to be more plug-ins available for it. i really like both of them, having used Microsoft Visual Studio on XP, and find they are quite similar. (as an aside, although VS2005 is quite expensive, and the free .NET command-line tools provided with the SDK are OK, Microsoft have now made available Express Edition of VS for C#, VB and even C++ for free, as in beer, for at least the next year.) anyway, of the two open source IDEs, i think i prefer the way Eclipse works, with its views and perspectives and enormous collection of editor and environment plug-ins.
in my development setup, i use Eclipse with the standard set of web and enterprise plug-ins. these are all packaged together as the Web Tools Platform or WTP. this gives me XML, HTML, CSS, JSP, and many more editors and views. because of this, i can now edit all the files in my web application with an Eclipse native editor and integrated debugging, error reporting/detection and validation (except for JSPs, since the editor doesn't handle taglibs that are imported with a
<%@ taglib ... %>
directive in a sub-fragment included in the main page using a
<%@ include file= ... %>
directive. this is perfectly legal in the JSP spec, since the include directive is processed before compilation (like
#include
pre-processor directives in C), unlike the<jsp:include ... >
tag and similar, which are processed at runtime. this means that my struts JSPs which use the html, bean and logic taglibs all show up with warnings, since the editor can't see the included taglib declaration. all quite annoying, and i had to turn off JSP validation, although that still doesn't always work. i tried a bunch of other plug-ins, but the better ones were all 30-day trials of commercial software (MyEclipse, EnterpriseWorkbence, ExpressWorkshop etc.) or poorly integrated and incomplete. the WST project is the official Eclipse set of J2EE/Web editing tools, originally the IBM Web Tools for Eclipse product, and is currently at version 1.5 and works fine for my purposes.
other Eclipse features i like are the ant integration and incremental compilation. i use Apache ant as my build mechanism because it allows me to do command-line builds and also deployment and other tasks in a repeatable way. i have tasks set up for compilation, war creation, database creation, code generation, revision control, backups and app-server deployment. Eclipse has an ant view that shows all available targets and an editor for your
build.xml
file that interprets file inclusions and external task definitions correctly, as well as parsing the EL syntax in properties and auto-completion of tags as you write. the auto-complete works in a similar way to Microsoft VS IntelliSense and gives you a pop-up list of possible methods, fields and so on whenever appropriate, as well as adding closing braces, parentheses and so on. good if you're forgetful, since you have less of the oh-damn-i-forgot-a-close-curly-brace-there-that's-why-it-won't-compile moments, after ten minutes of staring at the code...subclipse
the next plug-in i use, and the main reason for switching from NetBeans to Eclipse, is subclipse, which is a subversion revision control tool. it integrates into the package/file navigator view, showing me which of my project files is under revision control (currently the
src/
, conf/
and web/
directories) and whether they are out of sync with the repository. i can also do diffs against the repository, tag and branch revisions easily and commit changes, all using the Team context menu. (see above re: the new mouse... ;) Subversion is a great RCS, but it took me a while to decide to use it. the first version control system i ever used was sccs, and i then moved to RCS because it was free. CVS is the next obvious step, it being a descendant of RCS, but i never got around to using it. i was looking for something to use with my current project, and had heard lots of good things about subversion, but the lack of integration with my IDE stopped me trying until my decision to switch. now, however, i'm finding it very simple and easy to use, and the setup for OS X was very simple. i have the server running from xinetd, rather than WEBDAV, with svn://localhost/
URLs for the repositories. i also use a tool called SvnX to browse svn repositories and manipulate the with an OS X GUI. i also tried using a Finder plug-in that gives a subversion context menu for each file under revision control, and integrates subversion with the Finder icons, but so far i've not found it that useful. i manipulate the working copy of my project just like i would normal files, and only commit and update using the UI inside Eclipse, since that's where the editing is going on. also, the command-line client gives me a much more powerful set of tools when i really need them.(update the finder integration plugin is called SCPlugin)
one thing i haven't been using the Eclipse UI for is managing the application server or the database. i tend to view these components as infrastructure rather than part of my development environment, and usually control them using their native interfaces. i do have ant targets that allow me to deploy database schemas and upload web-app war files, but that's only as part of the deployment/build cycle. the app-server i'm using is Jakarta Tomcat 5.5.12. this version is usually built with the J2SE 5.0 runtime, but the version of OS X i have (10.3.9) doesn't have that available (although 10.4 does) so i'm stuck running 1.4.2 instead. fortunately, there's a compatibility package available that drops in on top of the Tomcat install to allow it to run on 1.4.2 Java environments. interestingly, the latest Tomcats all use the Eclipse Java incremental compiler, so only need a runtime not a full JDK deployment, although you can use javac or jikes if you want. to manage the Tomcat instance i just use the provided scripts, although i had to provide a
SystemStarter
directory and an option in the /etc/hostconfig
file to get it to run on startup. i just copied the Apache scripts written by Apple.database
the database i use is MySQL 5.0 with the InnoDB tables, since they provide better transaction and relational support. my persistence engine manages most of the actual data and schema definitions and updates (more later ...) but i also downloaded MySQL Administrator from the MySQL site to configure and monitor the database server itself. they provide a .dmg disk image for the OS X version of the 5.0 server, which installs in
/usr/local/mysql
and also adds a preference pane for automatic startup options. the actual OS X installer is a .pkg file and the whole experience is painless. i find a lot of companies don't give much thought to the OS X versions of their products, thinking "it's just BSD, isn't it?" so this is a welcome change.well, that's all for today. later this week i'll talk a bit about the libraries and other packages i'm using to actually write the application...
14/10/2005
analog organisation?
so, palm have released some new handhelds (the T|X which is a black, wifi enabled full-featured top of the range model, and the Z22, an ipod white style entry lrvrl unit. i actually own the Zire 72s, which my family bought me for my thirtieth birthday (best. present. ever.) anyway, while reading about these, i noticed a comment in a review talking about pocketmod. this is a paper based organiser, which is easily made by printing the design on a sheet of A4 and folding/cutting as indicated. the site allows a whole range of pages to be chosen for your organiser, and they will form a nice, compact 8-page booklet.
for some reason this origami organiser appeals to me, maybe just the alliteration?
i actually use the moleskine notebooks, which are excellent, with cool features like a set of perforated pages that cab be torn out easily, and a little pocket at the back, as well as a ribbon bookmark and an elastic band to keep the notebook shut. i just happen to like writing with a pen and paper, i guess, and it lasts longer than a laptop, since the batteries never run down... as soon as a lightweight laptop with the perfect handwriting interface comes out (newton, where are you now?) i'd buy that, until then, compromise.
for some reason this origami organiser appeals to me, maybe just the alliteration?
i actually use the moleskine notebooks, which are excellent, with cool features like a set of perforated pages that cab be torn out easily, and a little pocket at the back, as well as a ribbon bookmark and an elastic band to keep the notebook shut. i just happen to like writing with a pen and paper, i guess, and it lasts longer than a laptop, since the batteries never run down... as soon as a lightweight laptop with the perfect handwriting interface comes out (newton, where are you now?) i'd buy that, until then, compromise.
04/10/2005
whose money is it, anyway?
right.
you would suppose, in this country, that the money you deposit into your bank account is yours, for you to withdraw and spend as you please, whenever you want? certainly, if you went into a branch of your bank, you would want to have the ability to withdraw cash for whatever purpose you saw fit? well, let me tell you about what happened today, in the high street kensington branch of the royal bank of scotland...
i asked to withdraw a (largish) sum of money from my account, over GBP 1000.00 basically. naturally, the cashier wanted identification. i produced my bank card, and my current, valid, british passport. these were accepted, along with a cheque, written out right there, from a complete cheque book, for the amount, payable to 'CASH' and signed, again in front of the cashier. there followed a lengthy (~10 minutes) phone conversation, which i couldn't hear, presumably with my branch. this resulted in 4 (four) pages of faxed copies of a photocopy of my passport and bank card and signature, made at my branch in edinburgh when the account was opened (i was actually a member of staff at the time, so identity checks were even more rigorous). once my identity had been confirmed here in london satisfactorily, the cashier began to fill in a 'large withdrawal pro-forma' document. this went along fine, with me supplying my full name and the amount of my money i wished to withdraw, until i was asked 'can you tell me why you want this cash?' this struck me as an unnecessary and pointless question, so i answered 'no!' apparently, this is beyond the scope of a 'large withdrawl pro-forma' and appeared to be unacceptable. i offered other suggestions, such as 'customer did not say' and 'none' and similar, however the cashier insisted that these could not be entered into the (paper) form. being a curious sort, i asked why, and was told the magic words 'fraud' and 'security' . i can't even begin to imagine what kind of fraud is prevented by asking an (authenticated) customer why they want to withdraw their money. anyway, an impasse appeared to have been reached here, and the only solution proffered was for the chief cashier to be summoned. i was warned that this may take some time (i had been trying to complete the transaction for 15-20 minutes by then, and the cashier was obviously in an office about ten meters away) however i graciously agreed to wait, and sat down to read the copy of terror inc - tracing the money behind global terrorism that i had just bought. (sadly, nobody noticed. i don't know why i bother, sometimes...)
the result of all this is that i was unable to withdraw my money from my bank account in a branch of my bank. i believe i may have said some inappropriate words to the cashier, chief cashier and other assorted bank staff who had gathered to watch the proceedings. my incredulity at being unable to complete what i assumed was an everyday banking requirement seemed to baffle and confuse them. i even ventured outside to the atm and withdrew a (smaller than i needed) sum to show that i was indeed allowed to obtain and use my own money. since it was too late for me to do anything useful, even if they had relented and done the right thing, i simply shouted and stormed out. after a calming cigarette or four, i decided to phone the head office. there i spoke to a nice young lady who gave the same reason - it is part of anti money-laundering safeguards put in place to stop fraud and terrorism and the like. however, once i pointed out that, supposing i was minded to take my money and do something illegal with it, i didn't think that the prospect of having to lie and tell a cashier that i needed the money for a second-hand car purchase, rather than say, buying raw opium from afghanistan which i intended to exchange for plastic explosives in libya, would really bother me. strangely, she immediately accepted this, as did her supervisor, and they apologised, admitting that it seemed like the wrong kind of security question to have asked. i still don't have the money i need, though, so i'm going to have to try again tomorrow. this time, though, i will go there a lot earlier, just in case...
is it just me, or are these pointless invasions of privacy really, really, annoying? i can see absolutely no basis in law for the question, and as i pointed out, a criminal will just make something up! so there is no security gained or fraud prevented. actually, it's not just me - see bruce schneier's weblog, passim, for plenty of similar examples, and weep.
you would suppose, in this country, that the money you deposit into your bank account is yours, for you to withdraw and spend as you please, whenever you want? certainly, if you went into a branch of your bank, you would want to have the ability to withdraw cash for whatever purpose you saw fit? well, let me tell you about what happened today, in the high street kensington branch of the royal bank of scotland...
i asked to withdraw a (largish) sum of money from my account, over GBP 1000.00 basically. naturally, the cashier wanted identification. i produced my bank card, and my current, valid, british passport. these were accepted, along with a cheque, written out right there, from a complete cheque book, for the amount, payable to 'CASH' and signed, again in front of the cashier. there followed a lengthy (~10 minutes) phone conversation, which i couldn't hear, presumably with my branch. this resulted in 4 (four) pages of faxed copies of a photocopy of my passport and bank card and signature, made at my branch in edinburgh when the account was opened (i was actually a member of staff at the time, so identity checks were even more rigorous). once my identity had been confirmed here in london satisfactorily, the cashier began to fill in a 'large withdrawal pro-forma' document. this went along fine, with me supplying my full name and the amount of my money i wished to withdraw, until i was asked 'can you tell me why you want this cash?' this struck me as an unnecessary and pointless question, so i answered 'no!' apparently, this is beyond the scope of a 'large withdrawl pro-forma' and appeared to be unacceptable. i offered other suggestions, such as 'customer did not say' and 'none' and similar, however the cashier insisted that these could not be entered into the (paper) form. being a curious sort, i asked why, and was told the magic words 'fraud' and 'security' . i can't even begin to imagine what kind of fraud is prevented by asking an (authenticated) customer why they want to withdraw their money. anyway, an impasse appeared to have been reached here, and the only solution proffered was for the chief cashier to be summoned. i was warned that this may take some time (i had been trying to complete the transaction for 15-20 minutes by then, and the cashier was obviously in an office about ten meters away) however i graciously agreed to wait, and sat down to read the copy of terror inc - tracing the money behind global terrorism that i had just bought. (sadly, nobody noticed. i don't know why i bother, sometimes...)
the result of all this is that i was unable to withdraw my money from my bank account in a branch of my bank. i believe i may have said some inappropriate words to the cashier, chief cashier and other assorted bank staff who had gathered to watch the proceedings. my incredulity at being unable to complete what i assumed was an everyday banking requirement seemed to baffle and confuse them. i even ventured outside to the atm and withdrew a (smaller than i needed) sum to show that i was indeed allowed to obtain and use my own money. since it was too late for me to do anything useful, even if they had relented and done the right thing, i simply shouted and stormed out. after a calming cigarette or four, i decided to phone the head office. there i spoke to a nice young lady who gave the same reason - it is part of anti money-laundering safeguards put in place to stop fraud and terrorism and the like. however, once i pointed out that, supposing i was minded to take my money and do something illegal with it, i didn't think that the prospect of having to lie and tell a cashier that i needed the money for a second-hand car purchase, rather than say, buying raw opium from afghanistan which i intended to exchange for plastic explosives in libya, would really bother me. strangely, she immediately accepted this, as did her supervisor, and they apologised, admitting that it seemed like the wrong kind of security question to have asked. i still don't have the money i need, though, so i'm going to have to try again tomorrow. this time, though, i will go there a lot earlier, just in case...
is it just me, or are these pointless invasions of privacy really, really, annoying? i can see absolutely no basis in law for the question, and as i pointed out, a criminal will just make something up! so there is no security gained or fraud prevented. actually, it's not just me - see bruce schneier's weblog, passim, for plenty of similar examples, and weep.
03/10/2005
the guardian responds!
cool. the guardian reader's editor, ian mayes got back to me. he says that: there does seem to be a conflict [between the desire to eradicate bad science reporting and the health/wellbeing article contents] and he will pass my email to the editor of the [weekend] magazine, and also to the editor of the guardian. so there. writing to newspapers can be fun and useful. so hopefully if enough people decide its a good thing, there will be better researched science and medicine articles and less junk and 'alternative' therapies being promoted by journalists who should know better...
for those who haven't heard of him, ian mayes is the 'reader's editor' of the guardian, in charge of the daily corrections and clarifications column, also a weekly column discussing some of the content and contextual issues of that week's reporting. he's also put together a collection of these columns in a couple of books, which i highly recommend. the guardian was the first paper to have an editorial position like this, and i think it reflects well in their content - they listen to their readers a lot more than any other paper i know of.
for those who haven't heard of him, ian mayes is the 'reader's editor' of the guardian, in charge of the daily corrections and clarifications column, also a weekly column discussing some of the content and contextual issues of that week's reporting. he's also put together a collection of these columns in a couple of books, which i highly recommend. the guardian was the first paper to have an editorial position like this, and i think it reflects well in their content - they listen to their readers a lot more than any other paper i know of.
01/10/2005
dear "the guardian" ...
today i wrote a letter to the guardian - a first for me. my paper experience is usually the standard one-way variety. however, the thing that moved me to put pen to gmail account was the bad science column by ben goldacre. i really enjoy his column, which exposes a lot of the misguided or sometimes just plain fraudulent writing that goes on in journalism, press releases and marketing/advertising. there was a good explanation of his motives and experiences printed when the guardian moved to it's new berliner format. anyway, he is currently bashing the BBC for a wrong-headed online article about the therapeutic effects of spiraling water implosion electric fields something-or-other alternative rubbish. now, today on pages 78-79 of the weekend magazine, there is a list of ways that you can limit the damage done by cigarettes. one of these is 'too many computers' - apparently those pesky PCs leak EMF radiation, which could KILL you, and your CHILDREN if you're not careful. but, help is at hand. unplugging your computer, rather than just switching it off will (somehow?) make a difference. quite what that would be, i don't know, since a switched off computer uses no power, and unplugging will just mean it uses the same amount of no power. i don't have the complicated medical and scientific background that the author of the holistic therapy file has (available for GBP 14.99 the article helpfully informs me!) i suppose, so who am i to say that the 'evidence' that 'certain plants can help soak up EMFs' is faulty?
it just disappoints me that after all the good work that 'bad science' has done, and the excellent reputation the guardian has for reporting, and good science journalism, they missed this. i don't know whether doctor goldacre is responsible for overall editing or vetting of science content, but if he isn't someone else should be. i think it's all part of our society's tendency to think that scientific ignorance is nothing to be ashamed of, but rather something to be proud of. i remember a short article in the paper lamenting the fact that astronomical objects such as planets were defined by 'arrogant scientists' - the nerve! people really need to understand the world around them, and how it works, and science is the tool that we use for that. but these days, it's far trendier to claim an interest in 'alternative' therapies and solutions, as some kind of childish rebellion against authority. the problem is, the authorities are right - that's the definition of the word - scientists are authoritative on matters of, well, science!
you can contact him at bad.science@guardian.co.uk with stories of bad science reporting and other misinformation, or go to his website at http://www.badscience.net/.
update: i got a reply from dr goldacre (speedy, only an hour after emailing him) he says - "what can i do, they wont print a word i say about them" which i'm not sure what to make of? does he mean that he's not allowed to bad-mouth the paper that feeds him, and must leave it's hand unbitten?
update ii: he now suggests i take it up with the reader's editor, which i have done. more to follow...
it just disappoints me that after all the good work that 'bad science' has done, and the excellent reputation the guardian has for reporting, and good science journalism, they missed this. i don't know whether doctor goldacre is responsible for overall editing or vetting of science content, but if he isn't someone else should be. i think it's all part of our society's tendency to think that scientific ignorance is nothing to be ashamed of, but rather something to be proud of. i remember a short article in the paper lamenting the fact that astronomical objects such as planets were defined by 'arrogant scientists' - the nerve! people really need to understand the world around them, and how it works, and science is the tool that we use for that. but these days, it's far trendier to claim an interest in 'alternative' therapies and solutions, as some kind of childish rebellion against authority. the problem is, the authorities are right - that's the definition of the word - scientists are authoritative on matters of, well, science!
you can contact him at bad.science@guardian.co.uk with stories of bad science reporting and other misinformation, or go to his website at http://www.badscience.net/.
update: i got a reply from dr goldacre (speedy, only an hour after emailing him) he says - "what can i do, they wont print a word i say about them" which i'm not sure what to make of? does he mean that he's not allowed to bad-mouth the paper that feeds him, and must leave it's hand unbitten?
update ii: he now suggests i take it up with the reader's editor, which i have done. more to follow...
Subscribe to:
Posts (Atom)