Web Languages and Standards

39K

Solutions

30K

Contributors

Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.

Share tech news, updates, or what's on your mind.

Sign up to Post

Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications tools for websites.  So, what is a web application and how is it different from a website? What are some different types of web applications?  We will help you decipher which is best for the business functions you want to achieve- a website or a web application.


Website vs. Web Application

The best way to elucidate the difference between websites and web applications is to think in terms of purpose.  Do you want to provide information or do you want to get it?

Websites are simple, static, single page sites or marketing websites for distributing information. Websites generally feature and promote products, services, and organizations through articles, images, video, and files. A site informs the world about who you are and what you offer. For instance, you can check your local Italian restaurant website as a customer to check out the ‘Day’s Special,’ or hours of operation without giving away any information about yourself.

Web applications on the other hand are less focused on marketing and more on functionality to fulfill specific business purpose (submitting, storing, searching, and retrieving data). Web applications are software that runs on the web to provide some kind of service or to improve efficiency. Web applications generally always use databases, and are therefore called dynamic. It requires user interaction, as in the user has to provide information in order for the application to work. The big advantage of a web application is that it does not need the developer to build a client for a specific type of computer or a specific operating system because it runs in a web browser. Users can even be using Internet Explorer, Chrome or Firefox, though some web applications may require a specific Web browser.


An Example:

Think of the website of your bank, which promotes the brand and provides customers vital information about their services, and security features. Any member of the public can view the bank’s website but for account holders, the bank also offers web application tools focused on providing specific functionalities. For instance, to help check the balance on their account, submit an online loan application form, or pay bills online.


Technical Foundation

Websites and web applications both are collections of programming code for delivery of content and functionality on the web. The software run on web servers and is accessed through web browsers on a variety of devices.  Both use the same coding languages and tools (HTML, JavaScript, CSS and others) to develop the software. Web applications commonly use a combination of server-side script (ASP, PHP, or Python etc) to deal with databases, storing and retrieving information and client-side script (HTML, Javascript, CSS and others etc.) to present that information, along with frameworks like Rails, Django, etc. to develop and maintain the application.


Types Of Web Applications

There are three different types of web-based applications depending on the roles performed and logic placed and distributed by the server and the client browser.

Server-side HTML Web Application- In this type of web development architecture, the server generates HTML content and sends it to the client as a full-fledged HTML-page.

JS Generation Widgets (AJAX)- The page displayed in the browser shows widgets, where data is uploaded through AJAX query from the server into the content of the page. Any updates from the server show up only for the part of the page requested by the client.


Service-oriented Single-page Web Apps– An HTML-page is downloaded from the server, which acts as a container for JavaScript code to address a particular web service and retrieve business data only. The data is used by the self-sufficient JavaScript application, which generates the HTML content of the page.

It’s also possible to implement hybrid architecture to meet specific business requirements. The architecture of this collection of logically related interactive functions can consist of a number of components, including-

  • Business application functionality
  • Security
  • Browsers such as Internet Explorer
  • E-Mail functionality
  • Forums or bulletin boards
  • Custom-built Advertising


Web Applications Are The Future

Web apps can be customized and tailored for business purposes, like accounting software, reminder systems, order forms, and sales tracking for time saving efficiencies. Web applications can also be designed to strengthen both internal and external communication and improve data delivery and distribution. Advanced web applications are now available as online portals and eCommerce, which delivers content and the functionality of searching, adding to cart, and online financial transaction.

Most business owners understand the value of websites in their marketing plan but not many know the benefits of web applications and how they can offer stronger products and services, improve SEO, reduce cost significantly and help expand their business. Ultimately, whether you choose a website or a web application depends on your assessment of what you want to achieve.

0
Free Tool: Site Down Detector
LVL 10
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Originally, this post was published on Monitis Blog, you can check it here.



In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer technologies such as mobile and social media, customers are the ones who “shop with their voice” so to speak. The world of blog, forums, and numerous other social media channels over the past decade have provided consumers with unheard of power to determine their choice of products, brands, and services. Because of this power customer expectations have also gone through the roof. Continuing advances in technology, along with the “consumerization of IT,” has meant that companies are now expected to offer real-time, 24/7 service to meet the demands of mobile savvy customers.

 

Today, it’s all about meeting the customer needs and getting them to buy your products. And in order to do so, companies need to ensure their applications and websites are in tip-top shape. Customers simply will not have any patience for a website or application that is error prone or buggy or one that takes forever to load. This is why website performance and application monitoring is so central to your business strategy.

 

We talk about this subject a lot because it’s really so critical to the bottom-line of a business. And it’s even becoming more incumbent today as the demands of new technologies like the Internet of Things and wearables mean that customers are interacting with companies and their products through more endpoints than ever before. All of these channels require performance monitoring to ensure that things run as efficiently and optimally as possible. At the end of the day, web performance is really about keeping the customers happy.

 

In what follows, we want to do a reality check by discussing 7 “sure fire” ways to improve your web performance and make sure your customers keep coming back. After all, your business ROI really depends on it!

 

1. Keep Things Fast!

 

Research shows a clear relationship between web load speed and customer conversions. The faster a page loads the more likely customers will be to visit and do business on your site. The inverse is also true. The slower a page the less likely customers will be willing to wait around and engage with your brand. While this seems fairly straightforward, it’s surprising how few business owners really get the importance of website performance and the role it plays in their business strategy. It might be nice to have a trendy looking website, but if it takes 10 seconds to load visitors won’t hang around long enough to appreciate all the bells and whistles anyway.

 

 

2. Make Your Central Message Crystal Clear

 

From the moment visitors hit your page you want to give them a clear reason for why they should stick around. To do this you need to deliver your central message as quickly, clearly, and convincingly as possible. Don’t make your home page so convoluted that folks don’t know what action to take. Use large font, go generous on the content, and create clear pathways to the channels they need to purchase your product . . . period, end of story.


3. Give Visitors a Reason to Return

 

So you’ve got some visitors, now what? Well, that’s only half the battle. Studies show that most will not purchase on the first visit. So you need to give visitors a solid reason to return to your website. Do this by providing them with something useful, something they can’t refuse. Provide practical articles, a regularly updated blog, a newsfeed, or other user-generated content . . . anything that will engage your visitors and provide them with something of value.

 

