« February 2002 | Main | April 2002 »

March 25, 2002

Seeing the Light at the End of the Tunnel


Seeing the Light at the End of the Tunnel

This weekend I managed to finish off some major work on PHP functions that will be used throughout the system. I've only implemented them fully within the Front Page, but it shouldn't be too much trouble to build out the rest of the pages.

For a sneaky peak at the prototype, go to mac.thefraziers.org/index3.php. Eventually this link will not work, but for now it's there for testing purposes. Keep in mind that this is not a design preview, but a structure preview.

Note that most of the content is dummy data, but the News section (and its corresponding subesets of the Sources and Subjects menus) is being pulled from real live RSS feeds.

--------

March 20, 2002

Blind Spots


Blind Spots

I suppose you've heard by now that we had a large asteroid pass by fairly close to us (about 1.5x the distance between us and the Moon) with no warning. It wasn't even spotted until four days after it passed us. Press coverage was the usual silliness.

What interests me about this is the whole idea of an astronomical blind-spot. One of the problems a science fiction writer faces these days is that most readers understand that it'd be very hard for anything large to approach Earth from outside the solar system without us seeing it days, weeks or months ahead of time. One has to either have amazing accelleration capabilities, some kind of warp or hyperspace capability that can operate close to a massive object, a cloaking capability, blah blah blah.

It's all been done, and it's not a trouble to just repeat an old formula, but what if you want to write something that doesn't depend on any of those things?

Well, this asteroid pass provides another tool for the sci-fi writer's toolbox. It may even have been employed in the past, but I don't recall reading it anywhere. A large object, entering our system on the far side of the sun, and approaching the Earth from the direction of the sun, should be able to get right up to us without being seen. This is what the asteroid did.

This is nothing to build a story around, but it's a nice scientifically real trick to throw in during the course of an interplanetary war, for instance.

--------

Chugging Along


Chugging along.

Made a lot of progress this weekend, but it's always two steps forward, one step to the side.

Multicolumn flow of the main text has officially been abandoned. It didn't really make enough sense to implement, given the hair-pulling challenges involved in working around the various "float" bugs found in css browsers.

Note: PHP is not an OOP language, by any stretch. Sure, it has support for OOD, with classes and all, but it doesn't really lend itself well to that sort of approach in any rigorous sort of way.

Current issue: I want to list in sidenavs the "current" sources and subjects of article headlines showing up on the main portal pages. The trick is, my original design called for them to display in reverse chrono order. I.e., the subject of the most recently posted article, of any type, would be at the top of the "current subjects" nav, and so on. Of course, duplicate subjects should not be displayed. I've just managed to work out how to accomplish this, but I'm a bit concerned about performance. For such a small feature, the code and database calls required to implement it seem excessive, even with the pseudo-dynamic publishing approach I'm taking. Now I'm starting to wonder why this feature needs to behave the way I originally designed it.

The problem is, I almost abandoned this approach during the design phase, but then ended up deciding that it really was necessary for a not-so-obvious reason. I made no note anywhere of that tricky reason, though, and I can't recall it right now. <*sigh*>

--------

March 12, 2002

Always Changes


Always changes.

Some careful analysis of how pulling RSS feeds into different sub-pages revealed a flaw in my thinking. I've gone back and fine-tuned my data tables, plus altered the specs for the different presentation views and now things are much more streamlined.

As a result of rescrutinizing everything built up to this point, I'm very close to abandoning the multi-columned approach to the various headline portal pages. It would save me from having to write alternative stylesheets for those supposedly advanced browsers that break when you try to "float" something in a semi-complex way. Depending on what else transpires this week, I hope to have the changes complete one of these next several nights and hopefully by the weekend all of the templates for every presentation view will be complete, if not their underlying data abstraction functions.

--------

Not Much Astronomy


Yeah, not much astronomy going on for me these days.

