Archive for the ‘Software Design’ Category

Naked Computers

Tuesday, September 9th, 2008

Think about your current career.  Now, think back to an object that you loved that influenced your decision to follow that path.  For me it was a Commodore 64 that an uncle owned.  Anytime my uncle was away I’d sneak in some programming time, making the machine blink its borders, or animate a smily face across the screen, eventually freaking out my mom by writing a program that wrote “This is GOD speaking!” across the screen while blaring a crazy synthesized seemingly infinitely ascending tone.  Now think about this: can today’s computers awaken that curiosity and sense of awe that eventually lead you to a career in computers or are they now so opaque that, unless someone purposefully installs a programming environment, they’re unlikely to engage with the computer in a way that leads you to experiment with it?

I started thinking about this when I was reading a review of Falling for Science: Objects in Mind, a book that asks a similar question: what beloved object began your love for science?  The book consists of 51 essays, including some from senior scientists, answering that question.  You can probably guess some of the objects, like LEGOs and computers, for example.  But some objects are a little more surprising, like chocolate meringue pie and My Little Pony.   

My initial reaction was a nostalgic feeling that, no, today’s computers don’t lend themselves to that type of engagement, they’re opaque, not transparent .. get it? naked … nevermind.  Sure, today’s computers come pre-installed with software that lets you make movies, music, and write documents; programs that lets you create stuff and, an environment with tool for creative activities, but activities unrelated to computation.  I think of today’s machines with tons of craplets and compare it to my first PC, which had BASIC and the source for a little game about a monkey that hurled bananas; basically, stuff that let you play with the raw bits of the machine.   Yeah, the end product oftentimes was a video game, or some multimedia thing, but I had to translate from computer code to sounds, graphics, or algorithms.  That’s the sort of stuff that led me to my interests in computability theory, communication, and HCI.  My social and physical interactions with computers have had tremendous influence on what I’ve done, even down to the subject of my college essay.  I think that’s why the mac feels like such a great environment; because it comes with all the media stuff installed AND with programming and scripting languages that let you muck with the machine. 

I really like Turkle’s concluding remark that “at a time when science education is in crisis, giving science its best chance means guiding children to objects they can love”.  

Useful Patterns for BlazeDS

Tuesday, June 3rd, 2008

Neustadt, Dresden, Deutschland

While running the Los Angeles Flex Users Group I got a lot of questions from people about how BlazeDS could fit into their existing infrastructure.

Typically, they will have an application container, such as JBoss, or maybe just a servlet container, like Tomcat, and a SQL backend. Usually MySQL or PostgresSQL. JSPs are used for the presentation layer and, sometimes, they may use Struts or SpringMVC as a web application framework. If you’re using ColdFusion this post is likely of little use to you.

Many programmers are understandably weary of introducing yet another component into their system and BlazeDS sounds like such a complex component that it’s often mistaken for a standalone application container that doesn’t readily integrate with standard Java application containers. This couldn’t be further from the truth. Those programmers who follow the bundled BlazeDS examples get stuck trying to figure out how to expand the example to fit their application or how to even start from scratch.

Let’s tackle the first misconception, that is, that BlazeDS doesn’t play well with Java application containers. To put it simply, BlazeDS is configured as a standard servlet. When a Flex client wants to make a request to a BlazeDS server it will issue a POST request to a defined servlet path. That path is whatever you configured the BlazeDS MessageBrokerServlet to. Flex sends the request as an AMF binary payload or an XML version of AMF. I’m glossing over some details but just knowing that you can access BlazeDS as a servlet is a good starting point for figuring out how you can start integrating BlazeDS into your existing application.

What this means to you is that BlazeDS can use container authentication or even work with Spring.

Let me make it even more clear by putting some sample configuration and code.

Here’s the part of the web.xml in which you declare and configure the MessageBrokerServlet:

<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
</servlet>