4. Check Your Web Hosting

 

When reviewing web performance one of the first things to check is your web hosting service. It’s surprising how many times this gets overlooked. Even though your provider may offer you unlimited bandwidth, does that mean shared service with other sites that end up affecting your own web performance? Are you frequently experiencing downtime or bandwidth issues? If so, it’s worthwhile to review your hosting options to ensure you’re getting the most efficient service. Don’t be afraid to insist on 99.99% uptime.

 

5. Use Web Analytics & Gather Metrics

 

To some, this sounds like a well-worn cliché by now, but it needs to be drilled in more and more. If you’re not tracking the behavior of your visitors with metrics then you’re leaving money on the table. There are many web analytics tools on the market today that can help you closely monitor your customer’s online behaviors. The ability to track a single customer across your site and across multiple devices will ensure that you can tailor your brand to their needs. For instance, you want to learn more about when and where they’re visiting from, what devices they’re using, what are their online activities, and other key demographics such as age. Gaining these insights will help your organization better understand what’s important to your visitors and how to personalize their experience.

 

6. Take It Easy on Design ‘Best Practices’

 

Increasing the size of your website images, third-party scripts, and style sheets come with a heavy price and can adversely affect performance. This is especially true in the world of mobile. Over 50% of all time consumers spend on retails site is on mobile devices and more than 50% of consumers multiscreen during the purchasing. According to this slide deck, some of the worst practices are web pages that are initially blank and then populate, pages where the call to action is the last thing to render, popups that block the rest of the page, and designing and testing in a way that the user experience is completely overlooked.

 

7. Adopt Cloud-Based Website Monitoring

 

There are significant advantages to offloading your website monitoring to a cloud-based host – cost, scalability, efficiency, to name a few. Not to mention, this frees you up to focus on growing your business, which matters the most anyway.

 

If you’d like to get onboard with the latest in cloud-based monitoring then you should try a 24/7 monitoring service like Monitis. With its first-class global service, Monitis allows organizations to monitor their network anytime and from anywhere. For instance, with Monitis you can load test your website to determine at what point it starts creating traffic issues. They’ll also send you timely alerts by every possible means (live phone messages, text, email, Twitter, etc.) to keep you apprised about your site performance. If your web hosting services go down then Monitis will be first to let you know.

 

When it comes to monitoring your website, you don’t want to shortchange yourself. Get the peace of mind you deserve by entrusting your business to a proven industry leader. Go to Monitis and sign up for a free trial today and let them help boost your bottom-line. You’ll be glad you did!

0
Preface

This is the third article about the EE Collaborative Login Project. A Better Website Login System introduces the Login System and shows how to implement a login page. The EE Collaborative Login System Part Two - Design Considerations discusses design considerations and security features.

This article will discuss implementation details. Before we get started the people who worked on this project took great care in removing vulnerabilities from the Login System code.  

For it to actually remain secure, you have to kill any vulnerabilities in your site as well. One XSS vulnerability may allow a malicious person to gather the secure session id from one of your legitimate users and hijack that users account. The library files of the Login System can be put to good use to give you some proven good tools to help prevent vulnerabilities in your site.

Introduction

There are several steps to setup the Login System on your website.
You must set up a database for the Login System tables,
You must download the correct code for your environment,
You must copy the files to your website,
You must configure the system using the global configuration file, and
You must replace the example pages with your web pages incorporating the Login System include files.
 

1

Database Setup
At the project's Google Code project home
3
JavaScript
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand.
Self-Executing functions are just one good example that I'll try to demystify here.
1
 
LVL 75

Expert Comment

by:käµfm³d 👽
Comment Utility
It should be noted that these are often called "IIFEs":  Immediately Invoked Function Expressions.
0
 
LVL 30

Author Comment

by:Alexandre Simões
Comment Utility
HI käµfm³d,
you're right, thanks!

I've added it to the article.

Cheers!
Alex
0
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
9
 
LVL 9

Expert Comment

by:Brandon Lyon
Comment Utility
Thanks for the info
0
 
LVL 40

Expert Comment

by:evilrix
Comment Utility
Nice article!

I'm one of those poor souls who has to write cross-platform C++ code and the headaches involved in getting Unicode encoding working in a cross platform way is a nightmare. In general, we stick to UTF8 right up until we hit the system functions. On *nix platforms UTF8 works fine, on Windows one has to convert to UTF16. It's a bit of a pain, because there is a little inefficiency in doing this but it's normally not enough to cause concern.

What doesn't help is the fact Microsoft continuously refer to UTF16 as Unicode and anything else as ANSI. This has confused a lot of Windows programmers into thinking if it's a 16 bit data type it must be Unicode and if it's an 8 bit data type it's not. Ironically, Windows has no native support for UTF8 at the API level, even though it does have a UTF8 code page! I wish someone would welcome Microsoft into the 21st Century :)

UTF8 is really the only portable encoding format and for my money it's the encoding format I'd go for every time. Anyone interested in Unicode transformation and encoding, either because they are an engineer or they are a masochist, should also find the following resource really very useful and a nice compliment to this well written article.

http://utf8everywhere.org/

Thanks, Gonzo.
0
SASS
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
2
SASS
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
1
SASS
Styling your websites can become very complex.
Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
1
 
LVL 30

Author Comment

by:Alexandre Simões
Comment Utility
Thanks Marco,
let me know if after reading the three articles you still feel that something is missing.
It will sure come as a nice subject for a sequel on this series.

Cheers!
Alex
0
 
LVL 31

Expert Comment

by:Marco Gasi
Comment Utility
I f I'll have some idea I'll tell you for sure :-)
Cheers
Marco
0

Introduction

Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the principles and examples of the original article on a 1:1 basis.  As I created the examples for this article, I came across some anomalies in the PHP OOP DateTime implementation.  Here are some of my impressions and some notable gotcha's that I found.


It is possible to create an infinite loop with date/time arithmetic.  Your code will look right, but transitions at the boundaries of daylight savings time will change the values in your DateTime objects.  I hope PHP will fix this.

