SQLite is a great standalone SQL database engine - not ideal for every situation (particularly large websites), but more than good enough to have already made its way into desktop projects from Apple, and more recently Adobe and Google.
My colleague Mike recently used it as a way to distribute data from a 511.org transit website scraping project he's been doing. I wanted to see if I could download his data (gathered and processed using python) and access it using Processing.
Web searches for SQLite and Java (java wrapper sqlite, etc.) turn up lots of matches, including this promising tutorial from Tim Anderson, but sadly the most prominent matches didn't work for me. It's a real pain to get up and running and installed in a reliable way, mainly due to the need to compile SQLite natively for each platform and then talk to the native code using Java.
Enter this amazing project, a JDBC library for SQLite written in pure java that uses NestedVM to compile the C code for SQLite into something any Java VM can use. It's frightening to think about the amount of misdirection, abstraction and interpretation going on here, but it worked first time and plenty fast enough for my purposes.
Take a look after the jump for the code I ended up with. I hope people find it useful:
There's been a great deal of fuss recently about Ruby On Rails. Is it just hype, or is it really so simple?
I've got a few ideas for simple web-apps, and I'm looking to learn something new (you know, for fun). I like to code. I like elegance and neatness. I wouldn't mind being able to leave the graphic design to a real designer. I think I know what I'm doing, but I don't know where to start.
I'm not a databases person, but I know a reasonable amount about SQL Server, and I think I know how it differs from MySQL. I don't really know how things talk to databases - when I've done it in PHP/MySQL or ASP/SQL Server it's just been magic. I've played around with phpmyadmin (if that's what it's called).
I know what code-injection is. I know what session variables are. I know the difference between POST and GET. I know about HTTP headers and meta tags. I know why not to use client-side VB, and I'm pretty handy with javascript. I know the difference between HTML and XHTML. I know what a socket is. And a port. I've never really understood CGI. I don't really know what XSLT does to XML, and I don't think I want to either. I like the look of xpath. Unicode is pretty good, and essential.
I'm very Java-literate - that's my day job, and my hobby with Processing - but I've never looked into JSP seriously. Somebody said something about a TomCat. I can write proper C++ with templates and namespaces and exceptions and everything, but I probably write it like a Java programmer (and I never understood all the arguments about strings, and pointers). Would I like C#? If I'm familiar with ASP and VBscript, would I like VB.NET? I'm not a Microsoft person.
I've done a bit of bad C programming using cURL and OpenGL. I know a bit of Python, but I've never done anything serious with it. I know a bit of Perl, but it gives me the creeps. I know a bit of VBScript, but much of it seems back-asswards. I know a bit of PHP, but it likewise seems a bit messy (though intuitive, and I like the look of Smarty). LISP isn't out of the question. If someone wrote web-apps in Prolog, I would probably find it fascinating but it too would give me the creeps.
So... What are you using, and why? If you were learning from scratch, what would you choose, and why?
Why shouldn't I use Ruby On Rails? And what should I use instead?
Bear in mind you have to get me away from Why's Poignant Guide To Ruby...
© Random Etc.. Powered by WordPress using the DePo Skinny Theme.