Feeds:
Posts
Comments

Archive for August, 2008

i was reading a book head first design pattern, actually read that book many times, an excellent book. Sharing my details idea singleton design patter.
class diagram of Singleton design pattern

a singleton class is look like that
public class Singleton
{
private static Singleton UniqueInstance; //variable to hold one instance of the class Singleton
private Singleton(){}
public static [...]

Read Full Post »

fun with Javascript

I faced a problem to call 2 methods at the same time from body. and the solution is very simple. I wrote a script block at the end of the page look like that.
<SCRIPT LANGUAGE=”JAVASCRIPT”>
if(document.body.onload)
{
var existingOnLoad = document.body.onload;
document.body.onload = function()
{
existingOnLoad();
MyOwnMethod();
}
}
</SCRIPT>

Read Full Post »