Skip to content

All posts by moore - 77. page

Transcript of GWT talk

Here is a transcript from a tech talk about GWT by Bruce Johnson, who is apparently a tech lead over at Google. It’s from a TheServerSide.com tech talk.  You can view the video as well (I guess–I didn’t). Some very interesting stuff in there, even though it’s about two months old. Here are some excerpts I found interesting.

On why Java was chosen for javascript development:

We want a more mature language [than javascript]. The Java language has a lot of years on it now. We have a lot of developers that know Java. There are a lot of books, other supporting technologies, things like debuggers and JUnit, and there is a tool called ‘FindBugs’ which does static analysis. Have you guys heard of FindBugs? It is fantastic. It is like Lint on steroids. So, you really just point it at your Java source code and it says, ‘Oh, by the way, here is like 200 bugs,’ and actually most of them are really truly bugs. Code coverage, Javadoc, really good things, all available out of the box if you use Java.

FindBugs has an eclipse plugin, by the way.

On integrating GWT into existing applications:

Probably the single biggest thing that we have screwed up so far when telling people about GWT is all these demos are like from scratch demos, and we have worked so hard to make sure that you did not have to write applications from scratch to use GWT. So, I think so far that is the biggest flub. GWT does not require you to start over. So, for example, if you have a wizzy travel service application for example that is say, based on JSP, all you need in order to add GWT logic to a page is to drop a meta tag into your head and then have a DIV or multiple DIVs that act like place holders for where you want to insert GWT behavior, which means that your Java source could not be more loosely coupled with the page. Basically, it is only connection of the page is based on ID and then, however, many assumptions you want to make.

I’ve definitely found the above to be the truth. Using GWT to build standalone components is a low risk way to explore the technology and add value to your website.

All in all, an interesting talk, err, read. (Here’s another talk by Bruce on TSS.)

Webapp performance tuning tool list

Here’s a great article about performance tuning web applications. In short, have a goal, and measure, measure, measure. Otherwise, you’re just shooting in the dark at a pin in a haystack. Or something like that.

I’ve touched on the complexity of performance testing web applications before, but this article goes me one better by outlining various tools that can be used to actual test different pieces of the stack.

I did notice one missing piece, though. The SitePen folks outline tools to test from the browser to the web server, and then the database server. But they don’t mention any app server or web server profilers. I wonder whether that’s an unintentional oversight, or whether they haven’t needed to tune dynamic business logic, either in the app server or web server layer.

I don’t have any business logic layer performance tuning tools to suggest, either. Looks like sourceforge.net has a number of profilers–anyone have experience using one?

[tags]performance tuning[/tags]

Large varchar columns can lead to huge ESRI exports when using ogr2ogr

I was recently using ogr2ogr to convert, on the fly, some data in a PostGIS to other standard formats (ESRI and MapInfo). The ESRI export in particular had some problems–it took about 4 minutes for the export of an table with 11K rows and 37 columns, and it generated a 700M dbf file. This file was then zipped (with the other config files), and in around 6 minutes was compressed to a 7M zip file, that was sent to the browser. Now, you can imagine how thrilled a user would be to wait 10 minutes for an export. Apache was timing out (the default timeout is 5 min) and I was at a loss as to how to address the performance issue.

I mentioned this to a colleague who has significantly more experience with GIS tools, and he pointed out that in the source table there were several varchar(4000) fields. Now, in PostgreSQL, [i]f the string to be stored is shorter than the declared length … values of type character varying [varchar] will simply store the shorter string. But the ESRI export does not do that–each varchar(4000) field was padded to a length of 4000, even though none of the fields approached that length.

The solution? A few simple select max(length(colname)) from table and alter table statements, and the varchar(4000)columns were decreased in size. The dbf file decreased to a 50M file, uncompressed, and the entire zip file decreased to 5M. As you can guess, the download time was slashed.

Update 2/16: The kind members of the GDAL mailing list pointed me to a document listing all the limitations of the ESRI driver for ogr2ogr.  Check out the “Creation Issues Section”.

[tags]PostGIS, ESRI, ogr2ogr[/tags]

xo.com doesn’t allow file uploads using php

I’m doing some work for a client using the MODx CMS. I will be writing more about that cool framework later, but I wanted to let the world know that xo.com hosting does not allow file upload via php scripts.

It doesn’t matter what your php.ini file says, the hosting environment doesn’t allow it. I was so astonished by an email telling me this that I called their customer service. Very politely, the fellow on the other end of the line repeated the prohibition. I asked “So, if I need file uploads, the only way to get them is to leave XO.” He was pretty uncomfortable, but said that was the case.

I guess westhost.com has spoiled me. I simply can’t believe that a modern hosting service wouldn’t allow that kind of fundamental functionality.

Am I off base here? Do most hosting providers prohibit this functionality? Did I just not talk to the correct folks at XO?

[tags]php, file upload, xo.com[/tags]

Does any other blogging platform approach WordPress?

This person’s answer is ‘No!’. Looks like someone in the blog platform world has declared that the WordPress community has learned the lessons the Struts community learned a few years ago: If you document an open source system, provide plenty of examples and a supportive community, you can distance yourself from your competitors. Make it easy for the developers (QT) to choose you!

He states:

…the blogging market is c.l.o.s.e.d. – as in no more room, and most importantly, no more competition… [emphasis his]

(Regarding the strength of Struts, as of today, Dice has 1965 jobs matching ‘struts’, versus 176 for ‘rails’, 1481 for ‘spring’ and 493 for ‘JSF’. Now, it’s been a while since I commented on web frameworks, but it’s a pleasant surprise to see Spring approach Struts. Yes, yes, my methodology for documenting the ‘distance’ of Struts from its competitors is somewhat suspect. I don’t have access to book trends data, and what I can find doesn’t break things down to the framework level. Thanks for caring.)

However, Spring looks to be on the rise; even the most popular packages and/or platforms can fall from popularity. Especially in technology, where “new” is often a feature. Hence, I disagree with the statement that WordPress has locked down the blogging application market. My point is not argued from a knowledge of WordPress, but rather a knowledge of technology and tech trends.

Via sogrady.

[tags]wordpress[/tags]

Article on web searching techniques

Searching the web is a crucial skill nowadays. I have tech friends who don’t buy technology books anymore because the quality of content for developers is so high. I still buy the occasional book documenting technology, but I also spend a lot of time searching the web for answers to tech questions. (Still using Google, though I’ve tried Yahoo! and IceRocket). One of the reaons I write this blog is to document answers I’ve found; another is to try to provide answers for others.

In that vein, here’s a great post on advanced Internet searching techniques. These tips seem especially useful when searching for terms that might be obnubilated (there’s my 5 dollar word for the day!) by ecommerce sites.

[tags]oblique search techniques[/tags]

XHR Data Caching and the Dojo Offline Toolkit

I’ve found caching JSON to be very useful when writing GWT components. Basically, the XMLHttpRequest will go to the browser cache first, and if the data is (relatively) static, you can direct the browser to cache it. More about caching in this post. If the browser hasn’t seen that url before, it will get it from the server. Using some kind of rewrite tool to make sure the data page looks like a normal HTML page tends to be good form.

But the Dojo Offline Toolkit promises to take things to a whole new level. It’ll be interesting if he succeeds. I took a look at his milestone list, and there are a number of ‘Figure Out’ steps, as you’d expect with something this ambitious and new. Well worth looking at if you write web applications of any kind.

[tags]data caching,dojo,offline web applications[/tags]

Adding a tabview to an existing application with the YUI library

I recently built a small web application and the client requested, after a significant portion was built, that it be placed in different tabs. I immediately thought of the Yahoo! User Interface Library, which is a set of independent components “for building interactive web applications.”

I just wanted the TabView component, which is easy to just drop in and has pretty good documentation. This component is new in the 0.12 version of the YUI library.

However, FireFox 1.5 had an issue with the pages once the component was added. The different tabs would show up, but the bodies were all visible at the same time. IE6 did not have that issue, bizarrely enough. I asked some questions on the mailing list and received some helpful answers–the main things I needed to do were add the component instantiation function to the onload method of the window, and make my HTML valid. I used the W3C validator for the latter.

This post is pretty short, and I guess that’s the point–adding tabs to an existing application was pretty easy using the Yahoo! libraries.

Using the YUI library was simple and the support and documentation were good. I don’t like to think of how long it would have taken me to write a tab interface supported on so many browsers. If you need to retrofit some UI magic onto an existing application, or you just want discrete components for your web application (as opposed to the all in one approach of GWT), YUI is well worth a look.

[tags]YUI,web applications[/tags]

Social networking paper on First Monday

There’s a fantastic paper up on First Monday, an online journal I’ve written about before, “Friends, friendsters, and top 8: Writing community into being on social network sites”. It’s an interesting look at how social networking sites affect and are affected by their users. I’ve touch on this before in “Will you be my Friendster”.

Some interesting quotes from the paper:

Investigating Friendship in LiveJournal, Kate Raynes-Goldie and Fono (2005) found that there was tremendous inconsistency in why people Friended others. They primarily found that Friendship stood for: content, offline facilitator, online community, trust, courtesy, declaration, or nothing.

Or nothing! I wonder if this applies to business networking sites such as Linked In?

Talking about the early users:

Much to the chagrin of the developers, the early adopters of Friendster framed the social norms, not the system’s designers. Taking advantage of the technological affordances, early adopters used the site to meet their needs. In turn, because of the networked structure of Friendster, they passed on their norms to their friends. Their Profiles signaled what type of people belonged and their communication practices conveyed what types of behavior one could expect.

See Social Software and the Politics of Groups for more on how groups bend social software as they wish.

And from the conclusion:

Part of what makes the negotiation of Friendship on social network sites tricky is that it’s deeply connected to participant’s offline social life. Their choice of Friends online is not a set of arbitrary personal decisions; each choice has the potential to complicate relationships with friends, colleagues, schoolmates, and lovers. Social network sites are not digital spaces disconnected from other social venues — it is a modeling of one aspect of participants’ social worlds and that model is evaluated in other social contexts. In thinking about Friendship practices on social network sites, it is crucial to evaluate them on their own terms, recognizing the role of technology and social navigation rather than simply viewing them as an extension of offline friendship.

The paper is long but well worth a read.

[tags]social networks, friendster,myspace[/tags]