Information Technology Blog

Tuesday, October 25, 2005

Great! The JavaZone video and sounds is available online

JavaZone 2005 Videos Now Online
Welcome to JavaZone 2005 Online, brought to you by Javalobby and javaBin. We hope you enjoy these 24 excellent presentations recorded this past September in Oslo, Norway.

http://www.javalobby.org/av/javazone/

Sunday, October 23, 2005

Rough estimates of amount of knowledge human race has generated to date

What Google, Beatles, Sun Micro., Wikipedia & Aristotle all have in common? Archive.org is on a mission to make available on-line the entire body of knowledge(and art) human race had generated to date! This is an amazing, fascinating talk! I wonder if this is the most ambitious idea to date? The "Universal Access to All Knowledge" Brewster Kahle's (archive.org CEO) talk can be downloaded from here: http://www.itconversations.com/shows/detail400.html

Books, Texts:

It was estimated that there are about 100,000,000 books/texts were produced since Sumerian tablets. There are 28,000,000 books in US congress library. 24,000 texts are online at: http://www.archive.org/details/texts

Sound, Music:

2,000,000 - 3,000,000 records were ever released. 18,000 free concerts on-line legally available, 700 bands. Checkout out http://www.archive.org/audio/etree.php

Movies:

Between 100,000 and 200,000 movies were ever made, a lot of them are Indian. 300 movies already legally available on-line at: http://www.archive.org/details/movies Video of lectures from MIT is being put on-line as we speak.

TV:

There are about 400 original channels. 20 channels are being be archived 24x7, DVD quality - about 1 Petabyte, 1 week avilable

Software:

About 50,000 software titles ever released. Some old software is available online already legally.

Web:

Net is over 4,000,000,000 pages and over 35,000,000 web sites (domains). Way back machine - largest database ever with 100 hits/sec and 5 petabytes storage.

Saturday, October 22, 2005

Choosing technology for small or medium web application: PHP || Java = Ruby, RoR