See: http://php.net/manual/en/datetime.sub.php#114780


When you create a new DateTime object, you can assign both a date/time string and a timezone.  If you create the DateTime object from a Unix timestamp, the timezone cannot be used in the constructor.  You must assign the timezone to the object separately, after the object is created.


The ISO-8601 format for DateTime::format() method is not 100% ISO-8601 compatible.  You can use DateTime::ATOM instead if you need perfect compatibility.


The designator for a Unix timestamp in DateTime::__construct() is the at-sign ("@") prepended to the numeric Unix timestamp.  The at-sign ("@") is also the PHP error-control operator, but it has no error-control meaning in the DateTime constructor.


There is no avoiding arithmetic - DateTime::getOffset() returns its answer in seconds, but functions that use this information may expect minutes or hours.


I found no convenient way to instantiate a DateTime object and get a formatted date/time string in a single line of code.  The marriage of PHP date() and strtotime() was a convenience that is not here any more.  I'll update this article if I find a good solution.


At PHP 7.1+ the DateTime constructor incorporates microseconds when the object is constructed from the current time.  This may increase the risk that two DateTime objects will be unequal.


Now the good news.  Most of what you learned about date formatting with the date() format parameters is still applicable.  You will write a little more code with the OOP notation, but that is common for OOP programming and may help to improve readability.  And none of the common tasks we use in procedural PHP is impeded by the OOP DateTime notation.  A list of the most useful references is included at the end of this Article.


The DATE/TIME Tower of Babel

Human beings can read dates and times in a variety of ways.  We readily understand such things as September 5th, 2010, and we know that it comes before November 11th, 2010,and after May 9th, 2010.  We have shorthand conventions that let us write things like 9/5/2010 or the military correspondence format 5 Sep 2010.  But when we try to process dates and times in a computer program, this variety of formats becomes a jumble of confusion.  In response to the confusion, the International Organization for Standards was moved to publish a standard in 1988.  The standard has been revised and extended somewhat since the original publication.  The only thing that mystifies students of history is why it took so long to promulgate a standard.


Toward a Universal DATETIME Notation

Date formats for computer processing are prescribed by the ISO-8601 standard.  The ISO-8601 standard places all the information in fixed-width data strings with leading zeros where needed.  When you read ISO-8601 standard information you notice immediately that everything lines up in columns.  The larger values are to the left and progressively smaller values are to the right, starting with Year, then Month, then Day, then Hour, etc.  Date/time information formatted according to the standard is very useful because it is both easy to read and easy to understand in comparisons and computations.  For example, the date '2010-09-05' is a valid ISO-8601 string meaning September 5th, 2010.  Imagine how difficult it would be to write programming that works with dates in the text formats, or dates that are formatted like this: 05.09.2010.  Does that mean May 9th, 2010 or September 5th, 2010?  Fortunately the ISO-8601 standard removes the ambiguity.


The ISO-8601 standard removes the ambiguity about the time of day, as well.  All of the hours are represented on a 24-hour clock, so there is no question about what "two o'clock" might mean.  The string 0200 or 02:00:00 refers to 2:00 a.m.  If you're thinking of 2:00 p.m. your ISO-8601 standard will use 14:00:00.


This link gives a good discussion and examples of permissible variations on the ISO-8601 format.

See http://en.wikipedia.org/wiki/ISO_8601


The Value of PHP time() is Always the Same

No matter where in the world you stand, the value of time() is always the same.  The PHP function time() returns the number of seconds since the Unix Epoch.  While local times may differ, time() ticks on second-by-second.  Run this script to see the effect.  Knowing this, we can do arithmetic with seconds, and then return human-readable date and time values that are sensible for different locations around the world.

