Calendar getDisplayName() JDK 6.0 vs JDK 1.5.0

If you have somehow used jdk6.0 while developing your application that uses Calendar API of java.util.Calendar, and have used getDisplayName method to extract the display names for fields of the calendar, specific to your desired style and locale, and then had to compile your application with jdk1.5.0 only to realize that compiler spits swear words at you…Here is quick fix for you!

This is what you did in jdk6.0:

//get your application locale
Locale userLocale = getContext().getLocale();

//define a calendar
Calendar calendarInstance = Calendar.getInstance();

//Extract the month name in SHORT format (viz. "Jan","Feb" etc.) for the context locale.
calendarInstance.getDisplayName(calendarInstance.get(Calendar.MONTH),Calendar.SHORT,userLocale);

Here is what you can do to achieve the same getDisplayName functionality in jdk 5.0:

//import the following class
import java.text.DateFormatSymbols;

//declare variable.
DateFormatSymbols dateFormatSymbols = new DateFormatSymbols();

//Get the short names for months in a Calendar
String[] months = dateFormatSymbols.getShortMonths();

//Use the month field of Calendar to fetch the short name of month for cell label.
months[calendarInstance.get(Calendar.MONTH)];

Once you acquire the SHORT name for the field, you can use it for your labels, or column headers etc. based on where you require it.

Ideally, you shouldn’t have to fall back on the previous version of jdk, yet sometimes the project requirements can’t be altered even for better things in life.

Hope this tip helps!

Flex Builder 3 – LiveCycle Data Services – Libs

I would never have been writing this post in addition to so many others that are already there talking about how to build, compile, deploy, run your flex applications that use Live Cycle Data Service, had I not spent last five days trying to figure out why my application wouldn’t compile when I was following all the steps mentioned everywhere.

I might be dumb for not having known something that was obvious; that one must know in order to build applications in flex, so I concede. However, there might be my other dumb brethren out there who might be struggling with the same things, so this one is for you fellas!

After migrating the flex app that was built on Flex Builder 2 by my associate, some time last year, around October/November, I was facing a few issues in getting the application to compile.

Some of the errors were as follows:

Type 1:
1172: Definition mx.data.utils:Managed could not be found.
or
1172: Definition mx.data:IManaged could not be found.

Type 2:
Unable to resolve resource bundle “data” for locale “en_US”.

Now first of all when you start Googling, you come across the following links (that are relevant):

http://bugs.adobe.com/jira/browse/ASC-2815

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg38973.html

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg66002.html

And even though these have been written with the intention to help out the newbies in the flex world, they don’t really shed light on what might be the cause of this problem and/or how to fix it. The problem is indeed far simpler than the complicated discussions on the “Known Issues” and “Hot Fixes”.

All I need to know is, where is that goddamn missing library that I could include in my build path to resolve these issues.

If you have been following the instructions elsewhere, you probably already have gone through all the treacheries that I have gone through so you can relate to the frustration I am talking out of.

Well having said and done all that I have, here is what you need to do in order to get those libraries into your classpath.

The location where you installed your Live Cycle Data Services, let’s call it [lcds-install-path].

Under [lcds-install-path] you will find a war file called samples.war. If you can’t see it, download the Data Services afresh from an authentic source and install it.

Now the reason I referred to this samples guy was because I wanted to make sure if anybody had ever tried to accomplish what I had set out for with the Flex SDK3.0 and Data Services. (I realized later that what I was trying to do was not something that was rarely used, but something that is used so often that it is taken for granted that people who can’t get it right, like me, are just too dumb to work on Flex Applications.)

Procedure for alleviation:

  1. Create the following directory [lcds-install-path]/flex/libs
  2. Create the following directory [lcds-install-path]/flex/locale
  3. Create the following directory [lcds-install-path]/flex/jars **
  4. Expand or explode (suit yourself) [lcds-install-path] /samples.war to [lcds-install-path]/samples
  5. Go to [lcds-install-path]/samples/WEB-INF/flex/libs and copy everything.
  6. Paste the files copied into [lcds-install-path]/flex/libs
  7. Go to [lcds-install-path]/samples/WEB-INF/flex/locale and copy everything.
  8. Past the files copied into [lcds-install-path]/flex/locale
  9. Go to [lcds-install-path]/samples/WEB-INF/flex/jars and copy everything. **
  10. Past the files copied into [lcds-install-path]/flex/jars **
  11. Go to flex builder, and edit the build-path.
  12. Add [lcds-install-path]/flex/libs as an SWC folder.
  13. Add [lcds-install-path]/flex/locale as an SWC folder.
  14. Add [lcds-install-path]/flex/locale/en_US/fds_rb.swc as an SWC
  15. And now your application should compile!

