2009/08/14

HashTable vs. HashMap

Both provide key-value access to data. The Hashtable is one of the original collection classes in Java. HashMap is part of the new Collections Framework, added with Java 2, v1.2.

1. The key difference: Access to the Hashtable is synchronized on the table while access to the HashMap isn't. You can add it, but it isn't there by default.

2. Iterator in the HashMap is fail-safe while the enumerator for the Hashtable isn't. If you change the map while iterating, you'll know.

3. HashMap permits null values in it, while Hashtable doesn't.


2009/08/13

Java Beans

From Wikipedia,

JavaBeans
are reusable software components for Java that can be manipulated visually in a builder tool. Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. A JavaBean is a Java Object that is serializable, has a nullary constructor, and allows access to properties using getter and setter methods.
!

Model View Controller (MVC)

From Wikipedia,

Model–view–controller (MVC) is an architectural pattern used in software engineering. The pattern isolates business logic from input and presentation, permitting independent development, testing and maintenance of each.

An MVC application is a collection of model/view/controller triplets (a central dispatcher is often used to delegate controller actions to a view-specific controller). Each model is associated with one or more views (projections) suitable for presentation (not necessarily visual presentation). When a model changes its state, it notifies its associated views so they can refresh. The controller is responsible for initiating change requests and providing any necessary data inputs to the model.

MVC is frequently and needlessly convoluted by tying it directly to a graphical user interface. That a controller is often driven indirectly from a GUI is incidental. Likewise, rendering views graphically is an application of MVC, not part of the pattern definition. A business-to-business interface can leverage an MVC architecture equally well.


2009/08/12

MySQL Visualized Client - HeidiSQL

Official Site: http://www.heidisql.com
!

cmd - MySQL Login

Start -> Run -> cmd
-> mysql -u user -p
-> password
!

2009/08/07

VM - Copy and Paste between XP Desktop and XP on Virtual Machine

1. Start installed Windows XP on VM
2. VM -> Install VM Tools
3. Install VM Tools and reboot XP on VM
4. Copy and Paste is set up
!

Run Command - Event Viewer

Start -> Run -> eventvwr.msc

Watch Local Event:
Application Error Records,
Security Audit Records,
System Error Records,
Custom Log Records,
...
!

Google Analytics

Blog Archive

Followers