Thursday, August 21, 2008
Many hosting options
Hosting can either be very simple, or very complex. It really depends on a few basic factors.
Are you expecting a dramatic amount of traffic right away? Or a gradual increase from nothing? What kind of scalability do you expect? If you don't know the answers to these questions, have a look at the traffic for some of your competition to get an idea of what you might expect. Is your site going to be database driven? Or mostly a static site?
The other main consideration would be features. Small sites just starting out will do wonderfully with a cheap shared hosting plan. There are literally thousands of options out there, I suggest going with one of the larger corporations though, less chance of them disappearing (along with your site!).
Larger traffic sites can look at co-lo hosting, getting one or more machines hosted at a facility designed to manage the hardware. Very rarely would I suggest you host your sites in house. Only if you have dedicated sys admins, a proper server environment with full backups for power and connectivity. The last thing you want is for a natural disaster, or accident to turn your site off! While these things can happen at other facilities, they are usually designed to keep running even in event of natural disasters.
For truly massive sites (although I don't think you'd be reading this, as you've got teams of people like me to tell you these things) it's exciting to setup clusters of machines, working with masters and slaves (machines) and distributed environments around the world. Good fun! Sadly not relevant for most of us though.
My personal site, which I have a very simple page with very little design or information I host with GoDaddy.com. My only reasoning for going with them as a host, was that my domain was registered there. Please give it more thought than me! I hate the interface trying to get into my account. I have to click through a half dozen pages of ads assaulting me, dreadful interface trying to guess where my next link will pop up. Truly a painful experience. Luckily most of the time I simply ftp straight to the server, and skip that user interface nightmare. I have setup a bunch of "testing" sites there, where I post sites I'm working on for various projects, since I like to keep my home network truly hidden.
Friends and associates have found success hosting personal sites with 1and1.com, although I've never personally used them, I hear they are good!
Please don't judge me by my home page! Ever heard the adage "The cobblers children have no shoes". That's my site! I spend so much time on sites for clients, and for new ideas etc, I never actually update my own. Please have mercy!
BFN
Wednesday, August 20, 2008
What the site is for?
Finding out reasons why the web site will exist (Sales, Marketing etc)
Setting up these goals at the outset, will give you something to gauge your progress.
What is this site for? Well, so I can practice some of my fledgling writing skills on the unsuspecting web public. Hopefully one day people will leave comments... :D
BFN
Tuesday, August 19, 2008
Transaction processing, lots to consider
For shop sites, how the transaction will be processed
There is lots of information out there about setting up a shopping cart/store on your site, so I won’t cover those items. I’d like to go over all the _other_ options, and how to get the money from your people!
Some sites, (eg. Amazon.com) have wonderful API’s which allow you as the web developer SO much opportunity to sell stuff. If the things you want to sell are already on Amazon, more’s the better, because not only can you earn money by selling these products, but you can ALSO earn a cut of selling them through Amazon! Neat huh?
There are other store’s which offer similar API’s, as well as some which have affiliate programs worth pursuing. If you don’t have many things to sell, and you’re in the right market segment, then another example is Best Buy. They offer you the ability to earn a small percentage on what people end up buying at their online store, after clicking on a link from you. The only real drawback with them is that there is no API. That means all data about the product, including the link to it, you have to manually find in their tools, and add to your site.
The beauty of using an API, is that you can have your site do all the work for you!
I’m a massive fan of letting the site do all the work.. that’s what they are for right? An API should let you find out a lot of information about the product you wish to sell, after being given only a little. You can send over the UPC, title, or similar identifier, and have the other site tell you everything about it. From the cost, the link for more information, a buy link, an image of it, reviews, and much more. Using just this information you can enrich the content on your own site, without having to do much at all! Plus it can happen real time, so the information the user is seeing the most current possible.
As much as possible writing small add on’s, applications, or server side scripts to take care of any manual task the better. When a user see’s your content changing, they will come back more often, just to see what’s different! Creating a “clearance” or “news” section to a site, then never updating it, is instant site death. If a user comes to your site twice, and doesn’t see this information change, they won’t come back again because they assume it will never change. You don’t have to make it too hard on yourself, especially if you can make that content truly dynamic. If you spend a day a month just creating news items for the next month, then use a content manager to schedule them to come out every few days, suddenly your site appears relevant and up to date, even if that is the only thing on the site which is changing!
Thursday, August 14, 2008
Content Management is important
To make things easier for myself though (save time & money) I set all the variables at the top of each page. This way while each page stands alone, if they want to add/edit/remove a field, it can be added quickly and easily.
Security! This is a very important part of your cms. If it’s at all possible, I highly recommend never running this directly on a production server. This makes it harder for disreputable people to find it in the first place, leaving less room for brute force or other attacks.
This being said, if it’s going to be a well known site, you can protect your CMS in two ways, sometimes both. You can use the server (if it’s *nix use .htaccess) so that they can never even get to a login screen. Alternately you can use DB/server side scripting to protect your site. There are positives and drawbacks to both, so this decision should be made at the outset, as to what the security requirements will be.
BFN
Wednesday, August 13, 2008
YouTube XML uploading
I'll give a quick example of one thing that I was a little irritated by (because I knew it was going to break, but I had to guess which way was correct, sadly I picked wrong!):
yt:title, Required. The tag specifies the display title of a TV or movie video. This tag may have the same value as the media:title tag.
Subtag of: movie_metadata tv_metadata.
THEN..
tv_metadata, Required etc.
Subtags: id, show_title, episode, episode_title, season
Umm.. yeah.. so it's a subtag of it, but it's not a subtag of it? So it turns out, it's not! But of course I found that out the hard way (trying it).
I know it sounds like I'm getting on their case, but I assume many people read/use these documents, and has no one ever mentioned these problems?
Anyhoo! Book writing is going.. well.. no where! Sadly. Will have to get back on track next week. Tomorrow I'll post another excerpt, then another one next week!
BFN
Tuesday, August 12, 2008
All quiet on the ...
Tried to help MS out yesterday (front end developer) with a problem related to the video's on the page. There are basically 5. One in the main spot, and one beneath it which load with the page. When the user clicks on one of the movies to see details (which open in smoothbox) both of them need to stop. This is all working OK, the error occurs because each of those movies has also a trailer link, which then brings each of the (up to 3) trailers into replace the on load trailer. For some reason the variable he was passing to detect which of them was playing, so to know which one to stop, then restart once smoothbox was done, just wasn't working!
I made some suggestions about how to pass the variable differently, but I believe it is still not working. Sometimes the simplest things about the most basic interface can get really hard to make work! Like the smoothbox + ajax error, which is still not resolved. There must be someone out there who's got it to work before, I just have to find out who that is?!
BFN
Friday, August 8, 2008
AJAX and smoothbox - no resolution!
Frustration! Sadly today is the day we show the site to TPTB, so those beautiful smoothbox layovers are off the site, replaced by clunky old school window popups.
I simply can't get it into my head that we can't use AJAX, and Smoothbox together. The front end developer (who for brevity's sake I'll refer to as MS from now on) thinks that it wouldn't matter which framework he used, that it simply won't work. I think we're just missing something still, so if anyone comes across this while searching for a solution, AND finds a solution, please let me know how it works! If for some strange reason we crack it, I'll definitely post again as to how it was solved.
BFN
Thursday, August 7, 2008
Ajax and Smoothbox problem persists
The closest solution we found, and attempted to implement (unsucessfully) was found in the comments on the smoothbox web page.
# Pietr Says:
2008-04-01 at 10.32 am
There is a problem when you dynamically load content via AJAX into a div or span. If you have a link with the smoothbox class inside, it is not possible anymore to use the smoothbox, as it seems that the new element is not being regcognized as a smoothbox element. The link is just opened in the current window, and not in a smoothbox. How can this be circumvented? (A sort of “reindexing” of the smoothbox elements would be required I think.)
Then:
# Boris Says:
2008-04-01 at 10.33 am
Just run TB_init() after you AJAX call.
---------------------------------------------------
So we tried to run TB_init() in a bunch of different ways, but still no luck! Will update with results.
BFN
Wednesday, August 6, 2008
AJAX and Smoothbox issues
The entire process
User "drags" an item into a "box".
The JavaScript then runs my script thusly:
pickMovie(item.id);Then my script does this (shortened for brevity's sake):
function pickMovie(int) {Basically all it does is capture the ID, and send it to the PHP page. At the PHP page, it does a nice big request from the database, and returns the following:
xmlHttpPoll=GetXmlHttpObjecta()
var url="/pickmovie.php?element_id="+int
url=url+"&sid="+Math.random()
xmlHttpPoll.onreadystatechange=stateChangeda
xmlHttpPoll.open("GET",url,true)
xmlHttpPoll.send(null)
}
So now this is returned to the JavaScript to output like:<li><a href="http://www.blogger.com/titleinfo.php
?id=1&keepThis=true&TB_iframe=true&height=609
&width=761" class="smoothbox">Title</a></li>
function stateChangeda(){Pretty simple? The output we found had all the &'s turned into &'s. No idea why, but so hence why the front end developer did the replace here.
if (xmlHttpPoll.readyState==4 || xmlHttpPoll.readyState=="complete"){
$('demo').setStyle('display', 'none');
$('searchResultsCont').setStyle('display', 'block');
var resultsList = xmlHttpPoll.responseText;
var amp ="&";
var updatedResultsList = resultsList.replace(/&/g,amp);
$('searchResultsUl').innerHTML=updatedResultsList;
}
}
Doesn't work.. I mean the link works, but it doesn't use the smoothbox script. It works elsewhere on the page, where it is simply written, but not when returned through AJAX.
I'll post more as we learn more!
BFN
Tuesday, August 5, 2008
100 Open Source Presentations...
Very interesting to see what's new out there! I particularly liked the Developers vs Designers pdf. Way back in the late 90's when Java was "the next big thing" I really thought it would be. I was amazed at what a wonderful language it was (is). While at News Interactive we wrote some internal apps in it, but were unable to find a way to integrate it into the web sites, since Java applets were just not what the users wanted to deal with. With that experience, and being fortunate enough to attend the www7 conference in Brisbane, Australia in 1998 I thought that Java would eventually adapt itself enough to be useful in the web. From what Developers vs Designers pdf talks about, I think the future is once again rosy.
Still.. love PHP now!
I loved the How to be Normal pdf, simply because it explains in a simple, understandable and concise way what I've been trying to show people who _don't_ choose to normalize their database structure since the start! Over the past week I've been debating how best to cover this in the book I've been writing, and I think (without so much of the technical aspects) this will help me get my thoughts together .
Friday deadlines
Reasons why Friday's are bad launch days (for web sites, and pretty much anything):
- Everyone has had a long week, and are exhausted at the end of Friday, and all want to go home and rest. People make mistakes when they are tired, and tend not to work as efficiently when they are thinking about all the wonderful plans they have for their weekend, none of which include being at work.
- What happens if something goes wrong? It either stays broken over the weekend, or the staff have to stay late on Friday plus possibly WORK all weekend. This messes up your relationship with your users, and your staff, a lose lose situation.
- People often take Friday as a vacation day. There is a chance, some of your staff won't even be there!
Personally my favorite go live date is a Tuesday. You set the deadline for finishing work on the Friday, spend Monday testing/final tweaking, then Tuesday morning you go live. This gives you all day Tuesday to iron out anything else that you didn't see on Monday, while it's early in the week, your staff is still fresh and not tired, and the chances of them cutting into personal time is extremely minimal.
Sometimes though these dates come from TPTB and you can't set Tuesday as your launch. Absolutely determined that it is "done" by Friday. This means you have to squash your timeline, and set the real deadline for Thursday. Have everything done, completely written and tested, then Friday MORNING go live. Spend the day ironing out any last minute bugs, and voila, everything is ready to go for a full weekend, and staff can enjoy it as they rightly deserve.
See how simple this is? It doesn't just work for web site launches either, it is plain out COMMON SENSE people. Think about it!
Sadly I know the only people who read this agree with me already *sigh*. Make a case to your bosses, use all the reasons I've posted and more that you think of!
BFN