** – optional for now, may be needed for something in future, who knows?

If this doesn’t work still, you need to take a break and hire someone smarter to help you out.

The reason I copied all the files to a custom location was that it will keep me aware of where I need to make changes in future and also might give some hint to Adobe Team to include a separate folder in the LCDS distribution that contains all the mandatory libraries.

Hope that help you my dumb-friends. If it doesn’t you can mail me at remotemethod@gmail.com and I will try to help you out with some more “Flex for Dummies” tips if I can.

Here are some related links that might help:
http://www.adobe.com/devnet/coldfusion/articles/data_app.html

Pitfalls In Java Development and More

Hi guys, here is a super cool blog recently launched by my friends and colleagues at Pramati.

http://pitfalls.wordpress.com

The blog is named as Pitfalls in Java Development, but it doesn’t limit the content or the description to just the pitfalls; there are amazingly new and refreshing facts about Java Technology and all its associated open source technologies.

You will also find quite a few interesting debates on DOs and NOT TO DOs in the Application Development world of Open Source and Java/J2EE. All of the authors on the blog are experts in their respective domains and technologies and share the most recent issues they encounter while working on their current assignments.

In less than two weeks since it was launched, it has reached a hit count of 3000 approx. Which in itself is an indication of how techies about the value of information shared by this blog. And to those of you for whom it matters, the CTO at Spring Source Adrian Colyer has already commented on one of the posts on this blog.

I am sure you are going to learn a lot from this single link. So check it out now!

JavaScript 2.0 – A New Avatar

Java Script for objects: Brought to you by ECMA.

Now this is something that was pending for a long time now. Twelve years since the birth of JavaScript and no major or minor updates to the language. Imagine how much of value it must have offered to the entire web developer community to have survived in the software world without changing for twelve years.

As the creator of JavaScript and currently the CTO of Mozilla Foundation , Brendan Eich said,”It is not a revolution, just an evolution of existing capabilities.” It sure has been long due now. Especially, with the AJAX and Web2.0 taking WWW to a different paradigm altogether. Making it essential that the foundation of the new web be stronger and reinforced with as much steel as possible.

I would be looking forward to see how it evolves. The primary challenges would be to keep it as simple as it has been and still provide an OO environment for building RIA.

Packaging and scoping are some of the mandatory requirements for the JavaScript 2.0 to keep it rolling. And another challenge is the ascertain that the JavaScript loaded on the browser is not a security risk for the computer, because the internet browsers, as we know them today, don’t provide proper sandbox environment like a JVMs do.

There is a lot that would be expected out JS2.0 and I am sure, like before, it is going to deliver.

You can track the progress of JavaScript 2.0 or as the project Code name says ECMAScript from this link. ECMAScript

Torrent over RIA…Cascading Revolution!

Can Do: A New Paradigm for content sharing

A year and a half back a friend of mine, who is doing his research on biotechnology, explained to me a new way of sharing files that was taking heat and that could actually make things far more quicker in spite of the bandwidth variations across the internet.

Bit Torrent is a very innovative protocol designed to make file sharing over internet much easier and less bandwidth-intensive. Amazing technological advancement in the area of content distribution with shared bandwidth.

The concept of fragmenting the target files across a host of computers connected to the internet makes the entire idea of “high load on single server” obsolete. The connected computers distribute the fragments by downloading them from other computers and then making them available for upload for those computers that don’t already have the fragment.

This enables sharing between a large number of peers possible without increasing the load drastically on any single machine. And thus making it far more faster than a normal download over an FTP or HTTP would take for the same file size.

The downloads and uploads however still remain bandwidth dependent as everything else is on internet but in this case the dependency never leads to a bottle neck. The flow is constant and the load shared therefore reducing the chances of having single point of failure. Bit Torrent also enables non-continuous downloads inherently because the continuity can never be assured over internet given the fluctuating nature of the bandwidth.

Desire: Ease of Usage and Friendliness

To avail the power of Bit Torrent based file sharing, you would normally require a client side application that helps you in performing download management tasks viz. Bandwith Allocation per download, prioritizing downloads, pausing and resuming, seeding etc.

And to those of you who use internet extensively, installing yet another application sounds to be an encumbrance. Organizing all the applications on your desktop, then updating versions, re-installation, firewall limitations etc. are some of the common problems one faces while using tools like Torrent clients.

How one wishes there was a way of putting all these applications on top of another layer of organization within your desktop that would manage all these issues, instead of your having to sit once every week and arrange stuff on your desktop manually.

Alternative: Desktop Rich Internet Application Platform