PHP has never been my choice for many reasons: it's not a general purpose programming language, not OO language, slower then Java, it's hard to maintain and more. I admire PHP community for taking very practical approach and creating a whole new line of applications from PHP-Nuke & SquirrelMail - all way to Drupal, Mambo & Wikimedia. The most incredible sites run on PHP: archive.org & wikipedia.org. To gripe about PHP is almost like biting the hand that serves you(I'm a happy user of many PHP based apps), but it seems to me there should be a better way and it seems like RoR is a much better alternative long term and JVM has a role in it too.

None of the 5 major projects I was working on in the last 5 year could be done with PHP (in a sensible way) because in addition to web application they also had: concurrent high availability server components, integration with other systems over RMI, advanced imaging, third party libraries in Java etc. One application had to handle 100+ database transactions a second, another one had to run 400+ threads doing different things and more.

Having said that, a friend of mine, very talented web designer, an artists and entrepreneur had to put together a site for e-commerce. With basic programming knowledge and couple of weeks of work she was able to put together an awesome site with on-line payments, LDAP admin component and more. She installed Linux, took a bunch of PHP programs from all over the Net, put them all together, mailed a few people and asked a few questions, browsed through newsgroups and FAQs and added what was missing . There are thousands of people on the Net who would never have anything to show if they started with J2EE stack. Not because Java is inferior, but because J2EE learning curb is too high. Entry level into PHP is very low, it is designer and entrepreneur friendly. It will become a "fat pony" one day, probably sooner then most people think, but it will fill the niche and create new market by then.

Some of the factors that make Java today a good choice of technology for medium and large size project, are the same factors that makes it _not_ a good choice for my friend:

1. Very configurable - you need to know how to configure it.
2. Many choices - pressure to make right choice, often it means you have a to learn about a few of them first(Ouch!): frameworks, libraries, IDEs, JDKs, app servers.
3. Variety of methodologies, process - confusion: what should I use: aop, javadoc, junit, agile, xp, mvc; very bureaucratic.

These are the sides of the same coin in each particular case. With an exception of XML configuration overload and EJB overengineering - everything went reasonably well in terms solving design problems with Java. The resulting complexity is normal result of having all these options to choose from.

Is it a never ending quest to have it both ways then? Perhaps, but we have precedent how to deal with it - build a higher lever abstraction to hide details for the segment of the market that doesn't care or even want to know about them. When we moved on from machine code to C, we didn't throw away assembly languge - we've built on it. Likewise, when we moved from C/C++ to Java, we did not throw away them - we've build on it. If fact that was a very successful, evolutionary approach: grow a layer, polish it, leave it alone and move to the next level when the problem is big enough.
Perhaps, the easiest way to get the best of two worlds is to invite Ruby to run on JVM as a first class citizen. Perhaps even package it all together with RoR and Tomcat? I can't use Ruby alone because I need Java 2D imaging API and JMF as well. There will be many cases like mine and JRuby may potentially be even more practical then Ruby by reusing everything that Java has to offer. This is why I see running Ruby on JVM being only synergistic. Why rewrite all the magnitutude of the great code written in the last 10 years? Why not use a VM that was polished so well over so many years? Why not use Swing if you need cross platfrom GUI system? Microsoft is courting Ruby community. I think it's clever and they have figured it out.

The idea is called the "Firewall Brand" in business circles. Basically you create a low entry point alternative for your high end solution to preserve its market share from someone else's low cost alternative growing trend.

PHP is a DSL for developing web application. So is RoR which is two orders of magnitude more powerful and better designed. PHP had developed already large loyal community and application base and Ruby and RoR is still fighting its way up, but it's changing and it's going to be interesting to watch.

Friday, October 21, 2005

Beyond Java, By Bruce A. Tate

When is Java right?
• Safe decision
– With limited productivity
• Large teams (Community = choice)
– Teams need portability across problems domains
• Specialized requirements
– High-powered ORM, for example
• Fine-grained integration
– Java plug-ins
– RPC with serialized objects
• High-powered team
– That’s most productive in Java space
– And happy to be there

When might you use alternatives?
• Productivity is the overriding concern
– Especially in startup environments
• Small highly productive teams
• Coarse-grained integration is OK
– Web services (REST or Soap style), Database
only, HTTP-based RPC with primitives
• Emphasize the most crucial part
– User interfaces, text processing (parsing, etc)

How might you push Java?
• Emerging programming models
– Aspect oriented programming
– Frameworks like Trails
• Leverage ideas
– Less XML (annotations, parsed text)
– More emphasis on defaults and convention (Rails)
– Inversion of control (code blocks, seaside)
• Progressive frameworks that shun convention
– Establish a role for scripting languages
– Spring over EJB
– Tapestry over Struts
– Parsed text over XML
– REST over SOAP
– Scripting languages over XML config

Thursday, October 20, 2005

From Mark Richard’s Agile Architecture presentation

Applying Agility to the Architecture Process

1. A successful agile architecture effort does not have
to apply all of the principles agile architecture
2. Keep the architecture simple.
3. Know the business goals and stakeholders.
4. Communication, Collaboration, and Clarity.
5. Work iteratively and let the architecture gradually
Evolve.
6. Use abstraction wherever possible
7. Apply standards wherever possible
8. Make the architecture product-independent

Agile Documentation
  1. Document with a purpose
  2. Diagrams are more effective than written documentation
  3. Start with diagrams, document at the end of the process
  4. Don’t forget – published documents must be maintained!
  5. Don’t get caught up in UML
  6. Start with three models (diagrams)
  7. Conceptual Architecture Diagram
  8. Technical Architecture Diagram
  9. Physical Architecture Diagram
Agile Manifesto:

We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:

  • Individuals and interactions over processes and tools.

  • Working software over comprehensive documentation.

  • Customer collaboration over contract negotiation.

  • Responding to change over following a plan.



“The most important single ingredient in the
formula of success is knowing how to get along
with people”
- Theodore Roosevelt

“I don’t know the key to success, but the key to
failure is trying to please everybody”
- Bill Cosby

Tuesday, October 18, 2005

About Ruby again ...

Our team is back from the Pacific North West Symposium in Renton and everybody seems to be very excited about Ruby. There is also an interesting thread on Seajug as I write this. After looking at the Symposium slides, I'm highly unlikely to take another look at Groovy any time soon. Ruby or JRuby seems to be better way to go. Number of new ideas are attributed to Ruby, but not all Ruby specific: "convention over configuration" and "less is more" for example. The DSL aspect of Ruby however is very powerful. Ruby is also a very well designed language. I think the best way for Ruby to succeed is to run well on top of JVM. This Way Ruby can take adavntage of modern VM and also enjoy all the libraries that are written for JVM. Reinventing a wheel and rewriting things in Ruby would be just a great waste of time and resources. This will also allow to overcome many Ruby today's shortcomings by "riding the Java wave".

Ruby being a great base for DSL - is only the area where it's really different from say Python. However as a final proof we need real applications of different kinds, web based and otherwise start showing up written in Ruby. May I suggest the attack plan for Ruby crowd: go after PHP segment of the market with RoR. Time will also tell about using weakly typed language in large projects, I don't necessarily think it's a problem, but would be nice to see it successfully done.

Great site for presentations and ideas on Ruby/DSL is Neil Ford's site http://www.nealford.com/

Creating Domain Specific Languages in Ruby Presentation. (Thanks Nicolas!)

http://onestepback.org/articles/lingo/index.html




Java's RoR?: Sprint+Hybernate+JSF-DSL ;-)

Monday, October 17, 2005

AJAX and JavaScript continued

I’ve ran across this great AJAX presentation. It’s got tons of interesting info. Authors advocating that JavaScript is not all that bad and provide a good list of resources for dealing with it. Dion and Ban are running http://www.ajaxian.com/ and below are a few useful links from their AJAX presentation. Few interesting pointters from presentation:

  • AjaxFaces (http://www.ajaxfaces.com)
  • GoogleMaps is using IFRAME to solve “back button problem”
  • DWR: Direct Web Remoting
  • JSON: JavaScript Object Notation
  • Think XML-RPC but with JSON instead of XML !!!
  • Flash is AJAX with ActionScript insetad of JavaScript

UI Toolkit

JavaScript Widgets have been around for a long time:

• ActiveWidgets
(http://www.activewidgets.co
m/grid/)
• Backbase
(http://www.backbase.com)
• SmartClient
(http://www.smartclient.com)
• Dojo (again)
(http://dojotoolkit.org)

JavaScript Utilities
There are many tools that you need to make life bearable in JavaScript
land:
• JavaScript Munging
Jazmin / JavaScript Minifier (http://www.crockford.com/javascript/jsmin.html)
Obfuscator (http://www.shaneng.bobos.ca/#jso_description)
• Debugging
Ajax Debugging Tool (http://blog.monstuff.com/archives/000252.html)
IE Leak Detector (http://blog.monstuff.com/archives/000252.html)
DOM Inspector (built into Mozilla, need to grab IE plugins)
TrimBreakpoint (http://trimpath.com/project/wiki/TrimBreakpoint)
• XML Munging
Google AJAXSLT (http://goog-ajaxslt.sourceforge.net)
JSXML (http://sourceforge.net/projects/jsxml)
E4X
• Misc
JSDoc (http://jsdoc.sourceforge.net/)
JsLint (http://www.crockford.com/javascript/lint.html)
• Unit Testing
JsUnit (http://sourceforge.net/projects/jsunit)
Selenium (http://selenium.thoughtworks.com)

JavaScript Survival Tips
You will miss your IDE(A)
• Code completion etc
Packaging as source only
• GoogleBrowser will offer a binary version? ☺
Debugging: tougher
• Use debugging tools in Firefox / MS debugger
• Watch out for misspelling variable names
Packaging of libraries
• Leads to hacking and many foo.js ‘libraries’
• Be wary of namespace
innerHTML property will well-form any bad HTML
JavaScript Limitations: Signing Code
Limitation: “Can’t request other resources on
the web”
• WRONG: You can, as long as you sign your code
• Mozilla is anal about this security
• IE? Not so much ☺
Limitation: “But I want to read from the file
system!”
• WRONG: You can, as long as you sign your code
Limitation: “But I want to write to the file
system!”
• WRONG: You can, as long as you sign your code

Thursday, October 13, 2005

Great article on editing sound in Linux was posted on Slashdot.com

http://arstechnica.com/guides/tweaks/linux-audio.ars

Friday, October 07, 2005

WEB 2.0

WEB 2.0 is a relatively new buzz word. Here is how it's defined in wikipedia: http://en.wikipedia.org/wiki/Web_2.0

Web 2.0 refers to a perceived transition of the World Wide Web from a collection of websites to a full-fledged computing platform serving web applications to end users. The proponents of this thinking expect that ultimately Web 2.0 services will replace desktop computing applications for many purposes.

I guess I was working on WEB 2.0 without knowing it. WEB 2.0 is an AJAX enhanced, WebStart advanced, Flex/Lazlo/Flash spiced up, CSS/DHTML improved, RSS/ATOM/XUL-SHMUL optimized version of the Internet we all know very well.

At the core of transition are the technologies to allow building more interactive web based applications. The technology choices are:

AJAX: (JavaScript + DHTML + live connection back to the server + XML) pros: very light weight, no runtime to download; cons: limitations of DHTML & JavaScript, artful(painful) , probably high maintenance costs

Java WebStart: pros: Basically you can run your Java application from the web site! cons: need to download and install plug-in, application may also take time to load

Flex/Lazlo/Flash: pros: web designer friendly, Flash plug-in is commonly installed, light weight. Cons: it’s not really a full blown application language, also it was sad it comes very close

Java Web Start
http://java.sun.com/products/javawebstart/
http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html
http://www.vamphq.com/jwslinks.html

Laszlo: AKA opensource Flash
http://www.openlaszlo.org/

Getting Across to Flash with Java
http://www.flashmagazine.com/1024.htm

Interesting links: AJAX links:
http://www.ajaxinfo.com/
http://www.morfik.com/
http://www.zimbra.com/

write in C# and generate Flash
http://www.globfx.com/products/neoswiff/
http://www.xamlon.com/

Thursday, October 06, 2005

JBoss presentation

JBoss consultant was running a presentation on tuning applications running within JBoss. Here are a few interesting notes on it.
- JRockit JVM 5 alone (vs. Sun's JVM) can speed up application up to 50%
- MS SQL JDBC driver is buggy. jTDS diver http://jtds.sourceforge.net/ is apparently a lot better.
- Persistence: forget about EJB (CMP & BMP) and go with Hibernate.
- JSF (Struts) + Hibernate is very popular choice of technologies for web apps.
- Don't design you own frameworks, use available ones.
- http://www.centos.org/ is free legal equivalent of RedHat Enterprise Server.
- CMPs are harder to troubleshoot
- Use surrogate keys
- Use container caching
- Many to many relationships good candidates for lasy loading
- JMS performance had improved significantly
- Use clustering on production (everybody does)

JBoss vs. (tomcat + hibernate) can offer following advantages:

- Session replication (uses JBossCache)
- Farming & clustering
- Integration: all in one package
- Admin interface comes with support agreement
- hot deploy / redeploy any component

Monday, October 03, 2005

BizTalk – another XML thingy

Lately, I was wondering about BizTalk and how far it will fly. If you have wondered yourself - you might want to read this link above:

BizTalk Server 2004: Ten things you should know
http://techrepublic.com.com/5100-7343_11-5795155.html?tag=crm

10. Your time cost will be enormous

If there ever in the history of Microsoft was a product that was hyped through the roof and then thrown upon the sea, it's BizTalk. Originally a Microsoft acquisition that is now well-integrated into Microsoft's family and lovingly nurtured by its caretakers, BizTalk is powerful, well-conceived, and at this point married to the rest of the MS family\u2014but at the expense of correct and thorough documentation. To say that useful BizTalk how-to and real-world labs are scarce is howling understatement. Buy into BizTalk and you're more or less on your own, bringing it around to your particular applications and environment.

In short, prepare for endless hours of blogging, followed by endless hours of trial-and-error. You'll get plenty of frustrating hints from the BizTalk Server Administration event log, vague exception messages, and precious little real debugging assistance from the Health and Activity Tracking utility. The upside is that once you've learned the quirks and fixes and tricks, you'll feel incredibly empowered. But, oh, what a learning curve! Don't underestimate it.


Ouch! Time to wake up and smell roses ... BizTalk was doomed from the begining IMHO. XML is good at presenting your hierarchical data and that's about it. For anything else you want to do with it - it's likely a bad idea and there is surely a better way to solve your problem without XML. You may try XML anyway, but you will be sorry in the end.

Happy anniversary Javascript. What's new?

JavaScript will be 10 years old in a few months. LiveScript was renamed to become JavaScript approximately around the same time when JDK 1 beta was released. It was a very exciting time: Windows 95 was only out recently and IE was bundled with Plus!. IE was lame, not free and nothing really to talk about comparing to Netscape. It has changed dramatically 10 years and billions dollars later.

I started getting a bitter taste of Javascript about 8 years ago. Like everything else that causes consistent pain it’s only natural for human being start avoiding it. Even getting simple things work consistently across IE and version of Netscape was a challenging task. I had a simple image transformation effect on my pages which was done with JavaScript. It was only about a screen of code and never quite worked right. The only justifiable use for java script I found since then was a client side validation plus a few other tricks to avoid calling server side for no good reason. At the time there was a number of menus, toolbars and other things done with Javascript around the Net, but for me they mostly looked like bells and whistles and and very likely pain to maintain. Often this code was performing a some sort of image animation which was wasting CPU cycles big time on a client while performing very little useful function. The message was clear: try to stay away from it unless you want a clumsy application that slow down you system to a crawl.

Slowly browsers had matured. Amazing little JavaScript apps started popping up couple of years ago. Some of them very sophisticated like http://www.fckeditor.net/ Personally FCKedit for me was an indication that JavaScript can be taken seriously now. This app is trully amazing. The maturity of JavaScript made AJAX possible and Google product family had caught everybody’s attention, specifically http://maps.google.com/ was really the most impressive JavaScript web based application ever. If you are programmer, you may also find DWR quite impressive: http://getahead.ltd.uk/dwr/ (thanks Scott). Nicolas have sent this link today which is quite imressive AJAX example http://ondras.praha12.net/sql/demo/ .

I think it’s time to review the JavaScript usefulness for web applications. CSS is a must IMHO. JavaScript is more mature now and it’s possible to get consistent results. Well, took a while, but better later then never ... Or is it? YMMV

I was looking around JavaScript component to reuse and these are the useful links I found:

http://msdn.microsoft.com/scripting/jscript/ Microsoft's JScript Web page
http://www.javascripts.com/ EarthWeb's JavaScript site
http://www.builder.com/ search for JavaScript section
http://webreference.com/programming/javascript/ Webreference
http://webreference.com/js/ Javascript Doctor
http://webdeveloper.earthweb.com/webjs/ JavaScript examples by category

Script Repositories :
http://www.wsabstract.com/ Website Abstraction
http://www.dynamicdrive.com/ Dynamic Drive
http://www.javascriptsource.com/ JavaScript Source
news:comp.lang.javascript

Great JavaScript components:

http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm CMotion Image Gallery
http://www.fckeditor.net/ Needs no introduction
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm Drop down menu
http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm Cool DHTML ToolTip
http://www.dynamicdrive.com/dynamicindex4/logo.htm (Site Logo Script (a.k.a Geocities Watermark)
http://www.dynamicdrive.com/dynamicindex4/image3.htm Dragable Elements Scripts
http://www.dynamicdrive.com/dynamicindex3/tabdocviewer.htm Tabbed Document Viewer (IFRAME)
http://www.dynamicdrive.com/dynamicindex3/fixback.htm Watermark Background Image