My home on the web - featuring my real-life persona!

Compare the benefits of using HTML Server controls with using HTML controls.

HTML controls are part of the HTML language. You can use and address them in client-side scripting but not from the server side.

From what I understand, almost every HTML control can be converted to a server control by using the <runat=”server”> tag in the HTML code on your ASPX code which signals the server that this control is server-side. On page load, the server control generates the code for the control and sends it to the browser.

HTML server controls have the advantage of retaining status (viewstate) - that means, the server knows if the checkbox is checked or not and if an option is selected or not. This is particularly helpful if you refresh a pages or go back to it. A regular HTML control would be reset to the state in the HTML code. An HTML server control on the other hand checks with the server and the server will tell the page, that the user had selected option B and that the name entered in the text field was Susanne. With an HTML server control, the code for the control and the code behind is executed on the server but it can interact with client-side code.

HTML server controls seem to be the in-between step between old-fashioned HTML controls which don’t do much and are purely client-side and fancier Web controls or ASP.NET controls. The resemble HTML controls and make the transition from a static HTML page to a server driven ASP page easier. ASP.NET controls are not based on HTML anymore and are basically a new programming language that you have to learn.

What are the benefits of using the style sheet in a large company or educational institution?

I “grew up” teaching HTML to myself, and coding HTML pages manually. I didn’t know much of structure and presentation layer, and I happily mixed HTML and presentation elements together to create a big messy code stew. I remember when I first saw the CSS function in Dreamweaver and I thought that it was stupid - why would I define the look of a page element somewhere else instead of right with the very element? Well, I learned why when I decided to change the look of my website and I had to change every single element of presentation manually. CSS at first glance was terribly confusing and I didn’t feel I really _need_ it. Over the years I thought it would be nice to know CSS and I especially liked the possibilities of positioning elements with precision. Having to use tables to arrange items on a webpage always seemed awkward to me. But it would also mean having to forget everything I knew about HTML and start over. When I started at Davenport, the first class I took was CISP110 (Web Page Development) and when I looked at the book I was happy as a clam that I would finally learn CSS. Now, enough of the babble, why don’t I just answer the question?

A CSS (or Cascading Style Sheet) is a file that holds the presentational layer of a web page and thereby separates formatting from content. In a large company - and an educational institution is usually just that - it is extremely important to use CSS. It helps to keep a unified corporate image across all parts of the web page.

Often, different people work on different parts of the web site, someone may be in charge of the customer service pages while someone else takes care of the product index - the equivalent in an educational institution would be the different departments for example the Computer Science department vs. Marketing Department etc. Instead of formatting web pages manually, the formatting would be set by a CSS while the code only defined elements or regions. If you think of a web site and its different sections, they all have a similar feel to it. Most have the same page head and page footer, similar side bars and the overall fonts and color schemes are the same throughout.

Now, consider that a company changes their corporate color scheme. While I am usually a strong believer in the power of color, there are several reasons to change your corporate color scheme. One of them, I experienced with the company I work for. We used to have orange and light grey as our corporate colors, so our links were orange, backgrounds and headers were grey etc. Some years ago, we bought another company and we decided to show off the merger in combining our two business colors. Their color was dark blue, so we decided to change our corporate color from orange and grey to orange and blue. If our web site had not separated content from presentation, someone would have to go through every single page and change the color value from color=”grey” to color=”blue” - and that on thousands of pages on fonts, backgrounds, borders etc. Using a style sheet, the whole thing would take minutes and only a single file would need to be edited in a few places. Not only is this an incredible time saver, it is also a lot less likely to cause errors and ommissions. Now, of course it isn’t THAT easy, but I think it drives home the point well. Of course, we decided a little later that orange and blue really didn’t look that great and we went back to orange and grey :-)

