O''''Reilly Network For Information About''''s Book part 3 pot - Pdf 17


1.3. New Horizons
Keep in mind that I'm a cynic at heart. When it comes to technologies, it takes a
whole lot of effort to get me excited. I still have never written a web service, at
least with the massive IBM and Microsoft stacks, and I didn't write my first EJB
until 2003. I've never written an EJB entity bean unless it was to build a case
against them, and never will. I've instead preferred simpler architectures, like
REST, POJO programming, transparent persistence, and Spring. Even then, I was
late to those parties.
It's even tougher to get me to play with a new language. Dave Thomas, a highly
respected programmer and a gifted teacher, is fond of saying that you should learn
a new programming language every couple of months. I've probably averaged one
every five years, and I rarely do more than dabble. But recently, in my dabbling,
I've found a couple of startling innovations. These frameworks had ideas that just
about reached out and ripped me out of my chair this year.
I've taken a little more time than usual to survey the interesting innovations around
new programming languages. When it comes to building web pages and
application servers, two ideas have my undivided attention: metaprogramming
(like Ruby on Rails) and continuation servers (like Seaside on Smalltalk). Neither
of these two innovations is happening with much impact in Java. You'll get a
deeper treatment in Chapters 7 and 8, but it's enough to say for now that they are
both many times more productive than their Java alternatives.
1.3.1. Dynamic Languages
Java is a language with many compromises . Many of the features of Java are
appropriate for building operating system extensions and middleware, but limit
application development. Consider this Ruby fragment:
something = "Owls and Ostriches"
4.times {puts something}

Ant, left the Java community to code Objective C for the Mac environment. And,
as you have seen, Justin Gehtland and I are using Rails to implement a web-based
application for a start-up.
Think of metaprogramming as building a high-level builder. Ruby on Rails, for
example, discovers the columns and relationships in a database schema, and uses
that data to build a model, view, and controller for a web application. The
characteristics of the environment are striking:
 It's incredibly productive. It's easily five times as productive as the closest
Java competitor, for certain types of problems.
 It is flexible. Some solutions build a default application and allow common
extension points. Rails builds a default application, which you can extend as
if you'd written it yourself.
 It reduces duplication, and leads to more consistency.
To me, for enterprise application development , the overriding characteristic of a
language or environment is productivity . I want each line of code to work harder,
and I want that to translate into productivity. I don't quit measuring productivity
after deployment. If your tiny application is impossible to maintain, you'll lose
everything you've gained. For these reasons, I love Ruby on Rails, and I'll talk
more about it in Chapter 7.
1.3.3. Continuation Servers
Java web developers spend an incredible amount of time managing state, threads,
and the Back button. These problems get significantly more difficult as sites get
more dynamic and complex. There's been a recent resurgence in Smalltalk, and
most of it centers around a framework called Seaside. Since continuations maintain
state, continuation-based servers don't have any
problem managing state. They also
handle Back buttons and threading with relative ease. This framework uses a
language feature called continuations to maintain state within a web-based
application.


programming languages. Frustrations, driven by economics but stemming from
inadequacies in programming languages and programming models, rippled through
the community in another kind of gathering storm.
2.1.1. Economics of Client-Server Computing
Frustration with long development cycles and inadequate user interfaces drove
many companies to move off of mainframe computers. At first, the movement
amounted to nothing more than a trickle. As the cost-cutting financial offices
measured the software and hardware costs of IBM versus Microsoft on Intel, the
trickle became a flood.
But the wave of migrating customers did not consider all the costs. The rapid
movements from mainframes to Intel servers drove the first tsunami of chaos
because the client-server movement hid significant costs:

Management costs skyrocketed. It was too difficult to deploy tiny changes to
hundreds of fat clients. Technologists could not figure out how to maintain
the many desktop applications and frameworks necessary to make the
architecture go.
 Many customers became increasingly wary of a gathering Microsoft
monopoly.
 The tools of the day made it easy to get started, but did not handle
complexity well. Typical customers simply could not make them scale.
Decision makers were caught between the pragmatic approach of a centrally
managed solution and the adaptability and lower costs of Intel-based servers. They
waited for a better solution, and the clouds darkened.
2.1.2. Microsoft
While developers struggled with C++, Microsoft planned to hammer the final nails
in the coffin of OS/2, a competing operating system that it once created, but
abandoned to IBM. So Microsoft grew in stature and influence, and it learned to
cater to developers very well. Companies like IBM dominated the infrastructure
groups (called IT for information technology). Microsoft didn't care. It went

defang the dominant menace in the northwest. Market leaders always strive to
protect their base through proprietary products and frameworks. Everyone else
loves standards. IBM, which once built an empire on proprietary models
encompassing hardware, software, and services, suddenly did an about-face,
embracing every standard that it could find. It Internet-enabled its main products
like its DB2 database through a product like net.data and its mainframe-based
transaction engine through web-enabled emulators. Other companies also built
better servers, and more efficient ways to share dynamic content. Netscape rose to
prominence with a popular web browser. It looked for a way to share applications
with documents, and found the answer in a fledgling language, recently renamed
from Oak to Java. It started to rain.
2.1.4. Object Orientation
Object-oriented systems support three ideas that you now take for granted:
encapsulation, inheritance, and polymorphism. For many years, the industry had
been working toward object-oriented programming (OOP) . They tried several
times, but it never quite came together. The first major attempt was with Smalltalk
. It was a highly productive environment, but when less-experienced developers
tried to push it beyond its natural borders, they had problems. Initially, the early
hype around OOP was counterproductive. It positioned OO languages as tools to
achieve reuse, and suggested that inexperienced OOP teams could be many times
more productive than their procedural counterparts.
Object-
oriented software has the potential to be much less complex than procedural
programming, but it takes some time to build the expertise to recognize patterns
and to layer OO software in a way that makes sense. It also took the industry time
to deliver educated developers. Though it now looks like OOP exploded overnight,
that's not the case at all. After some early failures with languages like Smalltalk,
systems programmers went back to the drawing board to deliver a less-ambitious
version of an OOP language, and worked on delivering OOP concepts in a more
limited way, as you see in Figure 2-1:


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status