• No se han encontrado resultados

Efectos en España

4.2. Efectos del fin del sistema de cuotas lácteas

4.2.1. Efectos en España

Getting data into a database is of little value unless the data can also be retrieved. As illustrated in Figure 2-19, the most common methods for extracting data from a database are based on the Internet or an intranet and languages such as the Common Gateway Interface (CGI), the PHP: Hypertext Processor (PHP), and Java. In each case, the user issues a command from the workstation that is interpreted in the server. Results of the database query are then processed by language system and HTML is sent to the user's browser. In this scenario, the computational overhead is borne by the server.

Each system handles high-level database queries differently. For example, to perform a query using CGI, the user submits a query through a Web browser and the server executes a program, a CGI script, and the user's query is passed to the database via CGI. The program then returns information to the server via CGI, and this information is formatted into an HTML Web page that is displayed through the user's browser.

Similarly, the PHP interface offloads database query functions to the server, which handles the query, formats results, and conveys these to the user via standard HTML. Although PHP, which was

originally referred to as Personal Home Page/Forms Interpreter (PHP/FI), is less established than CGI, it is considerably more powerful as a database interface. For example, unlike other scripting languages for Web page development, PHP offers excellent connectivity to most of the common databases, including Oracle, Sybase, MySQL, ODBC and many others. Java is also a server-side language that shares many of the database interface features of CGI and PHP. In addition, like PHP, Java uses a language that loosely resembles C.

CGI, PHP, and Java are all dependent on the server hardware for performance, and don't make additional demands for space or execution time on the workstations that are accessing data. This is in contrast with JavaScript, which has little to do with Java. JavaScript runs on the client side of the interface and, as such, can be malicious because of JavaScript viruses. JavaScript, while providing interactivity to Web pages, is much less useful as a database query tool compared to CGI, PHP, or Java.

Regardless of the language used to extract data from a database, the data have to be displayed on the user's monitor in an appropriate, understandable, and attractive way. This component of the user interface is most easily handled with a separate style sheet that defines the characteristics for the display device. In this paradigm, data to be displayed are first extracted from the database and coded in XML, a markup language for the Web that classifies content, but doesn't define how it should be displayed. A separate style sheet, in the form of an Extensible Stylesheet Language (XSL) document, specifies how the data are to be displayed in the user's browser.

Using the XML/XSL approach, modifying the manner in which data are displayed can be done without changing the XML Document, and involves simply modifying the relevant style sheet. Similarly, if the data change, only the XML document need be changed, not the style sheet. For example, consider the differences in how wireless content appears in HTML, XML, and XSL for the following database report.

Genetic History: The patient's mother is carrier for BCG1.

In standard HTML, which combines data and formatting instructions, the source code could appear as:

<HTML>

<BOLD> Genetic History: </BOLD> The patient's

<I> mother </I> is a

<I> carrier </I> for

<I> BCG1 </I>. </HTML>

Notice that <BOLD> and </BOLD> are the HTML instructions to display in boldface type whatever comes between these two tags. Similarly <I> and </I> are the instructions to italicize the type between these two commands. By decoupling content from format instructions, changes in content can be made without the need to modify the formatting instructions given in the style sheets. Here's an example (formatted for clarity), using XML to categorize the data and XSL source code to describe

formatting:

<PHRASE>

<GENETIC_CATEGORY> Genetic History: </ GENETIC_CATEGORY > The

<SUBJECT> patient's </SUBJECT> <PARENT> mother </PARENT> is

<GENOTYPE> recessive </GENOTYPE> for

<GENE> BCG1 </GENE> .

</PHRASE>

Assuming that the data are destined to be displayed on a wireless PDA with a monochrome display, one that supports bold and italic text formatting, the associated XSL source code could take the form:

FORMAT "GENETIC_CATEGORY" = BOLD FORMAT "PARENT" = ITALICS

FORMAT "GENOTYPE" = ITALICS FORMAT "GENE" = ITALICS

Furthermore, because the data in XML is decoupled from the display information in XSL, the

symptom can be displayed in italics on the PDA and, for example, in red bold text on a laptop with a color display.

Documento similar