Sunday, January 31, 2010

A new web of life - HTML 5!

"HTML5 is not a technical achievement, its a social movement"
Doug Schepers

What is the significance of this article about HTML5 in eclipse community? Because... Web is getting 'richer' clients. HTML5 provides all of the rich client powers to a browser. HTML5 is not just another markup language, its an open 'platform' for building rich web applications.

Are you a fan of the first person shooter game 'Doom' of 1990s? Then check the game 'Gifter' in your favourite browser (oops, not IE). Its not coded using C or developed using a gaming engine. Its completely written in HTML 5.

HTML 5 will stretch the browsers to its limits. To be precise, the war will not be between just browsers, but between the engines that power the rendering of the browers. A rendering engine is a hidden piece of software that takes marked up content (eg. HTML) and formatting information (eg. CSS) and displays the formatted content on the screen. Believe it or not, today I opened an HTML5 powered site in my IE8, and guess what happened. The site killed my internet explorer.

Some of the popular rendering engines are,
  • Gecko - Used in Mozilla Firefox
  • Webkit - Used in Chrome & Safari
  • KHTML - Used in Konquerer
  • Trident - Used in Internet Explorer
  • Presto - Used in Opera
HTML 4.01 was around for a decade. The new HTML 5 working draft was released at the start of 2009.

Even though HTML5 gives you a lot of features, I will be discussing only those features the rich client developers are interested in.

Some of those exciting features are,
  • Canvas element
  • Drag and Drop support
  • Interactive Elements
  • Offline Web Applications
  • Web Database Storage
  • Video element
  • Audio element
But don't limit your knowledge. You can find the rest of the features at HTML 5 Draft. Lets find out more information about each of the above features.


Canvas Element

HTML 5 gives you a canvas element for drawing purpose. Most of the major browsers like Firefox, Safari, Opera, Chrome etc support the 2D canvas context.


What about 3D? An experimental build of Opera supports 3D canvas.


Can SWT be extended to support browser widgets? We have RAP!!! GWT is out there within a hands reach.

You want to try out a sample code? Copy the below code and save it to a file 'canvas.htm' and open it in canvas tag supported browser (eg: chorme, firefox, ...).

<!DOCTYPE HTML>
<html>
<body>
<canvas id="myCanvas">I do not support canvas tag</canvas>
<script type="text/javascript">
var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#00AA00';
ctx.fillRect(0,0,100,100);
</script>
</body>
</html>


Drag and Drop


HTML5 provides an event based drag and drop support. You have events like 'dragstart', 'drag', 'dragenter', 'drop', 'dragend' etc. There is a good tutorial which explains more about drag and drop.


Interactive Elements

Whats the limit of interactivity on a browser? The answer is that its 'limitless'. HTML5 provides the following interactivity elements.
  • datagrid - For grid control. This is similar to the 'grid layout' in swt.
  • menu - You can create menus.
  • command - This is a command the user can invoke. Similar to the 'commands' in eclipse.
  • details - This is an additional information the user can obtain on demand.
There is an interesting article on ibm developerworks which explains more about the interactive components of html5.


Offline Web Applications

Gmail users might have noticed by now that you can use the inbox even if you are not connected to net. See the offline web demo app at html5demos.

This is achieved by using a caching mechanism. Using a manifest file, you convey to the browser to cache the required files. The browser will download the files at the client side. A simple, but powerful mechanism, which will change the way web apps are used.


Web Database Storage

This allows you to embed an sql based database in your web app. You can find a demo of web database here.

Who will gain from the offline apps and web db storage? This will definitely be a boon for the web operating systems. How about rich client apps? What if you need to run rich client features in your browser? Definitely, you need to download all those rich UI code to the client's machine and web db storage comes handy.


Video and Audio

Like the <image> tag, now you can embed videos with the <video> tag and audio with <audio> tag.

