revjim.net Rotating Header Image

Object Crazy!

So I'm going object craaaaaazy.

Ever since Matt and I had our long talk about what an object really is and the value of it, I've been converting everything in Inklog to objects. And when I finally realize that something isn't an object that could be, I have a strong desire to convert it. This is nice because it'll make life easier for people who wish to extend my code. However, it's horrible because sometimes I go too far and make things into objects that shouldn't be.

Right now, whenever a handler object returns it's data, it returns an ObjectRendering object. This is fine and dandy. But, it might be a lot cooler if it returned an object that was typed according to the output. If you ask for HTML, you get a RenderedHTML object. If you ask for JPEG, you get a RenderedJPEG object. That sort of idea. This might be a little overboard. Because, regardless of what type of Object is returned, I can't think of when you'd use more than the same few methods: gettype(), getdata(). Well, except in ONE case, which is what made me think of doing this in the first place. A user might wish to have a Config Objects or a Metadata Object rendered as a Struct. Even in that case, it's still just getdata() and gettype(), unless I make those Objects do special things.

I have a big kink to work out right now regarding ErrorHandling. And I think, when I work that out, it'll help me decide if I need to have multiple Rendering objects, or just one. We'll see, I guess.

Also, a simple site is in the works to be deployed where it can be used. I've also got all of the NEW Inklog code on a CVS server. Those of you interested in hacking on it or just getting a look, email me. There are a few things I have to take care of before I'm ready to make it public, but, I'll share it with those who ask.

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Digg
  • del.icio.us
  • Google
  • Reddit
  • Technorati
  • Furl
  • Spurl
  • Live
  • Pownce
  • TwitThis