JHUG Java Day Sponsored by Sun Hellas – Athens June 7, 2008

Very excited to blog about the upcoming JHUG Java Day that is organized by the Java Hellenic User Group (JHUG).

At the time of this writing this the details are:

Location: Athens, Greece

Directions:

Hotel Classical Acropol
1, Pireos Street
GR 105 52 Athens
Greece

Tel: 30 210 5282100
Fax: 30 210 5282175

Start date: Saturday, June 7, 2008

Start time: 09:30 AM

End date: Saturday, June 7, 2008

End time: 03:00 PM

Agenda

  • 09.30 – 10.00 : Coffee break
  • 10.00 – 10.40 :(Sun) Sun Hellas OpenSolaris Session (speaker TBA)
  • 10.50 – 11.30 : (Sun) Netbeans Team,Mikhail Kondratyev – Netbeans 6.1 Overview
  • 11.30 -11.50 : Coffee break
  • 11.50 – 12.30 : (RedHat JBoss) Mark Newton – JBoss Community & JBoss AS 5
  • 12.40 – 13.20 : Kirk Pepperdine – Perfomance Tuning and Java Optimizations (TBA)
  • 13.20 – 14:00 : Lunch Break
  • 14.00 – 14:40 : (RedHat JBoss) Manik Surtani – JBoss Cache: Clustering enterprise Java for scalability and high availability

And you can register here and also find more details from the blogs of Paris and Panos.

From twitter users I’d suggest looking for #jhug. Also I suppose a FaceBook event would sound nice…

HTML Refactoring #n: Replace Flash with HTML (and grass is green)

At the JavaOne bookstore I got my hands on a book by Elliotte Rusty Harold about HTML refactorings. As I was skipping through contents I noticed the following refactoring:

Replace Flash with HTML: Convert Flash sites to HTML. Provide pure- HTML alternatives for Flash content.

… and it followed:

Flash is extremely inaccessible. I most cases a Flash site might as well be a black box to blind users, and is often hostile to color-blind, deaf and motion impaired users as well…

It is not a secret that I have a bias opinion when it comes to Flash/Flex and I’m happy that there other people also that are immune to this hype.

Of course the lift of the restrictions regarding the SFW/FLV spec was a very positive think on behalf of Adobe and I hope they keep it up!

“Advanced Web Application Security” by Jeremiah Grossman and Joe Walker @ JavaOne 2008

The queue for this session was huge and started outside of the Moscone center. It was interesting and well organized but the characterization “advanced” was not very accurate. Of course you cannot have any “advanced” presentation on a crowd of hundreds and you should give Jeremiah and Joe the credit for keeping a good balance.

Here are some points that are not very trivial:

  • You can mess with your friends Google search history with simple basic CSRF
  • The OWASP servlet filter is a nice tool
  • Mentioned a way to make a double cookie check both on the body and the HTTP headers and said that it was the way DWR works, but didn’t quite elaborate on it.
  • They mentioned several times that there is a wrong and right way to use JSON and it would be nice to provide more details but I suppose time was an issue.
  • Maybe the corner stone of JavaScript hacking is the action to override Object(). This is also a nice way to do AOP.
  • There are many-many places where JavaScript is executed in a web page besides the <script> element like attributes (javascript:), event listeners, browser specific event listeners, CSS (inline and imports), etc. so…
    • … you might consider using AntiSamy
  • With XSS you can grab the secret token and then launch a CSRF

Some things that I feel that should also be added in a similar presentation should be:

    • Application layer firewalls like mod_security
    • Hacking browser extensions that users typically have like firebug, Greasemonkey, etc.
    • Protecting your app from malicious JSON
    • Browser standards compliance mode (IE8 ) as a way to protect from attacks that aim at malformed HTML

Java Rockstars Panel @ JavaOne

A few hours ago I attended the “Java Rockstars Panel”, a press only event with:

