Dynamic pages

Dynamic Page . It should not be a space on the internet to display static information. New technologies offer many possibilities that can be applied to make it more attractive, fast and interactive. They are very attractive, their presentations are more entertaining than those that are achieved using only HTML and they are interactive. Almost always when writing a dynamic page, the code for the other programming languages ​​is embedded within the same HTML code.

Summary

[ hide ]

  • 1 Characteristics of the dynamic web
    • 1 Dynamic customer pages
    • 2 Dynamic server pages
  • 2 Web programming
    • 1 Web architecture
    • 2 Network technologies
    • 3 Programming and running programs on websites
      • 3.1 Programs on the client
      • 3.2 Programs on the server
    • 3 Other languages
    • 4 Sources

Dynamic Web Features

Are increasingly Web sites of Internet that apply new and colorful effects for presentation of information, but it is not only the application of these effects allowing deliver content in an interesting way, but also use interactive resources, that combined correctly, allow communication between the navigator and the webmaster , through the website.

What actually justifies the selection of this computer medium and not the printing of the book on paper, to propose a theme, is the use of these effects; whether they are visual, auditory or communicative and interactive. This chapter proposes the characteristics that Web sites should have to be considered dynamic, which is the quality that should correspond to these places on the Internet in accordance with the current development of new technologies; These Web are internationally called DHTML (Dynamic HTML), unlike the classic HTML that are already known.

Before continuing, it is necessary to insist that when deciding to create a dynamic Web , the browsers that are available to the recipients and the versions of them, according to the development, must be taken into account.

It should never be forgotten that many things on the Internet depend on the actual technological conditions that the receivers have. The information presentation formats must be programmed and prepared in such a way as to reach as many people as possible, so the technological development of the media that each user has must be taken into account. Among the factors that must be considered for the creation of Web pages is, for example, the browser used.

The most widespread browsers internationally are Internet Explorer and Netscape , and each one has different characteristics, although it is necessary to trust the wisdom of their creators to achieve, in the end, greater standardization and universality. Likewise, some results and effects are presented that are executed satisfactorily in one system and not in the other.

For this reason, it is suggested that during the development of a Web site both versions are used for the test and validity of the results, and it must be taken into account, in addition, that a well-developed DHTML document must be able to be seen with any of these browsers.

A DHTML is a combination of styles or style sheets (Cascading Style Sheet) and programming in an HTML document prepared to achieve changes in its appearance and, at the same time, allow the receiver to interact with the document.

A document is considered DHTML if it meets the following characteristics:

  • Use style sheets and other dynamic elements like templates, libraries, layers, etc. to position objects and define layouts on the screen.
  • Use programs to move, show, hide, or change the appearance of objects. These objects move, hide, appear or change their appearance when they are “touched” with the mouse by the receiver, after the document has been loaded.
  • With the combination of these programs and techniques, an intercommunication with the receiver is achieved and, in addition, it allows the updating of the pages by the webmaster, in a simple, fast and efficient way.

It is possible to include the style sheets using the HTML language’s own tags, both to define the styles directly in a document, and to add the CSS (Cascading Style Sheet) pages to the Web page. In the same way, within these documents the definitions and implementations of other techniques can also be included, such as: templates , libraries , layers , etc.

To add programmable routines to an html document, Java Script can be used, which is a language created for Web pages, combining the instructions with the tags of the HTML itself. Likewise, programs that run directly from the server can be included and produce a new Web page as a result.

These programs, in most cases, work with databases created based on the site. Another way to include interesting and attractive effects in web pages is to create interactive animations with programs, such as Flash or other systems for creating multimedia , which can be inserted into documents to offer other results.

The Dynamic Web can also offer recipients the ability to download other documents and services onto their computers, which are established in close coordination with the server where the site is hosted. So far, you can have a pretty good idea of ​​what DHTML or Dynamic Web is; However, a definition is proposed in order to clarify the concept:

A DHTML is made up of Web pages that present the texts and images with visual effects that can be animated and present the information in an interactive and dynamic way. For its design and implementation, stylesheets and programming resources are used, which allow obtaining these effects while obtaining a product with greater flexibility.