Here’s the part where you map the MessageBrokerServlet to a path:

<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>

The file “services-config.xml” is the primary configuration file for BlazeDS. Here is where you define a “channel”:

<channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://localhost:8080/sample_bds/messagebroker/amf"  .... />
</channel-definition>

This tells the Flex client where to make an HTTP POST request when using the “amf” channel on a RemoteObject, for example.

In fact, try it out on a browser, startup BlazeDS and point to htp://localhost:8080/blazeds/messagebroker/amf/

You’ll get a blank page. That’s a good thing!

The next question I usually get is, “do I have to dump my JSP/WebServices/Struts in order to use BlazeDS?” The answer is definitely no! In fact, if you have a JSP AND a WebServices front end to your application you’re a good bit along the way towards integrating BlazeDS. The reason for this is that if you have two front-ends to your application, and these two front-ends share some functionality, then you have probably structured your application in such a way (using a Service Layer, for example) that makes it easy to add a third front-end.

So what architectural patterns are useful for BlazeDS? To cut to the chase, I use Service Layer, Data Transfer Objects, and Mapper (or Assembler) on the server side. I’ll have a post on what I use on the client side later.

If you have played around with BlazeDS or used it to create a production application you’ve probably followed the examples bundled with the turnkey solution. And you probably have a hunch and instinct about how to create your app. I’m guilty of jumping right in and starting to code from my gut, but after a few days of learning a technology I like to step back and formalize my approach. My first place to consult is Martin Fowler’s Patterns of Enterprise Application Architecture (PEAA), and Design Patterns: Elements of Reusable Object-Oriented Software (Typically referred to as The Gang of Four Book, or GoF).

Service Layer

A Service Layer can have many methods, each using a variety of domain objects and models. Service Layer have application logic, like telling an emailing component to notify administrators that a payment has been processed, while delegating the business logic to the domain models. It’s pretty easy to figure out what types of methods a Service Layer should support; you can use the user interface as a guide to what sorts of things a client can do or you could base this off your use cases, if you’ve taken the time to do this.

The defining characteristics of Service Layers are the following:

  • Defines application boundaries
  • Defines available services from the perspective of interfacing clients
  • Encapsulates business logics
  • Provides convenient place for handling transactions, logging, etc.
  • Prepares the response appropriately for the client

That last one brings me to the next pattern I use.

Data Transfer Objects

These are objects that have a bunch of properties, contain no domain logic, and may be structured in a simple hierarchy. When I first started with BlazeDS I was using an Hibernate as my object-relational mapping (ORM) solution and so I was happily transporting the objects I got from a database straight through BlazeDS and over to Flex. Some of my objects had few methods for domain logic, some had more. Few had a complex hierarchies.

Once I started adding parent child relationships and collections then I suddenly encountered a problem where retrieving one of these objects would cause Hibernate to recreate a pretty huge hierarchy. Just as bad was a problem with transactions; when you’re about to send an object down the wire, BlazeDS will call each of its getter methods and each of those Object’s getter methods in turn. This is why it recreates entire hierarchies, but if you close the Hibernate session before BlazeDS has a chance to get to these methods then you’ll get an exception because the Hibernate proxy object can’t get a hold of a session with which to get the rest of the objects out of the database.

There are ways to go around this, such as using the Open Session in View approach, and that works well, though I found it felt awkward because of the name, since the “view” part of this is that hibernate objects are being used by the view and so the session should not be closed, but I also didn’t need to load all the objects that were connected to the one measly object I wanted to read.

I could have used the custom serialization method specified here: Using custom serialization between ActionScript and Java.

So, the simples solution I finally adopted was to use Data Transfer Objects. Characteristics of DTOs are the following:

  • May contain aggregated data
  • Fields are simple, such as primitives, or other DTOs

