|
just another regularban.info web blog |
| MEMBERS: | Server vs Client Sides of Web
Things which exist on one's personal computer are referred to as "client side", and on the web host as "server side". The average internet user might have first heard "client" in the context of applications installed on the personal computer, such as "email client". Those mail systems which can be used from anywhere are "web mail", and exist on the server side. In practical terms, all your office suite programs, media players, programs to edit images, most games, and so forth, are probably client side, although "utility" type functions are evolving on the server side. For example, users can now share data on server side spreadsheets and word processors. Most browser function is defined on the client side, perhaps with some JavaScript add-ons for interaction, calendars, multi-level menus, animated graphics, et cetera. Business enterprise level content management, databases, store systems, and much more are on the server side. Server side programming can range from simple CGI scripts ("Common Gateway Interface") written in a variety of languages, such as Perl. Large databases can be built in the popular open-source MySQL, and accessed through interfaces programmed in PHP. First embodiments of such CGI functions started a new copy of the executing module for each command request. To avoid server shutdown from excessive workload, host programmers have evolved better ways, but these need not concern us ordinary mortals. Fortunately for this author, a web site builder does not need to be an expert in all those server side tools in order to use them. Most hosting companies now offer access to pre-installed modules. Persons wanting better features can purchase modules from third parties to upload and install, such as shopping carts, which are backed by support staff, user, or similar. If the site builder lacks a very fast connection to the server, s/he can install client side copies of operating systems for SQL, PHP, other... to emulate behavior on the host. Sometimes the emulation is less than perfect, such as with different release generations, so adjustments may be needed after upload. Why would anyone bother to do this? One reason is that PHP can take over parts of HTML coding, such as with "include files" which represent often used sections of header, footer, body, or serve more robustly than JavaScript for interactivity and utility functions. If the connection is fast, however, present day "shared hosting" and "virtual private/dedicated servers" make it very difficult for one domain owner to break the system for other users. And only privileged employees have access to the power switch. VPS allows power users to get more behind the scenes than can the SH customer. Caveat: Whether your HTML writing is done directly on host account or on personal computer for upload, keep an off-site copy against the day your hosting company drops or back levels your content. It will happen. What ever the approach a person uses for working on the internet, all these elements are examples of "distributed processing", a concept which some large mainframe computer manufacturers had hoped would never be realized. Now that the small guys and gals have forced the issue, by using ever more powerful personal computers in place of dumb terminals, the big dogs have learned to love and profit from it.
Reusing Code in Web Sites and Applications Part 1 - Using Include() and Require()
Reusing pieces of HTML code is a common way of making web sites (or web applications) more consistent, reliable, and more manageable. Even a small web site consisting of perhaps 20 or 30 web pages can benefit from reusing code for header and footer sections, for example. If the same header or footer is used across all the pages on the site, it makes sense to put the header and footer code in separate files, and then call those files to insert their contents where required. PHP offers two statements that can be used for inserted the contents of one file inside another: include() and require(). These two statements are virtually identical, with the only real difference being that if require() fails, it gives a fatal error, whereas if include() fails it just gives a warning. For this reason I tend to use the include() statement as it just seems slightly more friendly. So, to include the contents of a file called header.inc inside a web page called index.php, you would just need to insert the following line of code (wrapped in PHP opening and closing tags) inside index.php. Include 'header.inc'; As PHP takes no notice of the extension used for the included file, you can use whatever extension you want to. Be careful though, if you put passwords inside an include file with a .inc extension, they will be visible. You can get around this by putting include files that contain sensitive information outside the document tree to prevent people from browsing to them. In Part 2 we'll look at the use of functions when developing web sites and applications.
FrontPage 2003 Made Me a Happy Webmaster
Let's begin with a little history. Many years ago, when the web was up and coming and you needed to be on it, I paid someone to build a site for me. Afterwards, I could say, "Yeah, I have a site, go to -" and then I would name my site a feel a hit of pride. I'd also get satisfaction when my webmaster (if you could call him that; I don't know that I would in retrospect, but that's another story) occasionally forwarded me an email of an interested visitor. My satisfaction was short-lived, as you might imagine. I soon began to understand the power of the web and found the sad reality that my "webmaster" was getting all my emails from my website visitors to be annoying. I had him change this so that the emails came to me. He charged me a one-time fee for getting him to do this. Okay, so these days it is not quite that bad, is it? Your webmaster or whoever is doing the "web thing" for you isn't charging you for every little service? Excuse me. I'll reserve my rant for another article, or possibly a blog entry. So anyway, I fired my webmaster. I built my own webpage. I did this - of all things - with Microsoft Publisher. Yeah, well, it worked - in that I was able to build a site and, with some effort, get it on the web. I won't go into why you shouldn't try this, kids, at home. I was at home when I tried it, sure. But I don't suggest building a site with Publisher. It can be done, but don't do it. One thing that happens - talk about annoying: The site crams all against the left side of the page. There's nothing you can do to change that. You might as well type out onto the web page "Look, Ma, I can create a website using Publisher." Don't do it. Well, I knew at the time I shouldn't be messing around with Publisher. It's great for putting together a book or something for print. It's not good for websites. I had just been so excited because I had created a downloadable book for lulu.com. Publisher was great for laying out a book. I had so much momentum... I put the Publisher site up, and thought I had done a pretty good job, considering that everything was crammed up to the left of the screen. I had yet to become a blogger, and I had yet to realize the importance of tagging and so on. All that important "extra" stuff. I'm joking. Writing tags is not extra. It's essential. So is the blog - on the website. Then I bought FrontPage and a book and... That's all she wrote. I learned FrontPage and I haven't tried anything else out since. Why not? So far I don't need to use the fantastic Dreamweaver that everyone talks about. Oh, I can't do Flash on FrontPage? Uh - yes you can. Easily. I continue to believe that content is all-important. Not bells. Not whistles. Content. I don't care what kind of a site you are putting up. Well, okay, I wouldn't necessarily use FrontPage for every circumstance. But for you and me, the individual or small company that wants to be up and shining on the web, FrontPage is the clear answer. At least it was for me. As I say, I haven't looked back since. One needn't learn the bells and whistles. One certainly needn't incorporate dhtml or whatever that code is that will make letters pop and fly about. Old browsers can't see it, and new browsers - mine, at least - don't want to see it. I have affiliated with companies. That is, I've tried to turn a dollar by putting them up on my site, a link or banner or what have you. Let me say that what I don't like are the banners that flicker and blink and all that junk. If I want the Las Vegas experience, I'll go there. Just give me content. FrontPage can handle that and handle it well. You want to be able to upload Flash, for sure. FrontPage can do it. You want to be able to get as much information on your website with as few bytes as possible. FrontPage can do this as well as any program. So, I'm happy. Are you happy - yet?
|
* About Archives
Categories:
Last Updated: |
| regularban.info
is proudly powered by WordPress MU running
on regularban.info.
Create a new blog and join in the fun! Entries (RSS) and Comments (RSS). |