<?php
                                        /**
                                         * Different Timezones share the same Unix Timestamp
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        // TIMEZONES AROUND THE GLOBE
                                        $locations
                                        = array
                                        ( 'Pacific/Auckland'
                                        , 'Australia/Sydney'
                                        , 'Australia/Perth'
                                        , 'Asia/Tokyo'
                                        , 'Asia/Calcutta'
                                        , 'Asia/Tel_Aviv'
                                        , 'Africa/Cairo'
                                        , 'Europe/Rome'
                                        , 'Europe/London'
                                        , 'Atlantic/Bermuda'
                                        , 'America/Chicago'
                                        , 'America/Anchorage'
                                        , 'Pacific/Honolulu'
                                        , 'UTC'
                                        )
                                        ;
                                        // ITERATE OVER THE TIMEZONES
                                        foreach ($locations as $location)
                                        {
                                            // SET OUR ZONE AND LOCAL TIME
                                            $zoneobj = new DateTimeZone($location);
                                            $dateobj = new DateTime(NULL, $zoneobj);
                                        
                                            // SHOW THE LOCATION AND THE CURRENT DATE / TIME
                                            echo PHP_EOL;
                                            echo str_pad($location, 24, ' ');
                                            echo $dateobj->format(DateTime::RSS);
                                        
                                            // SHOW THE NUMBER OF SECONDS SINCE THE EPOCH, RECOMPUTED IN EACH TIMEZONE
                                            echo ' ';
                                            echo $dateobj->format('U');
                                        }


Handling External Input

Whenever you accept a date/time string from an external data source, what is the first thing you should do?  Turn it (immediately) into an instance of the DateTime object.  The DateTime constructor can turn almost any English language human-readable date/time text into an object for use in DateTime computations and displays. Like the PHP function date(), the DateTime::format() method can turn DateTime information into a formatted date. 

<?php 
                                        /**
                                         * The DateTime constructor may throw an Exception
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $external = 'Yesterday';
                                        try
                                        {
                                            $dateobj = new DateTime($external);
                                        }
                                        catch (Exception $e)
                                        {
                                            // ON FAILURE, SHOW THE EXCEPTION
                                            var_dump($e);
                                        }
                                        echo PHP_EOL . $dateobj->format(Datetime::ATOM);
                                        echo PHP_EOL;

Once you have done that internal date format conversion your programming will handle internal date/time computations easily.


When you are storing date/time values, you may want to store them in the ISO-8601 format strings or in the form of Unix timestamps.  I prefer to use the formatted strings - they are easier to understand when you're debugging.


Handling External Input that is Invalid

The PHP DateTime constructor can turn virtually any human-readable date / time text into a DateTime object - but it won't work on everything.  When it fails to make the conversion, it throws Exception.  You can and should test for this.


<?php
                                        /**
                                         * Invalid date/time strings can be detected when you catch the Exception
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $external = 'Nonsense';
                                        $dateobj  = FALSE;
                                        try
                                        {
                                            $dateobj = new DateTime($external);
                                        }
                                        catch (Exception $e)
                                        {
                                            // ON FAILURE, SHOW THE EXCEPTION
                                            var_dump($e);
                                        }
                                        if ($dateobj)
                                        {
                                            $iso_datetime = $dateobj->format(Datetime::ATOM);
                                            echo "SUCCESS: $external EQUALS ISO-8601 $iso_datetime";
                                        }
                                        else
                                        {
                                            echo "ERROR: I DO NOT UNDERSTAND $external";
                                        }


Handling External Input that is Formatted (contrary to the disambiguation rules)

The PHP DateTime Constructor works much the same way as strtotime(), making some assumptions and obeying certain rules about the format of the date / time input string.  But what if you have dates that are not formatted according to the rules?  One of the common issues arises when we have dates that are in European order d-m-y, but have been written with slashes, implying American order m/d/y.  This may result in incorrect output when the values for m and d  are both in the range from 1 - 12, and will cause an exception when m exceeds 12.  Fortunately PHP has a way around this issue, in the static constructor createFromFormat().  We can tell PHP what format to use as it interprets the date.  This example shows how.


<?php
                                        /**
                                         * Date values separated by slash are assumed to be in American order: m/d/y
                                         * Date values separated by dash are assumed to be in European order: d-m-y
                                         * Exact formats for date/time strings can be injected with createFromFormat()
                                         *
                                         * http://php.net/manual/en/datetime.createfromformat.php
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        // THIS WOULD IMPLY MONTH == 19, OBVIOUSLY INVALID
                                        $external = "19/10/2016 14:48:21";
                                        
                                        // HOWEVER WE CAN INJECT THE FORMATTING WHEN WE DECODE THE DATE
                                        $format = "d/m/Y H:i:s";
                                        $dateobj = DateTime::createFromFormat($format, $external);
                                        
                                        $iso_datetime = $dateobj->format(Datetime::ATOM);
                                        echo "SUCCESS: $external EQUALS ISO-8601 $iso_datetime";


Interesting Forms of External Input

All of these external inputs work correctly with the DateTime constructor and this gives you and your clients powerful ways of talking about dates and computing with dates.

- 3 hours

tomorrow

tomorrow midnight

tomorrow 1:35pm

March 15, 1986

yesterday

yesterday + 1 week

next year

now

now + 627 hours 15 minutes

last Tuesday

third Wednesday

3 minutes, 15 seconds


Producing "Pretty" Dates From DateTime Objects ISO-8601 Dates

When you are ready to present the dates to people and you want them to see nicely formatted dates, you can use the DateTime::format() method to do the reformatting.  Let's say you have this timestamp value: 1,284,593,400 (which equals the ISO-8601 date: '2010-09-15T18:30:00-0500'. )  Maybe you got it out of your data base or computed it in your script.  It's meaningful, but not what you expect when you open the envelope.  "Please join us for cocktails on Unix Timestamp 1,284,593,400."  How can we get something that would be appropriate on an invitation?  Here is how you might do the conversion from a timestamp or ISO-8601 date to the pretty date.

<?php 
                                        /**
                                         * The DateTime::format() can change the rendering of date values and produce pretty dates
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $iso_date = '2010-09-15T18:30:00';
                                        $formats  = 'l, F jS, Y \a\t g:ia';
                                        $dateobj  = new DateTime($iso_date);
                                        echo PHP_EOL . $dateobj->format($formats);

Outputs "Wednesday, September 15th, 2010 at 6:30pm" -- very civilized!


Breaking down the date formatting, we have the following (all documented on PHP.net)...

$pattern
                                        = 'l, '    // LOWERCASE L - text name of the day of the week
                                        . 'F '     // UPPERCASE F - text name of the month
                                        . 'j'      // LOWERCASE J - day of the month
                                        . 'S, '    // UPPERCASE S - ordinal like the letters in 1st, 2nd, etc 
                                        . 'Y '     // UPPERCASE Y - 4-digit year
                                        . '\a\t '  // ESCAPED LETTERS... More to follow
                                        . 'g:'     // LOWERCASE G - hours on a 12-hour clock
                                        . 'i'      // LOWERCASE I - minutes 
                                        . 'a'      // LOWERCASE A - designator of "am" or "pm"
                                        ;


You might envision several patterns that you need in your application.  Most PHP sites and services are written with a central "common.php" file that gets included into all the specialized scripts.  You could prepare the formatting patterns in the common script and refer to them by a variable name, or define the patterns as constants.

define('MILITARY_CORRESPONDENCE', 'j M y');
                                        define('SHORT_8601', 'Y-m-d');
                                        define('COCKTAILS', 'l, F jS, Y \a\t g:ia');


What about the escaped letters?  Like the date() function, the DateTime::format() uses letter patterns as signals to describe the conversion into human-readable character strings, so some letters have special relevance and some do not.  Any character that is not used as a signal in the date pattern string is returned from the function unaltered.  Punctuation is one example - commas and hyphens go right through.  But if we want to get one of the signal letters back, we must tell PHP to ignore the signal and just return the letter.  We do that with the back-slash character, as shown here.  Try running these two lines of code to see how the escape can be useful:

echo PHP_EOL . date('The year is: Y');
                                        echo PHP_EOL . date('\T\h\e \y\e\a\r\ \i\s\: Y');


Setting Your Own Clock Values

Since the values contained in the DateTime object are usable in many different time zones, you want to have control over the way PHP interprets the time zone.  You control this time with the DateTimeZone object.  You can set the DateTimeZone in the DateTime constructor, or you can inject a new DateTimeZone into a DateTime object via the setTimeZone() method.  Here is an example that I use, because my server is located in the midwest at ChiHost.com.


<?php
                                        /**
                                         * DateTime objects are usually aware of time zones via the DateTimeZone object
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $string  = 'Now';
                                        $zoneobj = new DateTimeZone("America/Chicago");
                                        $formats = 'l, F jS, Y \a\t g:ia (e)';
                                        $dateobj = new DateTime($string, $zoneobj);
                                        echo PHP_EOL . $dateobj->format($formats);
                                        
                                        // WHAT TIMEZONE SHOULD I USE?
                                        $tz_ids = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'US');
                                        foreach($tz_ids as $zone)
                                        {
                                            echo PHP_EOL . $zone;
                                        }


Special Meanings for NOW and TODAY

We know how to convert external date/time strings into DateTime objects, and we know how to return them to human-preferred formats with DateTime::format().  Now we can return to some of the special meanings of date/time strings.  NOW and TODAY are particularly useful.

<?php 
                                        /**
                                         * NOW and TODAY have special meanings in the DateTime object; NOW includes time of day
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $date = new DateTime('Now');
                                        echo PHP_EOL . $date->format(DateTime::RSS);
                                        
                                        $date = new DateTime('Today');
                                        echo PHP_EOL . $date->format(DateTime::RSS);
                                        
                                        $date = new DateTime('Now', new DateTimeZone('UTC'));
                                        echo PHP_EOL . $date->format(DateTime::RSS);
                                        
                                        $date = new DateTime('Today', new DateTimeZone('UTC'));
                                        echo PHP_EOL . $date->format(DateTime::RSS);

The principal difference between NOW and TODAY is the time of day.  TODAY is always today's local date at midnight, with hour, minute and second equal to zero.  NOW is today's date including the current time of day.  So in our September example, NOW and TODAY have UNIX timestamp values equal to 1,284,593,400 and 1,284,526,800 respectively.  The difference is 66,600.  This is the number of seconds from midnight to 6:30pm (18 hours plus 30 minutes).  


This script shows that the Unix timestamp is consistent, no matter what timezone you have specified.

<?php 
                                        /**
                                         * The Unix Timestamp values for NOW and TODAY are the same, no matter what timezone
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $dateobj = new DateTime('Now');
                                        echo PHP_EOL . $dateobj->format('U');
                                        
                                        $dateobj = new DateTime('Today');
                                        echo PHP_EOL . $dateobj->format('U');
                                        
                                        $dateobj = new DateTime('Now', new DateTimeZone('UTC'));
                                        echo PHP_EOL . $dateobj->format('U');
                                        
                                        $dateobj = new DateTime('Today', new DateTimeZone('UTC'));
                                        echo PHP_EOL . $dateobj->format('U');


Computing the Difference Between DateTime Objects

This script shows how to compute the difference between two DateTime objects, using the diff() method.


<?php 
                                        /**
                                         * Computing the difference between NOW and TODAY in different timezones
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        // TESTING UTC
                                        $zoneobj    = new DateTimeZone('UTC');
                                        $date_now   = new DateTime('Now',   $zoneobj);
                                        $date_today = new DateTime('Today', $zoneobj);
                                        $date_diff  = $date_now->diff($date_today);
                                        $print_diff = $date_diff->format('%H:%i:%S');
                                        
                                        echo PHP_EOL . $zoneobj->getName();
                                        echo PHP_EOL . $print_diff;
                                        echo PHP_EOL;
                                        
                                        // TESTING ANOTHER ZONE
                                        $zoneobj    = new DateTimeZone('America/New_York');
                                        $date_now   = new DateTime('Now',   $zoneobj);
                                        $date_today = new DateTime('Today', $zoneobj);
                                        $date_diff  = $date_now->diff($date_today);
                                        $print_diff = $date_diff->format('%H:%i:%S');
                                        
                                        echo PHP_EOL . $zoneobj->getName();
                                        echo PHP_EOL . $print_diff;
                                        echo PHP_EOL;
                                        
                                        // USING METHOD CHAINING FOR TIGHTER CODE
                                        $print_diff  = $date_now->diff($date_today)->format('%H:%i:%S');
                                        
                                        echo PHP_EOL . $zoneobj->getName();
                                        echo PHP_EOL . $print_diff;
                                        echo PHP_EOL;


As you can see, it is important to be consistent about your timezone.  You can deal with this phenomenon in one of two ways.  You can set your timezone to UTC.  Or you can set your timezone to a reasonable setting for the location of your server.  I prefer the latter.  See http://php.net/manual/en/timezones.php and http://php.net/manual/en/timezones.others.php for more.


Time Without Date

Let's say we want to know the elapsed time between two events, and we want to express it in notation like HH:MM:SS. DateTime::diff() and DateTime::format() can help with this.

<?php 
                                        /**
                                         * Computing the difference between two times
                                         */
                                        error_reporting(E_ALL);
                                        echo '<pre>';
                                        
                                        $alpha = "2:30:47pm";
                                        $omega = "3:43:16pm";
                                        $date_alpha = new DateTime($alpha);
                                        $date_omega = new DateTime($omega);
                                        $elapsed    = $date_omega->format('U') - $date_alpha->format('U');
                                        $date_diff  = $date_omega->diff($date_alpha);;
                                        $print_diff = $date_diff->format('%H:%i:%S');
                                        
                                        echo PHP_EOL . "TWIXT $alpha AND $omega THERE ARE " . number_format($elapsed) . " SECONDS";
                                        echo PHP_EOL . "RIGHT ELAPSED TIME IS $print_diff";