In addition to the advantages that dynamic sites have, which can be inferred from their own characteristics, they have an important quality and that is that, in general, DHTML appear on the receiver’s screen at a higher speed than simple HTML and the space of storage occupied by pages conceived in this way is much less.

In summary, with the implementation of dynamic Web, at the same time that the receiver is offered more attractive information and the technological resources provided by computing are exploited to a greater extent, a higher performance is obtained, since it is gained in time and space ; two such important things in modern life.

According to the place where the page is processed, that is, the computer that will carry the additional weight that the page assumes to perform effects and functionalities, dynamic pages are classified as:

  • Dynamic customer pages.
  • Dynamic server pages.

Dynamic customer pages

They are the dynamic pages that are processed on the client’s computer, whose processing load of effects and functionalities is supported by the browser. Typical uses of client pages are special effects for the Web like mlhvers or window control; presentations in which objects can be moved around the page; form control; calculations, etc. The code necessary to create the effects and functionalities is included within the same HTML file and is called a script.

When an HTML page contains client scripts, the browser is responsible for interpreting and executing them to achieve the effects and functionalities. Dynamic client pages can be written in programming languages ​​such as JavaScript and Visual Basic Script (VBScript), and mainly with ASP.NET, which will be our object of study.

Client pages are very dependent on the system where they are executed and that is their main disadvantage, since each browser has its own characteristics, even each version, and what can work in one browser may not work in another.

As an advantage, it can be said that these pages download some jobs to the server, offer immediate responses to user actions and allow the use of some resources on the local machine.

Dynamic server pages

The dynamic pages of the server are recognized, interpreted and executed by the server itself. With them you can make all kinds of Web applications, such as agendas to forums, documentation systems, statistics, games, chats, etc. They are very useful in jobs where you have to access centralized information, located in a database on the server, and when for security reasons the calculations cannot be performed on the user’s computer.

It is important to note that dynamic server pages are necessary because to create most Web applications you must have access to many resources external to the client’s computer, mainly databases hosted on Internet servers. A clear example is the banks: it does not make any sense that the customer has access to the entire database, only to the information that concerns them.

Dynamic server pages are usually written in the same HTML file, mixed with the HTML code, just like client pages. When a page is requested by a client, the server executes the scripts and a result page is generated – which only contains HTML code – which is returned to the client again, that is, the server is the one that handles all the information of the databases and any other resource, such as images or mail servers, and then sends the client a Web page with the results of all operations.

To write dynamic server pages there are several languages, which will be discussed in more detail later, such as Common Gateway Interface (CGI) commonly written in Perl, Active Server Pages (ASP), Hipertext Preprocessor (PHP), Java Server Pages (JSP) and especially ASP.NET, which will be our object of study.

The advantages of this type of programming are that the client cannot see the scripts, since they are executed and transformed into HTML before sending them. They are also independent of the user’s browser, since the code they receive is HTML that is easily interpreted.

As a disadvantage, it requires a more powerful server and with more capabilities than what is needed for the client pages. In addition, these servers will be able to support fewer concurrent users, because more processing time will be required for the attention of each one.

Web programming

By virtue of growing access to the Internet and the possibility that this new technology offers people, regardless of their profession or occupation, more and more Web sites are found in cyberspace, and more and more people are, navigators, become designers of their own spaces.

The ease with which Web page editors are manipulated is another cause of this reality. Thus, when the first steps in these techniques are taken, pages are built using the HTML code only, but as skills develop and interest grows in offering more resources and more comfortable and pleasant environments to navigators, and to the designer of A website proposes new goals and new stages in the conception of its pages.

Among the possibilities that can be offered in a dynamic website, are: implementation of search engines for certain topics, consultations and on-line email accounts, virtual stores, registration possibilities for magazines, sending postcards, access and inquiries to information bases, document downloads, etc.

As already mentioned in previous chapters, programming is another resource whose implementation characterizes the dynamic Web, and it is the programmed routines that allow a large part of the interactivity and tasks such as those mentioned to be carried out on the Web.

In principle, the way to implement a program on the Web is to call its execution from an html document, but there are two ways to execute the programmed routines, one on the server and the other is with the same browser program, from the own computer of the recipient of the pages.

In order to offer a clearer idea of ​​how the programs can be implemented within a Web page, below it is proposed, in broad strokes, how the communication between the receiver and the server works, and what are the necessary tools for this interaction.

