GeekLikeMe.net

GeekLikeMe

(home)
Insert quarter. Avoid Klingons.
Collected web clippings, ramblings, and scribblings from me to you.

Saturday: December 1, 2007

A new verbose post? Really?

A semi-quick little update as to why I haven't posted much of anything to this section in recent weeks months. It can all be summed up pretty quickly actually. I moved, and I'm still on the hunt for a new place call my own. Combine that with other factors like work projects, adjusting to our new temporary residence, holidays, interest rates, the position of Venus in the third house (ok that was really dumb), etc etc. Basically, there a host of other reasons that would just bore you. But never fear dear readers, things are looking up.

I just recently purchased a brand new MacBook (daily grind readers already know this). But what's so special about this purchase? The fact that I can now run Windows on a Mac, that's what! I previously owned a PowerBook G4 (still do, it's just not getting much use anymore). Trouble was (and still is), by day I work in a Windows world as an ASP, ASP.net programmer / web developer. Having a PowerPC Mac just doesn't allow to run the kind of software I need to do any kind of work in my free time while say, commuting home from work or watching television (I like to multitask). And yes, I've heard of Mono, and no it couldn't work for what I need to do for job related tasks.

My new sweet little MacBook, which is both lighter and smaller than ye old fifteen inch PowerBook G4 of yore, is a great little machine. Plus, now I can get back to coding my nerdy ASP and SQL stuff whenever I want to. So basically, things should start happening around here soon. I'm cooking up some potential new features and designs as well as working on other projects that have been sorely neglected.

What's in the pipeline? Well, I really should get back to making some new comics for this site- another sorely neglected section of this site. There is also a project that was supposed to be included in this last iteration of GeekLikeMe that didn't make the final cut. It's going to be spun into it's own little project to see how it fares in the big wide world of web. More on that later when I have something more, uh, well coded to show.

One last note, going on a much needed vacation next week so links will be sparse. My superfluous linking skills will be back on schedule when I return.

Posted to Verbose filed in GeekLikeMe / Site Related @ 12:08 PM | Tags (6) | apple | asp | development | geeklikeme | life | programming |  | Discuss (0) |  | facebook | twitter | 0 Clicks | Posted by Vin


Friday: July 14, 2006

The benefits of webrooting.

Ever wanted to ensure a smoother transition when uploading your newly designed website to your newly purchased web server space? Rolling up your sleeves and setting up a webroot in your code may save you some time and some unnecessary headaches.

webrooting

Setting up a webroot is simple if your code is structured in a semantic way already. My general practice in designing websites is to give myself virtual include files for the header and footer of the site in question. This way, making global changes is far more easier than having to make individual changes to your website page by page. For those of you advanced web designers this is probably second nature. For those just starting out, this method will save you lots of time. The main content of the page generally lives between the two calls to the header and footer includes (see above example for diagram, if confused).

The next step is to set up the actual webroot variable in your code. You may preferably want to do this in your header include file so that each time a page is loaded, this variable carries over to the rest of your content. In this tutorial, I am going to show how to set up a webroot using ASP (my programming language of choice). The same concept can be applied to those of you who use PHP; you just need to use the proper syntax (which escapes me at the moment).

webrooting

So lets begin by declaring a variable intuitively called 'WebRoot' for this example. Set this variable equal to whatever folder you are currently coding your website in. In my case, I had been working locally in a folder called 'glm_06' so my webroot becomes '/glm_06/' (the beginning and end slashes are important, we'll get to that later).

Then in the content of your pages start adding this variable to your image tags, anchor tags, and basically any part of your site that has a path pointing to something in your local work folder where your site lives.

webrooting

You may be asking, why not just avoid this method and just point paths to where they are supposed to go without using this variable? One advantage right off the bat is working with subfolders. If you happen to have a portion of your site that you want to encapsulate into a folder underneath your main work folder, webrooting makes things a whole lot easier. By using a webroot your paths will line up automatically to the root of your server (hence the term webrooting) rather than you having to adjust every single image and href path to work in said subfolder (rather than having to make image paths line up by changing the source path to '../img/' for example).

Finally, this method comes in handy when you need to push your website to a live environment. If your web host demands that all of your HTML documents must live within a designated part of the server, all you would need to do is change the webroot variable in your top include file to sync things up.

While there is nothing groundbreaking here in terms of coding, I felt like explaining the benefits of this methodology because it has helped me out in the past. It may be of more use to those who are just starting out with web programming and don't use this kind of structure. It could possibly save some frustration and be a time saver in the long run.

Posted to Verbose filed in Programming @ 2:36 PM | Tags (2) | webroot | asp |  | Discuss (0) |  | facebook | twitter | 1 Click | Posted by Vin


1 Last »»