There are a lot of great examples on the web to display the power of stylesheets, the most famous is probably the Zen Garden (http://www.csszengarden.com/) which can have a totally new look just by switching to a different CSS file.

How is HTML different than XHTML? Which one you would prefer to use in new Web projects and why?

XHTML (eXtensible HyperText Markup Language) is an extension of the HTML language. Regular HTML is based on SGML - which is a very complex and difficult to follow syntax. With XHTML, the W3C switched to a different code base, the much simpler XML syntax. HTML was always very open and most browsers were able to acceptably render non-standard code. Unfortunately, this led to a lot of browser-specific code that caused major incompatibilities with the different browser engines.

XHTML has much stricter specifications. XHTML code must be well formed, for example in XHTML code is always lower case, all tags must be closed or contain a closing slash, attributes must have a value etc. The validity of XHTML can be tested with the Validator of the W3C (select XHTML as the document type)

For newer projects, I would always use XHTML. Most older browser are able to render XHTML correctly. I don’t think older, outdated standards should be used unless it is necessary for legacy systems.

How do you compare client-side and server-side programming? Discuss their advantages and disadvantages.

In general, client-side means that the code is executed on the client computer while server-side means that the code is executed on the web server. A client-side program uses functions of the browser and possibly the operating system (which may pose security issues) while server-side programs use the functionality of the web server they are running on.

Client-side scripts are often part of or referenced by an HTML page. The user’s browser is responsible for processing and executing the code while or after loading the web page on the client computer. The most commonly used client-side script language is JavaScript, which is a rather simple programming language that is easy to incorporate into HTML code.

In server-side scripting, the browser requests a page from the web server, and the server creates the page content “on demand”. Most times, the client does not see or receive the actual program code but just a web page that looks like plain HTML. BlackBoard is a good example. The currently open page is a Java Server Page (EDIT: since this is on Wordpress here, it is of course a PHP page) and it has been dynamically created when you clicked on this topic. The content you see is depending on who views it and when it is viewed. The next time you click on it, it will be different. It may just not be marked as a “new post” anymore, someone else may have replied or I may have edited my post.

Both have their advantages and disadvantages. Client-side scripts are good if a programmer does not have full access to the web server. I remember a long time back I had some free web space (Xoom or so) and I was trying to create an email form. I didn’t have full access but was only allowed to use some scripts that were included - what a pain. The successful implementation of client-side scripts also depends a lot on the browser. Even though most browsers display plain old HTML pages in a similar way, there can be a huge difference in the way code is executed. In addition, we have the different operating systems, the OS settings and the browser and there are a lot of possible combinations that may cause unexpected results.

Server-side scripting is independent of the browser and OS (though slight changes in layout can always happen), and it is easier to predict what the user will see. It does require more from the web server though. Not only do you need certain programs and functions on the server, you also have to consider the server load. If you have a lot of simultaneous users accessing a server-side script, the server has to be able to process all those requests. Server-side scripting is also more secure, since the program code is not transmitted to the user but only the result.

New semester and how to hide posts in Wordpress

As I mentioned below, I am not too busy right now but luckily my class has started, and I am really excited. In case I haven’t mentioned it, I am going to Davenport University part time for a BS in Computer Science. Davenport offers a couple of different specializations in the CS area, and I chose Web Development. With a little luck (well, it’s more about being able to pay for classes), I will graduate in April 2010.

Currently, I am taking CISP238 (Server Side Scripting I) and I am really interested to learn more about this. I have dabbled a little bit with Javascript, PHP and Perl, but never enough to really be able to code.

I assume by now, half of my translator colleagues fell asleep but I really want to write a little bit about school stuff here but straying to far off-topic and boring the non-geeks. Searching around, I found out that you can set up Wordpress so that certain categories don’t show up on the main page. The topic exists, you can select the category and see it, it just won’t get into your main page or in your feed. I really like that and I think it may be of interest for other people too. I got the instructions from Jangro 2.0. I had a hard time finding the category ID but it is explained on the Wordpress Support Forum.

Now, I just created a category called Davenport University and selected that to be hidden from main page and feed. I did a quick test and that actually worked, you may still see the first test topic since I created it first and then added the code to hide the category.

« Previous PageNext Page »