Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Something that makes no sense when it comes to web programming

edited April 2006 in Vanilla 1.0 Help
I was thinking about this earlier.

Probably 75% of the code in Ruby on Rails is dedicated to creating ActiveRecord, the ORM layer that maps database results into object-oriented code. This is also by far the most complicated part of Rails - without it, Rails would be much easier for anyone to pick up.

Mapping relational tables to object-oriented code takes a lot of code, time, and most of all, that ends up being a lot of performance wasted on converting all that data.

Thing is, in the web-world, that's almost all you do - manipulate database data to create a result. So if RDMS/OO systems are inefficient and unnecessary, why are we still using them? Is it because that's just what everyone has come to accept?

I wish there was an object-oriented database solution on par with MySQL or PostgresSQL. That would take out all of those unecessary conversions and make manipulating your data no different that manipulating any other piece of code.

I don't understand why this field hasn't been pushed further. I was also looking into table-oriented programming and data-driven programming (which seem to have been largely passed over due to the hype that surrounds OO), and I can't help but to there a better way of doing things? The current system just seems like its one we use just because its what we've used for years.


  • Options
    edited April 2006
    ... kind of like Windows!
    Cue rimshot from the drummer in the corner.

    But in all seriousness, you're right in many ways. We use it because it's what's there, and what we're all used to, and people tend to balk at new things, even in the tech world. The question is though, what would there be if there were no databases as we know them ... and text files were not an option.
  • Options
    Well, I was doing a bit more Googling, and I came across something called Prevayler. More or less, all it does is create a set of Java classes that allows you to take all your data, run in in RAM (memory), and manipulate it as code, then serialize it to a file when you make changes. This is obviously ridiculously simple and also extremely efficient. There are obviously some limitations - such as if your data set is larger than the amount of RAM you have. Also this will only work with Java. This however, does seem like the best way of doing things, if they could figure out a way to get around some of the current problems with it. RAM is dirt cheap and anyone who understands Java can use this, unlike the current approach where you must understand both a programming language and SQL (and the details behind the database system you use).
This discussion has been closed.