Building Active Record for Java: Igor Polevoy on JavaLite & Rails Influence

Building Active Record for Java: Igor Polevoy on JavaLite & Rails Influence

UGtastic Archive
Transcript Verified
The Interviewer

Mike Hall

Interviewer, community organizer at UGtastic

The Guest

Igor Polevoy

Creator of JavaLite, ActiveJDBC, and ActiveWeb

The Conversation


Mike Hall Interviewer, community organizer at UGtastic
Hi, I'm Mike with UGtastic, sitting here with Igor Polevoy.
Mike Hall Interviewer, community organizer at UGtastic
Igor does a lot of free and open-source development on the Java platform. He's created tools underneath the JavaLite family of frameworks and tools, including ActiveWeb, ActiveJDBC, JSpec, and HTTP Lite.
Mike Hall Interviewer, community organizer at UGtastic
You kind of have this family, this framework stack of tools that you've built. What kind of led to you creating those?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Well, kind of envy, I think. At the time, I was a typical Java guy, not paying attention to what was happening outside Java.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
In the meantime, the Ruby on Rails revolution took off. Back in 2007, I was on a Java project, but Rails was slowly introduced into the project.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
I picked up Ruby as a language, and then Ruby on Rails, and I saw that developing with Ruby on Rails was so much faster and better than developing anything we had in Java.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
It was like, okay, Ruby developers enjoy this fantastic framework. Why don't we have it in Java?
Mike Hall Interviewer, community organizer at UGtastic
Okay, so you were thinking, how can I make something that's as quick to develop with? And that's where ActiveWeb came from?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
No, that was not my immediate reaction. My immediate reaction was, great, somebody must already be developing this.
Mike Hall Interviewer, community organizer at UGtastic
Oh, okay. You wanted to see what was already out there.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Yeah. I waited a couple years, from 2007 to 2009, but nothing like that came out. So I rolled up my sleeves and started developing ActiveJDBC first.
Mike Hall Interviewer, community organizer at UGtastic
Okay, so you started with the database layer first.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Yeah.
Mike Hall Interviewer, community organizer at UGtastic
Was that mostly something you used for your own projects?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Oh no, no, no. From the very beginning, it was used on commercial projects.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
We were building a massive system for an insurance company, and we had two and a half months to start and finish a massive project.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
If we didn't have an agile tool, and if we had gone with something like Hibernate, it would have been difficult.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
At the time, I was managing a relatively small team. It was a team of four people plus myself.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
By the time we started the project, ActiveJDBC was already working, although not all features were there.
Mike Hall Interviewer, community organizer at UGtastic
Was it about 80 percent complete?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
It was probably 80 percent of what we needed for that one project.
Mike Hall Interviewer, community organizer at UGtastic
Okay. So you had to implement the rest in real time.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Yes. And it was really funny because, as a developer or architect, sometimes you architect things right, and sometimes you architect things the wrong way.
Mike Hall Interviewer, community organizer at UGtastic
Right.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
This one was architected right. When we hit the need for many-to-many relationships, we didn't have support for that in ActiveJDBC.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
My guys were like, 'Okay, back to Hibernate,' and I said, 'Wait, we're going to have it two days from now.'
Mike Hall Interviewer, community organizer at UGtastic
Yeah.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
And we had it two days later.
Mike Hall Interviewer, community organizer at UGtastic
So it was battle-tested from the word go. You had the idea and immediately put it into production.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Oh yeah. And by the way, the first implementation was for a crazy Oracle schema, so right there we hit a lot of problems.
Mike Hall Interviewer, community organizer at UGtastic
So is ActiveJDBC Oracle-specific?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
No, no, no. It's not Oracle-specific. The next implementation was for MySQL, and then basically there isn't much difference between databases other than generating very specific queries for things like pagination.
Mike Hall Interviewer, community organizer at UGtastic
So how did you go about implementing all these adapters?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Basically I implemented Oracle, MySQL, PostgreSQL, and H2. Two dialects for Microsoft SQL Server were donated by the community.
Mike Hall Interviewer, community organizer at UGtastic
Okay. So by this point, it had already been released and was out in the wild.
Mike Hall Interviewer, community organizer at UGtastic
And by the way, what license is it under?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Apache.
Mike Hall Interviewer, community organizer at UGtastic
Apache. Okay. How did people outside your immediate community find out about it?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
I didn't really make much effort to publicize it. I basically threw it onto Google Code, and that was it.
Mike Hall Interviewer, community organizer at UGtastic
I'm assuming that most people who found these projects had experience with Ruby on Rails and started Googling things like 'Active Record for Java.'
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Yeah.
Mike Hall Interviewer, community organizer at UGtastic
So the similar wording was intentional because you wanted people to make that connection?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
You mean ActiveJDBC?
Mike Hall Interviewer, community organizer at UGtastic
Yeah.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
I was thinking about what to name this thing. I didn't particularly want a funny, made-up name.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
I thought ActiveRecord was a good name. It's also the name of a design pattern.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
So I took the word 'active' because, as opposed to passive objects in Hibernate, it's a lot more active.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
On the flip side, it's a very thin veneer on top of JDBC. So ActiveJDBC came about that way.
Mike Hall Interviewer, community organizer at UGtastic
So you started with ActiveJDBC. How did you come up with ActiveWeb? What was the impetus for that?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
As soon as we implemented a massive back-end system for that company, we also had to implement about four portals.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
To be honest, implementing ActiveJDBC was a lot harder than implementing ActiveWeb. I always thought ActiveWeb would be harder.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
It turned out to be very easy to do.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
I had also implemented a number of other frameworks before then to make it easier for people to build web applications, so I already had experience doing that.
Mike Hall Interviewer, community organizer at UGtastic
Although those earlier frameworks didn't really go anywhere.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Right.
Mike Hall Interviewer, community organizer at UGtastic
Why did you choose to make these open-source tools instead of bundling them up and selling them as commercial components?
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
Well, number one, I'm not a salesman.
Igor Polevoy Creator of JavaLite, ActiveJDBC, and ActiveWeb
But the reality is I used so much from the open-source community, and I think that's where I learned a lot.

Critical Insights


durable
"Ruby on Rails fundamentally shifted developer expectations around productivity and framework ergonomics across multiple ecosystems."
durable
"Frameworks developed under real production pressure often evolve quickly toward practical, battle-tested abstractions."
durable
"Small engineering teams can deliver large systems rapidly when tooling minimizes ceremony and accidental complexity."
durable
"Naming frameworks after recognizable architectural patterns improves discoverability and lowers adoption friction."
durable
"The distinction between Active Record-style models and passive ORM entities was a major architectural debate in the Java ecosystem during this era."
time bound
"Google Code was a common distribution mechanism for open-source Java projects before the widespread consolidation around GitHub."
durable
"Database portability concerns in the early 2010s frequently centered around SQL dialect differences such as pagination support."
time bound
"Teams in the late 2000s often viewed Hibernate as too heavyweight for highly compressed delivery timelines."