Web Architecture

The Web service has a client / server architecture , where a main program is installed that runs on a remote or local computer (the server itself), and connects to the network through a predefined port, called TCP / IP to supply the orders from a web client (browser). Among the most popular browsers in the world are Netscape and Internet Explorer, the latter created by Microsoft .

Each one has its own characteristics and, according to the versions created, each time they offer new possibilities to interpret the codes written on the Web pages, which is where the communication environment between the server and the navigator is created. To establish this server / client communication a protocol called H ITP (Hyper Text Transfer Prolocol) is used, hence, in general, this prefix has been established as a reference for the addresses of Web pages (URLs).

Although the navigators have conditions to “understand” the codes of the HTML language, the CSS —referred to in previous chapters— and other programming languages, such as JavaScript ; It is necessary that other resources and tools are also installed in the server that facilitate both the communication between the receiving computer and the remote server, as well as the speed and efficiency of the response during consultation and navigation. Many of these tools are related to the execution from the server of programs and other tasks or specifications that the Internet system requires.

The server is configured to control access to the equipment and give rights to consult or not, change or enter information and other operations, according to the characteristics of the clients and the rights they may have. For example, the network administrator has all the access rights to the server, both to consult, and to change or add any information; Likewise, it has rights to install programs and other tasks inherent to the responsibility of maintaining with efficiency and quality all the services that are provided.

Clients who have Web sites hosted on the server will have update rights (modification or introduction of information), only in the disk space that corresponds to their pages or services that they offer. This customer also has access to some of the resources and tools; those that guarantee the development of your website.

For the proper functioning of all operations and inquiries, it is necessary to establish agreements between the interests and goals of this client and the server administrator, since the latter has to guarantee, from the functional point of view, the success of the work.

To place the information in the space allocated on the server for a website, the webmaster must use a program specialized in this task. The programs that perform these functions are called FTP (File Transfer Protocol), which is a file transfer protocol and its application is to copy files from a server to it.

On the one hand, all this forces any of these people to enter the server with an access key, determined by a client name (loggin) and a password (password). To guarantee security, there is a program on the server that compares this data with the database it has on the machine, and gives it the corresponding rights based on the conditions that have been configured.

Another person who enters the server is the navigator, for whom a universal client is created, called anonymous, who does not need a password and his rights are only related to the possibility of consulting, by way of reading, any page that is offered, you can also download information that is intended for these purposes.

In particular and specific cases, such as the purchase of an online product in virtual stores or the subscription to a magazine or event that takes place through this route or another previously conceived way, there are programs that are responsible for updating the information and include or conveniently modify databases.

However, in any of these cases, the person who “writes” the information on the machine is not the navigator, but software designed by the webmaster of the site. On the other hand, among the sailors themselves differentiations are also established. Anyone who has browsed the Internet must at some time have found sites that give certain privileges to visitors who have registered as customers (these accesses may or may not be free), because for certain reasons, the general concept of entry consists of the Creation of groups of partners or special clients, which are given the right to access certain information, is not available to the unregistered visitor.

As can be inferred, the entire network is a complicated fabric of programs, media and resources that have to be very well structured and combined to function with absolute precision, in order to guarantee service at all times.

Network technologies

To guarantee DHTML it is necessary that there be a whole series of resources and tools, both hardware and software, that allow the correct operation of each task that is designed to establish communication and interaction between the navigator and the server.

The HTML alone, as it has been explained during the development of this text, so far, as it was created, is limited; as it only conceives the possibility of showing the visitor the information with certain presentation format characteristics, but it does not give many more possibilities than that. For this reason, several techniques have been created that allow to extend the characteristics of the pages and expand the possibilities. These techniques are classified into: those that are executed on the server and those that are performed on the recipient’s computer.

The applications that run on the server are independent of the browser and can interact with other technologies, such as databases and security administrations. It is then on the server where there are operating systems that allow working with networks, executable programs that generate Web pages, such as: results, information to download, Web pages, among other resources.

The applications that run on the client’s computer depend on the possibilities available to each machine that receives the information, since it takes advantage of the particular capabilities to minimize the server load and, therefore, are inherent to the browser or the version that one has. installed. Thus, in this case, although everything is apparently very well conceived during the design of a site, there is always a part of the final result that depends on the conditions that the final receiver of the information has installed on its machine.