Having a RIA platform opens a great deal of opportunities for both developers and end-users. Developers find it easy to experiment with their ideas and offer their services over a customizable application development platform. End-users on the other hand benefit from a constantly growing community effort in bringing out function rich applications.

The RIA platforms and the desktop web has caught interest of major software vendors in the industry, to name a few Google and Adobe and they are in a race to offer these platforms out of their angelic desires to make the end user ever more equipped and enabled to leverage the strength of internet and web technologies.

Pramati, a relatively small fish in the huge ocean, on the other hand has already arrived with a solution that is simple, elegant and as powerful as your imagination. Dekoh in it’s entirety has altogether different view about how the world to come will use internet.

As I have been talking about Dekoh in my previous posts, so I won’t bother you with what Dekoh is. However, Dekoh can be used in places where no one could have ever imagined. Dekoh has evolved considerably in the past few months and its capabilities are growing by the day.

For a torrent service and client application all you need is a basic web server with trackers and clients that can communicate over the internet. Dekoh provides you with a personal webserver and there is a Central Application Server, both of these combined can add broader tracking facilities for Bit-Torrent files.

Dekoh architecture also enables you to work from behind the firewalls which means that it is possible that your IM services may be interrupted or your access to the internet may be limited but your downloads will never stop as long as you have Dekoh with you.

Wondering on these possibilities, the day is not far when you might actually hear about Torrent being available over Dekoh platform, making end-users’ lives much more simpler and organized.

Torrent over a Desktop based RIA platform, in my opinion will make a killer combination and I will be following up on it more. You keep tuned in to know more.

Google is Google after all…

Blogging has grown from a personal interest to a full time profession that can get you paid heavily. Weblogs are being used for Social Networking, Business Networking, Marketing, Advertising, Solicitation and what not. But what do you expect from a weblog of Google, not something that I found out recently.

All bloggers are burning their finger tips to make their presence felt over the internet. And then it happens all of a sudden that you come across blogs like these, http://googlegearsblog.com/2007/06/07/dekoh-this/ .

This makes you realize that there is someone ahead of you capitalizing on your efforts and getting further ahead. I don’t feel there is anything unethical in this practice but it is a bit too much of a show off for Google. They don’t even want to write their own blogs about their own products. They have created a mashup that pulls data from the weblogs that contains articles on Google or its products. Now that is cool and that is why “Google is Google after all.”

The link above shows a post made out of my post in which I had mentioned Google Gears. This site is an auto-blog that crawls the web for blogs and other informational sites, filters out content that contains people’s opinion about Google and its products, and posts it here, with no effort required whatsoever.

Using the Technorati’s ping facility, this blog keeps updating itself regularly and pinging it to Technorati, making it hot on the tag cloud. Google has really gained a lot of headway through its search and related products and now this is another use, they have found, of their searching capabilities.

I am not sure whether they plan to do it as a practice for all their products or it is just an experiment for Google Gears, but it sure feels very unGoogle like to me.

At the same time, I can’t deny the fact that this practice makes sure that blogs like mine get a fair chance for gaining visibility. This might even get me more hits and increase the chances of my opinion getting heard by a wider audience. So, in short even though I am not impressed by this blog by Google, I am still curious to see what it will mean for Google and the rest of us, eventually.

Attention Bibliophiles – Personal Cataloging has arrived!

I am a bibliophile. I love collecting books but over the last few years I stopped collecting books because I couldn’t manage them. I was loosing as many books as I was buying, so my library never grew beyond a certain number. I lost them because I would lend them to friends and forget to take them back or carelessly leave them at places from where not even God could retrieve them.

For the latter problem there was nothing much I could do. But thankfully for the former one I found this cool tool that I have started using.

Personal Book Cataloging, using Dekoh Books. You probably already know that I talking about a product that my company has built and it is fair on your part to assume that I am writing this article to sell an application that was built by my company. I won’t deny that, but that is not the only reason. Dekoh Books has indeed helped me catalogue my books and figure out which books are with my friends, which are with my family and which ones have I simply misplaced.

Dekoh_Books_Organize

The best part about Dekoh books is that now I can even add books to my Wishlist so that whenever I get a chance to visit a good book store, I can simply go through my wishlist and find out which books are pending on my list.

Dekoh_Books_Wishlist

There is another cool feature of this application. You can search for books through Amazon.com Web Service and add them to your Wishlist, which will enable you to fetch the ISBN number and a thumbnail image of the book’s cover so that when you go to buy that book, you don’t pick some other similar sounding book by mistake.

Some books that I found through Dekoh Books Search by Keyword are visible in the snapshot above which has three recommended books that I have been trying to find for years now.

Click to see my shared books. **

And you will get the idea.

To start using this application, all you gotta do is visit www.dekoh.com

