Vacation, Vacation, Vacation…

August 4th, 2008 by Afraithe

Yes, we managed to have ourselves some vacation time this summer, Spocke is currently traveling in Europe and I have been spending some time in my families cabin this summer. I wish I could write a piece of code to exterminate all mosquitos.

Our office is being rebuilt still, but its about 90% complete now, and we look at moving in next monday, that will also be the date our vacation is over.

We are looking into releasing more updates for TinyMCE and MCImagemanager/MCFileManager products during the fall.

Posted in Work | 2 Comments »

Firefox 3

June 19th, 2008 by Afraithe

Unless your living in a cave you probably noticed Firefox 3 was released recently.

The latest TinyMCE release fixes some minor issues with Firefox 3, in general though, it works very well. There are also a few new interesting features in Firefox 3 that can be used by WYSIWYG editing.

For keeping from going insane on the location toolbar, I can highly recommend getting the “Oldbar” addon.

And you can of course get Firefox 3 at www.getfirefox.com.

Now enjoy summer.

Posted in Software | 1 Comment »

Leak free event class that doesn’t use the unload event

June 9th, 2008 by Spocke

I recently read an interesting blog post at Ajaxian it described that Hedger Wang discovered that some Chinese fellow was able to fix the circular reference memory leak in IE using a finally statement. This got me very exited since it would remove the need to use the unload event to cleanup memory leaks. There are lots of issues using the unload event to cleanup memory leaks I blogged about one of them earlier and using an non unload approach would make things a lot easier and more efficient.

Here is the proof of concept class and you can see it in action at the example page.

(function() {
	window.EventUtils = {
		eventFuncs : [],

		addEvent : function(o, n, f) {
			var el, id;

			// Resolve element by id if needed
			o = typeof(o) == 'string' ? document.getElementById(o) : o;

			if (o.attachEvent) {
				// Since we can't use attachEvent we need to generate an unique id for the object
				// and place functions in an array one for each object
				el = EventUtils.eventFuncs;
				id = o._evtID;

				if (!el[id]) {
					// Generate new unique id
					id = o._evtID = el.length;

					// Add event listener old fashion way instead of attachEvent
					o['on' + n] = function() {
						var i, l, e = window.event, li;

						e.target = e.srcElement; // Force W3C style

						// Execute each event listener in order
						for (i = 0, li = el[e.target._evtID], l = li.length; i < l; i++)
							li[i](e);
					};

					// Create array with first function
					el[id] = [f];
				} else
					el[id].push(f); // Push in more functions

				// Fix the IE leak
				o = null;
			} else if (o.addEventListener)
				o.addEventListener(n, f, false);
			else
				o['on' + n] = f;

			return f;
		},

		removeEvent : function(o, n, f) {
			var i, li;

			// Resolve element by id if needed
			o = typeof(o) == 'string' ? document.getElementById(o) : o;

			if (o.detachEvent) {
				li = EventUtils.eventFuncs[o._evtID];

				if (li) {
					// Detach event listener by looking for it and remove it from the array
					for (i = 0; i < li.length; i++) {
						if (li[i] === f)
							li.splice(i, 1);
					}
				}
			} else if (o.removeEventListener)
				o.removeEventListener(n, f, false);
			else
				o['on' + n] = null;
		}
	};
})();

Here is a simple example on how to use the class it adds two events and removes one of them this sample code can be seen live running the example page:

var f;

EventUtils.addEvent('elm', 'click', function(e) {
	alert('Listener 1: ' + e.target.id);
});

f = EventUtils.addEvent('elm', 'click', function(e) {
	alert('Listener 2: ' + e.target.id);
});

EventUtils.addEvent('elm', 'click', function(e) {
	alert('Listener 3: ' + e.target.id);
});

EventUtils.removeEvent('elm', 'click', f);

Posted in Blogs, Cool stuff, Development | 1 Comment »

Congratulations Artopod, 10 years in the business.

May 22nd, 2008 by Afraithe

Our good friends Elin and Jonas at Artopod is throwing a party tonight to celebrate 10 years in the business!

We network quite a lot with companies around is here in SkellefteƄ, and the party will bring together a lot of old friends I would guess, ppl from Paregos, Northkingdom, Vinter/Mammon, and Thomson will be showing up, to name but a few. Please note, visiting the above websites can result in severe flash damage!

Moxiecode Systems AB actually celebrates 5 years in the business this year, perhaps we will organize something after the summer, need to spread these parties out, good for business.

Let’s get the party started!

PS: Please note that any support issues might have a slow response time on Friday ;)

Posted in Cool stuff | 1 Comment »

Everything is relative

May 9th, 2008 by Afraithe

We focus a lot on the size and performance of TinyMCE, each feature, optimization and fix adds more KB to the source, we always weigh fixes and feature against the increase in size of the package. If you use TinyMCE without compression, the Javascript, with all plugins and all features, is around 150kb, if you use the GZIP feature, you get it down to 75kb.

Is this big? Lets take a few examples, if you surf on a newspaper website, something most of us visit every day, you load far more than TinyMCE.

Here are some examples of some of the most visited websites in Sweden.

www.aftonbladet.se
CSS: 252kb
HTML: 244kb
JS: 252kb

www.dn.se
CSS: 325kb
HTML: 231kb
JS: 187kb

www.idg.se
CSS: 126kb
HTML: 140kb
JS: 175kb

This is without images or flash. Am I the only one to find this completely insane? Doing this test made my browser crash just surfing between these websites.

Perhaps TinyMCE is Tiny after all.

Posted in Development, Work | No Comments »

Sourceforge the sinking ship?

April 30th, 2008 by Afraithe