Leap Year and Daylight Savings Time

These are amazingly easy in PHP.  But beware of a bug in DateTime::add(), illustrated in this code.


3
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX.

The logical flow for the problem should be:
  1. Write an event handler for the first drop down box to get the user's selections.
  2. Send the user input to the server
  3. At the server, retrieve the data from the client side and process it; then send the result to client side.
  4. At the client, use Javascript to parse the server response and update the other drop down box.


Write an event handler for the first drop down box to get the user's selections:

It sounds difficult. What is an "event handler"?  In fact, every user action performed on the web page triggers an event. To handle those events, we need to write a Javascript function, and we call these javascript functions "event handlers". To handle the user's selection of an item in drop-down box, we need to capture the onchange event. Here is a sample code:
 
 <select id=type name="type" onchange="updateData(this)">

Open in new window


The above code means that a function named "updateData" would be triggered when user selects an item from this drop down box. Here the variable "this" means the dropdown box itself. Let's see what happens in the "updateData" function:
function updateData(dropDownBox)
{
  var value=dropDownBox.options[dropDownBox.selectedIndex].value;
  if (value!="") //Ensure no empty value is submitted to server side
  {
    jQuery.post("getResult.php","type="+value,updateNumber);
  }
}

Open in new window


Send the user input to the server

