revjim.net

November 19th, 2003:

Inklog: what is it?

After ranting about not knowing exactly what Syntax is, I realized something: I’ve never really stated exactly what Inklog is. So, here goes.

First and foremost, don’t infer any meaning from Inklog’s name. It was named that before it became what it is (will be) today. In fact, it needs a new name. If you’ve got an idea, let me know.

In order to describe what Inklog does, it’s easiest to describe a scenario and how it would work with and without Inklog. So, let’s start with a weblogging application since it was the reason Inklog was started in the first place. At the bare minimum, to write a weblog application you need 3 things: a place to put the data, a way to read the data, and a way to add data to it. Everything else is just "features".

So, without Inklog, our first step would be to decide where to put the data. Let’s say we’ll put it in a database. Great. So we design a table to hold the data and put it on a server. Now we need to be able to add data to it. So, we write a small script that presents a HTML form to the user and, when receiving input, shoves it in the database. We’ll call this script "edit.php". Now, to read data we need a script that will access the data from the database and display it in a pretty fashion. We’ll call this script "read.php". We write it and we’re done. Now we have a simple weblogging application.

At this point, using Inklog isn’t really that advantageous. I mean, these scripts are pretty simple, why bother with learning an entire application framework just for that? But then things change. You’d like your weblogging application to have "permalinks". You know, those nice little pages that show one, and only one, of the pieces of data that you’ve entered and reference it in such a fashion that it’ll be usable over and over again. No problem, that’s just another script. We write it and name it "one.php".

Then we decide we’d like comments on our weblog. Okay, we add another table to the database to hold comments. Then we write a script to add a comment, "commentadd.php", and alter our "one.php" script to show those comments. Easy as pie.

Then we decide that we’d like a photo gallery on our site. We create another table in the database to hold the photographs. We create a script to display the photographs ("photoshow.php"), and another script to allow us to add new ones ("photoadd.php"). Great.

Now we’d like to let other people write blog entries in our blog and add photos to our gallery. But we want to know who’s doing what and we don’t trust people to always specify the correct name. So we write an authentication script, add a table to the database to hold the users and then we edit "edit.php" and "photoadd.php" to use the new interface. We also create a script to let people log in and call it "login.php".

At this point, the application is getting more and more complex. The photographs code is tied in to the blogging code a bit through the authentication code. Still, without Inklog, things are too bad… yet.

Now we’d like to allow comments on our photographs. Hmmm… do we make another table for photograph comments and alter our exiting comments scripts and photographs scripts to use that table, or do we use the same comments table? Let’s use the same one. We alter all the scripts that read or add comments to allow us to denote what kind of comment it is so that we don’t have to change the ID numbering scheme we were using before. Then we add "photocommentadd.php" and "photocommentview.php" to our existing array of scripts.

Cool. Now we’d like to have an RSS feed of our blog. Easy as pie. "rss.php" is created and we’re done.

Now we’d like to integrate updates to our photo gallery in the RSS feed for our website so that RSS readers will know when either updates from the same feed. Huh? That’s hard work. Okay… we write a script to gather data from both sources, then compare the dates from the two and arrange them in order and shoot them out the other end. This isn’t easy but, eventually we do it.

Then we decide we want the comments in the feed too, and we want to be able to alter the look of our site be editing one file, and we want to be able to share the code with someone else, and they don’t want comments on their photographs but they do want them on blog entries, and then we want to add trackback and pingback and ATOM. And a nice Blogger.API to the blog section. And we want our static website to share the same look and feel as our blog and gallery and….

ENOUGH!!

With Inklog… this is all easy. Inklog takes a single principal and blows it out of proportion: in most cases, all people really want to do with any website (blog, gallery, FAQ, discussion forums, static site, etc) is store a arbitrary chunks of data in a hierarchy and retrieve those chunks in arbitrary conditions and they want to do it all in a way that allows their site to have a consistent look and feel.

