May 2005 - Posts
Hmm, got the event email from microsoft at 2.30am today. If the email
is not scheduled, then the staff should be working quite hard..keke.
Anyway the event web link is here,
microsoft.com/singapore/billgateslive/default.mspx,
but I suppose most people would get the email (I tink its mass email to
msdnconnection members) . I tried registering for it and was asked
quite a number of questions, like what is the common community I went
to, and so on. I typed in sgdotnet.org for the first one instinctively
but for the second and third, I was actually pondering which to
put as sgdotnet.org is the one forum which I check more regularly. When
I finally finished the form, I realised it took me more than 15mins to
do so. Now just wait and see if I got one of the limited seats
I was feeding off
Barbers Pole's Blog when I got the news that
Macromedia
has revamp their site. So I went in to take a look and the first
reaction I got is "WAH! COCKPIT DESIGN". I refer cockpit design to
those UI who will throw all the functionalities / links in your face
and I got sort of confuse. Good thing the friendly old flash menu bar
on top still exist. The main body for now is too confusing to me, maybe
I need some time to adjust..haha
Today, I was viewing several flash website recommended by a friend. The
loading time is a bit unbearable, so I decide to do my stuff first
while I loads. After chatting on msn, drink a few sip of coffee and
feeding on RSS, I forget about the websites. By the time I realise, I
have already miss the intro of some of the Flash site. Advice for Flash
designer/ developer, if possible, after the movie load, put a play
button on the screen whereby the user can click before playing the
intro. You won't want the pain staking intro you spend hours to make to
be missed. Sometimes once the intro starts and the music plays, the
viewer will be 'alert'. But sometime late at night (like now) viewer
may turn down the volumn and miss the 'cue'. So, just play safe and put
a play button, wun take much effort too
=)
In this few weeks, I have been hearing more and more of Ajax and Ajax
wrapper variants. Of course as a .NET developer, I will stick to
Ajax.NET wrapper. Today, I learn a new wrapper SAJAX Toolkit. S for
Simple.
URL @
http://absinth.modernmethod.com/sajax/
Basically an Ajax wrapper for PHP / ASP / Coldfusion developers.
but there is also
CFAJAX for Coldfusion, and there is also
Backbase
With so many choice to choose from, its not difficult to see Ajax is
gaining popularity. But whether it will change how web sites looks like
in the future is yet to be seen
Posted up a
half completed game I
made like a year ago. I decide to rewrite all the codes and redo it
since I really want to complete it, but the old code back then is
so..messy..

