Skip to content

All posts by moore - 58. page

GWT Marketplace

Two years ago, I surveyed the state of GWT widgets.  It was pretty fragmented and a bit confusing.  While I haven’t been paying very close attention, I don’t think things have changed much.

I was browsing around the GWT google group, and found this interesting announcement.

I’m a huge fan of GWT and the only problem I have with it is not really a problem with GWT but with the fact that there isn’t a centralized place for registering component and associated tools AFAIK.  I have created an application to do this which is available at http://gwtmarketplace.appspot.com/

I visited the marketplace and while it is currently in its infancy, it could be very useful. If you have GWT code that you want to share with the world, consider registering it. I added gwt-crypto, which I help maintain.

My experience implementing GWO for a non profit, part 2

I was finally able to get access to the wild.org server via FTP (previous cliffhanger resolved).  After cautioning me to be very careful (“please proceed with caution and help keep wild.org from blowing up…warnings from my IT guy”) Emily handed over FTP access.

I proceeded very carefully.

We had already had discussions about what we were going to vary to test the donation button.  Pictures, location of button, text of button, and text around button were the major variables.  One of the hard things about GWO is deciding what to test–the possibilities are infinite.  Even with our handful of variables, we ended up dropping some options and still have 100 variations to test!

Actually installing GWO was pretty easy.  The only wrinkle was the fact that the goal was a click of a button and not another page.  This post was helpful.  One item that that post didn’t cover was validation–GWO doesn’t let you start an experiment if the program can’t verify that the script tags are installed correctly.  Since we were doing a non standard install, I gimmicked up a goal page for validation, then added the goal tracking to the onclick event as described in the post.

So, the experiment is currently running on The WILD Foundation homepage.  It’s been running for about a week, and has only 1 non test conversion.  I worry that we are not testing big enough changes (a donate lightbox, rework the entire front page), but I think it makes sense to let the test run for a few weeks and see what kind of data we get.

Musings on php development as a career path

I was at a TedXBoulder preparty last night.  Ran into some really interesting folks–the usual tech folks, but also Charles, a high flying audio engineer (we’re talking Wembley stadium), Emily, a money manager bizdev lady ($30 million, minimum, please) and Donna, an engineer on leave from a big aerospace firm who is interested in entrepreneurialism.  Really looking forward to the talks on Saturday (tickets apparently still available).  I also ran into an old friend, roommate and colleague.

We chatted about a wide variety of topics, but one stuck out in my mind.  His brother is getting back into software development, and is starting out doing a lot of php.  Fair enough–it’s a great language, I’ve done a fair bit of it, and one can write good, maintainable, fase code with it.  But last night, we agreed that if you don’t want to be competing against, how do I say this politely, the lowest common denominator, it is wise to develop your software dev skills elsewhere, into one of three paths.  I thought it’d make a good blog post.  As I see it, the three options are

  • a compiled language–C#, Java, c, erlang: these tend to be used by large companies
  • a sexy dynamic language–Ruby, javascript (especially server side), groovy, python, clojure, lisp: my feeling is that these are more used by startups
  • particular packages in php–magento, drupal: these are often more configuration than coding, but can be customized to produce astonishingly powerful applications

The end goal, to be clear, is not to avoid php, but just to avoid competing against developers who are likely to undercut you.  For example, I knew of someone, in the US, who was doing contract php work for $18/hr a few years ago.  I just don’t think that’s someone with whom you want to be competing for business (I certainly don’t!).  Following one of the above career development paths will help you avoid that.  I personally have followed the first and third paths, with some dabbling in the second.

Blogger adds support for pages

I’m a big believer in simple websites that users can maintain–I wrote about how to set one up in less than two hours.  Snarky comments from Ralph aside, it’s a great way to get onto the web and add that much more credibility to any business you’re doing.

Blogger and WordPress.com are the two big options for easy, free web sites.  Blogger gives you more freedom in most ways, but until recently, came with a big downside–you couldn’t create standalone pages (for contact info, ‘about us’, etc)–everything had to be a post.  That’s changed: blogger now lets you create up to 10 stand alone pages.

Awesome!

My Firefox plugins

I recently moved to a new computer, and have been rebuilding my desktop environment.  I just wanted to list my Firefox plugins for future reference.

  • The Web Developer Toolbar lets you view css, disable javascript, resize your browser precisely, outline block elements and so much more.
  • Colorzilla is invaluable for a developer like me to copy a color palate correctly.
  • S3Fox lets you manage Amazon S3 buckets and their content.
  • Firebug lets you examine web pages in detail, including network operations/
  • YSlow is an add on for Firebug that evaluates site performance based on a variety of metrics
  • Some kind of whois tool–sometimes you need to know who registered that domain name

