We are pleased to announce the release of V4.1.2009 of the Cloud-2-Relational Query Engine.
What is it?
Our Query Engine will allow you to write SQL that will be executed against both a cloud table storage provider as well as most relational database engines.
We all know the benefit of an RDBMS is the ability to write sophisticated DML to extract data. Although these scale fairly well, to store hundreds of millions of records requires special attention or your performance will suffer. Most cloud storage solutions have the ability to store zillions of records (well at least in theory) but don’t really support joins, this is a real problem if you want to normalize your database.
This is where our product comes in. The best of both worlds, the ability of a cloud table provider to store zillions of orders and the ability to join those orders with a much smaller lookup table such as OrderStatus
You simply write a query such as:
select rdbms.Status, cloud.OrderNumber, cloud.OrderAmount from status rdbms, join (Select OrderNumber, OrderAmount from myCloud.orders where UserId = @userId) as cloud on cloud.OrderStatusId = rdbms.OrderStatusId
We are still working on enforcing referential integrity however once we do that we will have the best of both worlds. Performance and Scalability of large scale cloud storage and flexibility of a RDBMS.
-ec
With the introduction of Windows Azure I was looking for something I could write where I could kick the tires and see what’s involved with this new technology. For a quick overview what I came up with, please see the video video I created for my Mix09 “Show Off” entry hosted on SoapBox. My first (of hopefully many) Azure applications I created is online at http://www.tweetmyrun.net. The user experience needs a little tweaking but it seems to be working great!