The pain of adding DTOs is that you now have to transform some of your domain models, in my case, for example, some of the objects gathered with Hibernate into DTOs. So you have to use the Assembler (or Mapper) pattern. An Assembler can take care of:

  • Knowing how to transform an object into a DTO
  • How to reconstruct hierarchies for DTOs
  • Keeps the domain model independent of external interfaces
  • May make use of more than one assembler per dto based on the semantics of the request.

Now I have no problem with building deep hierarchies when I only need one object. If I do need the complete hierarchy I can use a different assembler that knows how to reconstruct that. That’s what the last bullet point on that list is talking about; if it makes sense in one request to bring in all children and grandchildren objects then an assembler can know how to do that, if, instead, all you need, is the one object, then that’s all the other assembler needs to do. In my case, I now had better control over when I could close the session without having to worry about Session closed exceptions.

An additional benefit with respect to BlazeDS and Flex is that the RemoteClass mapping from Flex to Java can always map to DTO and you won’t have to worry about changing your actual Domain Objects and having those changes reflected in the mapped actionscript class; if you remove a property from your domain object then the Java compiler will complain because the assembler will be unable to access that property. You’ve caught the error earlier on.

I didn’t talk about the client side much. I’m working on another post that will address that side.

Your Personal Site as a Social Stream

Friday, May 2nd, 2008

I read a blog post by Jeff Clavier about Twitter, Microblogging, and when Twitter might go mainstream.  I thought, yeah: I publish much more often on Twitter, Flickr, Facebook, and am starting to mess around with Muxtape.  So I looked around for a widget for my blog where I could put up my different streams from different social services.  I found friend feed and thought it’d be good to put on my blog.  That’s when it hit me: why not just make my stream my home page?  Why not replace my whole blog with my social stream, and just make my longer entries part of that stream?  So I whipped up a script in a few minutes and came up with what you see on the front page of my site.

Is this the way we’ll start to see online presence for those of us brave enough to run our own blogs?  Basically, this is a way to publish feeds from your online identities, not to aggregate feeds you’re interested in.  It’s not a personal feed aggregator.  It’s a starting point for people to get to your online identity(ies).

I have a bunch of ideas for this.  The initial, quick and dirty, version of these scripts is setup in a somewhat modular format, so as you sign up to new services, or new services appear you just drop in a new module and it will load those up.  Each item from each service can be customized as you want using CSS.  And you can control how often it should aggregate your content.  The source is coming soon but if you want to play with it I can post it.

Let me know what you think.

Battle for the Green: LA vs SF, Unrelated: Adobe Open Source Project Management

Thursday, April 24th, 2008

Graffiti in venice

I was just catching up on my SFist LAist reading and was reading through the comments on a post linking to an LATimes story comparing LA to SF on a green scale. turns out sf wins. Then I saw this comment I thought “Oh no you di’n't”

i have always promoted the awesomeness that is SoCal. without SoCal (specifically, without LA), SF is just another Portland. and i don’t mean that in a good way.

Completely unrelated … I was catching up on BlazeDS forum reading and saw a very good question about OS project management on the project.  Here are the questions:

  1. Who is the project manager(s), senior leads, etc?
  2. What is the experience level of the project management staff and contributing developers?
  3. What is the release schedule? What was the historical release schedule?
  4. What version is BlazeDS in right now?

Tom Jordahl, CF 7 & 8 architect and BDS/LCDS know-it-all, gave a good reply and the about page gives a highlevel answer to the questions, but it’d be great to see this more formalized, either as wiki pages with contact and role information about the higher level participants and accepted contributors. It reminds me of how tricky managing and leading an os project can be, and how much work it’s actually required to get do it right. It’s specially tricky for a project backed by a commercial entity because confusing or missing information can quickly bring suspicion from project users.

If you’re interested in finding out more about BlazeDS I suggest you watch the talk Tom Jordahl gave to the Connecticut CF user group.  Also, what’s up with those adobe forums? The formatting’s bleh and it pukes on multipart messages.

