Monday, May 26, 2008

Version Control : Netbeans beats ‘em all

Although most of the time I do sole-development….I still use version control a lot…my tool of choice is mercurial and i’ve been using it for quite a while now….i do all my version controls at the command line…and I am quite happy…or so I thought….Sincerely I dont know when the version control was introduced to netbeans…but I was perusing through the menu and I saw it..I played with it a little and more than I expected Netbeans blew my mind…

First every of the commands I issue at cmd prompt are now visually represented and all I have to do now is click and go.

Next…My outputs are now by far better than what it used to be…the outputs are now well arranged so I dont have to look for where what is and what is not.

And this is what blew my mind…Now as I write my code I can visually see what has changed since my last commit, what has been deleted, what has been added etc….the developement team of Netbeans had really done a good job..the colouring scheme is superb too..like red arrow points to where line has been deleted…green stripe says new lines have been added…blue says lines have been changed…pointing the mouse also gives u a tool-tip of what the color means….and again visually I can revert these changes by click of a mouse…

Finally, Netbeans supports three of the most popular versioning systems, Mercurial, CVS and Subversion….

If you take versioning serious in your development process, you just need to try out the versioning system built into Netbeans..and as usual..there is no Rocket Science involved in using it…it takes only a few minutes even if you have not used version control before

Netbeans….My IDE of Choice

Saturday, May 10, 2008

Code, Chat and Share: With Netbeans...coding can't be easier

There's this cool feature in Netbeans I just discovered...it is called Collaboration...it comes as a plugin. So what does it do.

First I go to the plugins page and I install the Collaboration plugin...just 4MB.
Next I see a new Menu appear on the Menu bar called Collaboration in between versioning and tools

I click on the Menu and it gives me options to Login or end my session if I am already logged in
Next I click Login and I have a side-bar where I can Manage my accounts.

I click on the Manage Accounts button and I have a new window where I can
  1. Register for a new collaboration account with share.java.net
  2. Register for a new collaboration account with another collaboration server
  3. Access my already created account on any collaboration serve
Any one who can install netbeans should be able to follow the simple steps to create a new account

After your account has been created your side bar is update to reflect your account settings. You can change any of these when you click on Manage Accounts button. if you are satisfied..click login
By now I guess all your friends have also done the same thing...so how do I add my friends to my contact...or better still how do two developers working on the same project collaborate real time without actually having to open an Instant Messaging Application? Some times ago I wrote about how Netbeans has helped me to eliminate most of the other GUIs that floods my screen...and now I have only one unified GUI...now its helping me to eliminate multiple Instant Messengers too......life is beautiful with netbeans

Now right click on Contacts in the collaboration side bar and select Add Contact..type your friends first name and click find..if your friend is logged in...he will show on the open and you can add him..a message is sent to your friend too to add you....you have fufilled the first step to real time collaboration

Next right-click on your friend's ID and click on Start Conversation...a new tab is opened for you where you can chat, share files and even share a whole project!

Now click on a file..drag it to the window that says Drag files here to share them and blam!...you have started sharing...your friend at the other end recieves the file(s) you dropped.....this way you can drop a whole project here and the guy at the other end gets it......He can also do something really crazy at this point...he can remotely build, clean, and run this project

Go try out this cool tool...you'll be glad you did....I did something with this tool...At a time I have a server setup that I manage remotely...most times when I make changes...i do it on my development system and upload...

What I did now was to install Netbeans on my Server and upload all the project files to the server...Next I created another account for the server on Collaboration and then I do all the editing I need to do directly on the server....all I did was shared the project files and that is all...whenever I want to run the project..I connect to the server using VNC Viewer to see the output.

Thursday, May 8, 2008

Every one wants to be on stage...even bugs