Among these techniques is the possibility of the browser to correctly interpret the JavaScript code or the CSS code, hardware or software possibilities to process multimedia elements, or other interpreters that are needed to be able to decode all the information free of errors or defects. that is obtained from the server.

Scheduling and running programs on websites

As can be inferred from the previous section, there are techniques and means to materialize in a virtual way all dynamic access to information, both on the server and on the receiver; therefore, from the point of view of programming, a differentiation is also established in the modes of programming and execution of the programs on the Web page, based on the place where these programs are executed.

Thus, there are programs that are executed from the receiving machine itself (client mode) based on the browser conditions available, but there are others that are executed from the server (server mode). What the receiver receives in the end is nothing more than the answer, written on a Web page, as a result of the execution of the programmed orders.

Programs on the client

The programs that are executed on the receiver’s machine, or client mode, are executed by virtue of the possibility of decoding or interpreting the instructions or orders of the browser installed on the computer. Therefore, they depend precisely on which version of the browser the receiver has, with (without) the necessary conditions to be able to interpret the lines of the program.

The languages ​​that are used for programming in this way are called scripts, which are also known as macro languages and, among them, are VBScript (Visual Basic Scripting Edition) and JavaScript.

VBScript is a language created from Visual Basic and used by Microsoft for all its products and, therefore, encodable by Internet Explorer. Because it is so specific, it is not recommended to use it for programming a Web page that is going to be placed on the internet, although in internal networks, where it is known that all clients will use this browser, its use is acceptable.

JavaScript was created by Netscape to design applications that run in the Internet environment, and because of its universality it is the most recommended for creating client-mode programs on the Web. The lines of a script are included directly within the HTML code of a Web document and are interpreted by the browser at runtime.

When the browser requests a page, the server sends the complete content of the document, including in addition to HTML, the JavaScript instructions over the network to the client, who reads the page, displays its content and executes the proposed program instructions.

These instructions can respond to receiver events such as: a mouse click, information input using a form, and page navigation. The main browsers that support the JavaScript language are: Netscape, from version 2.0 and Internet Explorer, from version 3.0. Microsoft has its own version of JavaScript, called Jscript, but as already discussed, it also supports JavaScript encoding. Unlike other classic programming languages, scripts have particular characteristics, such as the following:

  • They are languages ​​conceived and oriented only for the Web. So far it is.
  • They allow to extend the capabilities of HTML. The instructions written in a script and inserted into an html document, cause the obtaining of effects and possibilities that the HTML code does not have solved.
  • They work only within the application for which they were created. These languages ​​have a series of variables, methods and (or) predefined objects that allow them to interact with said application.
  • They are interpreted languages, not compiled. This means that the application is decoding and executing line by line, as the code is read, instead of previously passing it to machine code. This can lead to a lower execution speed, although in many cases it is salvageable, since it is executed on the receiving machine and does not require remote reading and interpretation from the server.
  • They are object-oriented languages. This is a modern form of programming, which offers a greater concentration on the programming of partial routines that solve small particular situations, giving the whole an integrated final result.
  • They ensure that programming is simple and comfortable. However, this is sometimes detrimental to the benefits or legitimacy of the code. The ease of programming allows anyone with good common sense, without having to be a specialist in the field of computer science, to prepare their own programmable routines to improve the quality of effects on their pages, but this may have an impact on the programming is not as rigorous and exact as it happens with other languages ​​for specialists.

The combination of events with routines that are executed in client mode are called behaviors. When a behavior is inserted into an element of a Web page, both the actions to be carried out and the event to which they are associated are specified; You can also specify the order in which you want these actions to be executed.

Programs on the server

To execute programs on the server from a Web page, the CGI (Common Gateway Interface) technique can be used .

The CGI is an interface implemented for communication between a Web server and an executable program that is stored and runs on the server itself. This information is communicated in both directions: from the web page to the program, in the form of parameters, and from the program to the page, in the form of results.

One of the ways to ask the receiver for data to send it as parameters to the CGI is the use of forms. The CGI then calls the program that is on the server and takes care of the information processing, and the results obtained are sent back to the Web page to be received by the client in their browser.