Open Source Creds and Others Reactions to the Microsoft Technology Summit

Saturday, March 29th, 2008

Here’s a quick list of blog posts about the Microsoft Technology Summit 2008 from people who were there. If you have a link to one please send it to me.

Paul Jones:
Don’t pitch me, bro!

The Real Adam’s impression of Open Source at MS:
http://therealadam.com/archive/2008/03/27/open-source-and-research-at-microsoft/

Luis Villa, who managed to quickly dismiss me and others who care about open source by saying “almost everyone was in some way a user or developer of open source technologies (the rest were flash/adobe people)“. Nice way to form alliances.

http://tieguy.org/blog/2008/03/29/microsoft-technology-summit-mts08/

The company I run is built on open source technologies, for both commercial and philosophical reasons. I use flash because it’s the best way to deliver the service to my costumers. The rest is python, mysql, php, apache, jabber, java, django, bsd and lots of other things. But, I shouldn’t have to list my open-source creds to be legit.

This reminds me about another thing I noticed at the summit: some people who are extremely passionate about their respective domain are, as my best friend often labels me, “ANTI”. You’re in the belly of the beast, in the borg! And you have the borg’s ear. Rather than showing how indignant you feel about M$ and what a shitty, enslaving, conniving, greedy, dense, stupid company you think it is, how about finding some common ground and seeing how you can work for the common good? If I missed some adjectives regarding M$ please send those to me, they will be promptly appended to the previous list.

And also, like I mentioned in my previous post: from what I saw, Microsoft Research is Research with a big “R”. That’s academic type research. The reason there is no iterative process or user engagement is because such research is not typically amenable to iterative process and user engagement; in other words, it’s not Product Testing. Some areas of study, like social computing, HCI, user interface design, cultural effects on user experience, and stuff having to do with people will have limited user engagement, typically called debriefing, after testing theories with experiments. Because you are trying to find out one thing, you control for many factors, much as in academic research. So, you can’t have the same free-form, back-and-forth user-feedback-loop that you should when developing and product testing. The way Research works is you first come up with a theory. For example, that green buttons are easier to click on. Then you create an experiment where you control for all sorts of stuff so that the only variable that changes is the green button. Then you have people click on the green button, and then you report your findings about how that one variable proved or disproved your theory. Then you provide some potential reasons why your hypothesis is true or false, sometimes pointing to previous Research. Some time, later in the future, maybe years into the future, the results of that research are used inside a product. At that point, you might, if you want your product to be good, engage in iterative development and user feedback.

Often I heard the question: “Why should I care?” Why should I care that, say, ASP.NET MVC, exists when I already use Rails? Why should I care that Silverlight exists when I use Flex? I have the same visceral reaction when listening to the Silverlight talk, but that’s just my initial reaction because I’m invested in what I’m already using. After thinking about it for a minute, I can come up with a few reasons why I should care a little more, and why I shouldn’t feel indignant about the fact that M$ is building a clone. As The Real Adam pointed out in his post “Important Ideas in ASP.NET MVC“:

The most promising thing about this tool, to me, is that MS is guiding people down the unit testing path by default

What about Silverlight? It might be a better tool for a client or product, but not yet. Hey, choice is great sometimes. These are purely pragmatic reasons. And if a programmer learns to do testing in one language then she’ll be at an advantage if sometime in the future she has to develop something in Rails and she’s already familiar with unit testing thanks to her having learned it first in ASP.NET MVC. Note to microsoft, drop the .net thing =s Skills transfer is an important thing that M$ cannot control. I learned to program on the C64, then on Borland’s Turbo Pascal, then on Borland’s C/C++, then on Microsoft’s C++ compiler. Then, I magically transfered all my programming skills that I learned in close-source commercial implementations to GCC, python, ruby, PHP, using vim or emacs. Lock-in is not so all-consuming on the developer skills end as it is on the product usage end.