These are my drop dead extensions for typical web development work.  What am I missing?  Do you have any to recommend?

My experience implementing GWO for a non profit, part 1

A few weeks ago, I went to the most recent BDNT and saw a number of non profits present.  It was very interesting to see the vast range of needs and technical experience across the twelve non profits who actually presented.  Everything from a small webapp project to any web presence at all to updating a custom php webapp.

Most did a good job of containing their request to something manageable, though one group did get asked “Do you need a super volunteer or an employee” by Andrew Hyde, I assume because their needs seemed so vast.  The answer: no employee would be hired :).

After pizza (thanks BDNT sponsors! ) I wandered up to the group that had piqued my interest the most.  The WILD Foundation had an employee (Emily) whose job responsiblities included social media, a blog, and actively engaging the online community.  This strategy had worked wonders for the foundation’s web traffic, but for online donations?  Not so much.  This was the challenge she asked us to attack.

The session was moderated by Derek Scruggs and there were lots of great ideas.  To paraphrase, you could see where someone sat by what actions they suggested.  I mentioned Google Website Optimizer (a tool I’ve been a fan of for a long time); marketing folks wanted to focus on the message; some people wanted to change button color.  There were about 10 suggestions at the end.  Derek and Emily and the group then ranked them by effort (mostly group input) and priority (mostly Emily input).  Then we assigned tasks to volunteers.

I volunteered to set up a GWO test for the donate button on the WILD.org homepage.  We’re going to vary images and text to see if we can drive greater click through to the donate page.  Eventually, it’d be nice to optimize the whole process, but the actual donation page and donation thank you page are hosted on a vendor’s server, so I’m not sure whether we’ll be able to.

It’s been a week or so, and I still haven’t gotten write access to the template so I can add the code.  There are a number of reasons, and I think they might be common to all technical volunteer efforts, so I thought I’d outline them.

  • Exploration of technology takes some time.  I looked at the GWO for wordpress plugins, and found that they didn’t quite do what we wanted.  I also nosed around the existing site and found which file to change in the theme.  And I suggested what elements we might want to vary and ran those by Emily.
  • Time was a big issue; both mine and Emily’s was generally lacking.  Since it was a volunteer effort, I squeezed it in around work that paid.  Emily had to do her job first too.
  • Trust had to be established.  These folks didn’t know me from Adam, and yet were letting me edit one of their primary faces to the world?  Emily’s IT guy was rightly concerned about this, and insisted on a website backup.
  • IT issues–I had trouble editing the theme files, and working through Emily (with this being neither of our highest priority) to resolve the IT issue (basically, getting me an FTP account) took some additional time.  As mentioned above, there’s still an issue of not being able to track the entire donation process (so as to optimize it) because the WILD foundation uses a third party donation acceptance service.  I think we can make it work but wanted to get a win and build trust without having to involve a third party like the donation acceptance vendor.

However, it’s all coming together.  Once I get GWO up and running, I’ll let you know.

Should Google share its index?

Dion Almaer points to an interesting article about search engine indices,  proposing they be shared across search engines.  The article is worth a read, but the points are:

  • bots use a tremendous amount of bandwidth across the internet
  • they all get the same pages; the value is in their algorithms
  • therefore, the capacity of the internet would be increased if a company were to make their index available for all search engines to use
  • Google has the largest index, therefore it might be best if they did the sharing

I think there are a couple of issues with this scenario, but the largest is that having the biggest index is a competitive advantage for Google–why would they give that up merely to free up internet bandwidth that isn’t costing Google a penny? Stephen O’Grady succinctly sums up this issue.

In addition, I’m sure that any search engine company that was basing their results on an index would want to have a hand in controlling the index; Dion later suggests a third party index, but I’m not sure where the impetus comes for that.

I think this idea falls under the “wouldn’t it be nice” category, but don’t see any way to get from here to there.  Good intellectual exercise, though.

Upgrading WordPress is shockingly easy

I was all set to write a post about my experience with the most recent BDNT, when I got distracted by an excellent post from Josh Fraser about never using captchas–excellent post well worth the read. After reading through the comments, mollom seemed like a great way to avoid captcha and comment moderation, and I decided to give it a try. However, mollom didn’t work on my ancient version of wordpress (2.0). This being a weekend I’m heading out of town, it seemed like the perfect time to upgrade my wordpress site (the backend–I hope you’ll notice that the soothing front end look and feel hasn’t changed).

