Friday, February 15, 2008

Sequel's lackluster to_*

Sequel is a great bare-bones ORM, but the bare-bones quality of Sequel::Model leave something to be desired. For instance the obj.to_json method just calls the default ruby object inspect method, which prints out the class name and memory space. Not helpful. Also no to_xml() for easy REST incorporation. Almost makes me want to go back to ActiveRecord, but then what's the point in using Merb?

Anywho, it's not that hard to extend the functionality of Sequel::Model, so I have started writing some gems to make development with Merb + Sequel a little easier. Like real to_xml & to_json methods on the model instances and instance collections. More on this as it develops.

Merb TLS mail plugin gem

UPDATE: Now available on github : merb_tlsmail github page

My previous post on sending mail via a TLS SMTP server on merb covered monkey patching Merb::Mailer.

I took the time to code this up as a gem, using Merb's meta-programming routines to extend Merb:Mailer in a standard way (for merb that is). See this open ticket in the Merb lighthouse issue tracker to download the gem until it is released as a proper plugin.

Tuesday, February 12, 2008

Secure SMTP server (TLS) from merb apps

It seems that Merb's Mailer class is either using a local sendmail client or a non-TLS enabled SMTP server. This is not a unique problem to merb, but rather a deficiency in Ruby 1.8.

I took some time to look around and found that Rails has the same problem, and it was fixed via a plugin, not a gem as is the "merb way". There was also a gem that packaged the Net::SMTP classes from Ruby 1.9, which do have TLS support. It isn't hard to guess what I did next.

I monkey punched Merb::Mailer to overwrite the net_smtp method and added two config options into merb_init.rb. See the pastie for the code example here.

http://pastie.caboo.se/151190

Thursday, February 7, 2008

Where has the Sematic web failed us?

News about the Semantic Web has being the "next big thing" has been hitting web application developers over the head for years, like it was news about the iPhone. But where are the products? Who uses it? Expect for academic papers, a standards process that nobody pays attention to, and ontology narcissists, nobody uses RDF or OWL or any of those supposedly "next generation" tool sets and languages. OK, maybe Powerset will, but I'll believe that when I see it.

Certainly the swoogle is no google, although it is starting to address what I see is the most overlooked part of the semantic web, usability. It seems that developers and proponents of Web 3.0 thinmk regular users of the web are a lot smarter than they are. Swoogle does actually show a pretty nicely formatted report on the metadata it has for a result, if you know what you are looking at that is. Yet the main result link leads to the originating ontology, which is and RDF xml file. Yeah, that's helpful. Even if Joe Public is aware enough to click on the metadata link, instead of the big red button that is the main link, I can't ever image him making heads or tails of the report, or for that matter caring.

Why is that? Why is usability not even a concern for majority of ontology & semantic web developers? What makes this situation even more of a disaster is that tagging (and tag clouds) are so wide spread and ridiculously easy to understand. How is tagging any different than RDF annotations? A little more text, that's what. Oh and querying RDF is a bitch, so developers are also affected by the situation, making adoption of this "standard" that much more unlikely.

PS: I am not part of, or hold any affiliation to, NG&E, but "the 85%" is one of those stereotypes that ring true to me
.