We all understand the simplicity of hosting an image, or an MP3 file, or even an HTML page. We stick the page on our web-server and people access it. The problem is, there isn’t a "blog" file type, or a "comment" file type, or a "photograph" file type and even if there were, the server doesn’t easily allow random, possibly untrusted people to add content of their own (comments, etc). Even if those file types existed and we found an easy way to add in good authentication and methods to allow random users to upload various chunks of data to various places, we’d still have to get all these users to install software that can read each of these file types. And, to make things worse, we’d still have to write methods of creating those file types.

Inklog allows users to store ANY type of data in it. Each piece of data has an associated type. However, instead of forcing the user to install software that allows them to read these pieces of data and create these pieces of data, we do that on the server to. So, for each type of data that is stored, a module is created that knows how to convert that data type into a format that our users can use: HTML, text, XML-RPC, RSS, whatever. When you ask for a document, you ask for it in a specific format. Inklog then gets it, converts it, and gives it to you. So, if you have an MP3 on your site, and a user asks for it as HTML, then you can show them a nice pretty page describing the MP3, showing a transcription of the MP3 and a link to actually listen to it. If they ask for an MP3 as an MP3, then you just give it to them. And Inklog takes care of all of this.

You want comments? Great, write a module that knows how to read a comment. create a comment and convert a comment into a few popular formats. Now, all you have to do is give users permission to create comment objects inside of blog objects, and all your blog entries are comment-able. Want it for photographs too? Fine, give them permission to create comment objects on photograph objects and you’re done. Want to restrict a certain entry from getting comments, just deny that permission on that blog entry. Done.

Everything locks together. Everything knows at least basic information about everything else. Everything looks the same unless you ask it not to. Everything just makes sense. Now, when you take a new picture, or record a new song, you don’t have to make a HTML page for it that links to it, then write a blog entry that links to the HTML page, then upload the song or picture, then the HTML page, then publish the blog entry. You simply upload the song or picture, and you’re done. If you want to write a description for it, fine. If you want to disable (or enable) comments on it, fine. Whatever you want. It’s all easy.

You want a Moblog script? Great, make an email alias point to a program that dissects an email message. Send the text of the email message to the system as a "blog" object using the Subject of the message as its title. Then send the attachments to the server as objects inside of the "blog" object. That’s it. And all of this is done through an easy as pie API. You don’t have to learn database structure, or manage usernames and passwords for things, or deal with rebuilding your indexes, or any of that mess.

You have a group of visitors that want to be notified via email whenever you update your site? Cool… write an email output module, and add a "new object" hook to the root of your site. Allow users to add emailaddress objects to the container that you’ve set up for notifications. The "new object" hook will get the emailaddress objects from the container, and contact the email output module to send out the notification.

It sounds simple. It is simple.

Certainly, there are some things that Inklog just won’t do well… or, at least not easily. But I can’t think of any.

There are some limitations to Inklog. First of all, if you want to customize the way your site looks, you need to know HTML. You can use Frontpage, or Homesite, or whatever to give you a hand but, in the end, you’ll have to edit some HTML to get it to do exactly what you want. Now, Inklog will support themes. So, if someone’s already built a theme that looks the way you want it to, you can simply install that. Additionally, themes can have configuration values. So, in the end, I guess it’s possible that if someone wrote a flexible enough theme, you could get away with not knowing HTML and still get it to look the way you wanted. But, that would be difficult to do. Secondly, if you want Inklog to handle a new object type, you have to be able to code. Currently, you have to be able to code in PHP. In the future, it’s possible that any programming language that can use XML-RPC (or maybe SOAP, or some other standard remote object calling method) can be used to code modules. But, at this point, it’s PHP only. Finally, if you REALLY want to make your site to do amazing or unusual things, you have to be willing to, not only edit HTML code, but possibly insert some "code-like" constructs into your HTML. They aren’t any more complicated than Movable Type’s template format. but, you will need to have a general understanding of very basic and simple programming concepts (what a variable is, what a function call is, what an if statement does, what a foreach loop does, etc). But really, if you can code HTML and cut and paste JavaScript, you can handle it.

That’s it.

I hope this makes sense and helps some of you understand what it is I’m working towards here.

If you’d like to help and know PHP fairly well, please let me know. I’d love a partner in all of this. Additionally, if you have comments or questions about Inklog, feel free to leave them here.

Syntax: what is it?

