Posted in typo, scriptaculous
Sat, 01 Jul 2006 23:41:00 GMT
I updated the Typo Themes Viewer with the following features:
- Lucid theme: No longer a drab gray :) The theme viewer currently uses a fluid layout for non-IE browsers and a fixed layout for IE since I ran into some issues using the fluid layout on IE. Even with the wider left and right margins, I can still get 6 thumbnails across on my 1400x1050 screen for easy viewing.
- Lightbox image viewer: The Scriptaculous Sortable effect has been removed and replaced with Lightbox (which relies on Scriptaculous). When you click on the thumbnail now a medium sized graphic will appear. Let me know how it works for you.
As before, I'm more than happy to add new themes as they become available. Just post a comment here with the uri(s).
The new look:
Using Lightbox:
On a final note, Lightbox 1.x allowed you to close the lightboxed image by clicking on it. In Lightbox 2.x, this has been disbled to allow the group feature to function. If you are only using single images or run separate copies of lightbox.js for singles and groups you can make the following mod to allow closing by clicking on the single lightboxed image:
// look for the following line:
objImageContainer.appendChild(objLightboxImage);
// then add this after:
objImageContainer.onclick
= function() { myLightbox.end(); return false; };
Thanks to Tyler Mulligan for this solution.
2 comments
Posted in prototype, ajax, dojo, mochikit
Fri, 30 Jun 2006 17:49:00 GMT
A little while ago I was looking at JSON and Catalyst::View::JSON (a server-side library to provide some JSON repsonse magic for Catalyst) and I discovered that AJAX libraries auto-eval JSON differently, Dojo looks in the response body and Prototype looks in the X-JSON header (read about X-JSON problems with IE 6). This got me thinking that there's no standard way for the server to tell what kind of AJAX library is making the request. Prototype sets the X-Requested-With and X-Prototype-Version as:
var requestHeaders =
['X-Requested-With', XMLHttpRequest',
'X-Prototype-Version', Prototype.Version,
For Dojo, some people are manually sending a request header along the lines of isDojo:true. MochiKit doesn't currently send an identifier.
I tend to prefer a bit more information such as the library version. Does it make sense for AJAX libraries to send a standard User-Agent along the lines of X-XMLHttpRequest-User-Agent (X-AJAX-User-Agent is shorter but may not be as correct; subsequent to the initial post, a discussion with Alex Russell generated the X-Ajax-Engine name which has been incorporated below). Something shorter is preferable but this is just an initial proposal. It would also remove the need for Prototype's separate X-Requested-With header since having X-Ajax-Engine set at all would indicate XMLHttpRequest. The format could follow the one established for User-Agent:
X-Ajax-Engine: <library_name>/<library_version>
This can be done manually with Dojo, MochiKit and Prototype as follows:
// in a Dojo.io.bind call:
headers: {
'X-Ajax-Engine':'Dojo/'+dojo.version
}
// for MochiKit:
req.setRequestHeader(
'X-Ajax-Engine',
'MochiKit/'+MochiKit.Async.VERSION
)
// in a Prototype AJAX.Request call:
requestHeaders: [
'X-Ajax-Engine',
'Prototype/'+Prototype.Version
]
Optional information could be added in parenthesis afterwards, e.g. Dojo Toolkit could include the edition name or something along the lines of "Custom Build" like (I'm not sure if other libraries have a reason to do this):
X-Ajax-Engine: Dojo/0.3.1 (BrowserIO)
If client libraries started using this or something similar, server-side identification could start (attempting to) depend on something that was standardized. Standardization can even be proposed as an addition to the W3C's XMLHttpRequest efforts. I think standardization would be great because it will probably happen eventually and for now it would make server-side identification more reliable.
UPDATE 1: Less than a week after I posted this, a related issue came up on the MochiKit Google Group involving adding a X-MochiKit-Version header to mimic X-Prototype-Version. I put in a word for standardization and after discussing this with Alex Russell (see below) posted back to the group. Seems like we may get a defacto standardization on X-Ajax-Engine which would be nice.
UPDATE 2: I spoke to Alex Russell of Dojo Toolkit about this and he thought this is a good idea. Apparently if you set sendTransport in dojo.io.bind, an identifier (but not version number) will get sent, however it seems not many people know about this. We discussed shorter names and Alex came up with X-Ajax-Engine. He mentioned he could bring this up at the OpenAjax Alliance.
5 comments
Posted in hacks, rails, typo
Mon, 26 Jun 2006 21:37:00 GMT
I've been using MediaWiki for a while and wanted its ability to auto-generate Table of contents for pages with multiple articles such as the homepage and the category pages. Typo is a Ruby on Rails app so you'll need to be somewhat familiar with it to make enhancments. I have this running on Typo 4.1.1, 4.0.0 r1188 and 2.6.0.
I came up with the following but it's still in the early stages:
Read more...
20 comments
Posted in hiring, mysql
Mon, 26 Jun 2006 21:36:00 GMT
I picked up a copy for Fortune Magazine's Secrets of Greatness: Teamwork! issue for the flight to YAPC::NA. There was an insightful article on MySQL. MySQL has 350 workers in 25 countries and 70% of them telecommute. This structure has led to some hiring practices contrary to the norm in other organizations.
- Employee characteristics: Given the decentralized nature of its organization, MySQL for skills, not the ability to play nice with a team.
- Finding talent: MySQL finds some of its talent (50+ employees) through open source cntributions to its code base. Others also look for developers among those that actively check in good code.
- Work schedule: CEO Marten Mickos says:
The brightest engineers like the calmness and coolness of the night
and likes hearing the following from prospective employees:question: How do you plan your day?
answer: I always sleep until 11 A.M., and then I start working
While working late at night seemed common when I was in college, when I got to the workplace many developers seemed to work a regular schedule leaving around 5-6pm, albeit in a regular office environment as opposed to MySQL's telecommuting environment. Do you like to work at night and is it common to come in "late" and work late at places other than MySQL? Also, in a non-telecommunting situation, is this mostly for developers without kids? If you do have a start late / work late schedule, why do you like it and what time to you tend to start work?
no comments
Posted in perl, logo, yapcna2006, yapc
Thu, 22 Jun 2006 07:22:00 GMT
The YAPC::NA conference doesn't have a blog badge yet so I edited one from another event. It's not official and just for fun:
You can add it to your blog with the following:
In your HTML:
<div id="yapc_badge">
<a href="http://www.yapcchicago.org/" title="YAPC::NA">
<img src="http://www.dev411.com/images/logos/ \
badge_yapcna2006.gif" alt="YAPC::NA badge" />
</a>
</div>
In your CSS:
#yapc_badge {
position: absolute;
top: 0; /* 10px works for Blogger */
right: 0;
}
UPDATE 1: This is now on the YAPC::NA Chicago homepage and Planet YAPC Chicago. Show your support :)
UPDATE 2: This is also seen in Jonathan Rockway's Catalyst Weblog Software presentation.
1 comment
Posted in typo
Wed, 21 Jun 2006 22:42:00 GMT
I just put together a dual-purpose Typo Theme Viewer. The first purpose is to allow quick scanning of all the themes at Typo Garden which are currently spread out over 14 pages. The second purpose is to provide an example using the Scriptaculous' Sortable effect. I've been interested in using it along with a fluid layout for a while but haven't had an application. Even here, it's more of a demo than some especially useful functionality but it's nice to see the effect in action on something more than a few random graphics. I'm still thinking about how to make the Web 2.0 functionality more useful.
The theme viewer lets you select how many themes you want to view per page so you can adjust it to however many look good in your browser. The pages will change accordingly. You can also see all the themes at once which I find very convenient.
There are some more enhancements I've been thinking about as Scriptaculous (or Dojo) experiments. Let me know what you think of it and what would make it better.
UPDATE: The theme viewer has been upgraded from the screenshot and description here.
3 comments
Posted in mysql, typo, apache, lighttpd
Wed, 21 Jun 2006 22:04:00 GMT
I'm giving Typo a shot after hearing some good things about it and having performance problems at a hosted blog service. It's been pretty good so far. Let's see how it runs in action.
I'm currently using the Lucid theme. So far I've played with Azure (the default), Lucid and Phokus. The default font size seems smaller than normal on other sites. Let me know if it's too small or there are other issues.
Up until now, my wiki has been the only app at this domain. I'm leaning towards putting commentary, questions, short summaries and the like in the blog while the wiki would still contain reference type information. To that end, I put up some detailed Typo install instructions covering MySQL, Apache, lighttpd and FastCGI on the wiki. Right now it just covers installation as I'm just getting into customizing the template. Let me know what you think.
no comments
Posted in ajax, autocomplete, dojo
Wed, 14 Jun 2006 08:39:00 GMT
Dojo Toolkit's ComboBox doesn't take a default value but one can be written in using JavaScript. The default value in the ComboBox dojoType is lost during onLoad when the dojoType widget is rendered. To get around this we can use JavaScript to fill in the value during dojo.addOnLoad. Here's the relevant JavaScript:
function init() {
var mycombobox = dojo.widget.byId('mycombobox');
mycombobox.textInputNode.value = 'Seattle';
}
// method 1
dojo.addOnLoad( init );
// method 2
dojo.addOnLoad( function() {
init()
} )
// won't work b/c you want to send an object
// not call a function
dojo.addOnLoad( init() );
The HTML:
<input dojoType="ComboBox"
id="mycombobox"
value="this should never be seen - it is replaced!"
dataUrl="comboBoxData.js" style="width: 300px;" name="foo.bar"
onValueChanged="setVal2"
>
A more detailed example of this technique is available on the wiki at Dojo Toolkit: Setting the Combobox Default Value.
3 comments
Posted in localization
Wed, 14 Jun 2006 07:05:00 GMT
Playing around with browser locale settings and the resulting HTTP_ACCEPT_LANGUAGE values, I've started to realize that websites often don't fallback to the language if you are using a two part locale they don't support but they do support the language only. Let's say a browser has the following preferences set up:
1. en-us
2. de
A website that only has en and de will typically fail on en-us and then return German. My intuition tells me the server would be more user friendly if it parsed en-us to try the language portion, en, before moving on to the next locale but there would be situations where the user won't get exactly what s/he wants? What do you think? Should servers fallback from two part locales to a one part language or should it be up to the user to manage it correctly in their browser?
no comments
Posted in venturecapital, strategy
Wed, 14 Jun 2006 06:32:00 GMT
YouTube may be the most popular video sharing website but according to a recent article on The Register they've burned through nearly $11.5 million in venture funding without any revenue channels. I've often wondered about this. What is YouTube's business model? It looks suspiciously like chasing eyeballs at the moment but I'm hoping one will emerge soon.
The article's main issue, that people give YouTube a "worldwide, non-exclusive, royalty-free, sublicenseable and transferable" license to use their work is also of interest. I wonder when we'll see them start to use those rights and in what ways. Will there be a backlash? For now it seems people either don't know about it or are trusting YouTube to do no evil.
no comments