** If it asks you user name and password, type the following "neoriz" & "dekoh123".

Gizmoz: Technology Innovation OR Wastage

Gizmoz gives you the facility to build a expressive animated face out of any frontal snap you would like to animate. A cool tool for kids, but I failed to see the importance of this tool in its current stage of evolution. It’s likely that We might get to see a better use case than the ones this website is advertising.

I feel the engineers behind this tool should take their skills, imagination and time more seriously.
Two points on Gizmoz –

It doesn’t really give you a well-finished animation.

You can’t use these animations on your answering machines and be takenly seriously by the caller. Besides, I didn’t understand why do you need an animation for your answering machine.

Buzz or Biz???

If you read my first post completely you might have noticed that I signed-off with an odd question.

Let’s see which comes first, the chicken or the egg?

You may call it a foresight, divine intervention or coming events cast shadow thing!

I am in fact struggling with a chicken or egg situation here. Y te presento, mi predicamento:

What comes first in today’s fast changing and hyperactive software industry.

The Buzz or The Biz?

For the uninitiated or intellectually challenged, What makes a product or service big in today’s effervescent market, the business proposition that a company offers or the buzz they manage to generate?

It took me nearly 6-7 years to realize what Google was offering through their search engine was nearly unparalleled by anybody before or after. I have been reading many websites talking about semantic webs and specialized searches for different type of resources that are search candidates. But, there is no other Google when it comes to finding something on the internet. And yet I started using the term Google as a verb “Did you Google for xyz?” instead of a noun “Did you search for xyz on Google?” just about a year back. So Google-ing has become synonymous to searching stuff on internet. And on a personal level, I feel any product that becomes synonymous to an activity in our day to day lives, has created a “Buzz” or has become a “Buzz”.

So, in Google’s case, Buzz came after Biz. Yet sometimes Buzz comes before Biz. Like an Apple iPhone. As far as end users like me are concerned, all we know is that it is going to be something out of this world. And we like to believe that because Apple has established itself as a Style Icon in the world of technology for their elegant designs and catchy outfit. And the Buzz might in fact take iPhone’s sales to the sky even before people realized the limitations and drawbacks (if any). So, Apple’s iPhone might actually sell-off more pieces out of buzz than the real biz offerings.

This leads me to the profound question of Chicken or Egg? Or in my case Biz or Buzz???

I would bet my money on Biz. And yet I can’t ignore the strength of Buzz. I am working on creating a Buzz about a Biz. And let’s see which one yields better results for me…

Dekoh This!

Pramati launched Dekoh at Web2.0 Expo and we have been growing in our user base ever since. Here are some points you should know…

  • It is not a browser plug-in.
  • Yes! you have to install it on your computer but it takes less than 5 minutes for the framework installation on a high-speed network connection.
  • It is not the same thing as Google Gears or Adobe’s Apollo, it is very different and is more focused on bringing lay users the facility to host applications and content on their home computer, only for small scale web application hosting, social networking and collaboration.
  • Works out of a web browser, so no pain of learning how to operate on some new proprietary user interface.

Evaluate Dekoh, if you want all these things:

  1. Personal Hosting: A platform that enables you to build custom web applications to be used within your community and host them from your desktop.
  2. No-Upload Sharing: Want to share content with your friends, family and/or peer group without uploading any stuff anywhere.
  3. Personal Audio/Video Streaming Stations: You want to play music or videos stored at your home desktop anywhere in the world.
  4. Work Off line: You want to maintain to build an application that connects to Web Service, synchronize your local data store and then allows you to work on that data even when you are off line. (like in a basement, in flight, or while you are out camping.)

Benefits of working on Dekoh Platform:

  1. Open Source: You don’t have to pay anything but attention (to your idea)!
  2. Free Support: Our engineers will help you customize the platform (if you really need it), application support (for configuration and maintenance related issues).
  3. Creative Freedom: You can build almost any sort of application that needs a web server to run it. You imagination is your limit.
  4. Web 2.0 Toolkit: You can use our widgets and request for other components that are related to Web 2.0 to add flavor and flexibility to your and your community’s experience.
  5. Dev Kit: The best part about Dekoh is that a Dev Kit for building basic applications and deploying them takes under 30 seconds.
  6. Powerful Application Server: You will be leveraging the power of our enterprise application server, which has been condensed and made available to you for free with almost the same robustness, scalability and extensibility.
  7. API for extension: If you have some experience with extending API’s, you will know what we are talking about here. The potential to enhance the whole platform to your personal advantage with no cost involved.
  8. Be Trendy: It’s a cool app, which will make your desktop look cooler than before. The industry is moving towards offline web applications, and giants like Google and Adobe are the best benchmarks for understanding the trend.