I ran across what seems like an interesting project today: Syntax. The only problem is, I can’t tell exactly what it does without downloading it and using it. And I made a pact with myself not too long ago that forbids me from downloading and attempting to use code of questionable value or operation. In the past I’ve spent way too many hours downloading a huge chunk of code, installing it, and writing a quick application in it only to realize that I hated it or that it was horribly written.

Syntax is particularly confusing. They reference PhlexDB (wiki reference) and PxDB often in their wiki, which is odd. You see PhlexDB (whose website is now just blank, however it appears, based on the google cache, that it’s been taken over by a Porn Site) is a project I looked at long ago. I thought their code was interesting, just not mature enough to be used yet. Additionally, the lack of documentation made it hard to decipher. But it was something I intended to watch closely. I was also watching another project named Xulit!. Xulit! has language issues: their developers did not write in English well enough for me to comprehend everything they tried to discuss. However, the project looked interesting and I decided to keep a close eye on it. Then, Xulit! announced that they merged with PxSystem. Now, I can’t find a reference for this on the web anywhere, but I was almost certain that PHlexDB and PXSystem were either one and the same, or that they were together somehow. Xulit!’s site hasn’t been updated for a few months. But PXSystem’s site (if you can call it that) seems to have recent entries in the changelog.

So I’m not sure if Syntax == Xulit! == PXSystem == PhlexDB or not. All four projects had similar goals — hence my interest in all of them — so it surely makes sense that they might consider working together. The Xulit! site seems to have the most content while the Syntax site seems to speak better English than the others. None of the projects ever produced, as best as I can tell, a working, usable, documented, code-base.

I’m so confused. I don’t really care what came from where. If the code is worthy, usable, (at least) self-documented and free (as in speech and beer), I’ll use it. But I don’t really want to download their entire codebase and invest a few hours into learning how it works only to be disappointed that its the same unfinished product under a new name. Or, worse yet, another product that is unusable and undocumented. The Syntax Wiki seems to have lots of information in it. But none of it really makes sense without downloading the code. And, I can’t seem to find a "here is a complete working example of how to use this code" type example.

Who knows?

as the mold grows

Two Saturday’s ago, Joel and Emily came over to hang out. And, in reaching to retrieve… something… from the back of our pantry I noticed green mold growing on the sides of it. The next day Jess went into the office to let them know.

Of course, they were immediately offensive, claiming we must have spilled something in there. Regardless, they said they’d send a maintenance guy out to look at it and pour bleach on it.

Bleach? Is that all they were going to do? Jess talked to them, so I just let it go for the time being. When Monday evening came around and they hadn’t been to our apartment to look at it, I decided to bleach it myself. It looked nice and pretty then, but, three days later it was back.

The next day, Tuesday, Jess went to the office again to tell them that no one had shown up. They apologized and said they’d send someone out right away. No one came.

Ditto for the next day, Wednesday.

Thursday, Friday, Saturday, Sunday, Monday, Tuesday all pass us by. The mold still grows. No one shows up. So this morning, I decide to call them myself.

A girl answers and she apologizes for the delay and asks for me to give her all the details again. I do, and she tells me that, by 4pm, someone will call me. I also let her know that I already bleached it, so there’s no point in doing that again.

About 30 minutes later the maintenance man calls me. He’s in my apartment and he wants to know where the mold is. I spend the next 5 minutes explaining to him what a pantry is and where mine is located. He finally finds it and says he’ll call back when he’s got it all figured out.

An hour later, the apartment people call again. There is a leak coming from the apartment above us. She’ll be contacting them this evening to take care of it. I inform her that no one lives above us, so it would be fruitless to contact them. Apparently they don’t even know which units are vacant in their own apartment complex. So then she tells me that she’ll have the leak taken care of today but that, because the wall is so wet, the sheet-rock will need to be replaced. That will be done today or, by the latest, tomorrow, according to her.

We’ll see.

I’m so sick of this shit. I’m so sick of incompetent people who don’t give a shit about their customers, their jobs, or doing things the right way. Small details really irk me, but I can ignore them. But when blatant avoidance of any form of customer service occurs… it really ticks me off.