A few interesting apps based on HTML 5 from Mozilla Labs and Google Labs are listed below.
  • Mozilla Bespin is an extensible web code editor based on HTML 5.
  • Mozilla Prism lets users split web applications out of their browser and run them directly on their desktop.
  • Google Wave is an online tool for real time communication and collaboration.
  • Google Gears is a plug-in that extends your browser to create a richer platform for web applications. Webmasters can use Gears on their websites to let users access information offline or provide you with content based on your geographical location.
  • Google Docs is a free, Web-based word processor, spreadsheet, presentation, and form application offered by Google.
The way we interface the world is about to change. Its happening around us. This is the best time to create the next killer app based on new web standards.

What is the strategy at Eclipse to compete against the web technologies? We do not compete, we synergize with the web technologies to give the best value to the end user. e4 is the outcome. e4 is still under development. You can customize the look and feel of an e4 based app using css. You can modify the user interface using xml. Eclipse is adapting the open standards to create tomorrow's technologies and next generation rapid application development tools.

madhu

Thursday, January 14, 2010

Eclipse Consultant And Trainer

"Be the change that you want to see in the world"
M. K. Gandhi.

You find a purpose on what you do when you know that you are serving something larger than yourself for a bigger cause.

I would like to announce my change in avatar from an organization man to a freelance Eclipse Consultant and Trainer.




And okey-dokey... My first client is one of the best I could get!


This way I can spend more time with Eclipse Community, learn and evangelise more about Eclipse and the new technologies.

madhu

Thursday, December 31, 2009

A warm welcome to 2010 with a KISS

As the new decade starts and the old decade fades away, I hope eclipse is taking the right turn with e4!

The quality of software applications depends more on the mindset of the developers, than the technology they adopt. Hence, I hope in the coming decade, the eclipse community can work together to increase the awareness of better coding practises, better UI design, better inter-operating and open systems.

The adoption of standards is gaining importance more than ever. Html 5 and web 2.0 along with the browser wars is speeding up the changes around us.

This decade ends with an accelerated change of technologies and events. This is happening faster than anyone can comprehend. Clouds are up, Oracle rescued the Sun, Java and .Net talks, Microsoft supports open source, modelling gains importance, stock markets fluctuate, money and guns flow faster between continents, tsunamis and tornadoes struck the world, speculates water in the moon… hopes and despairs!

The facts tell that the number one website has the most simple design with a single textbox.

A warm welcome to 2010 and the new decade with a KISS (Keep It Simple and Stupid).

madhu

Sunday, November 8, 2009

Eclipse Demo Camp 2009 @ Bangalore

"We are drawn to a body of knowledge, because it shed light on our identity as well as on the world. We did not merely find a subject; the subject also found us."
by APJ Abdul Kalam, former President and Chief Scientist of India!


Thanks to Prakash GR (Eclipse Tips Fame) and Ankur Sharma's efforts, we had an evening full of eclipse talks from eclipsers across the city on 5th of November, 2009.

The heavy rain that started at 5 in the evening did not stop anyone from attending the Eclipse Demo Camp. The overwhelming response from the eclipsers from the city resulted in 10 presentations, the organizers even had to cut down a few presentations as the evening could not hold more than 10 presentations. Around 50-60 eclipsers gathered for the event.

Let me start with my presentation - GEF3D. A concept to support 3D application development in Eclipse Editors. Jens Von Pilgrim, a research assistant from Fern University in Hagen, Germany conceptualized and implemented GEF3D. This was later supported by Kristian Duske with many more features in GEF3D.

The feature list provided by gef3d includes,
  • Creation of 2D, 2.5D and 3D graphical editors.
  • Connect between multiple graphical editors in 3D space (For example, you can connect a use case diagram and class diagram using connections or traces between them)
  • Extend your existing GEF based 2D editors to 3D
GEF3D Team is planning a few more talks on the topic at various demo camps across Germany. Please visit http://eclipse.org/gef3d/ for more details.

