260 likes | 279 Views
Beyond Java: The Rise of Java Chapters 1 - 3. S. Kanat Bolazar <kanat2@yahoo.com> Syracuse University Syracuse, NY. Chapter 1 Owls and Ostriches. A Change in the Waters. Owls and Ostriches. “Ostrich” kayaker bombs down class V rapids with reckless abandon They seem to have a "death wish“
E N D
Beyond Java: The Rise of JavaChapters 1 - 3 S. Kanat Bolazar <kanat2@yahoo.com> Syracuse University Syracuse, NY
Chapter 1Owls and Ostriches A Change in the Waters
Owls and Ostriches • “Ostrich” kayaker bombs down class V rapids with reckless abandon • They seem to have a "death wish“ • Oblivious, head in the sand • “Owl” kayaker scouts every inch of the river and sets up safety ropes before making the run • Eventually, owl knows danger lurking in every corner of a familiar creek • Then the owl gets overconfident... • But the water level might change one day...
Ignorance as a Virtue • There is a productive period where ignoring a new language is proper • Extreme Programming acronym: • YAGNI - You Ain't Gonna Need It • At some point, you have to take note
Shaken to the Core • Author’s own experience with Ruby on Rails (RoR), compared to using Java • Rewrite was 5 - 10 times faster in RoR • The generated code was one fourth the size of Java code • These productivity gains held up over time • Ruby on Rails performed faster !! • (this was probably due to object persistence efficiency)
Boiling Frogs • Dropped in hot water, frogs jump out • If the water temperature raises slowly, frogs happily sit as the water boils • It's getting hot in here...
Danger Signs • Complexity • High barrier to entry; not “approachable” • Rapid Revolution of new frameworks • Unnatural Stretching • Lacking language features as add-ons • Language Evolution: Java 5 • Generics: No change in JVM • Annotations: Complicate programming • Other features don’t evolve rapidly enough
What's Good is GOOD • Java community is vibrant. • Software engineers, salespeople, staff, project managers know Java. • Most major commercial vendors support Java or a close derivative (C#). • You can buy applications, components, tools, services, even management consoles for Java.
What's Good is GOOD, cont’d • Open source is driving incredible innovation daily. • Academic institutions teach Java development, and do research on many Java-related problems. • JVM is a powerful innovation and it allows unprecedented mobility.
Dynamic Languages • Ruby code example: sentence = "say four times quick“ 4.times { puts sentence } • Helpful features: • Type (string) is inferred • 4 is an object; methods can be called on it • { puts sentence } is a code block passed as an argument
Metaprogramming • Transparent, reflective, dynamic • Productive, flexible, reduces duplication • Significantly increases, and changes the structure of reuse
Chapter 2The Perfect Storm The Rise of Java
Storm Warnings • Client-Server computing was coming of age • Management costs skyrocketed; fat client model not efficient after deployment • Customers were becoming wary of Microsoft monopoly • The internet took off
The C++ Experience • Partly object-oriented, but you could just use C • Based on a systems programming language • String manipulation complicated • Pointer arithmetic, was powerful, but also caused much headache • Nested includes complicated source code • “DLL Hell”
The C++ Experience, cont’d • Multiple inheritance has problems • Consistency, portability were lacking • C++ had made some compromises • Awkward syntax • Primitives mixed with objects • Allowing functions outside objects • …
Clouds Open • Between C++ backlash, OO emergence, Microsoft backlash and internet, Java rose • C++ programmers converted in large groups to Java • Writing code in Java was at a higher level, and more efficient • Garbage collection was good • JVM was interpreted and slow, but this would change in later versions
Fury Unleashed • Applets got our interest • Servlets came, and they stayed • J2EE grew, and was complicated, but good • Standards and open source grew • Java took off, slowly at first, then with much gusto • Many programmers started to use Java
Aftermath • Author makes this comment: • “I believe that Java is now the most successful programming language ever.” • How so? • It changed how we think of languages • Java changed the economics of application development • Libraries and community were quite important
Moving Ahead • Next great language must • Establish community • Be portable • Provide an economic incentive • Have demonstrable technical advantages • The last may not be the most important
Crown Jewels Java Features Java Myths
Main Features of Java • Portability was achieved by JVM • Security is built in to the language (also depends on JVM) • Java was built for the internet • Java evolved well over time • Enterprise computing grew in Java • Community and open source are vibrant sources of great innovation daily
Myth #1:Java’s Leadership is Unassailable • Consider recording industry: Record died, CDs may soon die, walkmans rose, are now dying, iPod is on the rise • Some third world countries jumped to wireless without traditional phone lines • Visual Basic is now dying; .Net, incompatible, complicated, does not work for Visual Basic
Myth #2:Java is a Great Applications Language • Smalltalk and Python are more productive • Visual Basic is simpler • Java succeeded by grabbing the interest of C++ community • The community, not the language is Java’s biggest strength • C++ legacy may also be limiting Java’s ability to adjust to the new times
Myth #3:Java is the Most Productive Language • Compared to C++, Java is very productive • Basic and Smalltalk, with rapid feedback loop are much more productive • Java lacks “code blocks” • Static typing is good but it’s hard on productivity
Myth #4: Commercial Interests Drive Most Java Innovation • Community and open source drive innovation today • Large companies tend to move more slowly • Backwards compatibility limits evolution speed • JCP uses experts to invent the standards, instead of them growing out of need and use.
Myth #5: Big Things Usually Come From Likely Sources • C came from Bell, a communications company • Java came from Sun, a hardware company • Visual Basic came from a “small company, operating on a razor-thin budget out of a garage in the Pacific Northwest, called Microsoft.”