Some thoughts on “presentation fu”: I had ample notice from M$ about this summit. So I was disappointed when some of the presenters seemed to have recycled product pitches and tech talks created specifically for audiences already receptive to and interested in the M$ pitch. This could have been a chance for those presenters to really think about their work in relation to OS, Rails fanboys, Apple Fanboys, Flash Fanboys, etc, basically, to the audience. They could really have thought about how their work fits with the current trends in the online sphere. Maybe I was mistaken about the purpose of the summit? Anyway, there was plenty of time to at least drop a couple of slides addressing these issues. I’d get the summit managers to see how the talks fit in with the summit next time. I heard John Lam praised in the few discussions I had with other attendees about this particular topic. You’ll see his name in some of the posts on the above blogs. He certainly had the presentation zen, or whatever, while talking about IronRuby and the Dynamic Language Runtime. He put it nicely when he showed a slide with MS/APPLE/The Penguin at the bottom, IE/SAFARI/FF (where’s opera? nudge, wink), above that, and the stuff that really makes the web tick, the services and things people build for it, above all that. He said, and I agree, that the browser and the os are uninteresting; they’re just fancy rendering engines. He also said that people are interested in the source for frameworks, not for browsers. How true. I’ve often heard the question asked during Flex conferences why the Flash players is not open source? First, you probably will not download it and recompile it yourself. If you will, you will have exactly one user. Second, there are so many licenses to sub-components of the player that it would be plenty difficult to get lawyer$ to let you open source it. The same applies to the browser and maybe the os. I care more about why DRM is in the player, clear and consistent policies on spyware, adware, and user privacy while using that player. Anyway, John Lam even managed to keep me wondering if the presentation was done in Apple’s slidemaking thingy until he alt-tabbed out of it into vista. Still, he was running Vista on an Apple (i heard my nascent apple fanboy side say). What? No open office?

BTW, I saw zero GNU/Linux laptops at this summit; I left mine at the office.  I stand corrected on this point; thanks to Paul Jones for pointing out that Luis Villa was using one.

Personally, I’m glad for the opportunity to come and engage with so many smart people, both attendees and presenters. Special thanks to The Real Adam who was thoughtful and engaging when discussing our reactions to the summit while there.

Oh yeah. Just to be fully transparent here: M$ paid for my travel, stay, and food.

Microsoft’s Playing Catch-up

Friday, March 28th, 2008

This is the third day of the Microsoft Technology Summit. I’m thankful it is only a half-day because I’m all .NETted out. That’s just the nature of these types of events; I work with Flex all day, but when I go to Max or 360|Flex, I’m all Flexed out by the end of these conferences.

There were two main things I got from this summit:

1. Microsoft is playing catchup: They know they’ve missed the boat on this generation of web developers, that is, the folks who are working with rails, django, social networks, and open technologies. To address parts of this they’re providing ASP.NET MVC (rails), Silverlight (address Flash in silverlight 1; Flex, in silverlight 2), Hibernate (parts of LINQ), and the Dynamic Language Runtime (dynamic languages). I’m not saying I’m not impressed with what they have come up with.

2. Open web: OpenID was the prominent example of an open web technology during the two days. MS is playing a significant role in defining it, but the main questions during the two days were “why is MS not doing more to push it by providing implementations and integration points in its current products?” and “why are they not leaders in this?” I think the trust issue is big, too, with many people commenting that although they appear to embrace it, are they actually doing it for the “right reason?” or is it just for the bottom line.

Thanks to all the folks that I got to talk to during the event.

Microsoft Technology Summit 2008 - Day 1

Wednesday, March 26th, 2008

I thought I’d jot down a couple of things about day 1. I wrote out the details live on the chat over at http://www.chatopica.com/topics/flex/

Time at Microsoft is Variable

 

Microsoft Psychological Distress Mechanism

