Dedicated Servers
Programming Languages for the Web
The dispute over what technology to use on the server side has many characteristics of holy war because it is mixed with the question of what operating system / architecture to use. In this way, an element in the eternal battle between the Unix and the Microsoft world.
Space Security surveys and studies have regarding the use of each technology.
ASP
See this Webmonkey article on ASP. ASP.means Active Server Pages, these pages can be written in VBScript which in turn is derived from Visual Basic. The big advantage is that many people seem to know Visual Basic so it is easy to find someone to do the site, or to keep it, if the developer already migrated to better horizons.
ASP pages can use objects COM (Component Object Model) objects that are in some other language (eg, executable in C + + or Java), so if you already have something scheduled ASP pages through IIS can do use of methods in these objects.
To connect to a database, usually using ADO is a universal adapter to databases that specializes then to speak to a specific database.
The working scheme is to create COM objects that implement the logic of the application (Business Objects) and then make the layer interface with ASP.
<%
September OBJdbConnection = Server.CreateObject ( "ADODB.Connection")
OBJdbConnection.Open "nba_membership"
Sqlquery = "SELECT id, FROM Business Directory
September RSCustomers = OBJdbConnection.Execute (Sqlquery)
Do Until rsCustomers.EOF
Response.Write (rsCustomers ( "ID") & "" & rsCustomers ( "Business"))
rsCustomers.MoveNext
Loop
%>
There are tutorials on ASP ASP School.
JSP, not free or open source. "Target = _self> ColdFusion
JSP, not free or open source. "Target = _self> ColdFusion is a scripting language 100% that the idea is to achieve results with a few lines of code. JSP, not free or open source." target = _self> ColdFusion exploits the fact that many programmers in practice they do is plan and simply do not want to do with objects, classes or anything but high-flying just querying the database and print the result .
<cfquery datasource="nba_membership">
select id, from business directory
</ cfquery>
<cfoutput query="rsCustomers"> business # # # id # </ cfoutput>
That does not mean that the language is not very powerful. Also has an IDE and commercial support. JSP, not free or open source. "Target = _self> ColdFusion runs as an add-on to the servers, or as a separate CGI. It is similar in concept and expression to W3-mSQL.
Programming on any Languages
JSP, not free or open source. "Target = _self> ColdFusion is the best way to get something good from a bad situation, that is, having to develop a Web application for Windows 2000
JSP
JSP (Java Server Pages) is an invention of the SUN that provides a scripting language on the server side that communicate with Java classes, objects, RMI, CORBA, etc.. The methodology is expected to work the same with Visual Basic with the difference that this time it is a much more open platform.
The JSP code can be placed inside HTML pages, or can be precompiled into servlets (Java programs can be compiled into servlets). A servlet is a subclass of servlet methods that have to meet requirements. The server passes the variables to and from the implementation of the Servlet environment.
To program in Java JSP is required, be methodical and orderly. The language does not relax the conditions of typing to them.
<% @ Page language = "java"%>
<TITLE> Simple Scripting Tricks </ TITLE>
Anyone can count like this: <BR>
<%
for (int i = 1; i <6 i + +) (
out.println (i + "<BR>);
)
i = 1000000;
%>
Take time anyway, to <% = i%>.
Perl
Perl can easily solve the problems easily, and solve difficult problems. It is quick to make a small web application.
The main advantages are that it is a very mature language, which has long been working, and has hundreds of libraries operational and ready to use.
% vars = CGI-> ReadParse ();
print CGI-> MimeHtml ();
DBI-> init ( "Oracle");
$ db = DBD:: Oracle-> connect ( "dbname = mydb");
$ cursor = $ db-> execute ( "SELECT a, b, c FROM WHERE d = '$ vars (a)'");
while (% row = $ cursor-> fetchrow_hash ()) (
print "$ row <li> (a) - (b) $ row";
)
Perl is easier than in other languages understandable and do something dark. On the other hand, if you have patience you can find 90% of the work to be done and done by someone else, and you have to write code that is only 10% more trivial.
Perl should be used via precompiled ModPerl processor or impact is very high.
PHP
PHP pre-processor is an HTML page that is motivated and directed specifically to build pages, and JSP, not free or open source. "Target = _self> ColdFusion. An example of this is that the CGI arguments are imported directly into space global namespace for any PHP: PHP can run as a CGI or as a plug-in web server.
PHP has grown and in support functions and now comes "factory" with dozens of mathematical functions to libraries, databases, etc.. Is now in a consolidation phase after a few years of success, and the expansionary phase has been rather left behind to grow in areas more related to the integration of its parts among themselves.
<?
/ * Declare some relevant variables * /
$ Dbhost = "Your-MySQL-server-IP-or-domainname";
$ Dbuser = "your user name";
$ Dbpass = "Your Password";
$ Dbname = "The Name of the Database";
$ table = "info";
mysql_connect ($ dbhost, $ dbuser, $ dbpass) or
die ( "Unable toconnect to database");
@ mysql_select_db ( "$ dbname") or die ( "Unable to select database $ dbname");
$ Sqlquery = "SELECT * FROM $ table WHERE opinion = 'is great'";
$ result = mysql_query ($ Sqlquery);
$ number = mysql_numrows ($ result);
$ i = 0;
if ($ number <1) (
print "<CENTER> <P> There Were No Results for Your Search </ CENTER>";
)
else (
while ($ number> $ i) (
$ thename = mysql_result ($ result, $ i, "name");
$ theemail = mysql_result ($ result, $ i, "email");
print "<p> Name: </ b> $ thename <br> <b> E-Mail: </ b>
$ theemail </ p> ";
$ i + +;
)
)
>
Reflection
It is important to stop thinking that the matter of developing Web applications is read from the database, display a form, reading the data from the form, write to the database. We can not continue on that line a long time. It is better to aim higher, to ways of developing the higher-level applications.
A good start is to forget the database and think of ways to access the highest level of data, such as databases or object-oriented object-relational bridges. Another way is to tackle a problem as XML / XSL.
The important thing is to prevent any intelligence of the application is so close to the interface, because in the end, an ending similar to making mistakes when mixing concrete and content of documents.
Albert Sirvent - Grupo DomainGurus