Dave Cohen -
Alleycat Software

Web Development

What is a Dynamic Web Site?

A dynamic Web site is an Internet-based application that uses a Web browser to allow users to interact with program logic on the Web server. The program logic on the Web server is code that executes based on the users' requests. The code often extracts data from a database then presents it to the user.

The 'dynamic' designation in 'dynamic Web site' means that pages are constructed on-the-fly, and can differ according to the requester, current database state, time of day, or any of a number of other variables.

Too often, people looking for Web sites find cut-rate developers who put together a 'static' web site. This site might look nice...until it comes time to make changes, like adding products or information. Then, these people will realize how difficult the static site made things - they may need to modify every single page just to change a copyright date in the footer, for example.

Sites with pages that have .html or .htm file extensions almost always indicate static sites that are difficult to maintain, and thus often fall out of date. Sites with pages ending in .php, .asp, .aspx are dynamic sites, usually (though not always) built by skilled developers that are easier to maintain. It depends on the skill of the developers whether or not the web site owners can make changes, or whether they need to go to the developers for changes.

We build dynamic sites and work with customers to identify those areas where information will change, so facilities can be built in for the web site owner to make those changes in most cases. Even if the web site owner prefers to not manage these changes, we can often handle updating data quickly and cheaply because of the site's architecture.

Example Dynamic Web Site: Animal Rescue Group

An animal rescue group's site maintains data for dogs and cats available for adoption. A menu choice, button, or link on a Web page triggers a server program that reads the data from a database and produces a nicely formatted Web page showing all the animals. There may be options for the visitor to sort or filter the results based on certain criteria. Further, if the visitor wishes to pursue an adoption, a link in the Web page listing could bring up an embedded window with a form to be filled in and submitted directly to the rescue group. The submitted form is emailed to the group (or even the specific animal's foster), and also stored for future reference. In addition, an image carousel presents a rotating, up-to-date quick display of animals for adoption.

At the server end, this web site uses PHP to generate pages dynamically, and mySQL to efficiently and securely store and retrieve data. In addition, a jQuery tool provides the image carousel, which also draws its data from PHP/mySQL interaction at the server. Often, a web site might provide a Flash movie of animals, but of course this is a static view and does not present current data - in this case, animals available for adoption at that time.

Example Dynamic Web Site: Book Author

An author's web site presents information about her book series, but does not offer books for sale. Visitors can view information about the books, look at the covers, read reviews, and retrieve reader guides. The author also offers a forum where visitors can sign up for an account and interact with the author and other fans of the series on a variety of topics.

Given there is not a lot of data to manage, a text file is used to efficiently store book data such as title, description, reviews, etc. This approach allows book data to reside in a single place rather than embedded in multiple pages, making it easy to add/update books. And, the use of a text file makes it simple to maintain. However, the message forum will generate a lot of data, so it is maintained in a mySQL database. In fact, already existing forum software is used and customized, significantly reducing cost. PHP is used at the server to dynamically generate pages, accessing data either in files or in the database.

Example Dynamic Web Site: Jewelry Artist

A custom jewelry artist has an online store where visitors can look at and purchase items for sale. Customers can create accounts, select from multiple shipping and payment methods, and even look at past account history. The payment options offered are Paypal and the artist's credit card merchant account, via a custom payment gateway. Shipping options include interaction with the US Post Office and United Parcel Service to provide up-to-date quotes based on weight and required delivery time. While significant work exists to handle the customer purchases, a similar amount of work is needed to give the artist the tools to manage items for sale and customer accounts.

An online store is quite complex. Even using the existing osCommerce packages, significant work is needed to customize the code to fit with the artist's web site vision. Addons and customizations are needed for quantity discounts, a customized payment gateway, and even formatted customer order confirmations. While a lot of work was needed, it was not overwhelming since PHP and mySQL, reliable and efficient tools, served as the basis for osCommerce.

Important Technologies in a Dynamic Web Site
  • Web Browser: Firefox, Safari, and Microsoft Internet Explorer are the major Web browsers that need to be considered. Any front end tools used need to allow for potential discrepencies, though the use of jQuery often covers these issues. Browsers operating on Web-enabled devices such as cell phones and PDAs may also need to be considered.
  • Web Server: There a number of different Web servers, though they all mainly boil down to Apache and its variations or Microsoft Internet Information Server (IIS). Unless you are part of a large corporation committed to Microsoft tools, Apache is a much better, much less expensive solution. Apache runs on Linux/Unix or Windows.
  • Server Operating System: The operating system where the Web server runs is probably a Linux/Unix variant or Microsoft Windows. Even on Apple computers, the operating system should be a Unix variant. Again, unless you are part of a large corporation committed to Microsoft tools, Linux/Unix is a much better, much less expensive solution.
  • Server-Side Script: Server-side script refers to the language/tools used to dynamically generate pages on the Web server. The main choices here are PHP, ASP (Active Server Pages), JSP (Java Server Pages), CGI/Perl, ColdFusion, and Java. In our experience, only large corporations committed to Microsoft tools should opt for ASP due to costs and complexity. ColdFusion and JSP have fallen somewhat out of favor, though they still have followings. CGI/Perl was once the main server-side technology, but it is rapidly declining due to complexity. Java should only be pursued by large companies willing to carry the large costs of its complexity. This, of course, leaves PHP, a superior technology that is easy to use and boasts multiple choices for almost every conceivable tool desired, from database interfaces to online stores. PHP is fast and can even be pursued using object-oriented methodology.
  • Database Server: The database server is the software that manages your data and provides an interface from the server-side script. There are numerous options, but the most popular are perhaps Oracle and mySQL. If you are a large company with cash to spend, Oracle may be the choice. However, the vast majority of web sites use the reliable, fast, secure - and free - mySQL database manager. Interestingly, most database managers use similar SQL language, and thus switching among them may be as simple as specifying a different argument in the database interface.
  • Client-Side Pages: Client-side pages are just the web pages themselves. These should be built to follow strict HTML standards adherence, using CSS (cascading style sheets) for formatting. Server-side script is often embedded in the web file pages.
  • Client-Side Script: Client-side script is code that runs within the Web browser, usually with no interaction with the server (see AJAX below). This code checks the existence of form entries, provides pulldown menus, offers scrolling images, and more. The overwhelming choice here is JavaScript, though VBScript is used on closed systems where the web browser can be controlled, as it only works with Microsoft Internet Explorer. That said, many sites are opting to use jQuery for the majority of their client-side script. jQuery is essentially JavaScript, but it is a library constructed to make it easier to use JavaScript, bring more JavaScript features to users, and make JavaScript work the same across all browsers. jQuery is an essential tool for today's web sites.
  • AJAX: AJAX is really a combination of technologies that allows JavaScript to interact with the web server. Thus, visitors can execute dynamic operations without leaving the current web page. One example would be a form to allow visitors to sign up for a contact list - they could enter their name and email in a small box, submit it, and never leave the page they are on. The web server would receive the request and save the contact information. AJAX used to be relatively complex to implement, but the emergence of jQuery made it much easier to deploy.