I will try to summarize some key points:

  • This year is about Java on the client, the ubiquity of the platform and the energy of the community.
  • Tim Bray likes JavaScript’s ubiquity 🙂
  • Fact of life: Ruby and Python are (almost) as old as Java (chronologically
  • Alternative (scripting) languages that will be able to run on the JVM with automatically increase their potential user base
  • “People love the Web platform because it has no platform vendor” – Tim Bray
  • Having no real specs for dynamic languages (except JavaScript) makes it hard for people trust them.

JavaOne Day #1 Report: ROCKING!

Yesterday JavaOne 2008 kicked off:

Attendants were welcomed in the General Session by various dancing acts.

Then James Gosling was tossing his personally designed t-shirts.

The prediction that a Java Posse member made yesterday at CommunityOne that Jonathan Schwartz will make a joint appearance with Steve Jobs, hug on stage and announce that Java will be available on the iPhone was… not fulfilled.

Instead we were shown a biometric censors experiment held in Moscone during JavaOne. BTW all badges are RFID and scanned with a nokia phone. They also demonstrated the usage of sensors and Java code for measuring and manage climate inside Moscone.

Then Rich Green:

  • Invited Ian Freed of Amazon on stage who talked about the Kindle and gave a short presentation that illustrated how Java empowers this device. If you didn’t know it ALL Kindle applications are Java.
  • Invited Rikko Sakaguchi from Sony Ericsson on stage who showed a promotional video of a new device that will be launched later this year and said that “Java is the core strategy of Sony Ericsson”!
  • Showed a demo with Facebook and LiveConnect app/plugin that uses JavaFX. Showed it also on a JavaME phone. Really impressive, even though the slow Moscone network created problems.
  • Continued with a JavaFX demo that demonstrated that emphasized on the design capabilities of the technology. It was really eye pleasing. Also emphasized the 3D, HD video and sound capabilities of the platform.
  • Repeated the ConnectedLife demo on the Google Android emulator.
  • Talked about Glassfish modular new architecture.

One of the highlights was the appereance of Neil Young on stage. He talked about his effort to collect all his musical legacy to BlueRay and how Java enables him to provide an nice interface to it all. I would have liked it if he could stayed a bit longer and had his guitar with him 🙂

After the general session I had the pleasure of accidentally meeting Doris Chen, one of our beloved Java Evangelists that visit Greece regularly to talk about the latest and greatest in Java Land.

The conference is so huge and packet with people from all over the world that I would suggest to Sun to consider something like JavaOne Europe.

Continuying with the individual sessions that I personally found more interesting:

“The Duke and the Elephant: PHP Meets Java? Technology–the Best of Both Worlds” by Rob Nicholson

  • Why use PHP (fairly obvious)
  • Why use PHP+Java+Groovy: leverage the power and communities of all platforms
  • WebSphere sMash: Agile application development using dynamic scripting and RESTful Web Services (based on JSON?)
  • They seemed to have implemented some kind of PHP 5 runtime over Java SE. It sounds very interesting and I’ll have to look into the licensing information.

Blogger Q&A with Jonathan Schwartz and Rich Green

  • How long Jonathan spents blogging and other related questions
  • Bloging company policy and sensorcip
  • JavaFX platform questions
  • Sun/Google/Android
  • Java and iPhone
  • more…

“JavaScript? Programming Language: The Language Everybody Loves to Hate” by Roberto Chinnici

Outline:

  • Introduction to the functional nature of JavaScript
  • Mentioned that you can only have scope through functions (but later showed scope with objects)
  • Suggested that some Higher Order Functions library might be useful
  • Said that with no tail recursion it is easy to blow a stack
  • Browser implementations are primitive
  • Made a reference to Google project Caja
  • Showed several examples form frameworks like Dojo, jQuery and Prototype that alienated the typical Java programmer.

For those who don’t know yet, Roberto is one of the people that brough us Phobos. As I suggested after the discussion they should really put an effort to making it work with continuation. This is a programming model quite different then the one most web developers are accustomed to and it would strengthen Phobos position as an alternative framework. Especially as we enter more and more to the era of server-side Javascript with products like Jaxter by Aptana and the long awaited Rhino on Rails by Google.

BTW Roberto some of your comments where a bit biased against the functional and prototypical nature of the language but we all know you love it 😉

“Building Secure Mashups with OpenAjax” by Jon Ferraiolo

  • What is the OpenAjax Allience
  • The interoperability problems between the various toolkits
  • OpenHub 1.0 -> enables multiple ajax runtimes to work together (pub/sub). Included in the Dojo framework
  • Security issues in mashups
  • OpenAjax Hub 1.1 -> Adds pub/sub with the server (eg. Comet) and framework for secure mashups
  • OpenAjax Metadata

CommunityOne 2008 verdict… AWESOME!

Today me and Panos attended CommunityOne and I have to say that the event exceeded my expectations. The sheer scale of this event was something I hadn’t seen in the past!

Moscone Center was surrounded with street signs and people holding signs that pointed to the various designated areas.

The general session that kicked off was broadcasted live on the internet, as one of the speakers informed us.


HD abuse

I’ve spent most of my time in the RedMonk Unconference and also attended the Java Posse podcast recording during lunch time. Their podcast is my favorite one second to the Software Engineering Radio.

Also I attended a session by Zend about their framework and how they are planning to implement Comet applications. I use the word “planning” because from what I understood they don’t actually have any concrete plans. For example the speaker talked about a Comet server implementation in C that a PHP app would use through CLI, but when I approached him with the question if this would be given out as a PECL module or about the licensing, he couldn’t disclose any information. Anyway, since more than 50% of web apps are made in PHP, I’d like this community to overcome the challenges that the Comet paradigm brings and do it in a timely fashion.

I was also happy to accidentally bump into Reginald Hutcherson at the stairs. Regi is a Java Evangelist that has been regularly visiting us in Athens, Greece with his team.

I still have a couple of sessions that I would like to attend and I’ll go back to the hotel to rest since I still haven’t gotten over the jetlag and tomorrow JavaOne opens. This means dozens of great sessions and even more parties 🙂

Having a pet dog I really-really enjoyed the fact that there are people inside Moscone that (are allowed to) go around with their dogs. Actually I’ve read that one out of two SF residents has dog. Two thumbs up people!

JavaOne starts off with the NLJUG Party (and we recuperate from the bike ride)

JavaOne seems to be a very big thing in San Francisco. Starting from the airport passport checking staff that made JavaOne-specific questions (like “how r u associated with Sun?”), to signs about Java on bus stations!

This was our second day this side of the pond and we’ve spent most of the morning going around on rented bikes and sightseeing.

We were so overwhelmed by the scenery and the Golden Gate Bridge that we went far out of our schedule and couldn’t make it to the GlassFish Unconference that was held in Moscone. This was such a shame since I am very excited about the Comet support and I wanted to meet the team and discuss about v3. I hope I get the chance one of the following days during JavaOne.

After we returned to the hotel and had a few minutes of rest, we visited the party that the Dutch Java User Group – NLJUG had organized at the Carnelian Room. After meeting the NLJUG leader and some of their members I was very impressed about their enthusiasm… NLJUG rocks!

At this party, besides meeting Stephan Jansen from JAVOXX (formerly known as Javapolis), it was a pleasure to meet Aaron Houston in person after all those emails. He has been a source of inspiration and his outgoing nature helped to create a lively conversation regarding all kinds of Java related issues. Aaron the JHUG will be waiting for you in Greece 🙂

My friend Panos is keeping a log of our time here in SF, on one of his blogs.

BTW a little bird told me that a SunSpot might be landing soon in Greece for all the JHUG community to play with it and to program it, but will see about that… (update: Panos what is this little box in your bag?)

Amazon upgrades EC2 with Persistent Storage (@InfoQ)

Amazon’s Elastic Computer Cloud (EC2), which delivers Hardware as a Service (HaaS), is adding persistent storage to its list of features. Werner Vogels, Amazon’s CTO, describes how storage volumes will attach to EC2 instances and how they handle failure and data consistency; he also talks about how you can store a snapshot of your storage in S3, Amazon’s storage service, as a backup.

“Amazon upgrades EC2 with Persistent Storage” article for InfoQ -by Dionysios G. Synodinos

JavaOne: San Francisco here we come!!!

This year me and my JHUG-buddy Panos will be attending JavaOne which is held at the Moscone Center in San Francisco.

I’m very excited since JavaOne is the flag-ship of all Java related conferences and probably one of the biggest (if not THE biggest) conferences in the world for software developers. Moreover it’s a celebration where people from all over the globe:

  • come together in one of the most beautiful cities in the US,
  • get high quality sessions from domain experts
  • exchange experiences, ideas and their vision for the Java platform and
  • network with their idols and with each other.

There are several sessions I’m eagerly looking forward to attending like:

  • “The Java™ Platform Portlet Specification 2.0 (JSR 286)” by Stefan Hepper (WebSphere Portal Server)
  • “Asynchronous Ajax for Revolutionary Web Applications” by Jean-François Arcand (Grizzly)
  • “The JavaScript™ Programming Language for Enterprise Application Scripting: Five Years of Experience” by Olivier Modica
  • “Comet: The Rise of Highly Interactive Web Sites” by Alex Russell (Dojo)
  • “JavaScript™ Programming Language: The Language Everybody Loves to Hate” by Roberto Chinnici (Phobos)

We have planned our visit so we can also participate in CommunityOne, one day before JavaOne, where there will be many interesting sessions concerning:

  • Projects and Strategy
  • Linux Communities
  • Databases: MySQL, postgreSQL
  • Web and Application Servers: GlassFish, Apache
  • Scripting and Rich Internet Applications (RIAs): PHP, Python, Ruby, Javascript, JavaFX, AJAX, jMaki
  • Tools and IDEs: NetBeans, Eclipse
  • Next Generation Web Applications
  • Web Scale Computing
  • … and much more

You still have time to join us…

Here is the opening video from last year’s JavaOne:

QCon London 2008 Roundup

As you might have noticed from the last two posts, the last days I’ve been participating in QCon London.

nokia_065.jpg

My impressions about the organization of the event are excellent. The facilities were more than adequate, the schedule was practical and worked out fine, and the quality of the presentations was very high.

nokia_051.jpg

Even the security measures showed a high level of organization and professionalism.

The venue was at a very central point of London, next to Westminster Abbey and within walking distance from the Big Ben.

nokia_050.jpg

nokia_045.jpg

One f the things that I’ve never seen in a conference was the “agile assessment” of each presentation. After the end of the talk, participants were handed green, yellow and red card and voted with them according to their experience. This surely beats the traditional method of handing out assessment forms at the end that nobody bothers to fill-in.

nokia_089.jpg

Another thing I liked was the presence of an O’Reilly stand, that featured some of the hottest titles from this publisher. Actually they had a 35% discount on all titles, which I took advantage to get me as many books as I could carry back home.

nokia_053.jpg

So a short list of the talks that I found to be most valuable follows. Of course since there were 4 simultaneously tracks, taking place at the same times, every day I didn’t have time to see all presentations, so for more details maybe you should also check what the other bloggers are saying.

Kent Beck’s keynote on the “Trends in Agile Development”

I can still remember back in ’99 when I bought Kent’s book on XP programming, how much it all made sense. He is a very experienced and entertaining speaker that has a magical ability to sell the agile concept.

nokia_068.jpg

“REST: A Pragmatic Introduction to the Web’s Architecture” by Stefan Tilkov

A great presentation on the basic principles of REST and why you should care about it. It is interesting to see that after so much technological elaboration the last few years, it is all coming back to the basic nature of the WWW.

“The Cathedral, the Bazaar and the Commissar: The Evolution of Innovation in Enterprise Java” by Rod Johnson

Check out my later post.

InfoQ BOF

At this BOF I had the opportunity to meet the faces behind InfoQ and learn about how it evolved and the future directions. It was a friendly interaction, were several participants gave their opinions on how this information-rich community site can grow.

The BOF was taking so long that the team from Software Engineering Radio that were holding the next BOF in the same room arrived and we all had the chance to interact together until the place had to close.

“Interactive websites: Comet and DWR”

This presentation was a nice stroll through the current state of Comet development and what DWR can provide to Java programmers.

nokia_084.jpg

“Haskell: functional programming on steroids” by Simon Peyton-Jones

Although the title of the presentation had changed from the one in the schedule, the part about the steroids was 100% representative of the speaker. A person of an academic background, working for Microsoft Research and maintaining a GNU licensed Haskell compiler… wow that guy was awesome:

nokia_088.jpg

Of course this talk didn’t change my opinion that pure functional languages like Haskell are more suitable for academic research than the real world, at least in 2008 🙂

“Behind the Scenes at MySpace.com” by Dan Farino

Nice walk through the various administrative tool that the team that handles Myspace.com have build on top of the .NET platform, to monitor a system that serves hundreds of users.

“The Busy Java Developer’s Guide to Scala” by Ted Neward

Ted’s presentations are both informative and enjoyable. He has a way to communicate his thoughts directly to the audience and a very distinctive sense of humor to sugar-coate it all.

nokia_091.jpg

One of the impressions that this talk left to me is that even though this genre of languages is getting much attention these days, nobody actually has much experience in the enterprise field and the actual patterns of usage are yet to be established.

 

 

So, to finish of here are some nice pictures from London:

nokia_046.jpg

nokia_062.jpg

nokia_081.jpg

nokia_092.jpg

nokia_099.jpg

 

Rod Johnson compares JCP with USSR Commissar during QCon talk

Just a few hours ago the second day of the main QCon schedule ended. This day was even more captivating than the first and there where many interesting points which I will mention on my summarizing post, after the end of the conference.

nokia_083.jpg

Although there were several important presentations by people that were either well-known at their field or even considered pioneers/gurus, it was one session that I was eagerly expecting from the moment I first read the schedule. This was the presentation from Rod Johnson and it absolutely lived up to my expectations.

nokia_079.jpg

Usually Rod is being introduced as the father of the Spring framework. I find that this does not do him justice. Even though Spring has been adopted by several developers, I believe that Rod has influenced a much larger portion of today’s enterprise Java developers with his first book. For me this was one of the most influential publications I had the luck of coming across and it has played a great part in the path I chose as a professional developer.

On the lighter side of things, I urge you to visit amazon.com and see that the main negative points that people had in 2002 about this book was that Rod was demonstrating his concepts using his “own proprietary framework”… which turned out to be Spring 🙂

nokia_054.jpg

Returning back to today’s events, Rod gave the talk “The Cathedral, the Bazaar and the Commissar: The Evolution of Innovation in Enterprise Java” as part of the “Evolving Java” track. This presentation built upon Eric Raymond’s seminal paper that analyses why open source works so well, which was named “The Cathedral and the Bazaar”.

The addition was the Commissar, a role coming from the Soviet Union that was Rod’s perception of the actual role that the Java Community Process plays in the evolution of the Java ecosystem. This was a rough metaphor and he tried to back it up with several examples from the fall of the USSR.

In the past many of his preachings, like the lightweight approach of POJOs instead of EJB, have managed to influence the progress of Java. This is more evident than ever in Java EE 5 and the roadmap for the proposed Java EE 6. It will be interesting to see if his views on how the JCP should alter its modus operandi, will actually convince Sun to fundamentally reorganize the process which drives the Java future.

nokia_069.jpg

Will be attending this year’s QCon in London

From the 11th to14th of March this year I will be visiting London to participate in QCon 2008. It will be my first QCon but I have high expectations. First of all the organization of the event is done by InfoQ which is a well known and valuable source of information on enterprise software, and by the JAOO people, which organize some of the coolest conferences on software technology. Also the list of speakers is quite impressive, for example you have people like M. Fowler, Erich Gamma, Kent Beck, Rod Johnson, Neal Gafter and many others that are the crème de la crème of software engineering. Finally I’ve found many sessions that I would like to participate in so I guess I’ll have 3 days packed with presentations.

If you are also participating in QCon 2008, feel free to drop me a line or contact me directly at the venue.

tags: qcon, qcon2008, qconlondon

The Way of Client-Side Templating

templating.jpgIt is generally accepted that in every field of IT where a UI is needed there is great benefit from the separation between the content and the presentation rules. To quote Martin Fowler from his book “Patterns of Enterprise Application Architecture”: ”the separation of presentation from model is one of the most fundamental heuristics of good software design”. Especially in the area of web development this is somewhat of a holy grail, where every new framework or architecture claims that it has managed to split these two different considerations in a way so much better than everybody else.

So, how would you go about separating these Siamese twins? One of the usual ways people strive to achieve this is by trying to make the best of the MVC architectural pattern. It is common to split an application into separate layers: presentation (UI), domain logic, and data access. The MVC patterns that was originally intended for Smalltalk goes further by additionally separating the presentation layer into View and Controller. The View in particular renders the model into a form suitable for interaction, typically a user interface element.

The View layer classically implements a templating mechanism where content is assigned to a template and a template rendering engine performs the necessary transformations for the display. Although the use of a templating engine is not required, it has several benefits. First of all it provides a well-defined formalism for the effective separation between content and presentation. Also because the whole concept is based on a loosely-coupled relationship between engine and templates, it promotes reusability and ensures easier refactorings. Another important benefit is also the fact that it encourages the divisions of labor, where different people are assigned the user interface and others the domain logic.

It might not be clear to many developers, especially to younger ones, but the above reasons where the fundamental motive we came up with technologies like JSP, PHP and ASP. All these web development languages are basically template languages and where conceived in order to separate program logic from HTML markup. The first time I came in contact with this kind of languages was 9 years ago during the break from a Lotus Notes training and I can still remember how revolutionary JHTML looked for someone coming from the CGI world, like me.

In the case of web applications where the UI is the browser that renders the HTML, the dominant paradigm is for the templating component to exist server-side. In this post we are going to be dealing with the presentation logic that sits between the domain logic and the pure layout and design logic that is handled by CSS rules that manage colors, sizes, fonts and positions. Although you can do many things to manipulate the presentation with CSS its power is restricted due to the limitations of the CSS implementations and is beyond the scope of this article.

In the Java world the most popular templating solution is Tiles by the Apache Software Foundation. It allows authors to define page fragments which can be assembled into a complete page at runtime. These fragments, or tiles, can be used as simple includes in order to reduce the duplication of common page elements or embedded within other tiles to develop a series of reusable templates. These templates streamline the development of a consistent look and feel across an entire application. Tiles in conjunction with Struts have been the default solution for Java web developers for the last years.

On the other side of the river, in the PHP realm, Smarty has been the dominant templating framework, that provides the programmer and template designer with nice tools to automate tasks commonly dealt with at the presentation layer of an application. Another one is PHPTAL which implements the Zope Page Templates syntax. This is my personal favorite because it works on XML attributes instead of markup tags so you can use it to insert dummy content in places where for example you get data form a DB. In this way you can view your templates in a WYSIWYG editor like Dreamweaver. Although the implementation differs from Tiles, the basic pattern for all these engines is the same: do the templating server-side.

When talking about templating it is important to mention the Composite View pattern. This is one pattern that is commonly used by templating engines to assemble a web page from several components. To quote the Core J2EE Pattern’s Catalog: “Use composite views that are composed of multiple atomic subviews. Each component of the template may be included dynamically into the whole and the layout of the page may be managed independently of the content.” This functionality is quite common in portals where individual parts of a page are different components with diverse sources and caching settings that are assembled in a flat page (or hierarchies). The benefits of having pluggable and reusable components are obvious. The Composite View pattern is based on the GoF Composite pattern which composes objects into tree structures to represent part-whole hierarchies.

Although in the early days of the Web the browsers where just dumb markup renderers, with the emergence of Firefox 2 and IE 7 they have come to a point where the application developer can rely on the client side for several functions. JavaScript implementations still have many incompatibilities but you can count on them to perform many complex tasks as asynchronous access to remote resources (XHR) and generations of multifaceted markup. Also many frameworks like Dojo, jQuery and Prototype have emerged that assist the development of intricate OO applications that under the hood leverage patterns and best practices. Finally the browsers pack several other components that are exposed through simple APIs like their XSLT engines.

All the above reasons are strong enough to make us consider moving a greater part of our application to the client-side. Since the presentation logic is the closest layer, it comes natural to reflect on if it would be reasonable to move it to the browser and also the various ways that this could be achieved.

Having the presentation – templating logic in the client-side has several great benefits:

First of all you get the ultimate division of labour since the presentation is not only in a different language/technology than the rest of your application but it is not even located in the server. The people responsible for it might not even have access to the server.

The high degree of separation that is innate of this paradigm has the result of producing highly decoupled architectures. Besides the flexibility that the decoupling brings, it is obvious that it promotes testability and makes for easier refactorings.

Since the various components will be downloaded in the form of XML, JSON, YAML and will be assembled at the client-side (for example in the manner of Composite View Patterns) we can benefit from the various network caching mechanisms. Our “content components“ may be cached by proxies or even at the browsers. Imagine a portal page that consists of 10-12 different parts (components). When you visit another page most of them will not change and are already in your cache. In this way you save bandwidth both for the client and the server since for a busy portal the bandwidth cost per byte is a significant factor. Hell, with smaller network traffic you can even save the planet!

Another advantage would be that by distributing the template processing functionality to the clients you improve the scalability especially in installations with elaborate templating mechanisms. Maybe the presentation layer is not the usual place where you need to optimize for resources like in the case of DB connections or the memory management, but the various aspects of templating, like markup transformations and caching consume an important amount of system resources. By putting the load to the client you can save not only in bandwidth, as we saw in the previous paragraph, but also in CPU, memory and disk space.

Client-side templating is not something new. Actually it has been described as the Browser-Side Templating pattern in the Ajax Patterns Catalog. Although it is not the dominant paradigm, I feel that as browsers mature in terms of JavaScript engines and XSLT processing, it has the potential to become ubiquitous. Maybe even a buzzword 🙂

When I originally planned on writing this post, I had in mind to write a little code to demonstrate the concepts. Unfortunately due to the verbosity of markup code, the limited nature of a blog post and the several approaches the you can choose from, I believe that I wouldn’t be doing justice to the whole concept by just giving out a couple of short examples. If you are interested I would suggested you visited the online demo of JST and checked out an example of browser-side XSLT.

JST and XSLT and several other technologies are tools that can be used to develop client-side templating functionality. These tools are powerful and flexible enough in order to be combined together in various ways to provide for different deployment strategies. For example you might find that your application may well benefit from using the Two Step View pattern which basically transforms content to markup not in a single step, but in two. Or you could use more steps if you have well-defined natural hierarchies in your domain model. Also you might find that your architecture calls for the use of the View Helper pattern for handling logic that is part of the application but it is too complex to fit in the actual template.

Whatever you choose, there are several factors to consider before moving to client-side templating. In most cases these disadvantages are not prohibiting. It is important though to have them in mind since they might become a problem in some corner-cases.

In particular:

  • Although the frameworks provide us with abstractions that are portable, nobody guarantees that they are 100% portable
  • Client-side
    frameworks tend to be harder to debug. It is especially difficult for developers
    that are accustomed to strongly-typed languages like Java or C#, to try to
    debug JavaScript.
  • XSL has its roots in DSSSL which in turn is a subset of Scheme which is a dialect of Lisp. Therefore, mastering this language for someone coming from a procedural or OO background is a slow and painful procedure (but very useful).
  • Companies like Sun or Microsoft still push for their traditional server-side templating solutions so there is no major support or tooling.

Report from the “Java Developer Day 2008” in Athens

For the second year in a row the “Java Developer Day” was held in Athens Information Technology (AIT), where the familiar team of Java Evangelists informed the Greek community about the latest and greatest from the world of Java.

The venue was very good, although packed and some people had to stand up, at least at the first 2-3 presentations. I was happy to see many familiar faces and meet friends that I never knew they were attending. Maybe because 3/4 of the participants were from the NTUA.

javatechday2008_nokia_037.jpg

The organizers had prepared a comfortable environment in which you could listen to the presentations, get together with colleagues and share opinions with new people. After all one the great thing about these kind of events is that you not only have the opportunity to hear from the experts but also network with people from your own geographical region that share the same interest with you: Java 🙂

javatechday2008_nokia_025.jpg

Of course there were some issues that might need to be addressed for future similar events like the fact that:

  1. The location was outside of the city and getting there was hard. I suppose if it was held somewhere closer to the center the attendance would have been much (!) greater.
  2. There was no Wi-Fi in the auditorium. If you are going to hold an event from 9am till 5pm you have to give the participants some way to communicate with the outside world and their work. UPDATE: Aris informed me that there was a wireless internet access point in the auditorium and several people used it, but I didn’t hear it when they announced it.
  3. Since the schedule was packed there were no questions after each presentation. Don’t get me wrong, I like the fact that there was time to mention all these different and sometimes diverse subjects, but the interaction with the audience is a big part of the experience in similar events.

Since I have organized several events in the past I understand the many difficulties that characterize similar endeavors and I have to say that both this year and the last year, the organizations from Sun Microsystems Greece deserves two thumbs up!

A small outline of the event (as I witnessed it) follows. The structure you see is about how I as a participant perceived each presentation and doesn’t necessarily represent the actual structure of every single presentation.

So here it goes:

Welcome by Aris Pantazopoulos

Although I was a bit late and I missed the beginning it felt like a warm welcome that set the mood and the pace for the rest of the event.

“About AIT” by AIT Vice Chair

I didn’t get the name but I was surprised in a positive way to see the Vice Rector of AIT. He was much younger than what you would expect from a person in such a position, but I feel that for technological academic institutions it is crucial to tap in the energy and fresh ideas that younger people have. Many time the problems in this country come from people that have delayed their retirement for longer than they should have (…)

As for the actual presentation of AIT, it was quite impressive and will probably make several people consider it as an option for their postgraduate studies in Greece.

“View from the top” by Reginald Hutcherson

Regi is a very engaging speaker! He really makes you involved in the subject. He has visited our country on several occasions and as I learned there is a chance he’s coming back soon for a Solaris event.

javatechday2008_nokia_039.jpg

Basically this presentation was about Sun’s software strategy:

  • Business realities
    • A global internet economy
    • Massive scale
    • Demand for enormous throughput
    • Even more demand for flexibility
    • The world was never so inter-connected
    • We have free media
    • As well as free software
    • And free services
    • He introduced the term “Webolution” (a bit tacky for my taste but…)
  • Dynamic Languages = Productivity (Sun finally realizes that – better late than never)
  • New opportunities
    • New services
    • New products
    • A new mass market
  • JRuby
    • Sun came late to this game as opposed to M$ that has been supporting dynamic languages in its VM for a long time now – they have even rolled out a functional language on top of their CLR – F#. So since Sun joined late they are a bit more eager to “play”, hence the many times, unrealistic value that they place on Ruby.
  • Ajax for the next generation of web apps
  • JavaFX (more will follow on that)
  • JavaFX mobile (again more will follow)
  • The VM: a virtual machine of languages, not only Java
  • NetBeans 6
  • Solaris with emphasis on its many system virtualization solutions
  • Open Source Java
    • About a year old
    • OpenJDK: An open source JDK!
    • Will be adding closures (now there is a controversial topic!)
  • Java 7 (looking forward)
  • The GlassFish Application Server
  • JavaME: Will be superseded by JavaFX or merged with it, but it will be probably still be supported for some time
  • Java User Groups

“Secrets of concurrency” by Dr. Heinz Kabutz

Heinz is a Java Champion living in Greece. He consults, holds courses, programs, and writes a weekly newsletter in which he shares some rather unconventional insights about Java. Things that push the envelope; make Java do things you thought it could not; dirty tricks and such. In other words, stuff you do not usually find in Java periodicals or newsletters.

You can find his newsletter at: http://www.javaspecialists.co.za/

javatechday2008_nokia_030.jpg

Heinz suggested that writing multithreaded code will become more customary as multi-cored processors become ubiquitous.

Also informed us about a special course he is offering for Greek Residents only. It will have a 50% off discount and it will be named something like “Greek Geeks Masters Course” or something similar. It sounds interesting and you can find more info on http://www.javaspecialists.eu/courses/master.jsp

Heinz proceeded with his classification of typical concurrency issues into laws – “The Laws of Concurrency”. I will only give out their names without getting into a great detail since you can get this information from his newsletter. The names are actually quite intuitive:

The Law of:

  1. …Sabotaged Doorbell
  2. …Distracted Spear fisherman
  3. …Overstocked Haberdashery
  4. …Blind Spot
  5. …Leaked Memo
  6. …Corrupt Politician
  7. …Micromanager
  8. …Greek Driving (!)
  9. …Sudden Riches
  10. …Uneaten Spinach

“Java SE – Today and Tomorrow” by Simon Ritter

Simon had a cold and apologized for his voice but actually his British accent and tone was clearer that 90% of the speakers I’ve heard in my life.

javatechday2008_nokia_031.jpg
  • The Java Language characteristics
  • Community based (ok, not from the start maybe, but Sun has followed the stream)
  • Java SE features
    • On the desktop: Vista look ‘n’ feel, sub-pixel font rendering, splash screens, tray icon, java.awt.Desktop
    • Web Services become easier with JAX-WS and NetBeans
    • Added more scripting support
    • Pluggable Annotations API
    • jconsole improvements
    • Pre-verification for class file updates
    • Many minor improvements like classpath wildcard, java compiler interface, console API and more…
    • Short intro on the basic concepts of the Consumer JRE
    • Proposed features of Java SE 7
      • Closures for Java: Simon tried to give an explanation on closures with artifacts from the Java ecology, but IMHO this is not a good way to explain closures. You need to enter the world of dynamic languages where this paradigm is heavily used, for example talk about closures in JavaScript.
      • Auto-generated getters and setter with the property keyword. Again this is a feature that comes from dynamic languages and for example is heavily used in PHP with __get() and __set().
      • Swing Application Framework to simplify Swing development
      • Bean binding (check out JSP 295)
      • Separate parts compilation that supports compilation against an interface and not actually needing a concrete implementation.
      • Super packages for sharing code in a more scalable way
      • Changes to the VM to support dynamic languages

“Ruby, JRuby & Rails” by Dr. Doris Chen

javatechday2008_nokia_032.jpg

My friend Panagiotis has pointed out and interesting post that is introduced as a “fair and balanced” look at the static vs. dynamic typing schism. Reading this is a prerequisite in order to understand how much of the faith that Sun puts in Ruby (and other dynamic languages) is justified and how much is hype. While I like dynamic languages and I code in them almost every single day, you should know that they were not invented yesterday and there are several things you have to consider when you are comparing them with Java. There has been much ”static vs. dynamic” debate on the web. You even have guys from Ruby debating on why the strong dynamic typing of their language is so much better than the weak dynamic typing of languages like PHP or JavaScript. For the later two languages, as far as I know in the new versions there are suggestions to include optional type declarations.

So Doris (with an exotic accent):

UPDATE: A reader pointed out that the link to the “orthodox” blog in 15’ demo linked to a RoR webcast and not to the actual NetBeans demo that Doris demonstrated. The reason I used the characterization “orthodox” and pointed to this link was because since the RoR team posted that exact webcast (“How to build a Blog in 15’”) some years ago, every framework developer in the world has made it his mission to copy this demo and apply it to his own language/framework. It has been used so much that it has become a cliché, to the point that people have created parodies like the one by B.V. Puttyngton: “SQL on Rails: Creating a search engine in 8’”. Besides the fact that it is not intuitive anymore, it fails to deal with many of the interesting aspects of RoR and even worst hides under the carpet, the many limitations. For example the Active Record Pattern and the respectful implementation from the RoR team is only one way to go when choosing an ORM solution. It is usually the choice of lighter frameworks like the ones build with dynamic languages like Ruby, PHP etc. This approach has its strengths and its limitations and someone should study this pattern  as well as the Data Mapper pattern which is a more heavy-weight approach. A discussion about data access patterns is beyond the scope of this article. Finally I would like to mention that a presentation of a dynamic language to an audience coming from a statically-typed background is extremely difficult and would probably require at least a day. Doris is an appealing speaker but she had an impossible task. Stuff like dynamic typing, higher-order functions, object runtime alteration, closures even continuations are not only new to most java developers but alien! I could almost sense the difficulty that Simon had (in another presentation) when trying to explain closures using artifacts from the Java space. If there was one person in the audience that got closures with the example of inner classes he deserved a t-shirt 🙂

Ta-daaaa: Lunch Break

Excellent, both in quality and quantity.

“JavaFX” by Simon Ritter

  • Basic Idea: Scripting an application for cross-platform deployment. Even though Java is innately all about that, JavaFX tries to make it a little bit simpler.
  • The original name was F3 = “Form Follows Function”
  • Language Basics
    • OO, declarative, statically-typed, automatic data-binding, etc.
  • Tooling with NetBeans and Eclipse
  • The “Ugly Java GUI Stereotype”: Essentially GUIs with AWT or Swing are not aesthetically pleasing
  • May try to extend basic AWT/Swing with Java 2D
  • Gave some hints on the syntax:
    • Variable declarations
    • Functions
    • Operations (procedures) which are almost like functions but (if I got it right) if you bind to an operation it binds once and won’t be updated (as in the case of binding to a function).
    • Arrays (only one dimension!)
    • Expressions: very similar to Java’s; a double for-loop (nice!)
    • do-block: for avoiding the Swing blocking
    • Classes
    • Attributes
    • Triggers
  • JavaFX Widget usage
  • Animation with the dur operator
  • Direct DB access with JDBC or direct calls to enterprise components (maybe even calls to remote services?)
  • Script deployment:
    • The runtime is a 1,5MB jar
    • Can be deployed as a standalone java application (jar), applet, with Java Web Start
  • Future of JavaFX
    • A (native?) script compiler
    • More tooling
    • Integration with the consumer JRE
    • Mobile device’s support
  • The Consumer JRE
    • Quick starter
    • Deployment toolkit
    • Installer improvements
    • Graphics performance
    • New cross-platform look ‘n’ feel
  • Demos
    • Basic shapes, rotation, transparencies, etc.

If you have checked out JavaFX in the past and have though that it seems similar to Adobe’s Flash/Flex stack well… you were right: it is competing with the later stack in a direct way. While Abode has a lead start, I feel that with the native power of the Java platform, JavaFX has the potential to easily outshine Flash/Flex (and Silverlight)!

“Java developer @ Work” by Paris Paris Apostolopoulos

Paris is the leader of the Hellenic Java User Group (JHUG) in Athens, Greece. He has been working in a series of JUG-sponsored developer events held in Athens to build-up the Java developer community in Greece.

javatechday2008_nokia_036.jpg

Paris gave a talk that aimed mostly on junior developers and contained valuable information that when I started out, I had to try really hard and make many mistakes in the process in order to attain it.

In summary:

  • “What makes a good developer?”
  • The “Passion” of development
  • Staying up to date
  • Top Java Publishers
  • Java News Sites
  • Other Useful Resources: tutorials, blogs, etc.
  • Tools: IDEs, build tools, quality tools, testing, versioning

You can find the slides from his presentation here.

“Solaris & OpenSolaris” by Simon Ritter

Simon is quite appealing as a presenter but OSs is not really my field so I had an early coffee break 🙂

“Java EE & GlassFish” by Dr. Doris Chen

  • Java EE Overview: Differences from J2EE 1.4 like POJOs, annotations, dependency injection, etc.
  • Spec changes
  • An example of how “easier” are web services with JAX-WS than they were with JAX-RPC
  • How easier are EJB references with resource injection
  • JAXB 1.0 -> 2.0 (less LOC)
  • GlassFish:
    • A Java EE 5 compliant Application Server
    • Open Source License (choose from CDDL or GPLv2)
    • Strong community
    • Time line: v3 2008/2009
    • Showed a diagram of the GlassFish ecosystem
    • Mentioned some adoption stories
    • Main features: the Metro stack, clustering, JBI (OpenESb 2.0), Performance (…), etc.
    • Ajax Support: jMaki, DynaFaces, JRuby
    • jMaki demo with NetBeans.
  • Grizzly
    • Uses NIO primitives
    • Non-blocking sockets to the HTTP processing layer (!!!)
    • Some benchmarks (…)
    • Demo with Comet: A Flikcr-based chat
  • GlassFish v3:

“Sun SPOTs” by Simon Ritter

  • What is a a Sun SPOT: basically a little device running some sort of Java and supporting some kind of wireless network

Sorry Simon but at this time I had to leave so I missed the virtual-glove-minority-report-style demo which gets the crowd going…

Epilogue

Finishing up I would like to thank all the people that worked to make this event possible. Even though they make it look simple because they are talented, it is quite hard.

Having said that, I’d also like to see more efforts like that from Sun and even events that go beyond basic introductions and delve into the inner-workings of specific technologies. Events more focused on senior developers that have further technical depth.

At the time of this writing the only open Java events I have participated in Greece and where focused on more experienced developers were events organized by the JHUG.

Facebook stats for Greece

My friend Panagiotis pointed out this interesting post about how you could use the Facebook’s online ad builder interface to get all sorts of interesting statistics.

Since I have a couple of hours until my movie begins I thought it’d check out some numbers regarding the adoption of Facebook in Greece. It feels like everybody you know is in Facebook nowadays so lets see:

There are 183,840 Greeks from which the 56,060 are males, the 57,560 are females (almost 50/50) and the rest haven’t specified their sex.

There are only 40 minors and about 1,740 that have stated that are over 60 years old (!)

While trying to get some work related info I came to conclusion that most of my compatriots are reluctant to enter details about where they work. There is really not that much data. A similar tool for LinkedIn would have been much more interesting.

Finally, since we all know that many people use Facebook for dating/flirting, it interesting to see that only 28,040 members have stated that they are single and 30,920 have said that they are in some kind of relationship or have a more formal commitment. Again the majority is reluctant to give out private information. Little do they know…

Google Maps Article on Dr. Dobb’s Journal

wordpress-map-post.jpgSince most traditional periodical print publications like magazines and newspapers have moved much of their content to the web using portals and RSS feeds, I have only a couple of print subscriptions. One of those, which I have for many years is for Dr. Dobb’s Journal. This magazine continues to be the only software engineering publication based on “real solutions” for “real problems” by “real programmers” (the readers). I mean, these days it is easy to find experimental solutions to fictional problems all over the blogosphere but in most cases these POCs have little to do with the real world. Many times solutions proposed in blogs don’t scale or don’t work as they are supposed to. Traditionally DDJ is about people who have built something that works in their professional life and spent the time to share their experience with the rest of us.

So having built a Google Map application back in April (map.ntua.gr) , I’ve spent the time writing a short article describing the process and the practical issues. It has been published in this months issue (December 2007) and you can find it either buy getting a subscription or by visiting the online version here.

After Apple more manufacturers refuse to ship latest Java

“After Apple more manufacturers refuse to ship latest Java” by Dionysios G. Synodinos

“After the widespread disapproval of Apple’s choice not to ship Java 6 with its latest Leopard OS it has come to my attention that there are more manufacturers that are adopting this anti-Java approach.”

(This as all my Java related thoughts are posted on java.net so you can check out my blog there or subscribe to it too.)

New Age JavaScript

rhinojpg.jpgIf you’ve been keeping track of this blog, you might have noticed that I am a big fan of JavaScript. Although you can argue about the fundamental features that a language has, there are several reasons why I
consider JavaScript to be one of the hottest languages out there today
.

A couple of days ago the organization responsible for the new ECMAScript, version 4 (AKA JavaScript 2) have published a revised version of the language overview. Although this is only a proposal, TG1 is no longer accepting more proposals and has started writing the new specs, so this “overview” is pretty much final.

It is no secret that the new version of JavaScript will be heavily influenced by…. no, not Java 🙂 The new JavaScript will be… Pythonic!

Following you can find some of the coolest features of the next big language.

Note: Some of the following features are already part of current JavaScript specs and are also implemented in Firefox 2 (eg. Generators and Iterators).

Type Annotations

Generally speaking types describe run-time values. In the new JavaScript a type annotation can (optionally) be added to a property, to a function parameter, to a function itself (applying to the function’s return value), to a variable, or to an object or array initializer.

Examples:

var x :  String; // declares a string
function  f(a : int, b : String, c : Object) : RetType {
 // arguments are guaranteed to match types
 // return value must convert to or match RetType
}

Classes

Class-based programming is a ubiquitous methodology in the industry. Object-oriented programming as we have known to love it in Java and other languages is supported in ES4 by classes and interfaces. A class describes an object by presenting those properties (fields) of the object that are always present (the fixed properties or fixtures), including variables, constants, and methods. In the JavaScript a class basically defines a named record type derived from another class, or from Object if no supeclass is given, and is immutable.

Example:

class C  extends B {
 function C(m) { mem = m }
 public function getmem() { return mem }
 private var mem : Object
}var c : C =  new C(new Date)

Interfaces

An interface describes a collection of method properties; a class can declare that it implements an interface and then back that up by providing definitions for the

methods in the interface. Then instances of the class also have the type of the interface. In JavaScript an interface is a named record type, possibly derived from another interface, containing only function declarations with no body. A class may implement one or more interfaces

interface I  { function f() }
interface J  { function g(n) }

class C  implements I, J {
 function f() { return "foo" }
 function g(n) { return n+2 }
}

Structural Types

Besides classes and interfaces, types can also be renamed or abbreviated by means of special type definitions, which are helpful in giving names to structural types:

type Q =  {p: int, q: String}
type R =  {p: int, q: String, r: Boolean}
type A =  [int, String, Boolean, Object]
type F =  function (int, String, Boolean): Object
type G =  function (int, Object, Object): Number

Namespaces

Besides the built-ins (public, private, internal, intrinsic) you can declare your own with the namespace directive:

namespace  ns = "synodinos.wordpress.com/"class C {
 public function frob(): int {...}
 public ns function frob(alpha: double): double  { ... }
}

Packages

A package is a value comprised of a package name and two namespaces known as the package-internal and the package-public namespaces. The two namespaces are created by the ECMAScript implementation and are not visible to the program, but the package introduces a block scope in which these two namespaces are both open. The definitions in the package are evaluated in this block scope.

Examples:

//Wrap up  related code in a first-class way
package  org.mozilla.venkman {
 class Debugger { . . . }
 class Inspector { . . . }
 class StackWalker { . . . }
}//Import  names from a package…
import  org.mozilla.venkman.*

//…or  import selectively:
import  org.mozilla.venkman.Inspector

let variables

The let directive introduces bindings into the innermost block object. It is considered as a “better var” because var only introduces bindings into the variable object.

Example:

function f(v1: Vec3, v2: Vec3) {
 if (cross_product_only) {
 	let a1 = v1[0], a2 = v1[1], a3 =  v1[2]
 	let b1 = v2[0], b2 = v2[1], b3 =  v2[2]
 return new Vec3(a2*b3 - a3*b2, a3*b1  - a1*b3, a1*b2 - a2*b1)
 }
 . . .
}

let variables have block scope and in combination with for loops contain an implicit block:

for (let i  = 0; i < n; i++) sum += a[i]
for (let  key in obj) print(key, obj[key])

Here is an example of a block statements using let:

//JS1  idiom:
(function (a, b) {
 var x = b, y = a
 var z = eval(s)
 commit(x, y, z)
})(x, y)//With let much better
let (x = y,  y = x, z) {
 z = eval(s)
 commit(x, y, z)
}

Example of Block Expressions using let:

//In the  JS1 idiom:
return  (function (a, b) {
 var x = b, y = a
 return commit(x, y, eval(s))
})(x, y)
//With let much much better!
return let  (x = y, y = x, z) commit(x, y, eval(s))

Destructuring Assignment

Here are some simple cases of destructuring assignment and bindings:

//Group  assignment and return:
// swap,  rotate, permute in general
[a, b] = [b, a]
[p, q, r] = [q, r, p]//  destructure a triple into fresh vars
var [s, v,  o] = db.getTriple()

//Objects:
let  {'Title': title, 'Height': height, 'Width': width} = jsonResult//for-in  loops:
for (let  [key, {'Title':title, 'FileSize':size}] in dict)
print(key,  title, size)

Iterators

The iterators in the new JavaScript are similar to those in Python:

Example:

let it =  Iterator(["apple", "orange", "banana"])it.next() //returns  [0, "apple"]
it.next() //returns  [1, "orange"]
it.next() //returns  [2, "banana"]
it.next() //throws  StopIteration//The  for-in loop handles StopIteration:
for (let i  in it) print(i)

Generators

When developing code that involves an iterative algorithm (such as iterating over a list, or repeatedly performing computations on the same data set), there are often state variables whose values need to be maintained for the duration of the computation process. Traditionally, you have to use a callback function to obtain the intermediate values of an iterative algorithm. Generators and iterators work together to provide a new, better, way to do this.

A function containing the new keyword yield is a generator: when it is called, it binds its parameters to their values and immediately returns a new generator-iterator object which can be called repeatedly to yield new values:

function  count(n : int) {
 for (let i = 0; i < n; i++)
 yield i
}var gen =  count(10)
gen.next() //returns  0; . . .; gen.next() returns 9
gen.next() //throws  StopIteration
gen.send(value)  //passes value back to yield
gen.throw(exception)  //throws exception from yield

Array Comprehensions

Array comprehensions are a use of generators that provides a convenient way to perform powerful initialization of arrays:

let squares  = [i * i for (i in count(10))]
print(squares)  => "0,1,4,9,...,81"
let  odd_squares = [i * i for (i in count(10)) if (i % 2)]
return [i *  j for (i in it1) for (j in it2) if (i != j)]

Decimal pragma and type

A pragma is a directive that appears at the beginning of a block and its effect is limited to that block only. For doing math you can use the use decimal pragma, which selects a DecimalContext object containing rounding and precision

settings for decimal arithmetic.

//In JS1…
print(79.49  - 35.99) // => 43.4999999999999
//… but  know
{
 use decimal
 print(79.49 - 35.99) // => 43.50
}

In ECMAScript 3 the type double represents a 64-bit IEEE 754 binary
floating-point number. This is needed for backwards compatibility and is suitable for most computations since it takes advantage of the floating-point hardware on current CPUs. In the new version decimal represent a 128-bit IEEE 754r decimal floating-point number and provides base-10 arithmetic to high precision (34 decimal digits) which is is not yet widely implemented in hardware.