Posts
Ralph Johnson: RDBMS as a pattern
Ralph Johnson discusses the use of Relational Database Management Systems (RDBMS)
If you don’t have good architects, big systems will end up as big balls of mud. A lot of companies live with it, but there are certainly big payoffs if you can avoid it. The main problem is that there aren’t enough good architects to go around. One of the advantage of a RDBMS is that it is fairly easy to understand so below average programmers can still get systems running.
read morePosts
Integration testing: Many-to-one relationships with select-fields
This post is an entry in my ongoing series about web integration testing with Jetty. See post 1, 2 and 3 in the series for more information.
I often find that a web interface needs to let a user select one of a list of objects as a relation to the object he is editing. This is the basic and simple way of dealing with many-to-one relationships. However, most web frameworks don’t make this as easy or well-documented as it should be.
read morePosts
Integration testing: Validation and relationships
In my previous two posts about integration testing with jetty [1][2], I have showed how to test a simple web application with Jetty and how to expand this application with a fake DAO implementation to test display and updates of data through the web interface. In this penultimate post, I will describe how to work with more advanced edit scenarios.
Most web applications have some degree of requirements for validation of input and a bit more advanced data structure than the one we’ve worked with so far.
read morePosts
XPS Lights: Source code in Subversion
I have exported the XPS light control source code into my subversion repository. The software is currently set up to build with Cygwin. As an added bonus, I now have added a target that creates a dll so the code can be reused more easily.
How to use:
xps\_lights>_make all_ rm -f *.o *.dll *.exe gcc -mno-cygwin -Wall -c -o xps\_led\_control\_lib.o xps\_led\_control\_lib.c gcc -shared -o xps\_led\_control\_lib.dll xps\_led\_control\_lib.o gcc -o testexe xps\_led\_control.
read morePosts
In-process Web Integration Tests with Jetty and JWebUnit
Do you speak test? In that case: Hello web application:
public class WebIntegrationTest extends net.sourceforge.jwebunit.WebTestCase { public void testIndex() { beginAt("/index.html"); assertTextPresent("Hello world"); } private org.mortbay.jetty.Server server; protected void setUp() throws Exception { server = new org.mortbay.jetty.Server(0); server.addHandler( new org.mortbay.jetty.webapp.WebAppContext("src/main/webapp", "/my-context")); server.start(); int actualPort = server.getConnectors()[0].getLocalPort(); getTestContext().setBaseUrl("http://localhost:" + actualPort + "/my-context"); } } This code runs with no application server, no separate deployment step, just like that.
If this looks interesting, see my full-sized article on java.
read morePosts
Transparent encryption with Hibernate
The security people at my were suggesting that we needed to create an encryption service, to securely store passwords so that even rogue DBAs could not get at them. The idea is that no matter how good your access is to the database, you shouldn’t be able to decrypt the passwords unless you have the secret key. In a solution like this, the key is generally stored offline with the application and loaded into memory sometime during startup.
read morePosts
On Integration: Consolidated View
In my last post, I wrote about four integration scenarios using databases: Reference data, Consolidated view, Subscription and Publishing. Of these, the Consolidated View scenario requires the most interaction between the server and the client roles. This post will examine how to make the pieces fit together.
Consolidated view joins the data of multiple clients into a consolidated view. This makes you able to create administrative applications that span a set of subapplications without having to change the central view when a new application joins the mix.
read morePosts
On Integration: Organizing the data
In my last post on using the database for integration, I argued that the best metaphor for creating systems that are interconnected is that of One-Large Database. Carl-Henrik asked some very relevant questions about this, which I will interpret (for now) mainly as “how do you avoid drowning in complexity”. This post will address the issue of maintainability, especially when things grow to be large.
The On Large Database metaphor is mostly useful as a starting point.
read morePosts
Dell XPS lights addition: Touchpad light
I got the following addition on my Dell XPS LED code from David Pritchard.
The new version of the code has a “-touchpad” argument. Specify “-touchpad 1” to turn the XPS 2 touchpad light on, “-touchpad 0” to turn it off.
Here is the updated source code and executable. The executable should work without Cygwin now. (Note to self: Use “-mno-cygwin” gcc option to strip out the dependency)
read morePosts
Letters from Egypt: Top Five surprises
Honking Cars in Egypt, especially Cairo honk all the time. Day and night. If we woke up at 4 am in the hotel room, there would be cars honking outside. The honk to wake up pedestrians or other cars, taxis honk to attract the attention of potential customers, and often, it seems like they honk just for the fun of it.
Security There’s a ton of policemen in Cairo, easily recognizable by their white uniforms.
read more