Ankur Sharma presented Modelled UI in e4. It was amazing to see how you can model your UI with a few mouse clicks and model changes. If you want to try out e4, which is a re-written eclipse from scratch, check the e4 1.0M1 release. The first version e4 1.0 is scheduled to release sometime around June, 2010 (I guess).

Shubhvardhan from IBM talked about invoking eclipse controls from Visual Studio Add-ons.

Now more about, Twist and SWTBot. Ketan Padegaonkar presented the testing framework from ThoughtWorks - the 'Twist'. Its a functional testing tool which is a wrapper around SWTBot. Twist enables the tester to transform the indent of the business users (use cases) into automated tests.

Ms. Rajam from Infosys Technologies presented the Spring IDE using the MyEclipse Workbench. She travelled all the way from Chennai to present at the Bangalore Demo Camp. The spring IDE showed a perfect example for a language workbench. It reminds me the words from Martin Fowler on Language Workbenches.

Eclipse JDT Team Member Deepak Azad from IBM presented the new Javascript Development Toolkit (JSDT). Its a Javascript IDE based on the JDT framework. It includes most of the features provided by JDT, error markers, detailed flow analysis etc.

Pradeep Balachandran from IBM presented Jazz, the eclipse based new generation collaboration platform from IBM. The indent of Jazz is to make sure you follow the process during software development, and to ensure that you do not need to spend time with un-necessary documentations for the sake of following processes.

Ibrahim Quraish from Nokia, explained how to create widgets for S60 devices using the Nokia WRT Eclipse Plugins. Interestingly, the IDE used to present the topic was Aptana, not the Carbide IDE from Nokia, which is based on Eclipse. On further googling I could find out the list of IDEs Nokia uses for development.

Anil Gudise from Genuitec briefed about MyEclipseTools and Pulse. Ganeshraj from Hewlett Packard presented the C/C++ Remote Developer Plugin for Eclipse.

You can check the snaps at,


Myself In Action (Gef3D Presentation)


Ankur Sharma with e4


Room was packed with Eclipsers


Pradeep Balachandran explains Jazz



Ketan Padegaonkar (Twist and SWTBot)


Ms. Rajam explains Spring IDE


Shubhvardhan (Visual Studio - Eclipse Add-ons)


madhu

Tuesday, October 27, 2009

GEF3D in Action

Models, models, models... we hear this all the time...

In computing world, modelling is all about arranging abstract objects (which we do not see) into the computer memory. We stack objects, we pile objects, we queue objects, we order objects based on business and personal needs.

The senior software developers who developed the modelling concepts encountered lot of troubles before the time of the modern modelling concepts. Hence, they understand the significance of modelling more than anyone else.

How do you teach these modelling concepts to the next generation of developers? You need to teach modelling which is a concept of abstract ideas. Ideas which cannot be seen with the naked eyes, but which needs to be visualized in the brain. (Will people with spacial inabilities ever be able to learn modelling?)

Scientifically, learning is an associative activity. Any new information, unless it is related with something we already know, can never be understood. Thats how brain works! Otherwise, we learn facts and concepts through our senses. We see and learn, we touch and learn, we smell and learn, we hear and learn, we taste and learn. Which senses are triggered when we read most of the articles and tutorials on modelling? To which 'data' in the brain tissues should the new and young developers 'associate' or 'link' the new abstract modelling concepts?

Forget about learning, how can we comprehend the massive amount of data piling around us. Complexity is the new norm! Impatience is the accepted emotion! We still need to use the five senses to see, touch, smell, hear and taste all the information around us.

Never get lost in the jungle of information! GEF3D comes to the rescue.

GEF3D helps you to visualize the models in 3-dimensional space. You will be able to 'see' all the abstract data that flows around using proper use of GEF3D. Since we all are 3-d animals, 3D-fied (as Jens says) models will revolutionize modelling. Any data if properly analysed, designed and implemented; can change or optimize the existing knowledge base. More than 3-d models, what else do GEF3D provide? Any other features?

