Open Source Applications on Internet

Hello friends, In this post I want to share some of the open source software and applications which are widely used by different web developers. These software and IDE with included default servers are available on internet for free downloading. Many well known websites who are attracting huge number of users are based on these platforms.

Netbeans :

The latest edition which I have worked upon is Netbeans 6.7.1

The NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports development of all Java application types (Java SE including JavaFX, (Java ME, web, EJB and mobile applications) out of the box. Among other features are an Ant-based project system, Maven support, refactorings, version control (supporting CVS, Subversion, Mercurial and Clearcase).

Features of Netbeans 6.7,

  • The newest features in NetBeans 6.7 involve the integration of Project Kenai – a collaborative environment for developers to host their open-source projects – native Maven support and Hudson integration.(Read more on Kenai .. http://ezdia.com/Netbeans_and_Kenai/Content.do?id=997)
  • It offers enhancements for Java, PHP, Ruby, JavaScript, Groovy and C/C++
  • It brings support for SVG Rich Components, remote debugging in Ruby and the latest version of GlassFish

Minor updates with Netbeans 6.7.1 are that it does add support for the latest features of JavaFX with JavaFX SDK 1.2 being bundled with the IDE. It also incorporates bug fixes included in Patch 1 for the NetBeans 6.7 release.

Netbeans 6.8 is also released

Why Netbeans and not Eclipse ?

  • Netbeans is very fast (atleast on Linux, it is way faster than Eclipse, One can say that it should approach Eclipse on Windows)

License: From July 2006 through 2007, NetBeans IDE was licensed under Sun’s Common Development and Distribution License (CDDL), a license based on the Mozilla Public License (MPL). In October 2007, Sun announced that NetBeans would henceforth be offered under a dual license of the CDDL and the GPL version 2 licenses, with the GPL linking exception for GNU Classpath

Download Links :

http://netbeans.org/downloads/

MySQL :

MySQL Client Version 5.1.11 (it is the latest)

MySQL is the world’s most popular open source database software, with over 100 million copies of its software downloaded or distributed throughout its history. With its superior speed, reliability, and ease of use, MySQL has become the preferred choice for Web, Web 2.0, SaaS, ISV, Telecom companies and forward-thinking corporate IT Managers because it eliminates the major problems associated with downtime, maintenance and administration for modern, online applications.

  • MySQL is the world’s most popular open source database software, with over 100 million copies of its software downloaded or distributed throughout its history
  • With its superior speed, reliability, and ease of use, MySQL has become the preferred choice for Web, Web 2.0, SaaS, ISV, Telecom companies and forward-thinking corporate IT Managers.
  • It eliminates the major problems associated with downtime, maintenance and administration for modern, online applications.
  • MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), the fast-growing open source enterprise software stack.

MySql advantages over Oracle :

MySQL is characterised as a fast, robust database with a good feature set, but one which lacks all the extras of something like Oracle … So if we are writing code that’s designed to be portable it’s a pretty good choice.  Admin / security are effective but the setup of these and othe features isn’t over-complicated.

Download Links :

http://dev.mysql.com/downloads/

Tortoise SVN version is 1.6.6.

TortoiseSVN 1.6.6, Build 17493 – 32 Bit
Subversion 1.6.6,
apr 1.3.8
apr-utils 1.3.9
neon 0.28.6
OpenSSL 0.9.8k 25 Mar 2009
zlib 1.2.3

This software includes software developed by collabnet (www.Collab.Net)

This software includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (www.openssl.org)

Open-source website – http://tortoisesvn.net/downloads

Tortoise Advantages over other CVS Clients:-

  1. Subversion gives us the confidence that when we commit, everything went into the repository.
  2. The ability to back out changes before going to production–using an activity branching model, we can allow developers to branch per activity and only merge to the main source base after code reviews have been performed.
  3. If there are problems, we have one revision we can back out that includes the full change-set for that change. While the repository level re-visioning was a shift for my developers to make that didn’t happen immediately, it begins to make sense when an activity had to be removed from the build-it’s easier to see what people are working on as the commits hit our internal commit mailing list. Since we tag each release, we’re able to determine which source code contributed to a release.
  4. It’s easier to see what people are working on as the commits hit our internal commit mailing list. Since we tag each release, we’re able to determine which source code contributed to a release.

Openfire 3.6.4 (Chat Server)

Openfire is an open source real time communication (RTC) server. Openfire uses the only widely adopted open protocol for instant messaging and group chat, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance. Jive Software leads the open source source project at Igniterealtime.org  and uses the technology to power real- time features in their Clearspace products.
Openfire and Spark use the open XMPP protocol (also called “Jabber”), the only broadly-adopted instant messaging protocol and an approved standard by the IETF. With many server implementations and dozens of clients, it’s also the only protocol with proven interoperability. The XMPP protocol is supported and continually enhanced by the active XMPP Software Foundation community.

Opensource Website - http://www.igniterealtime.org/projects/openfire/index.jsp

References:

  1. Netbeans and Kenai : http://www.ezdia.com/Netbeans_and_Kenai/Content.do?id=997
  2. Netbeans Keyboard Shortcut keys : http://www.ezdia.com/Netbeans_Keyboard_Shortcut_keys/Content.do?id=1119
  3. About MySQL : http://www.ezdia.com/About_My_SQL/Content.do?id=1168
  4. Books on MySQL : http://www.ezdia.com/Recommended_Books_of_MySQL/Content.do?id=60
  5. PHP and MySQL Guide for beginners : http://www.ezdia.com/PHP_and_MySQL_Guide_for_Beginners/Content.do?id=601
  6. Tortoise SVN Downloads: http://www.ezdia.com/TortoiseSVN_downloads/Content.do?id=1169

Difference between an ArrayList and an Array

Hello Friends,

I wrote a function yesterday, and defined an String array there. I defined it like,

String[] arr = null;

No error was shown by my IDE. I thought to move ahead. But when I tried to increase the size of my array, I was caught.

Now I learned the difference b/w Array & an Array List.

In Java, standard arrays are of a fixed length. After arrays are created, they cannot grow or shrink, which means that you must know in advance how many elements an array will hold. But, sometimes, you may not know until run time precisely how large of an array you need. To handle this situation, the collections framework defines ArrayList.

An Array List

  • The ArrayList class extends AbstractList and implements the List interface.
  • An ArrayList is a variable-length array of object references. That is, an ArrayList can dynamically increase or decrease in size.
  • Array lists are created with an initial size. When this size is exceeded, the collection is automatically enlarged. When objects are removed, the array may be shrunk.

Constructors of Array List

  • ArrayList( )
  • ArrayList(Collection c)
  • ArrayList(int capacity)

The first constructor builds an empty array list. The second constructor builds an array list that is initialized with the elements of the collection c. The third constructor builds an array list that has the specified initial capacity. The capacity grows automatically as elements are added to an array list.


The following program will show How an Array Lists grows and How we define an Array.

import java.util.*;
/**
*
* @author Sulabh
*/
public class ArrayListDemo {
public static void main(String args[]){
// Creating an Array List
ArrayList arrlist = new ArrayList();                   // Stating the initial size in not mandatory.
String[] arr = new String[2];                                   // We need to state the size of an Array.

System.out.println(“Size of Array List = “+arrlist.size());
System.out.println(“Size of String array = “+arr.length);

arrlist.add(“Sulabh”);
arrlist.add(“Pratik”);
arrlist.add(“Kuldeep”);

System.out.println(“Size of Array List = “+arrlist.size());
}
}

The output of the program will be :

Size of Array List = 0
Size of String array = 2
Size of Array List = 3

ensureCapacity()  for ArrayLists :

Although the capacity of an ArrayList object increases automatically as objects are stored in it, you can increase the capacity of an ArrayList object manually by calling ensureCapacity( )

arrlist.ensureCapacity( int minimunCapacity );
By increasing its capacity once, at the start, you can prevent several reallocations later. Because reallocations are costly in terms of time, preventing unnecessary ones improves performance.


References :

1. How to use Array Lists in Java : http://www.ezdia.com/How_to_use_Array_List_in_Java/Content.do?id=1022

2. Array Lists in Java : http://www.ezdia.com/Array_List_in_Java/Content.do?id=1023

3. Differences b/w Array & ArrayLists : http://www.ezdia.com/Array_and_ArrayLists/Content.do?id=1024

Displaying hidden Divs on Mouse Clicks

Hello Guys, I was trying to create a Mail Box, where on clicking at every Row, I can read the mail content there itself.

As I click on a div, one Div opens right below it, and when I click on it again the Div must hide again.

I am providing the HTML code for such functionality.

Hidden Div for row one is appearing

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML>
<HEAD>
<TITLE> Opening and Hiding Divs on Mouse Clicks </TITLE>
<script>
function showHiddenDiv(divid){
var visibility = document.getElementById(divid).style.display;
if(visibility == “none”){
document.getElementById(divid).style.display = ”;
}
else{
document.getElementById(divid).style.display = ‘none’;
}
}
</script>
</HEAD>

<BODY>
<table width=”350″ border=”1″ datasrc=”#cdcat”>

<tr><td id=”row1″ onclick=”showHiddenDiv(‘hiddenRow1′);” align=”center”>Row One</td></tr>
<tr id=”hiddenRow1″ style=”display:none” height=”50″><td align=”center”>”hidden content for row one”</td></tr>
<tr><td id=”row2″ onclick=”showHiddenDiv(‘hiddenRow2′);” align=”center”>Row Two</td></tr>
<tr id=”hiddenRow2″ style=”display:none” height=”50″><td align=”center”>”hidden content for row two”</td></tr>
<tr><td id=”row3″ onclick=”showHiddenDiv(‘hiddenRow3′);” align=”center”>Row Three</td></tr>
<tr id=”hiddenRow3″ style=”display:none” height=”50″><td align=”center”>”hidden content for row three”</td></tr>
<tr><td id=”row4″ onclick=”showHiddenDiv(‘hiddenRow4′);” align=”center”>Row Four</td></tr>
<tr id=”hiddenRow4″ style=”display:none” height=”50″><td align=”center”>”hidden content for row four”</td></tr>

</table>
</BODY>
</HTML>

This code has been used at various places and uses simplest functions possible.

function showHiddenDiv(divid) is used for displaying and hiding the div whose Id has been passed as divid where ever the function is called.

document.getElementById(divid).style.display is used to get the display style status of the Div whose Id is divid. It will be “none” is Div is hidden & it will be blank if the div is Displayed.

References :

1. Drop Down Menu boxes : http://www.ezdia.com/Drop_down_menus_in_HTML/Content.do?id=495

2. All about element display in html : http://www.ezdia.com/All_about_showelementbyid_in_html/Content.do?id=946

3. Working examples with explanations : http://www.ezdia.com/Favorite_Javascripts_for_designers/Content.do?id=947

Follow

Get every new post delivered to your Inbox.