May
7
IE Object required error and other common coding mistakes
Filed Under JavaScript, Programming | Leave a Comment
Been having a lot of work on customizing Dokeos for a client, so didn’t really have any spare time to write.
This post is about common mistakes or overlooks when developing RIAs with JavaScript.
First of all, something to always keep in mind when working with Internet Explorer: it will never ever act like you wish from the first time.
Pay extra attention especially when dealing with DOM elements, as it tends to throw errors that FF doesn’t - I’m not talking about the fact that IE is not DOM compliant and methods that work in Mozilla family browsers don’t exist in IE or have different names.
Here’s a list of things to remember:
Read more
Apr
22
Simulating mouse clicks in JavaScript
Filed Under JavaScript, Programming | 8 Comments
There might
be times when you would like to simulate a mouse click on an DOM Node and don’t know how (for instance, submitting a form when in multi-frame environment).
Furthermore, it would be nice if the functionality could extend the DOM, so as to be able to use it combined with other pre-existing features.
Here’s the script bellow, just added and use it as you please (Ex. document.getElementById(”my_element”).click();)
HTMLElement.prototype.click = function() {
var evt = this.ownerDocument.createEvent('MouseEvents');
evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
this.dispatchEvent(evt);
}
}
Apr
18
Flex Camp Bucharest 2008
Filed Under Events | Leave a Comment
On Thursday I’ve attended the Flex Camp in Bucharest. It was mainly for showcasing the latest release. I’m just going to quickly go through some pros and cons, as I owe them for the cool t-shirt.
Pros:
- the tremendous work the Romanian team put into the flex builder; only someone who has worked on something like that knows the complexity of such a project
- the nice location
- the good educational talks about building RIAs
- the passionate speakers
Cons
- I really disliked the sense of superiority in the atmosphere, both from most of the Adobe team and from the audience. What they’ve accomplished in Romania is admittedly unique, but… Ehh,.. maybe it’s just me.
All in all it was a pleasant afternoon, so kudos to that!
Apr
16
The begining of the end for Second Life
Filed Under Marketing | 2 Comments
I’ve been reading a very interesting post about why is second life a dead end. I guess I kind of knew it a while ago from now. The reason is very simple: it collapses under its own weight.
As hard as I try to envision a way in which it could rise from its ashes, I can’t. Every service in the internet-world will fail sooner or later if it gets to complicated. I’m sure you are wondering why is Second Life complicated. Well, it’s simply too big. I mean, I’ve setup an account, played around a little and soon got bored. It’s too big, too real-life like. I’ve got my own life, I don’t want another one. If you come up with something, you’d better at least try to make it different.
Over on the marketing side, the whole project started wrong. In order to be able to monetize your business, you must have the capacity to easily reach your target audience with some sort of publicity. Not only that, but you must also be able to concentrate your visitors in groups so that any form of commercial you send to them have maximum of efficiency. Only then is when people will pay.
Apr
15
Database sharding unraveled - part II
Filed Under MySQL, Programming, Scalability tools | 6 Comments
After understanding how to pick the correct dividing logic we continue our journey into database sharding. Many say that sharding is partitioning and they are right, but keep in mind that it’s the most complex form of all. In order to better grasp the concept, think about a field of flowers.
In a normal situation (database), the flowers are all together.
What if you want to pick only the red flowers?
In this case you would have to check every flower and see which one has the desired color, than pick it up, but that would take to long.
Instead, why not plant all the flowers based on their color. So, if you’d like to get the red ones only, it would be easy as pie.
The only problem which could appear would be if you wanted only the flowers which had 5 petals. That is why you must carefully think things over before starting to split your data.
Alright then, we’ve setup the logic, what next? It’s time to implement it.Now, the implementation is the tricky part.