First, the attendees are a variety of people including enterprise architects at large corporations, popular mainstream bloggers (http://www.codinghorror.com/blog, http://www.davidrecordon.com/) and developers, people working in academia, java and Flex user group manager, and others. The purpose of the meeting, according to Microsoft, is to engage in conversation about their technologies, their roadmaps for their products. In this process they get to find out what people who don’t use Microsoft technologies think about and perceive Microsoft and its strategies.

We started off with Karri Dunn, Senior OSS Dev Lead of Platform Strategy & Sam Ramji, Director of Platform Strategy. Sam said Microsoft’s Open Source website (http://www.microsoft.com/opensource/default.mspx) was created to provide a unified statement about MS vision of open source in their roadmap. I had a good quote here about the reason behind it which went something like “to stop people from coming up with their own MS open source stories”, which included microsoft and non microsoft people but, being an inexperienced journalist i didn’t write any of it down and thought i’d be able to commit it to memory. so there you go, shoddy reporting. There were comments from invitees about how microsoft was trying to frame the discussion.

Kevin Schofield, General Manager of Microsoft Research talked about how research works at MS. Researchers, he said, are free to pick the area and problem they want to research. They have thought about and looked at how other companies do research and how much should be driven from a central place, or from business divisions. Some of the downsides are that taking direction from business divisions could cause researchers to focus on short term projects. One of the things that impressed me was the long view that MS took to research. Kevin talked about how they know that once a research project is complete it might take years, sometimes 10 years, sometimes 25 years, for it to become useful in a business application. That it also takes a long long time to refine it; meaning you might have the solution down but to actually get it to the point where it can be used in a product might take many iterations and lots of other work by developers before it can make it into a business product. This is a process they call Tech Transfer, and one of the important lessons he says he learned was that tech transfer is a social process. It requires relationships, communication, and trust. Unfortunately we didn’t get to go much in depth into this. One of the signs of commitment that MS has towards research is that they have yet to cut it during economic downturns, said Kevin. And that this usually happens when research is influenced by short term outlooks.

I thought there were a few pre-conceived notions about research project’s source code from the audience when the question was asked about why source was not provided. Kevin pointed out that many of the projects on the MS research site make the source available. Then others asked why it was not more open source driven. We couldn’t get into it because of time constraints but I think that managing an open source project is a serious undertaking that a researcher focusing on a problem does not have the time to manage. In fact, the lead researcher may not even have the skills necessary to run an os project.

There were a few other questions that made me realize that maybe the way research projects works wasn’t made clear. For example, some people asked why the customer was never involved in the research. I think some projects are amenable to research. Those are projects where user interaction actually takes place, but it’s probably not going to be the regular ms customer, and the setting and presentation have to be free enough from MS baggage that it doesn’t influence the results. Imagine you are testing a novel way of presenting structured data to the user. It’s one thing to test the effectiveness of how an MS product will perform with the user, but if you want to get at the base question, that is, does presenting data in, for example, an isometric view makes it easier for people to remember where they put data, then you have to do it free from stuff that might influence your result.

Someone asked about the percentage of research that become products and Kevin’s wild guess (it was a wild guess, he said he didn’t actually have an idea) was 25% or more. Some thought this meant that MS Research was extraordinarily successful and Kevin agreed.

Scott Guthrie presented on ASP.NET MVC. This was more of a tech presentation where we went over code and he showed how to do basically what Rails, Django, and other MVC frameworks are already doing. Someone asked him outright if Rails influenced the creation of ASP.NET MVC and he said not really. I’m not sure. In my opinion, I think it was more so than he’s letting on to be. Someone said, it’s cool but why would they use it when they have other options. I think the only compelling argument I heard was that it provides really great integration with their development tools; you get intellisense (auto-suggest), data modeler, debugging, and such. I spoke to some attendees who were on the fence about picking an MS technology on the server and this aspect, tool integration, was what impressed them most. My personal opinion, not that anyone asked, is that I’m not familiar with IIS, or .NET, and I’m happy enough with the tools I use (vim, eclipse, php, django, mysql, etc). But I think developers who are used to MS technologies will greatly benefit from this framework, AND, if they were never going to jump on Rails or some other framework, then this gives them a way not to miss out on the great productivity improvements you get with a good MVC framework.

I asked an MS employee (sorry, forgot his name but he’s a real nice guy) if there was a community project that was trying to implement an MVC framework on ASP.NET, and if so, why did MS not work with them instead of creating the thing themselves. His answer was that there sort-of was but that once MS came out with the framework they were happy to build on top of that rather than write it themselves. I guess that’s one difference between camps ;) I mentioned to him that the majority of the Flex community is adamant about not having Adobe sanction one particular framework, but that it is valuable for a strong entity to back some of them because it makes adoption at some companies easier.

Brad Abrams

… except on my friend Sven Claar’s Mac

Next on, Brad Abrams, Principal Group Program Manager for the .NET Developer Platform (phew!) presenting on Silverlight. It still catching up to Flex. I think I’m prejudiced in thinking about Silverlight in relation to Flex, so when he showed a video of flashy video players and moving buttons and said that those were demonstrations of things whose features were primarily addressable by Silverlight, my thought was: bullshit, I thought, you can do that in Flex. But, of course, no one was talking about flex, and indeed those features, i.e. video and fancy buttons, are addressable by Silverlight, if Silverlight is the only player in town. Look at the puppet!! Another reason was the clients had a lot of video in some windows codec and did not want to pay Adobe for the license for the video encoder … The demos left a lot to be desired. For example, one of the apps built for the San Diego Zoo was the simplest of apps, one that could have been whipped up in Flash in no time and with no performance problems, but somehow Silverlight crapped out on it. The app had a basic vector based drawing of the San Diego Zoo with some semitransparent widget window thingy on top. You could click on a spot on the map and it would calculate your route through the park. But the app just stopped responding and we didn’t get to see other demos. Sucks when your demo blows up during your presentation.

He, Zack Stepeck, and I spoke about Flex, Silverlight, and the RIA ecosystem. He asked me if there were some things that Flex failed at. I’m not sure there are any enormous problems that would make flex fail, but I do think it could use work in a few areas. Two important ones are: more control of class loader management for the developer, and a good plugin framework, something like in OSGI, with manifests, provisioning, and dependency loading. I know, Flex has the modules framework, but from the few examples I’ve seen where it is used in a crude way, where the modules are loaded in the background instead of being loaded partially on demand with features exposed as extension points filled in by proxy objects and then instantiated or loaded when actually accessed. It sounds like Abram’s team and Silverlight might have something like this, including declaring extension points. I think that is a pretty compelling selling point for RIA enterprise architects who cannot afford to build giant, monolithic apps.

Attention to this sort of thing tells me that there are people in MS thinking about the classic developer.

One of the sessions that got people really worked up was the Windows Live Platform. I heard over dinner that if they had come out and said: “look, here are a bunch of tools that you can use on your web platform if you want to take advantage of them feel free to use them”. So, what was the demo? Well, a not very compelling way of sharing videos on http://premium.quiksilverlive.com/. You can see your MSN buddies on the page, click on the ones you want to share the video with, and then go into a group chat session where you can all chat and manipulate the video inside the chat window. uh, ok. So you get your chat buddies in the web page. Can’t I just paste the link into MSN, or AIM, or GTalk, and have them all go to the same page? Yes, but the video won’t show up in the group chat window. Uh, ok.

Now, the compelling thing here should be that you have a way for a site to let you share it so that the site can spread. But when it suddenly got trapped in the msn chat window that seemed to lessen its value. It was a weird presentation. And it really got people worked up. They talked about Facebook and how they leverage feeds. Someone wanted to be able to have hotmail provide APIs so you could put your app in there.

Andres Hejlsberg talked about LINQ, which looks like SQL in your code, only it gets translated into C# that looks like Hibernate criteria objects. The cool thing that I got out of this talk was the stuff that lets LINQ exist. Basically, there’s something in the language that lets you create these expressions that can be analyzed because they have an AST attached to them and then compile that at runtime and execute it.

I’ll write down the discussion we had with Roger Slobe, the guy who’s managing the whole Olympics infrastructure and why they are using Silverlight, and a David Recordon on OpenID.

Kool-Aid? That’s for suckers

 

Plasmid Map Drawing Code - Part 1

Tuesday, December 4th, 2007

A while back I started working on a project with a friend at UCLA’s MBI which we called the Schneider Suite. The first bit of code I wrote for this was a circular plasmid drawing library for use with python Tkinter. I stopped working on the suite altogether while I started my business but I figure I’d put a screenshot up in case anyone is interested. I’ve updated and cleaned up the code a bit and ported it over to wxPython. wxPython is a great cross-platform GUI framework. I’ve used it to create an entire process control system for carbon nanotube synthesis, so it’s very powerful and extensible.

Here’s a screenshot of the new plasmid drawing library:

plasmid_test_2007_12_04.png

Here are some of the current and planned features:

  • Draw start and end arrows for segment. Segments can be flat ended or have an arrow at either end.
  • Specify colors for rail, segments, markers, labels, and label guides
  • Customize width of arrow tips and arrow head length.
  • Customize display of plasmid map rail (those two inner circles you see on the screen shot).
  • Offset the plasmid segment (so you can overlap markers and segments).
  • Draw flat tick markers (single line segment instead of full segment).
  • Labels (in process, i’m porting it over).
  • Hot-spot detection (have segments respond to mouse events - in progress).

No code yet, but soon I’ve lost it, unfortunately.

Fun new AIR game: Chipwits

Sunday, November 11th, 2007

Those of you who were typing away on your Apples and C-64’s back in ‘84 might have spent countless hours programming a tiny robot on roller-skates to do your bidding in a fun game called ChipWits.

ChipWits on the Mac

Well, Dough Sharp, creator of ChipWits has given written the next version of ChipWits using Flex and AIR.

ChipWits on AIR

ChipWits is a fun and addictive puzzle game in which you program a little robot to execute a series of moves and complete the level. Along the way you’ll pick up new commands, which you’ll use in later levels to instruct the robot to perform more and more complex tasks.

Download it and give it a try!

Suppress that Reflex: Think about user experience when evaluating Flex

Tuesday, October 23rd, 2007

Someone in our chat pointed me to this great article by Yakov Fain, of Farata Systems. This is a must read for anyone evaluating Flex, either as a developer or as a product manager. Here is the article in summary:

1. Flex 2 is not a RAD tool
2. The pool of Flex developers is still limited - retrain your developers
3. Check the credentials of the vendors you hire
4. Be careful with frameworks - use components
5. Architecture - Avoid monolithic applications

I want to add another point: Think about user experience.

I get the feeling from talking with many developers, clients, and prospective clients that they think adding a little bit of Flex will compensate for the poor look and performance of their existing site. I recently had a potential client ask me to help re-write a web application that was not performing well. They felt that certain features were being underutilized because the existing HTML-based site made it hard for the user to figure out where to click, what to do next, what was available to do at the time.

They thought Flex would be able to solve this. But when I saw the initial design for the Flex rewrite it turned out to be very similar to the old HTML app. Sure, Flex offers new affordances and UI elements like transitions and effects to guide the user’s action through a complex form, but can this overcome a confusing information architecture? Why jump right in and recreate everything from scratch? Take incremental steps instead. Figure out what can be changed on your site/app to make it easier to use, easier for the user to figure out what actions are available to them. If you’re starting from scratch, Flex might be the way to go. But, take some time first to evaluate the pros and cons in terms of development and user experience.