This application uses the following technologies:
- Windows Live Authentication
- Windows Azure Hosting Services
- Windows Azure Table Storage
- Silverlight 2.0 “talking” to Azure via WCF
Here’s are some high-level bullet points you need to get started:
- Download the Windows Azure SDK
- Download the Windows Visual Studio Tools for Azure
- Apply to participate in the beta.
- Create a library project to contain your DAL, I found this post as a great starting point.
- Start your development storage from the start menu after configuring the your table storage settings with the following settings:
- AccountName = devstoreaccount1
- Shared Key = Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
- Storage Endpoint = 127.0.0.1:<StoragePort>
- Create BAT file to extract the settings from your DAL assembly to create tables to simulate you Azure Table Storage with something similar to:
"Program Files\Windows Azure SDK\v1.0\bin\DevtableGen.exe" /forceCreate "/server:localhost\SQLExpress" "/database:MyDatabase" obj\Debug\MyDAL.dll pause
- For more information on configuring IIS 7.0 click here.
- Although you can certainly test your application on the local development fabric, as long as you create your site as a web role, you can test most of the features as just a standard IIS web site.
- When working with Live Authentication redirection back to your server, I found creating an entry in your HOSTS file works good.
If you have any questions, please free to message me on Twitter via @bytemaster
-ec
I'm building a multi-tier application in JavaScript. This is implementing the Model View ViewModel
pattern to keep as much of the code generic as possible, while allowing
for customizations in both the UI and data layers for specific browsers
and data access methods such as a local SQLLite database or calls to
the server. I'm using code-generation to
create my models, but need a good way to create the Controllers, Views,
and ViewModels. I had been using a simple template, but cutting, pasting and replacing
text seemed a little inefficient, so I decided to create some Visual
Studio Templates to accomplish this goal. It's fairly simple to create a trivial template,
but I needed to add just bit more complexity, I need to build up a
custom namespace for my classes, so just a simple ZIP file
containing my template didn't cut it. The answer was to implement IWizard in the Microsoft.VisualStudio.TemplateWizard namespace
We
need to create two components for our new templates, a ZipFile
containing, *.vstemplate and a .NET Assembly containing the IWizard
implementation.
Create your IWizard Implementation 1) Create a Windows Class Library 2) Add the following References
- EnvDTE
- Microsoft.VisualStudio.TemplateWizardInterface
3) Create an empty class, and implement the interface Microsoft.VisualStudio.TemplateWizard.IWizard 4) The method you care most about is:
public void RunStarted(object automationObject, Dictionary<string,
string> replacementsDictionary,
Microsoft.VisualStudio.TemplateWizard.WizardRunKind runKind, object[]
customParams)5) In this method you can add additional
tokens to be used in your template by adding name value pairs to
the replacementDictionary replacementsDictionary.Add("$modulename$", "MyName");6) In addition you can add a standard windows form to your wizard to collect information _inputForm = new ModuleInputForm(); _inputForm.ShowDialog(); replacementsDictionary.Add("$modulename$", _inputForm.ModuleName);7)
Within the Project Properties and the Signing Tab, you need sign your
assembly. You will be installing within the GAC, so it needs a strong
name. 8) Install your Assembly in the GAC. The easiest way to do this
is to just copy the file from your build output directory to
%WINDIR%\assemblies between two explorer windows. 9) After you install your Assembly note the Assembly Name and Public Key Token, you will need these to create your vstemplate.
10) If you make updates to your wizard, you have to make sure you close
all instances of Visual Studio .NET so your wizard is reloaded.
Create your vstemplate:
We will need to create a ZIP file that contains at least three components (more if you want to generate multiple files):
1) SomeTemplate.ext - This will contain the template used to create the Visual Studio Project Item
2) Specification.vstemplate - An XML file that contains the configuration for your template
3) Image.ico - An image that will be displayed in the new project item dialog for your custom project template.
What
I did was just create a temp directory where I created these files. Once
complete I'll zip them up and show you where to put them so Visual Studio will
recognize them.
SomeTemplate.ext, or in my case Controller.js This is your
custom template. It can contain anything, but what makes this work is the ability to replace tokens within the template. I wanted to use a custom module name and class name within my
JavaScript files, this is only a fragment from the file, but you get
the idea.
MyCompany.Controllers.$modulename$.$safeitemname$.registerClass('MyCompany.Controllers.$modulename$.$safeitemname$', null, Sys.IDisposable, MyCompany.Controllers.IController);Specification.vstemplate or in my case Controller.vstemplate Next
we need to create our .vstemplate file. This is a small XML file that
tells Visual Studio how to build your populated instance of the template, it's format is as
follows: <VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item"> <TemplateData> <DefaultName>Controller.js</DefaultName> <Name>M-V-VM Controller</Name> <Description>Model View ViewModel Controller</Description> <ProjectType>CSharp</ProjectType> <SortOrder>10</SortOrder> <Icon>__TemplateIcon.ico</Icon> </TemplateData> <TemplateContent> <References /> <ProjectItem SubType="" TargetFileName="$fileinputname$.js" ReplaceParameters="true">Controller.js</ProjectItem> </TemplateContent> <WizardExtension> <Assembly>MyCompany.Templates.WizardTemplateInstance, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=a2c453bf57a7f5d7</Assembly> <FullClassName>MyCompany.Templates.WizardTemplateInstance</FullClassName> </WizardExtension> </VSTemplate>Pretty straight forward. but here's a little more information about the file format, one important note, make sure in your ProjectItem node, you have ReplaceParameters="true" to update your tokens. In addition to the custom tokens we added in the wizard we created above, here is a list of built in tokens.
You need to find yourself an icon for your template. Make sure it's in
the same directory and is specified by the <Icon> node.
Once you have this completed, zip all three files and place them in the directory on your machine similar to:
[USERNAME]\Documents\Visual Studio 2008\Templates\ItemTemplates
Generate your Template Start Visual Studio, within your solution tree, click on Add
New Item and in the bottom section on MyTemplates you should see the
following:Change the name and if the Software God's are shining on you you should see:
where you can enter the name of your module.
Once you hit Save, your new file should get generated any tokens you
specified be replaced. In my case here is a portion of the generated file
with the module name of "Sync" and file name of "History" is as follows:
MyCompany.Controllers.$modulename$.$safeitemname$.registerClass('MyCompany.Controllers.$modulename$.$safeitemname$', null, Sys.IDisposable, MyCompany.Controllers.IController);MyCompany.Controllers.Sync.History.registerClass('MyCompany.Controllers.Sync.History', MyCompany.Controllers.ControllerBase, Sys.IDisposable, MyCompany.Controllers.IController);
-ec
I've always had a drive to take apart anything electronic and figure out how it worked. Even better if the thing had a microprocessor since then I would try to start up a conversation with it. I think my first experience with this was hooking up an old teletype machine given to me by my junior high school to a VIC-20 computer to use a printer. Then came the first XBox. I enjoyed playing games on it, but I wasn't really a gamer. Then I found out about modding the darn thing...I think the main reason for this was to be able to make *back-ups* of your games. I really didn't so much care about that, I wanted to find a version of the XBox SDK and get my own Hello World programming running.
That brings us to current day, Microsoft did something really cool and made game development main-stream for the XBox 360 in the form of the XNA Game Studio. Last summer I downloaded Version 2.0 of the SDK and started my journey on learning this new technology. Other than playing around with the Hydra Game Development Kit, I knew next to nothing about game programming, this was a chance to learn a brand new technology.
I'm still in the process of learning but I thought it was interesting on how I'm building my first game. Most of the time when I write an application, I really want to have an in depth knowledge of what's happening with the code. I don't like calling methods, even if they are in a library or frameworks unless I at least have a general knowledge of how that software will be ran by the processor. In January I started a project that I will be publishing in March as a Community Game on the XBox 360. To make this work, I needed to do a bunch of stuff I really had no clue how to program. These were things like explosions, smoke from a missle trail etc... I found some great tutorials and started cutting and pasting my way to an application that pretty much did what I needed to, although the program was a mess. I did feel dirty doing this, but just reading about code isn't enough, implementing it into something that actually runs is a much better way to learn things.
So I figured out how to create 3D models with the XSI Mod Tool, that was no small chore, but kind of fun and something I did on the couch while watching TV. Next I found some code to render the model in my game, I cut-and-pasted that into my application and be-hold the model was spinning in 3D, although I didn't know how it worked it was rewarding. Then I added a few more models and decided that the code just didn't "smell right" anymore. It was a good time to create a class that knew how to render models in my game, this was important since my game had some specific needs and I couldn't just cut-and-paste anymore I needed to know how the code worked. This is when the lights started coming on. Next was implementing the flight of a missile. I found some algorithms for acceleration and gravity as well as a smoke plume and cut-and-pasted the code. This got me about 75% of the way there and was a mess, but at least it sort-of worked and was rewarding. I refactored the code, learned how it worked and the light bulbs came on again. I repeated this process for other things such as rendering water and implementing a generic controller that works with either a keyboard or game controller. So the basic pattern here was add the features, you may need a dependency that you don't know how to implement, that's OK, instead of just banging your head against the wall for 3 days, find some code the sort-of does what you want, get it working. Then the real critical part, refactor the hell out of it and make that code your own!
This was a project I
wrote for myself, most of the time people pay me to write software so I
can't recommend this process for any client work. However now if a client contracted with me build an XNA game (fat chance, but you never
know), I can point to some real world experience and feel good that
I'll be delivering a solution and not learning on the job.
I
think to a certain extent, this is probably how we learn to implement
technologies most of the time, but in smaller steps. This was just
very obvious since I had to start from scratch with many core concepts
and the process of turning the cut-and-paste code into my own code was very clear and effective. So don't feel bad about
cutting and pasting code, just make sure you don't leave it like that
once you get it working. Apply your style, refactor, rinse and repeat and make the code your own!
-ec
Lines are starting to get drawn for the Great Quality Wars of '09. On one side you have camp led by Joel Spolsky and the now infamous Stack Overflow Podcast #38, and the other camp led by Uncle Bob. I'm sitting this one out, from what I can see so far, both sides are going to get bloodied up where the discussion turns from a reasonable and positive debate to personal attacks. We have a lot of problems in our industry and dividing it into factions won't help anyone. Especially when I see this religious war based on how do I get there, not where do we want to go.
This, being on a much greater scale, reminds me of the Great Coding Convention Battles I participated in within a company in the early 90's. One of the stupidest things we discussed over the course of a month of meetings was whether to use the following syntax for one line after an if statement.
if(true) DoSomething();
or
if(true) { DoSomething(); }
Looking back this was a tremendous waste of time, albeit a relatively fun discussion in our meetings where both sides decided the other side was a bunch of hacks.
I was in the
if(true) DoSomething()
camp unless I wasn't.
For the case of:
if(true) while(someCondition) DoSomethingElse();
I would use the convention:
if(true) { while(someCondition) DoSomethingElse(); }
where I would be in both camps. What does this mean? Does this mean I'm a moderate? Well no, I do have very strong views on both coding (and politics but I'll spare you the pain on discussing my political views here). I think the main reason I had strong feelings on my approach was that the other camp wasn't using C/C++ in their day to day work and kept bringing up examples and what *experts* said about the topic and under no circumstance should we have a block of code not enclosed in curly brackets. My camp lived in a C/C++ editor for most of our work.
Do I agree with the statement that Quality doesn't matter? No. Do I agree with the statement that Quality is the most important thing? No. For any system there is really only one true measurement of success:
In the long term is your user community satisfied and will they continue to use your software to enhance their business or personal lives.
Anything else is pure rubbish. You may have a very high quality system that is just a joy to maintain, but unless people use your software, you probably won't (and shouldn't) get past V1.0. You also could have a system that you deploy within a month or two that people just love, but it has tons of bugs in the core architecture and can't be maintained, you probably won't get beyond V1.0 either.
Quality is an important attribute of your system, however quality is not free. Building a quality systems is not ensured by a set of tools, techniques or processes. Quality is a result of an individual's commitment and a culture within your organization.
There is a danger on both ends of the spectrum. On one end of the spectrum there is "we don't need these new fangled tools and techniques, our Cobol and Assembly Language application runs just fine", yeah right, there's a real competitive edge. I'm probably not going to buy or use your software, and if I do, I'm probably not going to apply any updates unless absolutely necessary. On the other end of the spectrum, we try to rigorously follow the latest fads something like not writing a single line of code without a test, attempting to achieve 100% code coverage, or program exclusively against interfaces. While this does sound good in reality are you putting too much trust in your metrics? Code coverage of 100% (or even 90%) means your code was run, that's it. I may be different, but I know most of my bugs are edge conditions I don't account for even if I do have a test suite covering that chunk of code. The code coverage metric does little to protect me against these problems.
What is the middle ground here? It's actually pretty simple, think for yourself, make sure you write lots code that makes it into production, it doesn't do much good to get your code to a certain point and gloss over all the little details. Also read as much as possible.
Although I think the SOLID Principles offer a number of good concepts, I personally don't agree with all those concepts. You may agree with all those concepts. That's OK. One area I disagree with is the Single Responsibility Principle or SRP. I've seen implementations of this in code a code base I needed to extend, and it's just not my cup-of-tea, too much noise, classes are not free. The developer swore by this technique. That's OK.
I wish I could find the transcript, but let me paraphrase a discussion of SRP from Uncle Bob's Hanselminutes interview (right around 3 inutes into the podcast)
Uncle Bob: This is somewhat out of the norm for object oriented design. Early Object Oriented Design Principals had us grouping together functions of that operated on the same data structures so that the methods of the class manipulate the same variables.
Scott: That definitely flips things on its head.
Early on I learned one of the core principals of Object Oriented Analysis and Design is it's all about the data and methods acting upon that data via encapsulation. Over time your business rules will probably change, however the structure of your data will remain fairly static. The way I design LOB type apps is ruthlessly focus on my physical data model. If you don't get that right, you will be fighting with an impedance mismatch all through your development cycle. Although I could certainly see the value of a different approach, I keep my business objects 1:1 in sync with the database tables. The primary reason for this is simplicity, once you break that relationship you introduce a mapping layer that is sometime necessary but comes at a cost of additional code. The only code you know has zero bugs is code you don't write.
Maybe I'm "old-school" but my process has allowed me to pay the bills for the past 20 years now. In some cases the developers picking up my code said, this is so incredibly easy to maintain and the hand off went smoothly with very few support calls. In other cases, people just said it was a mess. It seemed like people that liked my code have been in the industry 10+ years and have handed over legacy code themselves. The people that thought I was a hack usually had less than 5 years and already knew everything there was about writing software. They were just waiting for their first chance to start from scratch, build a product and show us old-timers how it's done. I suspect, at one time I thought I knew everything about writing code. Maybe this is a right-of-passage?
Using classes to group together functions just doesn't smell right to me, it may to you. That is ok. I have the right to express my opinion just as Joel and Uncle Bob did, neither of these two people are hacks and I don't think I am either. We as an industry need to do a better job of leaving out the religion and personal attacks, software is hard. Period. What works for one person on one project would cause a different person to fail.
Another thing to think about in adopting and evaluating new techniques and technologies is one of the concepts of the Software Capability Maturity Model or CMM. If you are a Level 1 organization, you cannot skip directly to a Level 3 or 4 organization. You must go through Level 2. If you attempt to implement processes found at Level 3 or 4 you will fail.
At any point in your career your toolbox contains a finite number of tools, over time you should be continually adding tools to your tool box or you won't advance in your career. If you attempt to implement something like the SOLID principals before having in place effective requirements gathering, defect tracking, or a continuous integration process your time would be much better spent focusing on blocking and tackling exercises rather than more advanced techniques. It's surprising how many organizations I've worked with that try to adopt the latest advanced technique, but their bug tracking is emails, source control is sorely lacking and requirements gathering consists of meetings where the main goal is for people to hear themselves talk and sound important! I've seen many more projects fail because of the lack of effective leadership, poor requirements or project management than I have because the programmers used the wrong technique or pattern. Before we put stealth on our airplane, let's make sure our airplanes fly.
Over time there have a been considerable advances in our field of software engineering, some stick around some don't. Are we still using those old Rational Rose Puffy Clouds. I liked my Puffy Clouds! I want my Puffy Clouds back! None of these should be considered 100% bad and ignored, learn something from these, but don't just jump in and blindly implement without thinking. Put what works for you in your tool box, have a full tool box and select the exact right tool to solve your problem and more importantly, know why you picked that tool.
I'm looking forward to the "smack-down" between Joel and Uncle Bob in an upcoming Stack Overflow episode! Would be very interesting to see them on UFC as well. In the mean time, I'm going to keep writing software, reading blogs and keep adding more tools to my tool box.
-ec
With all the grim economic news, there has never been a better time to be a developer (well maybe during the internet bubble, but that wasn't sustainable). As an independent consultant, I'm always just a little worried about what the next six months will bring. I've been doing this for about 8 years now and so far there has been no shortage of work, but you never know what the future will hold. I think 2009 may provide a different way of thinking about how I perform my craft to pay the bills, let me explain. When doing client work there is really no long term guarantee. It's a process of identifying a need for their organization, doing an excellent job filling that need, get a check, rinse and repeat. You are really establishing a "dependency" on your client, their needs and cash flow have a big influence on your future. As a developer we know that in most cases dependencies are not a good thing.
That's where I think there are some great opportunities these days for us developers to break these dependencies and really take control of our future. As much as I enjoying developing systems to make my clients succeed, I would rather develop systems to make myself succeed! How is this possible? Well I'm pursuing two opportunities right now that you can too! The costs and barriers for entry are negligible.
The first one is really sort of fun, I'm building a game for XBox Community Games.
The idea is I build software, publish it, and it becomes available to
millions of XBox users to download and play for a very small fee where a large portion of that goes into my account. This means if I can make the game interesting enough to tap into an extremely small percentage of the millions of users, the
income may not be all that trivial. I'm not buying that 54 foot yacht
yet, but who knows. The point here is that I have a high level of
control over the success and outcome of this effort, the advertising
and sales are taken care of via the Community Games site. I can
focus on cuttin' code and not have to build a business with dozens of employees and all the headaches that come with that.
I think the next opportunity is even more exciting and beginning the second half of this year will merit a considerable investment in my time. I'm already getting my feet wet with this technology and I'm excited for the RTM date. This approach and techonology changes things, period. Over the past eight years, I've been working on a product I call The Chaos Filter. I've spun off a few little products that generate some revenue, but really haven't cranked up the marketing engine yet. My thought is once I do this, my primary role will shift from building and extending the product to building and extending the business to support that product. The challenge has always been, how can I focus on what I enjoy and outsource 95% of everything else yet remain in enough control to be successful. My product is really a set of highly configurable services that work together well. My goal is to allow subject matter experts; non programmers but technical folks; to very quickly customize and assemble those services into things I'm calling MicroApps. These will be built for highly specialized niche markets. My thought is not to sell these for hundreds or thousands of dollars, but a monthly subscription fee that will usually be less than $20. Basically a high value, low cost solution that will be very easy for people to sign up for and keep coming back. To make any money at this effort, I'm going to need a ton of people signing up. That's where I see the Azure Services Platform come in. Without building a large company, I can partner with subject matter experts to build these MicroApps. Then make these products available to the Windows Live user base. This also offers a highly scalable platform that as my product grows and I need more capacity, I'll just need to adjust the number of server instances in a configuration file and wha-la I'm more scalable. Again, as with the XBox game, I can focus on my core competency, cuttin' code.
Another awesome opportunity would be to start writing applications for the iPhone and iPod Touch. Although being a .NET developer, I'll probably focus on the two opportunities I've outlined above, however this once can't be ignored. Apple did a great job of making it super simple for people to trade you their money for your apps. I purchased a MacBook and have started to learn Objective C. Even though this seems very appealing, I just don't see spending my valuable time on this anytime soon. I guess the XBox and Azure Live Services just turn out to be a fad *cough* there are other opportunities out there.
I'm spending about two thirds of my time doing client work and the other third trying to figure out what type of killer app I'm going to develop that will allow me to spend all my time programming for fun, not necessarily to pay the bills. This approach isn't for everyone, if you enjoy the security of working for a company and thrill of being part of a high performance team you may have found your niche, if not, maybe it's time to start looking at what you can do on your own.
-ec
Yesterday I had a dog-and-pony show to discuss a product I've been contracted to build for a client of mine. The demo was in three parts, a technical design review by their lead developer, then a status review with their CTO and finally a recap with the CEO. The first two parts went just fine, then when the CEO came into the room my Gateway Vista 64 bit laptop froze up. My mouse would move, but wouldn't respond to any clicks or keyboard input. To be fair, I had a VM running and I think this may contributed to the failure. Since this product needed to run on all sorts of OS's & devices, I had my MacBook, iPod Touch and Google phone so I was able to give a few quick demos, just nothing on the projector...I hate it when those types of things happen.

Overall my experience with Vista hasn't been that bad, but also can't say it was all that great, this was the final straw. I upgraded my main custom built Quad Core machine last December to Windows Server 2008 64 Bit Standard Edition and that machine has just been rock solid. I decided until Windows 7 goes RTM, I'm done with Vista and will be putting Server 2008 on all my dev boxes. In a small way I miss the nice Aero Glass interface in Vista and I know I can configure it by turning on "Desktop Experience" in the Add Features configuration section, however right now my system is running so good, I just don't want to make any changes.
On my way home from the client meeting yesterday afternoon, I stopped off at Best Buy and picked up a 2.5" 7200 RPM drive for my laptop and have decided to upgrade. I picked up the drive for about $109 plus tax. With the price of hard drives these days, going forward when I need to repave or upgrade a machine, my plan is going to be to just go ahead and pickup a new hard drive then keep the old one around for a bit. For this upgrade, my computer has two drive bays, so now my laptop will have 640GB of storage (well less than that since a 320GB drive really isn't a 320GB drive, but that's off topic). That should be plenty of room for a bunch of VM's so I don't have to bring my external HD with me when I travel. One of the many nice things about this laptop is that that it has a eSATA port that makes copying the 20-30GB VMs quick work. Once I get my laptop upgraded, I'll report back. If the drivers just aren't there, I'll just use the second SATA drive as extra storage and put my original one back in and be ready for business! The moral of the story is with drive prices these days it's just as easy and considering time involved just as a cheap to pickup a second drive and keep the old one around.
-ec
|