The statement:

var value=dropDownBox.options[dropDownBox.selectedIndex].value;

Open in new window

retrieves user input from the first drop down box. The following statement mean user input is sent to server side php script "getResult.php".
 
jQuery.post("getResult.php","type="+value,updateNumber);

Open in new window

1
Free Tool: Subnet Calculator
LVL 10
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Introduction


Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).  

The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least complicated way as possible.

There are also other frameworks that essentially do the same thing in their own way. Find what works for you. React is what Facebook is built on and is very popular. AngularJS has also gained a lot of momentum and worth checking out.

Knockout takes a basic HTML structure and applies logic (written by you) to control the insertion and removal of HTML elements. This keeps the markup simple and straightforward, especially when it comes to repetitive content.

It's incredibly easy with Knockout to create dynamic interactive web pages with simplified markup. I've seen markup get out of control when creating content both from the server side (e.g. using PHP) or via the client side (e.g. using jQuery), making it virtually impossible to troubleshoot issues with layout and styling. 

I come across many questions in the web dev topic areas that are related to issues with the asker's website. Invariably this starts with them being told to fix their markup and validate it through the The World Wide Web Consortium's (W3C) Validation service.  When a site doesn't validate, it is not guaranteed to work on all …
1
 
LVL 3

Expert Comment

by:mmoore
Comment Utility
Really interesting stuff! So many technologies so little time.
A couple of typos you may wish to correct. "It incredibly easy" "know no only".
0
 
LVL 43

Author Comment

by:Rob
Comment Utility
Thanks @mmoore :)
0

What is Node.js?

Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event driven, which throws a whole new light on the way a server side app performs. As Node.js is the complete package (web HTTP server and server side language), there is dramatically less overhead in implementing it as a webserver when compared with a typical Apache (and PHP) or IIS (with ASP/PHP) installation.

Node.js is written in JavaScript, the most common client-side language around. This reduces the learning curve somewhat for most web developers as they understand JavaScript and how to code it.
 

Why is it Important and what are the Benefits?

Most of the server side languages I’ve used are built on sequential execution models, meaning one task has to finish before another one begins. For instance, PHP (in conjunction with the type of server it is running off e.g. Apache) will spawn a thread for each request made to the server. If that thread needs to get data from a database that takes a while or another request comes in, that thread is locked up and consuming resources. For a data intensive app with many concurrent connections, that could severly impede the server’s performance.

Node.js is single threaded (yes only one thread!) and is beneficial in applications where frequent blocking I/O requests
9
Shoutout to Emily Plummer for giving me this article! She did most of it, I just finished it up and posted it for her :)
 

 

Introduction


In a previous article, I gave some tips on Sass using the Sass syntax. This time around though, I’m going to be using the SCSS syntax to show you some more features of Sass. Here are four singular capabilities of Sass.
 

1. Super Long Selectors

Often times while writing CSS, we find ourselves writing verbose selectors, then in the next rule having to repeat that same long selector just to select a different child element. A little copy-pasta helps the pain, but these long selectors still make reading your code hard to do.

Sass fixes this with nesting! Here's an example:

Let's say you want to edit a button, that is inside of a < ul > that is ​inside of a < div > that is inside of a < section > that is inside of a < container >, and you really need to be specific in this case so that your styles don't carry over. In regular CSS you would have to do something like this:
 