I browsed through the releases list to find the oldest one with automatic upgrade functionality, and then followed the quite painless upgrade guide. From there, it was a pretty simple matter to automagically upgrade to 3.0. Shockingly easy.

Overall, it looks like there are a few snafus–the home page didn’t have a sidebar because of post content for a bit, my tagging plugin doesn’t appear to be compatible with this version of wordpress–but it looks like all the content is there. If you see any content that looks broken, and you feel charitable, please post a comment on this entry.

More on code splitting and GWT

Code splitting is one of the features of GWT that make it worth your while.  See, using GWT is really a choice–do you want to use one of the lightweight javascript libraries like jquery, with all the agility that implies, or do you want to use GWT which lets you leverage all kinds of java tools and optimizations, but saddles you with a compile cycle?

I’ve talked before about the situations that I think are good fits for GWT.  I just re-read that post and don’t feel that things have changed too much in the past 3 years, though I might argue with point 4 of that post.  Code splitting is an optimization that would be hard to do with a more normal javascript library (dojo has something like it, but it looks like you are responsible for maintaining dependencies).

I talked before about code splitting, and how it is a great fit for the widget based html enhancing GWT development that I’ve done a lot of recently.  I wanted to talk a bit more about my process for finding code to split.

With code splitting, the main goal is “never have the user download javascript that isn’t used”.

The first thing to do is run your GWT compile with the -compileReport option, as outlined here. This will show you your module code, and therefore let you focus your effort where it makes sense.

The second thing to do is to find code dependencies.  The compile report shows you that in a text format if you navigate all the way down to the class level in a class that is downloaded in the inital fragment via the “see why” link.  I had a hard time understanding those dependency lists, so I went looking for a tool to help.  After trying a number of open source dependency analyzers, I stumbled on the Class Dependency Analyzer (CDA) which is free as in beer, not as in speech.  The key difference between this tool and others was its included dependency graphs.  You should set CDA up to ignore all the google code, as well as any third party tools you have.  More documentation on CDA here.  (This is another example of leveraging java’s tool set.)

Using CDA, you can see which packages (since modules are grouped in a java package) have dependencies on others.  Packages that don’t have dependencies on any of your other packages are great candidates for code splitting, as well as packages that depend on other packages that are code split.  However, if your packages depend on utility classes, especially those that share business logic between client and server side code, that’s OK.  (This exercise can also help in general code quality.)

Now you have a number of candidate modules.  The next thing to do is dive into the code and see if these modules execute on every page.  If they do, then doing code splitting is not a win.  All you’ve done is forced GWT to make an extra network call.  If, on the other hand, this code only executes when someone clicks a button or takes some other action, then you have a great candidate for code splitting.  And if the module only executes on certain pages (perhaps using a DOM element to signal whether it should execute or not), you have a good candidate–because with splitting that code will never be download on pages where it is not used.

Now, add the following code around the candidates:

GWT.runAsync(new RunAsyncCallback() {
public void onFailure(Throwable caught) {
// handle error
}

public void onSuccess() {
// do something
}
}

I actually added this code block to my eclipse templates ( more on templates here) so it is super easy to set up a split point.  Note that I haven’t found a generic good action to take on failure.  For most widgets providing enhanced functionality, a safe fallback might be to just let the HTML execute.  A custom message display might be ignored, and using Window.alert can confuse your users (and lock up a browser for a time if all of your code or the network suddenly becomes unavailable).

The next step is to run the compile report again and see if the GWT compiler agrees with you that your candidate code is not reachable by any other path.  If it does, you should see split points show up underneath the permutations menu.  (BTW, the -compileReport flag easily doubles or triples the time it takes to compile GWT–I’d recommend focusing on one user-agent and doing other things to speed up your compile, as outlined here.)  You can also test this by just compiling your GWT without the -compileReport switch and looking under the deferredjs directory; it is quicker but doesn’t help you determine which modules are being downloaded.  Firebug also lets you see the files downloaded on demand.

I was able to decrease the initial download size of a project I’m working on by 20%.

I’ve mentioned the caveats before but they are worth mentioning again.

  • The XS linker is not supported, so if any of your XS modules depend on a module which has code splitting, you’ll find out when your GWT does not compile.  However, there is hope–code splitting support for the XS linker is apparently coming with GWT 2.1.  If you need this functionality, vote for the bug.  There are some work arounds in the meantime, but they involve a fair bit of hoop jumping so I’m going to avoid documenting them.
  • Events that happen before code is asynchronously downloaded are not propagated to that code.

Given the second issue, it’s important to test your code and make sure that the behavior is unchanged.  That’s the final step.

I hope this was a useful tour of the GWT code splitting process.