Author Archives: hedleyproctor

Lift controllers example

I’ve recently put together a basic Lift example, based on an e-Commerce theme. It contains: Product listing Basket Checkout Order confirmation It shows the following techniques: How to write forms and process the response How to submit forms using Lift’s … Continue reading

Posted in Lift, Scala | Tagged , | Leave a comment

Effective Selenium testing

Selenium is the de facto standard for testing web applications. In this article I’m going to cover a number of techniques for improving your Selenium tests. The article is suitable for you if: You already know the basics of Selenium … Continue reading

Posted in Selenium, Testing, Uncategorized | Tagged , | 1 Comment

Why Java developers should be learning Scala

Over the past fifteen years Java has been a phenomenally popular programming language, but it is starting to show its age and programmers are increasingly looking at more modern languages. The purpose of this article is to explain why Scala … Continue reading

Posted in Scala | Tagged | 4 Comments

Generating Javascript with Scala and Lift

One of the ideas that has become popular in recent years is the concept of writing complex browser GUIs entirely in your server side language, and generating the required javascript. In Java both the Google Web Toolkit and ZK allow … Continue reading

Posted in Javascript, Lift, Scala | Tagged , , | Leave a comment

Using Java to download a file that needs authentication

You can easily download files using Java by making a URLConnection. However, if you need to login before accessing the file, how can do this automatically? If you automate the login, how will the code that makes the URLConnection be … Continue reading

Posted in Java, Scala, Selenium | Tagged , , | Leave a comment

Organising Eclipse static imports

By default Eclipse “Organise imports” doesn’t deal with static imports, so if you are using JUnit and want to write something like assertEquals(), it won’t be imported. However, you can add static imports to your Java preferences to get them … Continue reading

Posted in Eclipse, Java | Tagged , | Leave a comment

Getting the last build date from CruiseControl

Imagine you have a part of your build process that is a time consuming operation that only needs to take place when a particular file has been updated. How would you get the time of the last successful build? Well, … Continue reading

Posted in Ant | 2 Comments

Comparing two MySQL databases

When doing development, you’ll often have multiple versions of a database on different environments and sometimes it would be useful to be able to check the differences between the data. Did you know you can use the Toad database tool … Continue reading

Posted in Databases and SQL, MySQL | Tagged | 2 Comments

Tutorial: Building your first Lift app with sbt

The Simple Build Tool (sbt) is the standard build technology for Scala and Lift applications. However, if you are new to Scala and Lift, trying to learn sbt at the same time can be a little confusing. The aim of … Continue reading

Posted in Lift, Scala | Tagged , | 3 Comments

Inserting large amounts of data into MySQL with LOAD DATA INFILE

Suppose you want to do some performance testing on your application and you want to insert a large number of database records, what is the fastest way to do it? You could write some Java code that creates a PreparedStatement … Continue reading

Posted in MySQL, Performance, Testing | Tagged , , | Leave a comment