I just read a post by Lukas Hasik ( http://blogs.sun.com/lukas/entry/failed_demos_at_javaone ) talking about failed demos at javaone and already we have three failed demos....the question that raised is dis...why did the bugs all want to appear at the presentation time? No matter how much QA u do..u cant seem to get a bug-free code and at presentation they all keep coming up....well i guess this blog answer that.....Let me know what you feel ok?

Building Java FX using Netbeans 6.1

For some of you using netbeans 6.1 and having problems with Java FX, here is the solution....first you can't find Java FX under plugins as is usually the case with 6.0.1 and older...The reason for this is that the Netbeans beta update URL is set to 6.1 and you have to manually change that...instructions to do that are available here

https://openjfx.dev.java.net/javafx-nb60-plugin-install.html

I also found this site on the netbeans plugin portal http://deadlock.netbeans.org/hudson/job/JavaFX_NB_daily/ i guess the claim this secondlink is d 6.1 build of JavaFX(I've not tried it)

But if you like to play with the raw source like myself...here is what to do....

  1. Download the latest source from https://openjfx.dev.java.net/source/browse/openjfx/ using svn
  2. If you want the tar.gz format use this link https://openjfx.dev.java.net/servlets/ProjectDocumentList
  3. After downloading the source.....open Netbeans and select Open Project
  4. Navigate to the folder where jfx is download...Netbeans sees the folder as a Netbeans Project...Open it..Netbeans will complain of some dependencies files missing....just ignore it
  5. For some GodKnowsWhat reason..this project does not build successfully under Netbeans..You need to make some changes to the bootstrap.xml file.
  6. Open the folder where jfx is downloaded and open the file bootstrap.xml with your favourite XML editor (which I guess is Netbeans..I use Netbeans)
  7. On the navigator tab you will see Ant Targets...double click on ant..Netbeans automatically points you to the target ant
  8. Put a comment on lines 93 to 98 (use html comments).
  9. Now download the latest ant build from http://www.apache.org/dist/ant/binaries/
  10. Extract the contents to $JFXFOLDER/bootstrap/ant-1.7.0/ where JFXFOLDER is d folder in which you have your jfx files
  11. Next create a folder ant-1.7.0 in d folder $JFXFOLDER/tools/
  12. Now build the project...the project should run smoothly without any problem...it will also download all the necessary files and folders and put them where they should be......
  13. So that Netbeans wont download these files next time I want to build the project...Sorry I cant have XML code in here....mail me to get the modified bootstrap.xml
Now you have javafx compiled and the jar file should be in the folder $JFXFOLDER/openjfx-compiler/dist/lib...you can easily add this to your path so that you dont reference this folder anytime you want to compile a Java FX program...using your own build

Wednesday, May 7, 2008

JavaFX and Applet: Flash got a competitor

Sometimes ago I discussed with a colleague of mine on how this browser incompatibility issue is affecting one of the world's most popular language : Javascript....The conclusion of our discussion is that Flash/Flex will replace Javascript at least for now......I argued however that Flash/Flex can never be ubiquitous. Though some technologies that promises to compete with Flash/Flex are still young and probably immature.....they definitely will be able to catch up with flash/flex considering the big-wigs behind them....The first of these technologies is Silverlight from Microsoft and the Other is JavaFX from Sun Microsystems. The reason for this I reasoned is because the M$ guys will like to go with Silverlight and the Java guys will love to go with JavaFX.....this however I did not see happening anytime soon....as I wrote in http://trinisoftinc.blogspot.com/2008/04/web-30-and-javafx.html talking about web and JavaFX....I mentioned lately in that blog about applets and then I didnot know what was going to hit me at the Sun JavaOne conference......

After the session at the Sun JavaOne conference...and the demos we saw about JavaaFX and Applets...i betcha if flash wants to stay on-top it gat to do something dramatic.....with the new consumer JRE Java 6 update 10....the disparity between desktop and web have been reduced to zero.....you can simply drag and applet to your desktop and blam it becomes an application.....that is the coolest of them all.....i bet I have not seen anything like that(pardon me if it already exists).......The multimedia is awe inspiring....the connectivity is outa this world....the language is mature and superb.

For me I will go with Java or .NET and I will prefer any one of them to Flex....these languages have a super backing...the are matured and they are tested and trusted....flex is still a new language that is bound to go tru so many transistions.....I don't think that kind of language is suitable for the kind of apps I build.

Besides.....No matter how well flash is tinckered with....I still prefer(and I know anybody should) the graphics presentation and multimedia video and audio quality available in Applets + the MPees over flash....JavaFX crowns it all. With the JavaFX backend availability for applets....its best described as Applets on Steroids.....

You can check out the new cool features of JavaFX on www.javafx.com

Tuesday, May 6, 2008

SIP: the future of telephony, the future of communication

Its no more a buzz word...almost every one has heard the word SIP at one time or the other. Recently I started working with SIP and the results and insights I got are innumerable. I found out that there's nothing http:// can do that sip:// can not..and even more do.

I have posted here some of the areas where SIP is a considerable technology and where I see SIP perform far better than HTTP.

First of all, when most of us hear SIP..what comes to mind is VoIP...SIP != VoIP. Its a delusion to even think both are of the same family. VoIP is just one of the things you can do with SIP....its like a subset of SIP and its not equal to SIP.

So what can SIP do...or better still what can I do with SIP...this list is actually far from beign comprehensive..but its a good place to start..
For those who dont know..we have software,malware,bloatware,spyware,M$ware etc....compared to SIP, http is a bloat ware. I use SER and I also use Apache I want to say that my LSAM (Linux Sip Applet Mysql) applications performs better in terms of speed that LAMP(Linux Apache Mysql PHP)...The problem of LAMP is TCP..The Strength of SIP is UDP...I dont have to use the problematic TCP/IP protocol...

Except for the issue of firewall(which has since been solved by SIP proxies) UDP in my own opinion is better than TCP/IP again in terms of speed...whenever I develop apps especially in java, I prefer to use UDP than rely on TCP...i have to write my own failure-to-deliver protocols yes...its better that way aint it?

One area I am most impressed is in the area of Instant Messaging...with Ajax and PHP over TCP/IP...using two systems connected on my LAN we still noticed a kind of lag when chatting....with SIP....its like the message is already sent waiting for you to press enter before appearing on the other person's screen.

When connecting to SIP, its like magic....even on my LAN...some pages take close to 30secs to load...i.e if the page did not have much images and flash animation....streaming multimedia on my LAN using TCP/IP is another story...on a Intel Pentium M 1,36 GHz processor, 1Gb of Ram and 160 Gb of hard disk..we cant have more than a few connections(less than 50 to be precise) before we notice that the server is already crying for more resources....for SIP we use a Branded Pentium 4 System, 512 of RAM and 40 Gb of Hdd and the number of concurrent calls(including video messaging) goes to about 1800...I see SIP Streaming Servers replacing bloatwarez like Adobe Flex Server*
So in the nearest future I see SIP totally taking over
  1. Instant Messaging
  2. SMS/MMS
  3. Multimedia (Audio && Video)
  4. Webcasts (Live TV)
  5. Presence
  6. VoIP
  7. Every form of Data Transfer
  8. Telephony
  9. Community Portals(Messaging, Collaboration, Presence)
  10. Web Operating Systems
  11. Languages like CPL becoming more popular
  12. Switching Technologies
  13. Scalable Web Apps etc
Well..after all said and done...SIP Rules...I think developers should begin to fine tune their minds to develop apps for the platform that promises to be the technology of choice as far as communication is concerned.

*Adobe Flex Server is a super product please dont get me wrong...but at the same time its trangressed against the rules so...its a bloatware