Ok, I know my mage looks like Final Fantasy one
Flash does not give us much of a data structure to play around. The
only data structure it give us is the Array class, which can pretty
much implement a lot of things. But when it comes to searching and
sorting, the speed is horrible.
A much much much faster way (I not sure if it is more memory consuming,
but definitely much faster in terms of searching and sorting) is to use
a hashmap. There is no hashmap in Flash, but we can implement one
almost effortlessly. This technique is very handy when dealing with
complex relationship and collections, example in Flash games.
To create a hashmap in flash, all we need, is this
hashmap = {};
Eh..done!
Simple huh..haha..not quite. So now, how to insert? So lets say we create an object with the Primary key of "sgdotnet"
sgdotnet = {name:"sgdotnet" , type:"forum", age:1};
To insert, we will just have
hashmap["sgdotnet"] = sgdotnet;
so now we can do something update to it like hashmap["sgdotnet"].type = "Best Forum"
So now we can insert and retrieval, but how to loop thru all the items in the hashmap?
We can accompolish this using a very simple recursion
function Read(object:Object)
{
for(var i in object)
{
var current = object[i];
if(current instanceof Object)
{
Read(current);
//Can implement codes over here
}
else
{
trace(i + " is " + current);
//Can implement codes over here
}
}
}
Basically a for-in loop to search thru everything
Now for delete, we just use the delete keyword.
delete hashmap["sgdotnet"].age;
This can goes on, to much much more complication structure like
hashmap["Country"]["State"]["City"]["Library"]["LibraryName"].Address
Nice Flex application over @
Macromedia Consulting to dynamically generate CSS for Flex application
When creating event handlers in AS2.0 classes, we need to create local
variables that point to the instance of the object which contains the
event handlers. For example, something like the below will not work
class World{
//these 2 variables are declared outside default constructor
private var currentWorld:XML;
private var currentWorldListener:Array;
function World()
{
currentWorld = new XML();
currentWorld.ignoreWhite = true;
currentWorldListener = new Array();
currentWorldListener.push(defaultWorldListener);
currentWorld.onLoad = function()
{
//within this block of code, currentWorld and currentWorldListener is undefined
currentWorldDispatcher(this) //nothing happens
}
}
}
in order to make the event handler works, we need to create a local variable in the same scope as currentWorld.onLoad, example:
private var currentWorld:XML;
private var currentWorldListener:Array;
private var x = 50;
function World()
{
currentWorld = new XML();
currentWorld.ignoreWhite = true;
currentWorldListener = new Array();
currentWorldListener.push(defaultWorldListener);
//Create a local variable for event handlers to point to.
var localWorld:World = this;
currentWorld.onLoad = function()
{
//Within
this block of code, only 2 variable is in scope. localWorld and
currentWorld. The
rest
//like variable x is not in scope.
localWorld.currentWorldDispatcher(this)
}
}
Just return from the Big Walk today. Quite fun, I saw spiderman, batman
(cosplay), and crowds with banners, it seems like we are having a
demonstration in Singapore (Which will never happen). The most shocking
thing i saw is a big group of people carrying the banner of Fa Lun Gong
and they have even a group of drummers that accompany them. Along the
way, there is a small group (ard 6-7 people) by the side of the road
demonstrating Fa Lun Gong. Stunned, big walk has became an advertising
media for them.
Overall was quite fun, although its very hot today. Hope I dun get incapacited tomoro. =)
Spend the entire morning / noon working on experimental website to see
what I can get from using ajax and paladin together. I dunno wat to
name it so I just conveniently joined up the two names together to
formed
ajaxalin.. (I know it sounds weird)
Basically wat I want to achieve is minimum postback as well as a good
MVC design for the backend. One of the key concern I have read so far
on my daily rss feeds from blogs such as
http://www.ajaxian.com
and design patterns on ajax such as
http://www.ajaxpatterns.org/index.php?title=Main_Page
is that whether we might shift some business logic to the presentation
tier. Thus, I hope to see for myself how much this is true by trying
out myself
Basically I found out from today experiment that to create a good site
on ajax, a few elements which was initially not that paramount in web
development takes a greater role , basically CSS and javascript. When
developing with
AJAX.NET wrapper with
Paladin,
although AJAX.net wrapper claims that it can convert custom objects, I
get stack overflow exception if I return a entity_base object through
ajax. For now, I am not very sure where the problem lies (can be a
problem with my codes), so I will try to find it out over the next few
days, then I will move on to experiment
Ajax with Flex , hope can get something fruitful from all these experiments..=)
By the way..I dun play beyblade nor know what is it, I just happen to
come across its whether when I am trying to search for a banner for the
site...and since they got the nicely cropped pics, I decide to use
them..^^"
Play around with
Paladin 0.9 today. I must say I am quite amazed!
At first met with some problems as I tried to import all the tables
from my database in, which results in exception, but I suppose its
because some of the tables do not have primary/foreign keys.
Once BeWizard is done, the rest is a breeze, managed to get everything
set up in 15mins. Eh..15mins cause I never read the readme..haha..so I
never use the new business component object to populate the entity
objects. After getting everything right, I tried out playing with other
tables, etc.
Excellent job, Serena =)
Hmm, want to thanks the sgdotnet commitee for organising such the bbq, great job! And Happy B-dae to SgDotNet too!
Look forward to viewing the pictures taken..=)
After studying J2EE and EJB for around a week(and keep getting
deadends), I am back to .NET again for today, basically exploring
around VS 2005 Beta 2 and seeing what it offers. Was very impressed
with the new controls and functionality, user-friendly UI. In order to
learn more, I got the ebook "Introducing ASP.NET 2.0" from Safari, hope
can get to learn more about it soon, coz so far I have not really
explore 2.0 framework yet.
Now will be looking forward to the BBQ session tomoro. See you guys
there. Hope I can still keep my eyes open after tomoro work (yes, I am
working on saturday...=.=)
Tried
CrystalTech free
ASP.NET 2.0 hosting
today. I must say I am very impressed by the quality of the service
they offer even though the hosting is free. The control panel they
offer they very good and provide me with lots of features and their
24/7 email support reply me almost instantly when I had problem
creating a new database on their sqlserver 2000. If I will to recommend
a hosting to a friend, they will be on top of the list =)
Went for lesson today and realise the class has been postpone, then the
admin forget to tell me. Hmm, end up staying in the school and enjoy
the air con and conducive environment while learning Java Server faces.
Now have to wait til next sat before my next class. =\
After fustrated in using the relatively poor UI of Jbuilder (as compared to VS.net), I decided to search around and found
Sun Java Creator 2004.
To my astonishment, the UI is almost similar to Vs.net. We can drag and
drop controls around (faces in this case), double click and the
"code-behind" (which is a javabean class) pop out. Nice piece of
software =)
More Posts
Next page »