Tuesday, October 7, 2008

Advanced Query API (in javascript!)

We're seeing a lot of downloads of our current WW.DataServices version. Those people are enjoying a tool that automatically builds their back ends for them, including a SOAP Web Service layer. That's just the beginning though.

This upcoming release (soon, I promise), has much more. In this post I just want to briefly describe the Query API, which is a series of new web methods in the WW.DataServices auto generated web service layer, as well as an auto generated javascript data entity layer designed to make it super simple to query your data from a Rich Internet Application front end. This means your back end will be instantly mashable! Just think for a minute about how powerful that is.

Ok, now let me show you a bit of code to explain the kind of power I'm talking about.

var customers = Northwind.CustomerCollection();
customers.showGrid();

You'll be able to write the above javascript in order to query your web service, get all the customers, and display a rich grid (based on extjs.com). All the AJAX, web service proxying, wiring, JSON/XML serialization, etc. will be handled for you automatically. Furthermore, the grid that gets displayed will include, out of the box, a search box toolbar, pagination, double clicking a record to pop open an auto generated form for editing, and of course sorting. All with just two lines of code (see screenshot below)...

customer_grid

So, now what about something a little more interesting? Now let's say we want to get a list of territories and their corresponding region names, but only where the RegionDescription property is "Western". We then want to set the initial sort order to be on the TerritoryDescription column, descending. Finally, we want to page the dataset, starting with the first page of 5 records, and display the results in a rich grid. Note that we are talking about a join query across two tables... check out the below mashup enabling javascript:

var territories = new Northwind.TerritoryCollection()
.select(["TerritoryDescription as Description",
"Region.RegionDescription as Region"
])
.where("Region.RegionDescription","=","Western")
.orderBy("TerritoryDescription DESC")
.setPagination(1,5);

territories.showGrid();