In this way the program is executed in real time and thus dynamic information is generated. The form that is proposed to the receiver is written in HTML and this calls a compiled program or a script that is located on the server and, in turn, returns the response or information already processed to a new Web page that the receiver receives .

The programs that run on the server are stored in a folder created within the site structure, which is called cgi-bin . Any programming language such as Visual Basic, Clipper , C , among others, can be used to create these programs , which generate machine codes after compiling them.

However, programming languages ​​have been designed fundamentally directed towards e | network work, such as: ASP (Active Server Pages), PERL (Practical Extraction and Reporting Language) or PHP (Hypertext Preprocessor), which are actually interpreters and not compilers, therefore, each script written in Some of these languages ​​are not compiled and stored as a document with an extension (.exe), but each instruction is interpreted and executed in real time when they are called.

Microsoft’s ASP is a set of command sequences (scripts) that run on the server to create and run dynamic and interactive Web applications, therefore, an ASP page is a text file with an extension (.asp) that contains and it combines texts, HTML tags, commands and ActiveX components that run on the server.

PERL is a language available for almost all platforms and is based, fundamentally, on the treatment of character strings for its implementation. It is a language made to “scan” text files and print reports based on the information.

It is very useful for many systems administration tasks. This language combines some of the best features of C and other high-level languages. It uses sophisticated techniques to find patterns, allowing it to review large amounts of data quickly, and it can also work with binary information.

PHP is a high-level language, whose code is included in HTML pages and is executed on the server. Then instead of writing a program with many commands to create an HTML output, the HTML code is written with some PHP code embedded in it, which produces an html document as the output. It also uses special start and end tags that allow you to enter and exit PHP mode.

The fundamental reason that justifies the use of CGI in the implementation of a website is the need to manipulate databases, to complement the work of communication and information exchange between the generators and administrators of the site and the visitors and, in general , to obtain information that is not directly accessible by the recipient; either for security or design reasons, based on the interests of the webmaster of the site. The programs that are executed with the CGI technique have the following characteristics:

  • They run on the server computer.
  • They are able to read some environment variables offered by the receiver or as effects of actions carried out by the client, which are introduced by the standard input of the operating system.
  • They write the output in the standard format of the operating system (html files).
  • CGI is universally supported, therefore each program can be recompiled or interpreted to work in any environment.

As CGIs are implemented on the server, before the conception of the computer system that will guarantee the dynamism and interaction of a DHTML, it is necessary to establish an agreement between the webmaster of the site and the administrators of the provider, since these The latter must ensure all the technical support that allows the proper functioning and execution of each program on the server.

Another way to implement applications that run in server mode is to include, in some way, the instructions within the HTML code itself, as can happen with PHP, where some instructions or statements can be written within tags in the page code. Web.

Other languages

The HTML language, despite its limitations, is an excellent system for the presentation of documents due to its simplicity and wide possibilities for the traffic of information over long distances through the network. Due to the growing demands and needs to improve Internet conditions more and more, this language has evolved rapidly, but as it is known, it is still insufficient.

For these reasons, instead of developing new versions of HTML, a new language called XML (Extensible Markup Language) has been created , which takes the advantages of HTML and adds new possibilities, which allow us to do much more.

Both XML and HTML are based on SGML (Standard Generalized Makup Language, ISO-8879), which is the international standard for defining the structure and content of different types of electronic documents. However, XML is not yet strong or developed enough to eliminate HTML, as current versions of browsers still do not support this language to its full potential.

But it is indisputable that in the coming years there will be a radical change in the way Web pages are made, if technological development continues in this way. Unlike HTML, XML allows you to describe the information it displays; Furthermore, with the use of this language for the creation of Web pages many advantages are obtained, such as:

  • It enables faster and more efficient access to information.
  • Make search engines much more efficient.
  • It facilitates information exchange and cooperation between companies, as well as electronic commerce.
  • Not only does it allow communication between people, but because of the way it is conceived, it has a greater ease of communication and exchange between the machines themselves.

With the current versions of Dreamweaver it is possible to import documents in XML and, in this way, achieve files that combine both languages ​​in their programming. It is also possible to add applets and other routines and programs, which enrich the possibilities of the web pages of a site.

 

Leave a Comment

Scroll to Top