Yesterday I revealed Starline (
starline.schementec.com), a project of mine that I’ve kept on the backburner for about a year now. It was previously “POS”, a project Mike Veilleux started and I continued. We’ve moved between so many different technologies, but finally I’ve found happiness with this project being a web application. The main reason I’m meantioning this is to point out what I’ve learned from the project so far.
Programming can be very painful. In college, it was easy; your projects were nicely scoped and you just pounded out code until the damn thing worked. Thought I’m still in school, I’ve been taking on more and more real projects and finding that a lot of my work can feel very ugly to me. I don’t know about you, but I have a need to write really neat code. The more time I spend working on code that doesn’t immediately solve my problem the more angry I get at the project. This is exactly what happened with POS. The first version was in Java/SQL, and creating the backend functions to handle every little thing I wanted to do with the database was SO ugly. I hated it so much I cut the SQL out and moved the ½ done application over to db4objects, a object database. The project sat for most of this time, accumulating dust, while I worked on
other cool stuff. When I came back to it, I had such a hard time testing the object database (for example, tests would pass that it successfully stored the object, but the actual application couldn’t retrieve anything). I got so fed up with this
transactional crap that I completely re-thought the application and switched technologies.
Note: let me clarify myself a little here; I actually think object databases are very cool, and db4o is a great product and something I did enjoy using ... there was a reason I moved away from SQL and an object database was a good solution in Java. However, this post is about me getting frustrated with Java and moving to Ruby, db4o kinda got caught in the crossfire.
This has been a common behavior of my projects. I start off using Java, then get frustrated and move to Ruby. Last time was ViGL, and that worked out for the best. This time, I decided that a web application would be more along the lines of what I wanted to make, so that’s what POS became. Plus, I figured I could deploy it easier on the web. Oh and it also needed to have a new name, and a long time ago I called this project “Starline” after a room in the restaurant we’re making the software for.
Anyway, I’m excited to get this prototype out the door and hopefully reach Alpha quality next week. But now, it’s time for sleep. I was at Microsoft until 10pm today, and I don’t want to do that again tomorrow.
2 comments:
Thanks for calling our project transactional crap.
Though db4o is far from perfect, some 10,000 users do manage to retrieve their objects, and I wonder whether you could have achieved the same.
Your blog post leaves the wrong impression that db4o is not able to store and retrieve objects.
Did you ask for some help in db4o's forums (http://developer.db4o.com/forums/default.aspx) ?
Cheers,
Christof
Christof,
Sorry if that post came off wrong; check back for my corrections. To clarify, I was not calling db4o 'transactional crap', I was referring to the problems with transactions i was having. The way I was unit testing my persistance layer showed that the data was getting saved, but then when I used this layer in the actual application things wouldn't save properly. To be more specific, I was working with a tree-like object hierarchy and adding/removing children proved to be very difficult. After some testing I realized that the persistance layer was using the same db connection to check the data inside of the objects, and that worked, but when it was between two connections (like the application needed) it would break.
I did post around and I got the answers I needed, and got the presistance layer to pass my tests, but in was already re-prototyping this project as a web-app. So in short, I re-architected my project based on a language preference and business decision rather than just my problems with db4o as the underlying persistance layer.
However, I do want to make one point that would sell me 100% on db4o ... a much better object browser. Alot of times I couldn't just check to see if the object saved correctly or not b\c the object browser didn't work correctly. I have a team that works on Macs and PCs, and I don't think I ever got the browser to work on a Mac :P. I can't explain in-debth what specifics I didn't like about it, but I just remember not being able to check if data made it into the database easily as I can with most relational db management tools.
I'm working at Microsoft now on ASP.NET and dynamic languages, and I really do respect what you guys are doing. Keep up the good work and maybe another project of mine will be a better fit for db4o.
Regards,
~Jimmy
Post a Comment