How about 2.5D models! What is it? How about giving more meaning to 2D editors by connecting between multiple 2D editors.

Want to learn more about tomorrow's 3-dimensional computing! Attend any of the GEF3D sessions at,
  • 29-Oct-2009 : Eclipse Summit Europe at Ludwigsburg, Germany
  • 05-Nov-2009 : Eclipse Demo Camp, Bangalore, India
  • 23-Nov-2009 : Eclipse Demo Camp, Berlin, Germany
  • 04-Dec-2009 : Eclipse Demo Camp, Hamburg, Germany

For more details see http://eclipse.org/gef3d/

madhu

Saturday, September 26, 2009

Comments, Imports and Constructors

According to the butterfly effect, even the slightest and minutest events can change the course of events in future. Hence, each change is significant for shaping the future.

Progress of a society can be calculated by the amount of change happening in that society. A transforming society appreciates and experiments with new ideas. But, if the new idea is evaluated using the framework of old ideas, then the old ideas become more and more rigid.

I learnt three new things which conflicted with my existing understanding. In the below points I do not want to coin the term old approach and new approach, since they are just two ways of approaching a concept.

The best way to appreciate a new idea is to experiment and see whether it makes sense.

1. Writing Comments in Code

What I Knew : Write as much comments as possible in your programs. The more the better. It can never be more than needed. I heard about various code-comment ratio - 1:1, 1:5, 5:1.

What I learnt *: Do not write a comment unless you feel that you failed to express your indent in your code. Means, write comments if your code is not expressive enough. If you have a public method

"public int findTotal(int amount1, int amount2)",

you can provide a comment "Finds the total of amount1 and amount2". This comment is redundant. Anything redundant in your code can be avoided. The method and argument names convey the indent of the programmer. Redundant content in your classes will make it difficult and time consuming to understand.

2. Wildcard imports (import java.io.*)

What I Knew : Never use wild card imports. Wild cards do not cause performance issues in java. Still the use of wild cards were considered as ineffective coding practise. The specific imports helps to identify the dependencies of your class.

What I learnt* : Use wild card imports. You just need to know which packages your class depends on. All the specific imports clutter your classes with too much information. Incase you need to know the specific imports at any point of time, you can see those imports quickly using the advanced features of the latest editors. In Eclipse, just go for 'Ctrl+Shift+O' to add specific imports.

Another reason is that specific dependencies are hard dependencies. Wild card imports reduces the coupling by avoiding the hard dependencies.

3. Default Constructors

What I knew : Always create default 'no-arg' constructors in your class, even if you do not need it at the moment. Tomorrow, if you may need to sub-class your parent class without a default constructor, you may end up in agony. If your sub-class needs a 'no-arg' constructor, you may have to write a 'no-arg' constructor for the parent class at that time.

What I learnt : Do not use default 'no-arg' constructers unless you require it.

What if my sub-class needs it tomorrow?

If your parent class doesn't indent to provide a 'no-arg' constructor, then its a design decision. Your sub-class is supposed to use only the constructor which is provided by the parent class.

madhu

* Courtesy - Clean Code by Robert C Martin

Tuesday, August 11, 2009

Multitasking

Multitasking - the ability to do multiple tasks at a time. I am lost in the multitask world.

15 years before, every morning my father used to drink his tea while he browse through the newspaper. This is one of the few multitasks he had done in his entire life (I guess).

Today as soon as I wake up, I turn on my laptop, drink my tea, check my email, open planeteclipse, browse through multiple blogs, if there is a delay for a blog to open, I will go back to my email, in between I read the heading in the newspaper, I'll check the twitter account, how about linkedin account, new articles in newscientist.com, then i .... am I nuts? !!!

Bhoom! Information explosion !!!

Scientifically speaking, humans are designed to do only one thing at a time (females are an exception ;) ). Either I have to mutate to the new alpha persona with multitasking ability, or time for me to go back to the fundamentals of time management.

Prioritize, do one thing at a time. "Focus".

madhu