We have been users of the Sourceforge system for a long time now, and personally I think that is has been going downhill for quite some time, more ads, more downtime, site is slugish and at the same time, nice alternatives have been poping up. For example, Google Code and if your brave, the Trac system that you can run on your own servers, been keeping an eye on that for some time and it seems very nice really. Only problem is that its made in Python, not to fond of that.

Spocke planned to make a release of TinyMCE today, but Sourceforge has been down almost all day and now the site is up, but the SVN isn’t, so we will see.

Posted in Development, Software, Work | 1 Comment »

Offline storage, who will care in 10 years?

April 25th, 2008 by Spocke

There are lots of fuzz around the ability to store contents offline these days. Using Google gears, local storage in the browser, Flash or Silverlight storage. I can see how these storage technologies can be useful for local applications to store user data without using some backend and having things like a local SqlLite database is really neat and handy.

But there have been lots of examples where the scenario is that you for example write to your blog when your laptop is in offline mode then commit the contents ones you get online. I think this problem is short lived since who will ever be offline in the future. We will have full 3G coverage, local Wifi spots all over, Internet connections on planes (some airlines have this already) so I ask my self when will we ever be “offline”.

Posted in Software | No Comments »

More on browsers and WYSIWYG

April 24th, 2008 by Afraithe

I thought I might report a bit on the status of the browsers regarding WYSIWYG support and ContentEditable, watching the bugs we have reported, there have been quite a lot of fixing going on the last few days, both on Safari and Firefox.

Firefox
The features that they have implemented is quirky, but on the upside, they are further along than most other browsers in terms of functionality, if only the things they had worked properly, it would be great. One major problem with Firefox, that goes through many of their features, is the cursor handling, it jumps around and does not perform as expected.

Safari
On the complete opposite of Firefox, the things in Safari that they have implemented works very well, but the browser lacks certain important features. Overall, its looking very good, but its slow progress.

Opera
These guys are very fast as fixing bugs, there are some minor known issues with the back button at the moment, but other than that it’s very nice. We enjoy working closely with the Opera team.

Internet Explorer
We do not have as much overview of the current status of MSIE 8 development as we would like (if anyone at MS reads this, get in touch). Most of the stuff seems broken now in the latest 8 version, so we are basically waiting for the next Beta before we start to look into it more. But on the positive side, in MSIE 7, the things that work works flawlessly, there are a very low number of quirks compared to other browsers. It’s tough to report bugs and get them noticed however, so for any problems that does exist there isn’t much hope in getting them fixed.

So there you have it, our status report on current development in the WYSIWYG area of browsers.

Posted in Development, Software | 3 Comments »

SEO - Modern day scammers?

April 18th, 2008 by Afraithe

Since we do quite a lot of HTML development from time to time, we come across quite a few companies that offer “Search Engine Optimizations”. I can’t say I haven’t met one that I don’t think is nothing more than a scammer, its simply a profession that should not exist, instead, hire good developers. We have come across SEO companies that got clients banned from several search engines during the whole “doorpages” area of optimization, and “optimizers” that didn’t know how to view the HTML of the website (hello view source?).

I mean, what is the point of actually coming in after the project to review the HTML/Layout/Content for Search Engine Optimization? What if we had our HTML totally wrong, are we going to redo the whole website? No, any optimization should be done during development, and any good HTML/CSS coder knows how to do a decent optimization.

I wish clients would spend their money on hiring a good copy to help them with some text instead, that is probably better for the indexing and usability of the website.

Except for coding good HTML and having good value content, there isn’t much you can do, except for links! Getting others to link to your website is very important in order to get anywhere in today’s searches.

So, as a conclusion… if you use TinyMCE or any of our stuff, we would appreciate any links you can give us :)

Posted in Work | 4 Comments »

MoxieCompressor makes your site or product fast!

April 15th, 2008 by Spocke

We have been working on project for minification, concatenation and gzip compresson of JavaScript and CSS files for a while. It started as a part of our commercial products but it has over time matured into it’s own project.

Since we do a lot of JavaScript development and the code base tends to be very large overtime we where forced to come up with solutions to reduce the download size for the users. We started this as a project for TinyMCE and there is a compression package available for that product but that was just the seed for these classes and we will in time replace the TinyMCE compression package with this one.

We have by intention not made it possible to for example send in the files you want to compress from the page level in a query string. This is to make the script more secure and it wouldn’t be that nice if there are like 30 scripts to compress. You can always make your own simple switch statement in the compression page to send out different sets of files depending on input.

Below is an example of a usage scenario it basically compresses a few files together into one request it will also cache the file to disk to reduce the server workload. The compression ratio is about 70% depending on content so it really makes a difference on bandwidth and overall traffic from the client to the server.

// Setup compressor
$compressor = new Moxiecode_JSCompressor(array(
   'expires_offset' => '10d', // 10 days
   'disk_cache' => true,
   'cache_dir' => '_cache',
   'gzip_compress' => true,
   'remove_whitespace' => false,
   'charset' => 'UTF-8',
   'patch_ie' => true // Fixes an IE bug
));

// Add files
$compressor->addFile("jquery.js");
$compressor->addFile("thickbox.js");
$compressor->addFile("syntax/shCore.js");
$compressor->addFile("syntax/shBrushPhp.js");
$compressor->addFile("syntax/shBrushJScript.js");
$compressor->addFile("functions.js");

// Output minified and gzipped contents
$compressor->compress();

So if you haven’t compressed your contents before we recommend that you give it a try since it will improve your clients user experience with a more fast loading site or system.

You can download the package and find more details about this project at moxieforge.net

Posted in Development | 6 Comments »

« Previous Entries