In the above code (apologies for odd line breaks due to the blog stylesheet), please take note of the following niceties.

  • First of all, we are able to intuitively build up our query using a series of chained calls. Notice that javascript allows us to continue a single line of code simply by placing the dot on the next line. This is merely a convenience that us seasoned js pros take advantage of. You could just as easily have written the query in multiple lines of code, as each of the methods returns the underlying data entity.

  • Secondly, we can specify, via the .select() method, an array of column names we want to have the webservice return in our data collection query. The webservice will smartly serialize only the columns you explicitly request in order to optimize bandwidth and wire overhead.

  • Next, notice that we are able to alias the columns using the "as" keyword (in our example we're aliasing "TerritoryDescription" as "Description".

  • Now for the really cool part, notice the intuitive manner in which we are able to jump across to another table (i.e. join). You do this simply by using dot notation in the form of TableName.ColumnName. Behind the scenes the webservice back end will automatically build the appropriate joins for you.

  • Moving on, we can filter the dataset using the .where() method, set the initial sort order, and even specify pagination options. In this example we're saying "start on page 1, and give me 5 records per page"
And the resulting rich grid is shown below:

territory_grid

Finally, I just want to show one more screenshot, and that is of the auto-generated form you will get when you double click a row in one of these grids...

form_dialog

Notice in the above picture, that the forms are also rich by default, and automatically figures out foreign key relationships in order to display type-ahead paginated comboboxes as appropriate. By default, these widgets (grids, forms, trees, etc) can take advantage of the automatic windowing system (notice our form is actually a modal dialog), but of course all of these behaviors are overridable by you.

This was just a sampling of the types of things you'll be able to do. In closing, did you happen to notice that we never had to "bind" a proxy to the web service in the back end? That's because we do that dynamically behind the scenes as well. Gone are the days of having to re-deploy clients every time a service contract changes... That is if you're using WebWidgetry :)

Monday, October 6, 2008

Running a Zero-Infrastructure Company, Part 2e: Social Networking at the Shop

Dice.com, ZyQuest, Local Universities, LinkedIn and Social Networks

What would a consulting business be without staff, and quick ramp up times to boot? When we were suddenly faced with needing to expand our capacity from 3 people to 7, we tried Dice.com (which got us nowhere) and our good friends at ZyQuest. We needed people that were very hard to find. ZyQuest delivered. John Moss (you can't have him, but you can imagine what it would be like if you could :P) has became our Lead Engineer in less than a year. We did also hire a number of people remotely. Some worked out right away and some were wrong from the start. IMHO, if you don't know who you're hiring, make them prove their worth first. Regardless of ramp-up time and complexity, it shouldn't take more than a 30 day trial to know for sure.

Local universities are also a great source of new people. If you pick well, pay well and (with today's generation) play well, you should see great results. We actually employ four (4) UW-Oshkosh alumni, and we hope to see many other graduates from Universities of Wisconsin help us with expansion.

LinkedIn is the professional social network to be on these days. Where else can you reach out to thousands (or hundreds of thousands) with industry specific questions and get quick replies? It's also a great place to find experts. Our latest Penguin comes from a LinkedIn job-post – her name is Jacky Powell, and she just happens to be the award-winning designer with her name on the patent for the Sony XMB interface! Do you have a Sony TV, PSP or Playstation 3? Click the 'home' button to see her work.

We haven't really dug into Facebook as much as we should, but do encourage virtual socialization through "Fragtime". We setup a few game servers in-house and bought everyone copies of The Orange Box and Call of Duty 4. Whenever things get a little too tense, someone has the insight to suggest we let loose for 30 minutes. Just play. No other reason. It really helps us buy another solid block of productivity instead of dreading the rest of the day. You can translate "Fragtime" to something more appropriate if you prefer racing games or the Wii in your office, but don't ignore it. It's quicker, interactive, less expensive and way more fun than a company picnic. I dare you to have your C-level people call us for details.

Next Time: Part 3, The Future

Friday, October 3, 2008

Running a Zero-Infrastructure Company, Part 2d: Webstuff of our Shop

Browsers: Firefox, Internet Explorer, Safari and Chrome

We're a web-application development firm, so we have to stay up on the latest browser challenges. That being said, we could fill many, many, MANY more blog posts about reasons for and against different browsers. Or you could just Google for this info. If you're not in the web-app business, just pick one and stick with it. Pick the one that the person with the most experience can help with, or that is recommended by your virtual-IT department. It is also to your advantage to let others experiment ("let your people be happy") so you have alternatives should your main browser fail in a specific function.

Amazon Web Services (EC2, S3) and Mingle

There's a whole world of SaaS infrastructure solutions with Amazon Web Services. We currently really dig S3 for storage/backup of our Subversion code repository and its counter-part EC2 as a virtual server for our project management software Mingle. The services are truly pay as you go – you can try a simple JungleDisk connection and see how just storing your favorite personal data in S3 will only cost pennies per month. Some people in this office pay less than 10 cents a month for this backup service! Even at 20 gigs, it's still only $5 a month!

Mingle is one graduated step from Google Spreadsheets in the direction of Agile project management. We're still trying it out, on an EC2 instance. It's very flexible and well template, but can be a little slow at times. Agile PM software abounds in many flavors, and we're on the hunt for one that is as effective and inexpensive as Google's apps. In the mean time, Mingle is worth a trial project or two if you're interested. They may still have their 'Free' 5-user license out there.

GoDaddy.com, Dotster, DynDNS and Subversion

GoDaddy or Dotster are great places to manage your domain names. Lots of options. Lots of controls. Pretty easy to use and other SaaS services like Blogger are now writing custom instructions for people when they have to integrate a domain name with the service.

For the two boxes that do sit in our office, we originally started with a Dynamic IP address instead of a Static IP address to a) allow us to put the server anywhere since we were working from houses, porches and free office space for 3 months and b) save the $10 a month. DynDNS was a great way for us to have a permanent address for clients to access our internal machines, but after we landed regular office space this felt like 'cheap ego' masquerading as 'frugal wisdom'. We spent too much time maintaining the connection to the servers to not pay $10 extra a month.

Subversion – the second hub of our business aside from Google Apps. Also referred to as SVN, this repository software works great with a TortoiseSVN client for windows (there is a Mac client too) to keep a versioned history of all of your local-hard drive work, that can be collaborated on with the rest of the team through branching, tagging and merging. I would imagine that as the bonds between repositories, project management, continuous integration and SaaS get stronger, we'll eventually just use that SaaS service.


Next Time: Part 2e, Social Networking at the Shop

Thursday, October 2, 2008

Running a Zero-Infrastructure Company, Part 2c: Not-so-Hardware of our Shop

EFax & Vocalocity

We did manage to avoid a fax machine, sort of. Instead, we setup a multi-purpose scanner/fax/printer and EFax. The scanner software from HP allows us to scan direct to a PC hard drive over the network. We can then 'fax' that to anywhere, and receive faxes to our inbox to avoid printing them out. We only use it for signatures.

Vocalocity is still a new endeavor for us – when they say it only takes 15 minutes to get up and running, that does not include the months of waiting while paying off teamsters at the local TelCo to release and switch over the numbers you own. But considering a simple in-house PBX can cost thousands in hardware and cryptic learning, this is worth it. I look forward to integrating some of these features. In the mean time it's enough that we can just forward phones and transfer calls as needed.

Hardware: TDS vs. Time Warner Cable, Laptops, Mac-tops, Cable Modem, UPS, WiFi Router, IP Phones, Cell Phones, Printer/Scanner

Yeah, so 0-Infrastructure is more of a goal than a reality. When it comes to hardware, everything comes down to service plans, service performed, product reliability and cost. Here's the quick-list of what we did, what we learned and where we're at:

  • Time Warner Cable is a better choice than TDS. Not because it's cable over DSL. Because TWC actually delivers on service, immediately. You also get to pay extra for this. Lots and lots of extra.
  • Dell Laptops with three-year, gold-level, light-it-on-fire-and-we'll-still-replace-it support is our scalable choice. Why laptops? They're pretty powerful now. They have their own UPS. You can take it with you! We did have some early non-Dell purchases (HPs, a Lenovo and one government level experiment with Alienware), but it's easiest to call one company for our hardware support. Pay $300 extra per laptop to have 4-hour onsite service, or watch production staff spend a day+ not producing...
  • Not everyone works in Windows-land. Our design team loves Macs, and we still get to run Vista on them for cross-platform hurdles. I support this choice because I support our people – I want them to have what they need to do work they love. Fans love 'em, they do have a legitimate slew of benefits… just nod your head and sign the PO for the Mac-heads.
  • Cable Modem – comes with the service, supported by the service contract. Put it on your UPS. 'Nuff said.
  • Uninterruptable Power Supply (UPS) – get something that will support multiple machines for more than 4 hours, but that can still be carried by one person. Plug your modems, routers and VOIP boxes into it to maintain a connection to the Big Blue Room if the power goes out.
  • WiFi Router – the Linksys WRT54G is perfect for a house of 10 or less. Make everything wireless if you can help it, and get quality CAT-5 cable when you can't. Just make sure you follow all the WiFi security rules. Honestly, how much longer before we can cut every cord by the power? If you do have more than 4 hard-lines, use a Linksys switch too. And if none of this makes sense to you, just pay the local virtual-IT department to do it so you can focus on production.
  • Vocalocity recommended the Linksys SPA941 which was satisfactory for us. Inexpensive, good display, good speakerphone, multi-line, headset-capable and we can transfer calls. For superior conference call capability, we bought a Polycom SoundStation used through Ebay. I recommend getting one with a warranty, as sometimes people can't hear us very well, but my long-term experience still recommends a Polycom for conferencing.
  • One area we haven't really incorporated under the business umbrella is cell phones. Their invaluable for our 0-infrastructure, but very personal and generally everybody already has one. My only recommendation is to get phones that are Gmail & Google Calendar ready.
  • We started the business on an all-in-one HP printer/scanner/fax unit, but then bought another small laser printer for printing checks. Later as we purchased a bunch of Dell laptops, they gave us a 'free' color laser printer. They haven't required any major repairs, so no complaints here. If you decide to buy refilled toner, buy it from a local service that will also fix your printer for 'free' as part of your toner contract.

Next Time: Part 2d, Webstuff at our Shop

Wednesday, October 1, 2008

Running a Zero-Infrastructure Company, Part 2b: Collaboration for our Shop


Collaborating without Microsoft Office: GoToMeeting, OpenOffice, Google Apps and MS Office 2007 (okay, you're not really getting away)


Sharing information and communicating down the long-hallway posed a significant challenge. It could have been very expensive – except that as a startup we drink the Fruity Frugalistic Kool-Aid™ every day.


GoToMeeting – our choice for sharing screens and collaboration. The toughest part about doing agile remotely is not being able to share the cards or the whiteboard markers. GoToMeeting provided us with a conference number and unlimited usage for $50 a month. Shortly after signing up, we got a break when they offered us access to the v4 Beta, which included VOIP, for the same cost. Now we keep a developer's channel open all day long. We call it the crèche, like emperor penguins use for young ones, except we use it for our developers to help each other through tough spots or for long sessions of eXtreme Programming. We also signed up for a second plan, and now pay $100 a month, but it's worth every penny.


OpenOffice – if you don't have the cash and you like to experiment, get OpenOffice to replace Word, Excel and PowerPoint. It's free, and now there's a plug-in to open .docx files. This is IMHO still just a necessary evil especially when you need to work off-line or need better controls over your formatting than what Google Docs can do for you. We consistently introduce our clients and vendors to Google Docs whenever possible.


Gmail – this may not seem so new and cool now, but back in May 2007 when we wanted to have a centralized email repository for the newco, this was the obvious choice. No Exchange license fee. No hosting fees. No backup concerns. No spam-filter concerns. Uptime had as good a guarantee as most. 6 gig of storage space meant never having to delete an email. Best of all, we could manage users through the Google Apps domain manager.


Google Chat – not only does Chat serve us consistently throughout the day for solutions, it's a way to grow a personal relationship with a co-worker you'd like to get to know better without having to disturb 4 other people in the same room (we have 5 people in a room meant for 2 or 3). It also grew to be our In/Out board, as many people work from home, work late, work weekends, work remotely (we work a lot). Lately it's been a fun tool for learning machine-translated foreign language phrases.


Google Calendar – another stellar, free service that keeps us from paying for Exchange hosting and licensing. Google Calendar allows everyone in the team to have their own calendar, and view others as needed. Calendars give reminders via email, mobile device or pop-ups. They also integrate nicely with Google Maps using the location box. I hear there are services to sync your Google Calendar to your mobile device, but we have not adopted anything in the company.


Google Docs – I bold this, specifically Google Spreadsheets for its collaborative abilities that are a natural evolver of ideas. Here's how it works: you have some data, perhaps just a to-do list. If it's not a sticky-note, start it on a G-Sheet no matter how simple. Don't ever use Notepad or Excel again. Save it. You can organize these into folders. You can invite friends to look or edit. Best of all, you can see their edits within seconds, and you can always roll back changes according to the revision log. We tend to use GTM for voice communications, but it also has a chat window – a fun feature here is to click on their name in the window, focusing your view on the cell they are currently editing. If you need mass-input, create a form within minutes that can be emailed or linked to, and data entered is time stamped. When you're done, export a PDF for a snapshot to those who care. This one app replaces sticky-notes, pens, Excel, a screen-sharing tool, a revision tracking file system, a backup system and Adobe Acrobat (or PrimoPDF). It promotes ideas to fruition with ease.


Then there's Google Document and Google Presentation – both of which are great ways to add collaboration to things like Word and PowerPoint, but still need to capture the layout capabilities to the extent that you could get with OpenOffice or MS Office.


Which brings me to MS Office 2007 – through the MS Action Pack – for $650, we were able to get a huge list of software from Microsoft. There were a few different reasons for this: We needed Visual Studio 2008 and SQL Server 2005, and we kept getting that new .docx format from everyone else, for which there was no OpenOffice plug-in at the time. So, the Action Pack had 10 seats of Office 2007… and the rest is MS business as usual. Besides, who can resist that cool new ribbon header? I'm actually using Word 2007 to write this post and publish auto-magically to Blogger.


Next Time: Part 2c, The Not-so-Hardware of our Shop