The new baby is the main culprit. (I'm not complaining! She is an immense source of joy and peace for me.) Those very few times I've almost hauled the scope out these last weeks, the weather just wasn't there. Over the next month or two, though, things in my life and in my schedule will shift a bit here and there, and I look forward to soon getting at least a little time at the eyepiece. I am especially looking forward to taking my 4-year-old out under the stars again; he still occasionally talks about our early morning leonid party we had in November, and I certainly want to maintain support for his interest in looking at the sky.

--------

March 6, 2002

RSS Imports


I've got RSS imports working.

I've written an XSL stylesheet that transforms RSS files (versions 0.9, 0.91, 0.92 and 1.0) into XHTML fragments. A PHP script processess the XSL Transformation and echos out the fragments to the appropriate part of the front page.

Next on the list is building the Article pages, and then the Author's admin screens.

--------

March 1, 2002

Rethinking My Architecture


As always, I'm rethinking my architecture.

Now that the wife and kids are all in bed, I've finally had some real time to go over what I've accomplished in the last two weeks and map out my next steps. The very next step is to get the RSS import functions working on the home page.

Here's the thing: I intend to export RSS feeds of all my content channels, and (as already mentioned) I'm going to be importing RSS from elsewhere; so the begged question is, "Why not just import my own feeds when building the homepage?"

Yeah, that would imply all the code I wrote over the last week in my spare time (hah!) was purposeless.

Actually, most of it is entirely reusable; it can just be swapped around so that it becomes my core RSS export algorithm.

You know, I went round this circle a hundred times when planning, so it irks me that I'm going around again. Something just seems wrong about exporting RSS documents from my SQL database, only to just slurp them back up again to post on my own site.

But what's the alternative?

Well, the path I'm going now will require me to publish twice, as it were, every time new content is added. Once to the xhtml on the site, once to the rss files left behind for content subscribers to pick up. Is that better than publishing once and then using the published rss materials as sources for my own homepage?

Actually, the rss generation is not necessarily synched with the xhtml generation. The plan for publishing, right now, is to ignore messing with cron schedules, and instead just publish the xhtml on the site when an author/editor commands it. The publishing model will actually generate static pages from the dynamic output of the php and database. When a new article is added, it can be previewed via the "live" php pages connected to the db, and when it looks good, the author just hits "publish", and the php will splurt out static xhtml that gets served on demand in end-users browsers.

The rss, on the other hand, is (was?) only going to be generated as requested by outside agents. I.e., there is no "rss file" sitting on the server, waiting to be picked up, getting regenerated every hour/day/week/whatever. Instead, when an agent requests the rss feed, a php script will dynamically generate one on the fly, using whatever the then-latest content is, as needed.

Hrm. Well, none of this changes the need to bring in rss/rdf/xml data from outside syndicates. I'll just bang that out and then revisit this internal problem afterwords.

Aside: BBEdit rocks. It's been a very long time since I've used it. I've got the 6.5 Demo running right now; it's much better than the 5.0 version I used back in the day.

Opera also rocks. And Netscape is back on track.

I used to be a major Netscape fan. I'm by nature irrationally anti-Microsoft, and since I got on board with web development within days of Mosaic being launched, I've got a soft spot in my heart for it's first child.

Still, Microsoft's no-need-to-think interoperability is nice. And the ubiquitousness of their "standards" makes many things easier. And ASP was a great development. And MSWord finally replaced WordPerfect on my desktop due to a couple of specific features. And Exchange convinced me I wanted Outlook in all its bloated glory at work, and thus my work pc became a windows machine. And when I was writing Java, the Explorer kicked Navigator's bee-hind when it came to conforming with the "standards".

And suddenly I'm a MS fan. My company is a Certified Gold Partner development company. (Not that we do only MS work, but the majority of our programming rev comes from clients that are distinctly MS-based.)

And then IE on the Mac, touted as one of the first "fully compliant" CSS1-savvy browsers, failed me. Right here, just in the last week or so. IE 5.1 Mac is rated around 98% CSS1 compliant. It's that final 2% that has me pulling my hair out. Their "float" selector is buggy as all getout.

And then, for testing purposes, I loaded a bunch of "forrun" browsers on my G4 at home, and on my Win2k machine at woik. And I spec'd out the conformance matrices for Navigator 6 and various vers. of Opera wrt CSS1. And you know what? I'm about to abandon Explorer as my browser of choice.

For now, at any rate.

EXCEPT THIS ONE PAIN IN THE REAR THING THAT IS HAPPENING RIGHT NOW!!! I'm in Navigator 6 on my Mac right now, typing away into the Blogger window (which I hope soon to replace), and I reach for my mouse, wander up to the top-right corner of the screen, hit "Post"...

...No, wait a minute - I don't hit post. THE BUTTON ISN'T THERE! Weird. I guess I'll just copy this longwinded post to the clipboard, fire up Explorer (or, actually, Opera, cause I'm perverse), and paste it in there.

<*shurrrp*>

[..........]

<*THPBLAT*>

Okay, I just pasted it into the Blogger window on Opera. It looks kinda funky, but there's a "post" button, so I guess it'll work.

Until next time....

--------

Focusing on Importing RSS


This weekend, I'll be focusing on importing RSS feeds.

I've already got Headlines and Summaries of local Opinion, Blog, and Review articles showing up dynamically on the "front page", along with dynamic lists of recent Authors and Subjects. Once I have Headlines and Summaries of items linked out to RSS providors, I'll have the main portal all spiffed up.

I still need to go back and clean up some of the code, though. There's a lot of repetitive crap that should be folded into more user-defined functions.

Oh, and my front page validates as XHTML 1.0, and the stylesheet validates as CSS1 - no errors, no warnings.

What goofball, by the way, took the "target" attribute out of "a href"s??

--------

The Interface Is Nailed Down


Okay, the interface is nailed down pretty well. I'm not set on colors and such, but the layout and logical ordering is fine.

Of course, I am frustrated with the mixed support for CSS1, which is, after all, a six-year-old recommendation! Navigator 6, Opera 5, and Explorer 5.5 (Windows) are all pretty good, at this point. Unfortunately, Explorer 5.1 (Macintosh), while overall one of the most compliant browsers, still has a really nasty float{} bug that totally destroys any attempt at floating columns of text in any but the most simple layout. I may just offer an alternative stylesheet or two, but for now I'm done with that side of the development until I get the data flowing better.

Which, by the way, is going nicely. I've got PHP talking to MySQL, pulling headlines and summaries into a nice webzine blurblike page, building nav lists of recent authors and subjects, etc., etc., etc.

Still to do:
RSS import;
RSS export;
Publishing static pages;
Session management;
Discussion boards;
Author's input screens;
Other stuff.

Yeah, there's a way to go. But I've spent a long time developing a strategy, architecture, framework and design schema for everything, so things are now moving along without much in the way of speedbumps.

--------