Fri, May 31, 2019 4:51:23 PM

reasonable to distribute and update client applications using these technologies, and this can <br/>
save considerable time, effort, and money, especially if you need to do frequent updates. <br/>
In the Graphical User Interfaces chapter, we will look at one promising new technology, <br/>
Macromedia�s Flex, which allows you to create Flash-based applet-equivalents. Because the <br/>
Flash Player is available on upwards of 98 percent of all Web browsers (including Windows, <br/>
Linux and the Mac) it can be considered an accepted standard. Installing or upgrading the <br/>
Flash Player is quick and easy. The ActionScript language is based on ECMAScript so it is <br/>
reasonably familiar, but Flex allows you to program without worrying about browser <br/>
specifics�thus it is far more attractive than JavaScript. For client-side programming, this is <br/>
an alternative worth considering. <br/>
.NET and C# <br/>
For a while, the main competitor to Java applets was Microsoft�s ActiveX, although that <br/>
required that the client be running Windows. Since then, Microsoft has produced a full <br/>
competitor to Java in the form of the .NET platform and the C# programming language. The <br/>
.NET platform is roughly the same as the Java Virtual Machine (JVM; the software platform <br/>
on which Java programs execute) and Java libraries, and C# bears unmistakable similarities <br/>
to Java. This is certainly the best work that Microsoft has done in the arena of programming <br/>
languages and programming environments. Of course, they had the considerable advantage <br/>
of being able to see what worked well and what didn�t work so well in Java, and build upon <br/>
that, but build they have. This is the first time since its inception that Java has had any real <br/>
competition. As a result, the Java designers at Sun have taken a hard look at C# and why <br/>
programmers might want to move to it, and have responded by making fundamental <br/>
improvements to Java in Java SE5. <br/>
Currently, the main vulnerability and important question concerning .NET is whether <br/>
Microsoft will allow it to be completely ported to other platforms. They claim there�s no <br/>
problem doing this, and the Mono project (www.go-mono.com) has a partial <br/>
implementation of .NET working on Linux, but until the implementation is complete and <br/>
Microsoft has not decided to squash any part of it, .NET as a cross-platform solution is still a <br/>
risky bet. <br/>
Internet vs. intranet <br/>
The Web is the most general solution to the client/server problem, so it makes sense to use <br/>
the same technology to solve a subset of the problem, in particular the classic client/server <br/>
problem within a company. With traditional client/server approaches you have the problem <br/>
of multiple types of client computers, as well as the difficulty of installing new client software, <br/>
both of which are handily solved with Web browsers and client-side programming. When <br/>
Web technology is used for an information network that is restricted to a particular company, <br/>
it is referred to as an intranet. Intranets provide much greater security than the Internet, <br/>
since you can physically control access to the servers within your company. In terms of <br/>
training, it seems that once people understand the general concept of a browser it�s much <br/>
easier for them to deal with differences in the way pages and applets look, so the learning <br/>
curve for new kinds of systems seems to be reduced. <br/>
The security problem brings us to one of the divisions that seems to be automatically forming <br/>
in the world of client-side programming. If your program is running on the Internet, you <br/>
don�t know what platform it will be working under, and you want to be extra careful that you <br/>
don�t disseminate buggy code. You need something cross-platform and secure, like a <br/>
scripting language or Java. <br/>
If you�re running on an intranet, you might have a different set of constraints. It�s not <br/>
uncommon that your machines could all be Intel/Windows platforms. On an intranet, you�re <br/>
responsible for the quality of your own code and can repair bugs when they�re discovered. In <br/>
Introduction to Objects 37�<br/>
addition, you might already have a body of legacy code that you�ve been using in a more <br/>
traditional client/server approach, whereby you must physically install client programs every <br/>
time you do an upgrade. The time wasted in installing upgrades is the most compelling <br/>
reason to move to browsers, because upgrades are invisible and automatic (Java Web Start is <br/>
also a solution to this problem). If you are involved in such an intranet, the most sensible <br/>
approach to take is the shortest path that allows you to use your existing code base, rather <br/>
than trying to recode your programs in a new language. <br/>
When faced with this bewildering array of solutions to the client-side programming problem, <br/>
the best plan of attack is a cost-benefit analysis. Consider the constraints of your problem <br/>
and what would be the shortest path to your solution. Since client-side programming is still <br/>
programming, it�s always a good idea to take the fastest development approach for your <br/>
particular situation. This is an aggressive stance to prepare for inevitable encounters with the <br/>
problems of program development. <br/>
Server-side programming <br/>
This whole discussion has ignored the issue of server-side programming, which is arguably <br/>
where Java has had its greatest success. What happens when you make a request of a server? <br/>
Most of the time the request is simply �Send me this file.� Your browser then interprets the <br/>
file in some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script <br/>
program, etc. <br/>
A more complicated request to a server generally involves a database transaction. A common <br/>
scenario involves a request for a complex database search, which the server then formats into <br/>
an HTML page and sends to you as the result. (Of course, if the client has more intelligence <br/>
via Java or a scripting language, the raw data can be sent and formatted at the client end, <br/>
which will be faster and less load on the server.) Or you might want to register your name in a <br/>
database when you join a group or place an order, which will involve changes to that <br/>
database. These database requests must be processed via some code on the server side, which <br/>
is generally referred to as server-side programming. Traditionally, server-side programming <br/>
has been performed using Perl, Python, C++, or some other language to create CGI <br/>
programs, but more sophisticated systems have since appeared. These include Java-based <br/>
Web servers that allow you to perform all your server-side programming in Java by writing <br/>
what are called servlets. Servlets and their offspring, JSPs, are two of the most compelling <br/>
reasons that companies that develop Web sites are moving to Java, especially because they <br/>
eliminate the problems of dealing with differently abled browsers. Server-side programming <br/>
topics are covered in Thinking in Enterprise Java at www.MindView.net. <br/>
Despite all this talk about Java on the Internet, it is a general-purpose programming <br/>
language that can solve the kinds of problems that you can solve with other languages. Here, <br/>
Java�s strength is not only in its portability, but also its programmability, its robustness, its <br/>
large, standard library and the numerous third-party libraries that are available and that <br/>
continue to be developed. <br/>
Summary <br/>
You know what a procedural program looks like: data definitions and function calls. To find <br/>
the meaning of such a program, you must work at it, looking through the function calls and <br/>
low-level concepts to create a model in your mind. This is the reason we need intermediate <br/>
representations when designing procedural programs�by themselves, these programs tend <br/>
to be confusing because the terms of expression are oriented more toward the computer than <br/>
to the problem you�re solving. <br/>
Because OOP adds many new concepts on top of what you find in a procedural language, <br/>
your natural assumption may be that the resulting Java program will be far more <br/>
38 Venkata Pilaka Venkata Pilaka <br/>

Comments

Popular posts from this blog

termux vnc viewer setup

../Settings.jpg

me.html