Comments Finally Work ShareDecember 24, 2009 |
|
Well, this is an exciting day! Yesterday I finally was able to get comments working on my site. I want to try to document some of the hassles I had but this is not meant as a "how-to" guide of anything like that. I want my Journal to be my creation so that I learn about how Webpages work rather than just make use of someone elses code. I don't want to pay one cent for something I can do for free either. I remember working at eBay and learning for the first time about data driven Websites and I knew that's where I wanted to go. No one gave me any directions though, other than saying it was possible. So I learned slowly. Working at New Horizons was without a doubt the primary reason I was able to learn about this stuff. I learned the programming languages necessary, and above all I learned what in the heck a database was. Even today I hear people talk about databases and they throw it around having no idea what it entails. "How does this button work?" "Oh it gets data from the database and puts it here." As if that is a satisfactory answer. While technically true its like saying "Cars move because they have gasoline." There is so much more. I've wanted this comment section for a long time, and even knowing how databases work I could not get it. I've had a table in my database called "Comments" for a long time and tried to implement it years ago. I hate to admit it but I finally looked at other blogs to get an inkling of an idea. I always hated the fact that comments where on a seperate page in your standard blogs. My philosphy about Web surfing is that the more pages there are the more jarring experience the visitor has while surfing. Commercially its bad, but it has benefits as well. I now realize why they are on seperate pages. It probably could be built in the same page but the code would be messier and you'd have to account for a lot more stuff. That was a key discovery/realization. Once I accepted that comments must be on a different page the rest practically snapped into place. I built the form and the data handler, accounted for all the data clean up and it was 99% finished. Then I had a huge problem with the insert query. The query was correct actually, but my variables were empty. Even now I have no idea why they were empty. It took me another few weeks to sit down and tinker with it enough to change my approach. Once I did that, the variables were full, the insert worked. The feeling was like that of a sailor being lost at sea for months and months and then finally, one day, seeing land. I'm happy to announce comments can now be left on any Journal entry. There are still things I can improve. Presentation, data handling, an approval system (which is pre built in to my code I just have to turn it on a change a few select things). What stinks is that my brain is hard wired to beleive now that I have comments I should expect a minimum of 50 comments on every entry in the past and higher amounts for every entry in the future. I know that won't happen. But still I check my email every 10 minutes. It's like a child building a paper airplane and then expecting the US Air Force to call. No action yet but it does feel good to have it built in and working. So what's next for this page? I keep talking about a major face lift to make it look better. That's going to be rough. But perhaps. I keep dreaming about making a store to sell items. Not for the business of it. I don't really want to sell T shirts or anything. But I do want to use XML more so that my code can stand up to job interviews better. Oh, Merry Christmas tomorrow, eh? How 'bout that? We were supposed to go to Tennessee but didn't because of Beckah's new job. We are ready for Christmas in Utah though. The stockings are hung (no chimney), tree is up (praise be to the pagan gods of the Romans), and we have a manger seen over looking everything (Gooooo, Jesus!). I'm looking forward to it. I will try to update one more time this year. |
Comments: | |
| Jamie said: | Very Brainy, and Wordy. You are way smarter than me. Have a very Merry Christmas! I understood the Tennessee part! We are very proud of you!Posted on December 24, 2009 at 9:31 PM |