Interview to OpenInteract creator
OpenInteract is a web application server written in Perl. It features integrated data persistence, security, user and group management, plus an easy way to create and distribute fully database-independent applications.
Hi Chris, please introduce yourself to the CaFe.pm group
My name is Chris Winters and I currently live in Pittsburgh, Pennsylvania in the USA. I've been married for five years to my favorite person in the world.
I've been using Perl for about 10 years or so; those first two years I just dabbled and have been using it full-time since 1997.
Currently I work at Vocollect (http://www.vocollect.com/) doing software quality assurance on a Java web-based product; I'll soon move to another part of the company doing more embedded development along with building customized workflow-type systems.
Which one is (are ?) your expertise area(s) ??
Well, I wouldn't call myself an expert in anything :-) However, I've been working on web architecture and web application development for about eight years and on frameworks for six. I've also developed fairly generic workflow systems and object-relational mapping tools over that time.
One of the interesting aspects of web architecture is that if you do it right the basic ideas transfer pretty well to other languages. For the last four years or so my paying job has been writing Java code for web applications as well as general server-side processes. And many of the ideas I learned from Perl were also implemented in Java -- although with much more code!
Does it pushed you to build OpenInteract ??
OpenInteract came about the same way I think many other frameworks come about. You build a system for a client, deploy it and it works great. Then you build another system for another client -- it's not exactly the same, but enough so that cut-and-paste will get you by your tight deadlines.
Then you build another system that differs from both earlier ones, and at the same time you've got some changes you need to apply from both earlier ones. So you start finding commonalities among them and building a system to meet those needs.
Do that ten or more times and you've got a framework!
What might also be interesting to note is that the system behind Kuro5hin (http://kuro5hin.org/) also sprung from this same company -- when they were first developed they had quite a few things in common, but they quickly diverged due to their different specialties.
What problem does OpenInteract solves ??
OpenInteract takes care of much of the plumbing you have to do in web applications:
- user/group management
- application security
- database access
- hooking to a template system
- caching
- building database-independent code
- distributing your application (including code, templates, database structures, initial data, documentation, etc.)
- running under different platforms (mod_perl 1.x, mod_perl 2.x, FastCGI, CGI, standalone web server)
As an application server it doesn't solve problems for non-developers, at least any interesting ones. There are some simple applications installed with the server but it's nothing like Slashdot, webmail system or a more sophisticated Content Management System.
But what OpenInteract does is make it easier for developers to create such complex applications.
It's probably worth noting here the difference between OpenInteract 1.x and 2.x. OpenInteract 2.x is pretty much a complete rewrite and has much better design and documentation. So if you're just getting started I strongly recommend you look there first, even though it's still in beta.
What advice will you give to the wanna be designers ??
People learn differently so it's hard to give generic advice. But in my experience many developers learn best by doing. And open-source gives us so much to work with! And with something like OpenInteract it's even easier because you don't have to recompile anything -- you can modify a package, restart your server and then see what happens. Some of the best learning can happen by breaking things on purpose (or even accidentally).
Another important part is that it's tough to learn when you don't actually have work to accomplish. I can tell you to walk through this code or that code, but I don't think it will really stick until you have to do something with it.
So think of your interests and come up with a simple application you can write that includes them. For instance, maybe you're a bird watcher and want to create a log of your sightings. Or maybe you collect comic books and want a better database for storing information about the book along with scans of the covers. Or keep track of your favorite recipes. It doesn't have to be complicated, just something you're already interested in.
In which parts of the code you will advice to the novice Perl coder to look at, in order to have a very pleasant learning experience?
OpenInteract has a lot of code and I'd imagine can be quite intimidating for people, especially because it's an application framework that needs to have hooks for many features that people might never need.
However, what might be interesting for people is to follow the path of a request as it moves through the server. One of the documents shipped with OpenInteract2 -- OpenInteract2::Manual::Architecture -- has a section 'Tracing a Request'. It walks you through the system at a high level, and following along by opening up the different perl modules as you read could be very educational. (In fact, while reading over that section again it would probably be very useful to have samples of code from the different modules along the way.)
Which ones were the limitations that Perl imposed to the project ?
No real ones that I can think of *--* that is, I don't remember ever thinking I wish Perl had X. A few possibilities:
- OI2 uses quite a few classes and that might be a problem for people not familiar with Perl's OO system.
- Not having a practical mod_perl on win32 was a problem for the 1.x series. But Apache 2.x/mod_perl 2.x is apparently as robust and stable on win32 as on unix.
Have you checked out the Perl 6 features ?
Very briefly. It still felt like Perl but with more planning, less features by accretion. But that's just a first impression.
Do you have any opinion or advice regarding to it ?
I'm ambivalent. Like everyone else I wish it were here now, particularly because of all the attention paid to Ruby and, to a lesser extent, Python. I think Perl5's odd OO system has prevented a lot of people from either using it or sticking with it and welcome the cleanup and rethinking.
That said, we don't have a big pile of money to throw at the smart people designing and implementing Perl6 and I know how difficult it is to balance open-source programming and a full-time job (not to mention a family, non-technical hobbies, sleep...).
Also, I'm awed by the progress Autrijius has made in such a short time with Pugs (Perl 6 running in Haskell). It's truly amazing. I wish I had some spare time to learn more about it and help out.
Why do you think that Perl is not so widely used for application development ?
There are quite a few reasons, but off the top of my head:
- Perl has a reputation for being write-only, that nobody else can read another person's code. I don't think that is Perl's fault, any language can be written poorly. Perl's flexibility works against it here -- I think a lot of times people write a script and don't expect it to last very long. But then it becomes so useful that the author just adds one more feature here, one more feature there and then it just becomes a mess. And then that's blamed on Perl. (Having 'use strict' as a default would help some)
- Many people don't know about some of Perl's advanced features, or are afraid of them. The fact that you can mix functional, procedural and object-oriented programming is a huge win.
- Lack of smart tools. I write all my Perl in XEmacs and for a long time had a deep suspicion of IDEs. But there are a number of IDEs in the Java world right now that do far more than provide a nice wrapper for people who like to use a mouse. When I write anything non-trivial in Java I use a tool called IntelliJ IDEA. It's not free, it's not open-source, but it's so powerful I can't imagine not using it. (There's also a tool called Eclipse but it is not as polished as IDEA, although Eclipse does apparently have some support for Perl.)
Java is statically typed, and since IDEA knows so much about Java makes it easy to rename a method 'execute()' in a class Foo everywhere it's called, ignoring the 'execute()' in class Bar. Or to replace all constructors with two arguments with a static factory method call. Or change the order of method arguments. Or many, many other actions. It's difficult to explain how useful this is, but at a deep level it makes the code much more malleable because you know changing it is so simple, very much how creating good unit tests give you confidence to make functional changes in your code. (Some of these features are present in Emacs through JDEE, but IMO they're neither as usable nor as powerful.)
Some aspects of Perl make this sort of tool difficult, but I hope Perl6 enables these types of tools to be used.
How can anyone of us colaborate with OpenInteract ??
It depends on what you want or like to do!
For instance, if you're a good graphic designer there is quite a bit of work to be done regarding OpenInteract2's lack of stylesheets and modern layout techniques. We also want to make the OpenInteract website (http://www.openinteract.org/) a little friendlier and nicer to look at.
Or if you're an application developer you can contribute with feature ideas or implementations. Or better yet, you can perform one of the most under-valued activities: a smart user. Many times people use an open-source project but some code doesn't work the way they expected, or an interface is a little awkward to use, or the documentation is confusing. And they don't let the project know because they either don't want to get involved or they don't want to be a bother.
But this is *hugely* valuable feedback. It's very easy for people working on large projects to forget how people use them, so your words, even for something simple, will probably be more useful than you know. And even if the project leads don't agree with you it's still useful for them to know how users feel so they can modify the documentation to meet what people expect, add items to the FAQ to direct people to the right place, or other changes.
So if you're using OpenInteract2 and something is confusing, let us know!
Finally, since OpenInteract2 has support for internationalization we'll also need people to translate our English messges into other languages.
... and the minimum skills required ??
I think there are enough jobs to do for all sorts of skills! Plus, one of the benefits of open-source is that you can learn as you go.
What features you think are missed, and which ones will you add soon ??
Any ideas anyone has for features and fixes should be in our issue tracking system, JIRA (http://jira.openinteract.org/). Otherwise they fall by the wayside and never get implemented.
Any favorite CPAN module ?
There is no way we'd be able to build something like OpenInteract without CPAN and there are many modules I've used that do a simple thing and do it so well that I never have to think about it. However, off the top of my head here's a list of modules I use most often to solve common problems:
- Template Toolkit
- DBI
- DBD::SQLite
- DateTime
- Log::Log4perl
- CGI::Wiki
- WWW::Mechanize
I also use a couple of my own fairly frequently (Class::Factory and Class::Observable), but it's not fair to put them in favorites :-)
Do you have any experience (funny or not so) that you had while making OpenInteract and that want to share with us ??
A few things come to mind:
The company where OpenInteract came from was generous enough to make it open-source. I think they wound up benefitting from it but that was a great honor. (I didn't have to put up a huge struggle to get this done, just a little one.)
And a little over a year ago I asked the community for some funds so I could buy a server to host the OpenInteract website and JIRA issue tracking site -- along with my website :-) I was not flooded with money but that I got anything was surprising, and deeply appreciated.
Finally, I get a real jolt when someone emails me and lets me know they've used OpenInteract for a project and that it's working well. In fact, about a year and a half ago I heard from one such company in Germany that had some extra money in their budget. They flew me over there and I did some training with the developers there and learned about their system. That was a great pleasure.