.container .sectionName .divName ul .button { color: #fff; }

Open in new window


But then you realize you need to edit three other things in that unordered list, and they all have to be as specific as possible. Now you have to do this:
 
.container .sectionName .divName ul .button { color: #fff; }
.container .sectionName .divName ul .kittens { border: 2px solid #fff; }
.container .sectionName .divName ul .puppies { font-size: 4rem; }
​.container .sectionName .divName ul .lava { background: red; }

Open in new window


With SCSS you would just do:
 
.container .sectionName .divName ul { 
  .button { color: #fff; }
  .kittens { border: 2px solid #fff; }
  .puppies { font-size: 4rem; }
  .lava {  background: red; }
}

Open in new window


Beautiful! The code is pleasant to read, and you just saved a bunch of time by not having to write out long selectors.
 

2. Vendor Prefixes

2
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
I would never recommend the use of SCSS or SASS or any other parser choker being touted.  If you become familar with how the CSS parser in any mainstream browser you very quicly see the the parser needs to execute 30-50% more steps to parse this kind of nonsense because everything unds up in nested classes and the right to left parsing that is necessary to optimize attachment in the Document Object.

This is just another example of an approach that helps the lazy avoid learning how to do things right at the expense of slowing down the presentation of the page.

Nice article... bad idea... bad technique; fortunately most of experienced professionals tried it and are abandoning it because it has no net valuer.

Cd&
0
Sass Logo
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
3
The canonical version of this article is on my web site here:
http://iconoun.com/articles/collisions/

A companion presentation is available here:
http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
15
 
LVL 111

Author Comment

by:Ray Paseur
Comment Utility
@jason1178: Coming from you that is a great compliment!  Thanks, ~Ray
0
 
LVL 16

Expert Comment

by:DansDadUK
Comment Utility
An excellent article.

I spent years persuading other people (in the Western world) to use the 8-bit ISO-8859-1 coded character set, rather than switching between various National Language Variants of the 7-bit US-ASCII coded character set in order to use (relatively common) accented characters.

Moving to UTF-8 is the way to go now that 256 characters (strictly 191 graphic characters plus 65 control codes) of an 8-bit encoding is no longer sufficient in our increasingly global environment.
0
Preface

This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certain set of common functionalities that should be employed in a website authentication and authorization system.

One article can not discuss all aspects of such a system at the level of detail required for every web developer, so this will be one of several articles.

The purpose of this article in to introduce an open source, collaborative project by various Experts-Exchange contributors, in providing a safe, secure, robust and extensible authentication system suitable for many websites.  The Login System is more aptly called an authentication and authorization system as will be discussed in more detail in the following articles.  At the end of this article you will have all you need for a login page.

Only you as a web developer can determine the needs of your website or web application.  For the very impatient developer you can skip to Section "1. Prerequisites"

Introduction

"I need a login page for my website." A very common question here at Experts-Exchange, but not one which is simply answered.  Why? Because a login page alone is insufficient. ¶

Any useful login system will be based on some type of database.  If not directly tied to a network directory service …
18
 
LVL 38

Expert Comment

by:younghv
Comment Utility
What a great demonstration of the capability of the EE Experts.
Thanks to all who helped put this together.
Big "yes" vote above.
0
 
LVL 15

Administrative Comment

by:Eric AKA Netminder
Comment Utility
rdivilbiss,

Your article has been selected as an Editors' Choice. Congratulations!

ericpete
Page Editor
0
Preface

In the first article: A Better Website Login System I introduced the EE Collaborative Login System and its intended purpose.

In this article I will discuss some of the design considerations and give a more comprehensive overview of the Login System. You do not need to know this information in order to implement some or all of the Login System on your web site. Based on feedback from this article, certain aspects of the Login System may even change.

"Security by obscurity is no security"

With that in mind, presenting the design considerations and source code to public scrutiny means that someone will find an erroneous assumption or some important detail that was not originally considered. This process of public review, especially on a site with hundreds of subject matter experts, will result in better, more robust, and more secure code.

1

IntroductionI previously asserted that the Login System is actually an Authentication and Authorization system.  Authentication being "prove who you are" by logging in and authorization being "do you have permission to access a given resource."  The user's table of the Login System has a text field called "userRoles." Each person who registers is assigned the user role of Guest. The web developer or webmaster is free to add a comma delimited set of roles to …
8
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages.

For Example

a = 2 + 3 (where 2 and 3 are 2 random numbers)

Session("Answer") = 5

then we will create a image using System.drawing namespace with the text " 2+ 5 = " within it. We will store the result into a session variable, so later on our webpage we can use this session variable to compare with what user types.

Lets see the code of Captcha.aspx:

Imports System.Drawing

Partial Class Captcha
    Inherits System.Web.UI.Page 

    Private Sub returnNumer()

        Dim num1 As New Random
        Dim num2 As New Random

        Dim numQ1 As Integer
        Dim numQ2 As Integer
        Dim QString As String


        numQ1 = num1.Next(10, 15)
        numQ2 = num1.Next(17, 31) 

        QString = numQ1.ToString + " + " + numQ2.ToString + " = "
        Session("answer") = numQ1 + numQ2

        Dim bitmap As New Bitmap(85, 35)
        Dim Grfx As Graphics = Graphics.FromImage(bitmap)
        Dim font As New Font("Arial", 18, FontStyle.Bold, GraphicsUnit.Pixel)
        Dim Rect As New Rectangle(0, 0, 100, 50)

        Grfx.FillRectangle(Brushes.Brown, Rect)
        Grfx.DrawRectangle(Pens.PeachPuff, Rect) ' Border
        Grfx.DrawString(QString, font, Brushes.Azure, 0, 0)

        Response.ContentType = "Image/jpeg"
        bitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)

        

Open in new window

0
 
LVL 23

Author Comment

by:Saqib Khan
Comment Utility
Absolutely, the purpose of this post was to show how to create a captcha yourself.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
Comment Utility
There is a reason why all of the CAPTCHAs that you see these days are very squiggly, borderline unreadable texts:  OCR is very easy to perform against normal text. The kind of CAPTCHA presented here is good for a personal or family blog, at best. For something with a larger audience or having a higher risk/value, a more established CAPTCHA should be employed.
0
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility standards to your web sites well. W3C provides the better validation services to all. It is all just to follow the standards to make it better in online. These web standards are globally accepted by the people who are in the web.

You can validate your site HTML, XHTML,CSS and Accessibility design structure.

HTML, XHTML Validator:
http://validator.w3.org/
http://validator.w3.org/docs/


CSS Validator:
http://jigsaw.w3.org/css-validator/
http://jigsaw.w3.org/css-validator/documentation.html

Accessibility Services
http://www.w3.org/WAI/

You have to follow the standards strictly to have W3C standards for your web site. After validation you can have the W3C logo approval for your site.

All the best!
1
Free Tool: SSL Checker
LVL 10
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red:
p {color: #F00;}

Open in new window

CSS also allows us to define our own custom selectors.  These are known as ID and class selectors. IDs and classes are applied to (X)HTML elements as simple attributes that provide much tighter control over our design.

Most of the time, we get confused about the differences between IDs with classes -- either failing to utilize the real purpose of each or simply using one instead of the other.  Let's think of an ID as you do with your own personal identification.  It is unique to you and is not shared with anyone else.  A class is different, in that there can be many people in a class, be it at school, in society, or wherever.  

This translates to CSS where an ID can only be used once per page, whereas classes can be used an unlimited number of times.  An example could be Bar Code (class) and Serial Number (ID).


IDs

An ID can only be used once per page, and it is a unique identifier to an element. Typically, an ID is used for any unique page element such as the header, main navigation, footer, or other key part of the user interface.

Applying an ID

The most common way to apply an ID is to reference it in the (X)HTML using the id="name" attribute immediately after the opening …
1
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs.

First of all, let's see how to add 1 day to the current date, in a XSL expression:
xp20:add-dayTimeDuration-to-dateTime(xp20:current-date(), 'P1D')

Open in new window


There are 2 functions used here. The most important part in this article is the special format 'P1D' which means "one day". So the current date is obtained with the "xp20:current-date()" and the number of days to add is defined with the '1' between the 'P' and the 'D' in the format 'P1D'.

So to add N days, the format must be in the following form : 'P' + number of days + 'D'. For example, to add 40 days to the current date and to get back the new calculated date, the following command must be used :
xp20:add-dayTimeDuration-to-dateTime(xp20:current-date(), 'P40D')

Open in new window


Now, in an XSL expression referencing a XSL variable in which the number of days is, that would be done with something that looks like that :

<from expression="xp20:add-dayTimeDuration-to-dateTime(xp20:current-date(),concat('P',String(bpws:getVariableData('OnMessage_1_InputVariable','parameters','/ns1:MyParam/ns1:NumberOfDays')),'D'))"/>

Open in new window


Let's take the expression only :
xp20:add-dayTimeDuration-to-dateTime(xp20:current-date(),concat('P',String(bpws:getVariableData('OnMessage_1_InputVariable','parameters','/ns1:MyParam/ns1:NumberOfDays')),'D'))

Open in new window


This can be split visually to understand more clearly :
xp20:add-dayTimeDuration-to-dateTime
(
xp20:current-date(),
concat(
'P',
String(bpws:getVariableData
(
'OnMessage_1_InputVariable','parameters','/ns1:MyParam/ns1:NumberOfDays')
),
'D'
)

Open in new window

1
I was recently asked to create an report based on an HTML table. The report needed to contain many more columns than could be displayed across the page, but they would all be needed.
Fortunately, it was possible to group the columns of data into related subjects that would be viewed altogether or not at all.

I needed a simple way of hiding or displaying the groups of columns, that would also indicate that there was a hidden group of columns that was available for display.

My solution looks like the screen shot below.

Column group1 & 3 are both expanded, Group 2 is collapsed, indicated by the narrow blue column.
The 'ID' column is a fixed column that is always present
To expand Group 2, or collapse Group 1 and 3, it is simply necessary to double click in one of the header cells

 Screenshot of tableWhen the head cell of a column is double clicked (either an expanded or collapsed column) the following Javascript function is called.

 
    // This value is updated when the document is loaded is inline-table style is not supported
    var showStyle = "inline-table";
    function expcoll(cell) {
        var className = cell.className;
        var classType = className.substr(0, 2);
        var classID = className.substr(2); 
        var ctrlClass = ((classType == "ct") ? "cg" : "ct") + classID;
       
        $("." + className).css("display", "none");
        $("." + ctrlClass).css("display", showStyle);
    }
    function cssTest() {
        // 

Open in new window

1
Differences between browsers has been the bane of web developers ever since the second web browser was released. Although the situation is much better today than it was in the late 1990's, it is still possible to get caught out by minor differences between browsers.
Initially, web developers used the 'User-Agent' string to try and determine the type of web browser and hence what it did or did not support. This method however is difficult to maintain and is not always accurate. It is not helped by the fact that some browsers let users change the User Agent string. The Opera browser, until about version 7 or 8 even went as far as making itself appear, by default, as Internet Explorer. Thankfully, they have since stopped doing this.
A better method was to detect if certain objects or functions where available and use their existence or otherwise to determine how a script ran.
For example 'if (document.styleSheets) ...' will be true if the browser supports style sheets. This is a more robust method of detecting browser capabilities.

However, even when a browser supports style sheets, the support is not consistent across different browsers and differences can cause problems.

While writing another tutorial today, I came across a problem with differing CSS support in different browsers so I decided to see if there was a way, like the object detection, of determining if the browser displaying the supported a particular style, without resorting to using the UserAgent string
1
The past - html
In the early days of the Internet, html code was used to describe how the page should look more than it described the actual content. Some used a combination of the <font> tag and the <b> tag to make headings, others designed web pages using <table> tags -- while now most pages use <h1> tags for headings, and combine <div> tags and CSS for page design.

The present - xhtml
While more focused on content than html, xhtml still provides only a limited set of semantic tags, such as <h1> <p> <a> <abbr> <acronym> <cite> <code>. These tags add value to search result describing the type of content the tags contain, helping search engines such as Google to assess the relevance of the text. However, the tags do not describe things such as "what's at the other end of this link", "this is a street address", or "this is calendar info about an event".

The future - The semantic web
The past few years Web 2.0 has been a buzz word, introducing collaboration, interoperability, communities and focus on the end-user. The next "version", Web 3.0, will be all about the semantic web; how we can create and use mark-up code that describe the content of web pages, and how that content can be used to closer relate resources on the Internet.

Microformats are part of several other standards and technologies used to build the semantic web. Using attributes provided by standard xhtml, metadata can be added to links and other tags, …
4
 
LVL 60

Expert Comment

by:Kevin Cross
Comment Utility
I second the motion.  Got my vote above as well.  Nice article, Håvard!
0
 
LVL 2

Author Comment

by:havard-fjaer
Comment Utility
Thank you for your kind comments -- and for your feedback, WaterStreet and lherrou, when I was writing the article. This is my first article on EE, and I'm very impressed with the feedback and quality assurance you uphold. You really helped me add that little extra to the article.
0
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium.

https://www.matthewstevenkelly.com/blog/

If you make your website compliant, you can add the compliance link to every page of your site! The code snippet below allows for users to click the link to really know you are compliant.

The best compliance to go for is XHTML. This is because XHTML is a stricter and cleaner version of HTML. XHTML not only makes it easier for people to follow your HTML code, but makes it more likely to be displayed in multiple browsers. With many surfers using browsers such as Apple Safari, Google Chrome, Mozilla FireFox, or the multiple version of Microsoft Internet Explorer, writing clean strict HTML code is the best thing you can do for usability of your site.

You may be tempted to say that a majority of "normal" web users use IE anyways, and any one technical enough to use an alternate browser will be able to figure the site out anyways. But think of all the Mac users who use Safari or Opera browsers! Do you really want to keep the technically inclined and Mac users away from your site?

I know as a Experts Exchange Expert I would love if every piece of HTML code I looked at was formatted XHTML compliant. This would make it much easier to troubleshoot problems when users post their code.

I hope everyone at least …
3
 
LVL 54

Expert Comment

by:b0lsc0tt
Comment Utility
*Here, here!*

You have my vote. :)  Good info and article.  Thanks!
0

Web Languages and Standards

39K

Solutions

30K

Contributors

Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.