Home

GeekRider - the goal, technical perspective

As I briefly mentioned earlier I am endeavoring on a project which is going to demand a lot from me physically, but also from a technical perspective. I have a lot of things on my plate, during daytime I'm 100% engaged with work at clients, nighttime is the time I have to squeeze in a lot of activities into. For one, I have two kids that needs my attention - and I have a golden rule of engaging with them from the time I get back from work till they're in bed. This leaves some 2-4 hours left per day to do all the things I do. I therefor have to be smart with my time and make the most of it. Adding things into the schedule is hard and if I add something, it in general must have a synergy with something already in my schedule. In my schedule I have a couple of open-source projects that I focus a lot of my energy on; BalderBifrost and Forseti, so pretty much anything I put in must relate to these in some fashion. Geekrider arose concretely from this need of synergy. I need to focus more on physical exercise and brought in Geekrider with the synergy of pushing forward development on the open-source projects I'm involved in forward. Balder will hopefully serve the purpose of 3D visualization and bringing forward the a few features that I want to have in that project. As a general web platform, I could have gone for anything already out there, but I wanted to push forward features in Bifrost, I therefor decided to build the site from scratch on top of it and also push into the cloud by hosting it on AppHarbor. Since the site will become very JavaScript intensive, and I pretty much get allergic reactions when I don't write tests or BDD style specifications for my code, the last project also will get some love; Forseti. The reasoning behind the project is that most test runners out there has so many moving parts in the form of dependencies to get up and running and they're also very focused on running things in a browser. Forseti is aiming towards something very different, a headless runner for JavaScript tests based on Env.js not using by default any browsers to execute the tests/specs.

One of the goals for Bifrost is to make it easier for developers to create rich web based applications, promoting good software development practices. Today, the RIA space is rapidly changing and for the most part moving away from plugin technologies such as Flash or Silverlight and focusing more on the open standards found in HTML, CSS and JavaScript/EcmaScript.

From a fronted development perspective, Bifrost is taking on this latter part. Traditionally one would compose the resulting web page that is handed over to the client on the server. Multiple solutions exist out there for doing so, and specifically in the .net space, ASP.net and its derivatives are the most popular ones. Rendering, as this is often referred to, adds an extra load onto the server - not only is the server responsible for dealing with the request from the user, wether it is getting data or performing an action, but it also has to transform the result into something the client can show. On top of all this, it has to deal with security. This pattern is a very proven pattern, but in my opinion not the pattern we want to be doing moving forward, and therefor Bifrost will focus on a different pattern. Sure, Bifrost will not only be compatible, but also support out of the box the traditional route - but for now in an opinionated fashion by only supporting ASP.net MVC. The technique that Bifrost will be focusing in on is the Single Page Applications, were you basically hand over the "rendering" to the client and let the client compose the page by swapping in and out elements at runtime. This is in fact nothing new, ever since AJAX became the big thing, we've pretty much been doing this - but only for parts at a time and even letting parts of our page be swapped out for new versions being rendered by the server dynamically.

Bifrost will have a composition technique that is based on, as most things in the framework, conventions. The focus will be on Features and one can point to a feature simply by adding a <div/> tag and give it the attribute data-feature="[name of feature]". Based on the configurable convention, Bifrost will find the necessary files representing the feature. Looking at the page from Geekrider as it is at the time of writing this post, we'll have the following.

NewImage

So, back on track. Now that we have this, what is the next logical step?  Up till now, Bifrost has been very server side rendering focused, sporting an extension for ASP.net MVC and taking advantage of that stack. That is about to change, or should I say, the fact that it has been the only way to use Bifrost is about to change. A set of REST endpoints will be exposed from Bifrost, enabling any client to interact with the framework. From a Web developer perspective, this is not good enough, we're therefor working on bringing in a JavaScript library that will just nicely integrate with all this.

In addition to the goals summarized thus far, I've also got another goal for me personally; I want to become more productive with tools other than what I'm used to. I recently bought a MacBook Air, an impressive piece of hardware - but it doesn't sport the same specs as my MacBook Pro or my iMac, I've therefor decided not to put any virtualization software on it to run Windows. This means I have to start using other tools than Microsofts Visual Studio for my development. For .net development, I'm for now using MonoDevelop and for general HTML, JavaScript and CSS development, I'm using TextMate. My long term goal is to be using TextMate for everything.

Summarizing, Geekrider will be the proof of concept for features added to Balder and Bifrost - driving forward with new thoughts and ideas. I will try to blog about the progress as much as my schedule can permit. This means I should keep myself from playing around or doing unnecessary stuff.

This post was brought to you by

PartyPoker

 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Categories: .net | 3D | Balder | C# | Cloud | Community | JavaScript | Personal | Silverlight
Post Information: Permalink | Comments (6) | Post RSSRSS comment feed

State of the union; 2012

So, here we are then - actually its been almost two weeks now; 2012. As most bloggers tend to do, I'm going to do the same; do a state of the union thing to tell the world "wasssssup". Consider it a delayed Christmas letter from a relative. :)

2011 was probably one of the most stressful years I've had ever, it is the first year I am totally on my own as a freelancer and not having an employer, but have clients instead. That is needless to say quite different, not in the terms of what kind of work I do, but in more in a psychological perspective. In addition to that I had quite a few speaking engagements. Late 2010 I signed a deal with Programutvikling to do courses in 2011, I did a couple for them as well, but decided to drop doing courses as I was spreading myself way too thin doing way too much stuff. During 2011 I've also been heavily involved in the open source community, for the most part on the following projects; Balder and Bifrost, with most focus on the latter. I also started another project called Forseti, a JavaScript test/spec headless runner written in C# and has the goal of being a self contained executable that is easy to use and get up and running. October last year I got renewed as a Microsoft MVP for the 4th time, very honored and grateful to be receiving this award.

Come 2012, still alive and kicking, new opportunities and challenges are coming. For the last two and a half years I've been hired by Komplett to be their solutions architect and help build there vNext platform for e-commerce for both mobile and desktop web-browsers. The project has been an awesome experience and helped shape Bifrost. But, a new opportunity arose, and from 1st of March this year, I will be involved in a software project at Statoil, Norwegian oil-company. Really looking forward to be involved in that particular project. I will however continue to press forward on building features and fixing bugs in all of the open source projects I'm involved in. Will also try to involve myself more in the developer communities, such as NNUG and other communities. Allthough software is what I do, I'm also slowly realizing that I need to focus more of my energy on my own health. Personal exercise has never been a very big focus on my part, sure I've done my share of bi-cycling - but never reached a point were its natural or I end up doing it on a regular basis. Therefor, this year I'm setting out on a big hairy goal; be part of something called Birkebeinerrittet, apparently the worlds largest cross country bicycle race. In order to accomplish this I need all the motivation in the world and something driving me towards that goal. I decided in December 2011 to start a website to help me drive myself towards that goal; GeekRider. Not entirely sure what the site will end up being, but my plan is to let the site drive forward a few ideas I have with regards to how I see web development moving forward and at the same time help me maintain all of the mentioned open source projects - a synergy.

I guess thats just about it, wish me luck.. :)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Categories: Personal
Post Information: Permalink | Comments (3) | Post RSSRSS comment feed

Balder - where is it, and where is it going?

In 2007 I started something called Balder, a 3D engine for the Web using Silverlight. Back then with Silverlight 1.1 Alpha and later 2.0, there really weren't that many options to make it especially feature rich, nor fast. My first goal when I started this whole thing was basically to achieve 3D rendering on the Web across multiple platforms (Windows + Mac, later Moonlight on Linux) and have a declarative programming model for 3D. This is still the motivation for Balder; to be cross-platform on the Web and be declarative in its nature. I've never had the idea of being a 3D engine to compete with the big engines out there that are both free and commercial, this has been partly a research project for me to learn Silverlight properly from the ground up and also maintain a foot within the graphics programming industry which I still hold dear. Even though my day to day job is something completely different these days, I've always had side projects that kept me somewhat close to what was happening in the games industry that I left behind some 10 years ago.

Back in 2007 with SL1.1 and 2.0, you basically had to either built on top of the built in primitives, which were super slow or you had to do magic like create yourself a realtime PNG encoder and draw pixels manually with code and then hand over the generated PNG to an Image control inside Silverlight.

With Silverlight 3 came along the WriteableBitmap that enabled to skip the PNG step and Balder started to pick up performance and features were a lot easier to create. This story continued through for Silverlight 4 and Balder has received many a make over of both its rendering pipeline, but also internal architecture while I've learnt more and more in-depth of how to do things in the best way inside Silverlight. With the announcement of Silverlight 5 came a long a low level interface for drawing 3D utilizing the GPU sitting inside your graphics adapter. Finally Balder could shine with great performance and still maintain its declarative, Silverlighty way of doing things.

For SL5, that was the gold-plated story - the reality is quite different. Balder needed yet another architectural make-over in order to achieve hardware rendering with Silverlight. The main problem being that rendering now had to be done on a specific rendering event that sits on a completely different thread than the regular UI thread inside Silverlight. This poses quite a few problems when Balder is built to be declarative and have all the binding capabilities that Silverlight offers.

Most of the architectural change has been done - but far from being finished. There are still some holes that needs to be filled internally in Balder that has to do with code-smell basically. At one point in time, development of Balder went forward too fast - and code-quality was during this period suppressed in favor of number of features per day that could be implemented. I know, I'm not proud, but it was the reality for the period that things needed to get done and they needed to be done fast. Another aspect of Balder development has been the lack of being able to properly test things with unit tests all the way. Quite a few times I've tried to do the effort to retrofit tests without succeeding all the way. Silverlight is basically too hard to test if you want to be lightweight with your tests. Sure, there are things out there that mock out the runtime and you can make most of your code so that you don't have dependencies to the Silverlight runtime and just run the tests on the desktop framework. I've done all the techniques out there but never been happy with the flow. This is an ongoing things.

Are we there yet?
Phew.. So, were are we at?  Balder has a default branch which is still on the SL4 level where I left off over a year ago and there is a parallel branch for the SL5 parts and all the refactorings and changes that had to be done to bring Balder to SL5. There are some bugs and quirks in it and development is not going as fast as I would have hoped. There are a few reasons for that, one is the lack of tests and not a good story for retro fitting them. I've started doing it with MSpec and writing in a specification way instead, made it a lot easier but there is still a lot of work to be done there. The second reason things are going slow is that Microsoft has yet to come up with a good cross platform story for the 3D bits, in fact, thus far there is none - it only works on Windows for now. I've been probing them to get an answer, but haven't gotten one yet. To be honest, it has for a while halted my motivation for moving forward at the same pace, until last week when I had a breakthrough in rendering that increases performance quite a bit and also the quality for software rendering, which will then prove as the fallback solution for Mac.

Deferred software rendering

In addition the latest versions of the most used browsers on Mac supports WebGL, which is something that can be used directly from Silverlight as well. After getting the software rendering fallback done, I'll start looking at the WebGL approach as a second fallback scenario for those browsers that supports it.

Another aspect of the SL5 codebase is that Microsoft changed security from the beta released at Mix to the version released at Build which lead to in-browser shaders not being allowed to do loops. Balder supported 5 light sources with the pixel shaders I wrote for the Beta version, but can only do one with the latest version of SL5. In order to fully support an arbitrary number of lights I'll have to move over to deferred rendering and that has quite a few implications on how Balder works as well. But a job I've started and will make it the default rendering method across the board for now.

But all that being said, there are some critical issues that needs to be solved - they are issues that really makes it hard for me as a developer to get the velocity I want, so I will be going back and forth researching and bringing back the code quality I want to feel comfortable.

 

So, what about the tag-line of Balder and devices?
A couple of years ago I saw the opportunity to bring Balder onto more devices and started optimizing the code-base and extension points to be able to bring to things like the Windows Phone 7, iOS, Android and others. This is something I'd still love to do, but will not focus on it for quite a while. There is still too much work on the Silverlight side to justify focusing on devices just yet. There is a version of Balder for WP 7, but not for the latest Mango and to be honest, WP7 is in fact the hardest of these devices to get any proper rendering on since one is not allowed to write shaders for that device.

 

Conclusion
As you might understand, Balder is still active - not just at the same pace as before, hoping to pick this up a little bit moving forward. There are some code-rot that needs fixing, increase of code quality and things like that holding back development a bit, but also technical challenges with the platform. Since I'm relentless with the cross-platform part and am not willing to budge on it, I will focus my energy on getting that working and hopefully working good. If this was a commercial product, I would probably not go to the lengths I am to get the cross-platform parts working, but one has to remember that my original motivation for going down the road of creating Balder in the first place was based upon cross-platform - take that out and personally I will lose the biggest motivation I've had with the project.

I've established a Trello board were people can see what I'm focusing on these days for Balder.

 


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Categories: .net | 3D | Balder | C# | Silverlight
Post Information: Permalink | Comments (7) | Post RSSRSS comment feed

Wazzzzup ??

Its been quiet on this page since April, in fact - since 2007 this is the longest period of time that has gone by without any posts on the blog. The reason behind my quiet period has been that I've basically been working way too much. I've had quite a few things on my plate and really haven't had the time to blog at all, hardly had time to tweet even.

This is about to change. I've started clearing up my schedule quite a bit in order to focus more on the things I love; blogging, open-source and being social on the usual suspected social medias. Time to go back to the roots and rediscover the fun.

That being said…
For those of you who have been following my work on Balder have seen the occasional commit, but not at the pace you might be used to from me. I'm very committed to bringing back to life Balder - there are a few things I need to be doing to the library before I'm comfortable, but I'll be posting about that later in a separate post.

Another project that is dear to heart is something called Bifrost, something that has been getting a lot of love the last year and will get even more love moving forward from now. Also a project I will be blogging more about and sharing some of the experience from building with you.

 

Concluding this post with; I'm back and I will be focusing more on the blogosphere and the open-source community moving forward.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Categories: General
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Courses, fall 2011

I'll be doing a couple of courses this fall for Programutvikling, focusing in on LOB development in general with the subject of data access and Azure.

The first course will provide a backdrop for those wanting to take the MS 70-516 exam, focusing in on data access in your LOB apps. Read more about it here.

It has been scheduled for the following dates :

  • 24th of August
  • 5th of October
  • 23rd of November
The second course is a crash course in Windows Azure and will provide you with the capability of developing with Azure and take the right choices to make your application scale and become reliable in the cloud, you'll find the details here.

It has been scheduled for the following dates :

  • 19th of October
  • 9th of November


Currently rated 3.3 by 3 people

  • Currently 3.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Speaking at the Gathering 2011

Easter for some is taking time off to spend with your family, others spend their time at The Gathering, a get together of people with a common interest; computers. This year I've been lucky enough to be asked to speak there. The focus will be Windows Azure and also sneak in some Silverlight and Windows Phone 7 stuff. I'll be there for 2 full days doing multiple talks around these subjects - so if you're at The Gathering and want to learn more about how you can do things in the cloud with your favorite programming environment or want to learn more about doing cool stuff on the Web or the WP7, be sure to look out for the talks on this page when they are made available.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Speaking at NDC 2011

I've been preparing on and off a talk for NDC 2011 the last couple of months, at first I was not sure what it would become, but as the agenda came together and it had to get published the subject finally materialized 100%.

The talk will be about CQRS, but not a demo-ware thing - a real life project that uses it. At one of my clients, Komplett.no, the largest web-shop in Norway - we have applied CQRS. The talk will be about the experience with how it was applied, how the team learned and what pitfalls we went into.

On day 3 of NDC 2011, you'll find me on the 7. track.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Silverlight 5 and Balder

As most of you probably already know, Balder has thus far for Silverlight been a software rendered 3D engine. Basically what that means is that the CPU has been doing all the rendering, and not only that but also within the .net runtime. To say the least, quite costly - at least if one wants a bit of accuracy as well.

Now that the cat is out of the box and Silverlight 5 beta is available I can finally announce the new hardware accelerated support for Balder. The full feature list can be found here for Silverlight 5, the beta can be downloaded here.

Silverlight 5 Hardware accelerated 3D

With Silverlight 5, Microsoft is introducing hardware accelerated 3D graphics. What they have basically done is take the Xna route and implement a scaled down version of Xna for Silverlight. They have implemented the basics needed to do 3D rendering, so all the asset management that Xna normally provides you with on the desktop and the Xbox is not included - here is were Balder comes into play with its support for assets.

Balder is closing in on feature and rendering parity with the Silverlight 3/4 version of Balder.

Also worth mentioning is my good friend René Schulte has a blog post up with more specific Silverlight 5 3D details here showing the SLARToolkit with hardware accelerated 3D.

Whats there

The main priority for Balder has been to get the rendering visually equal with hardware rendering that the software rendering did, basically what that means is the lighting model that has been so far in Balder has been replicated in hardware.

Basically most of the features as you know it in Balder is supported, everything from asset management, geometries, scene management, view management, frustum clipping and all, and a hardware accelerated rendering pipeline.

The picture below shows the hardware accelerated version of Balder on the left side, and to the left is the software rendering version

Whats missing

Below you'll find a list of things that are missing :

  • Sprites

  • Directional lighting

  • Multi texturing - reflection + diffuse maps and mixing

  • Texture opacity

Over the next couple of weeks the parity gap will be closed, but also new features such as bump mapping, more asset loaders for other modelling formats and general bug fixing. Another thing is parity with Xna for the desktop and Xbox plus Windows Phone 7.

Shaders

Since Silverlight 5 uses Xna and graphics adapters work with the concept of shaders (vertex shaders and pixel shaders), this is also what Balder uses to do all rendering. This also means that Balder has opened up for you to actually write your own shaders but take advantage of Balders scene management, asset management and all the goodness that Balder provides, and everything done through Xaml. The shader can be specified by setting the CustomShader property on the Material object. Balder has a Shader object that you can create an instance of and point it to a PixelShader and a VertexShader.

Demos
Andy Beaulieu has been working with Balder and created a couple of demos that show what one can do with Balder now that the CPU is freed up to do other things. He has created a demo using physics and Balder - a video can be viewed here, the source for it can be found here. Andy has a blogpost up and running here with more details.

Balder has a SampleBrowser, and it is also available Silverlight 5 and can be viewed here.

Where do I get it?
The Balder release can be found here. After downloading the Silverlight 5 SDK and developer runtime, you basically download the Balder release and create a new Silverlight project and add references to all the DLLs in the Balder release. The next thing you need to do is add a parameter to the plugin setup in your HTML file that holds the Silverlight plugin. You need to enable GPU acceleration :

The source code for Balder for all this will be pushed later today.

Whats next?
Balder is an ongoing project and will continuously be developed and improved. I mentioned a few things above that will be focused on, another thing is animation. Full hierarchical animation and skeleton support and also skinning of it. Another aspect is design time support, today Balder is Xaml only - meaning that you have to type everything out. Although the API in Balder is very simple and the declarative nature of Balder is easy to use, design time support has been requested quite a few times. Another aspect is physics. The idea is to make physics a natural part of Balder by simply declaratively define properties for your objects so they can automatically take part of a physics scene without having to think much of it.


Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (11) | Post RSSRSS comment feed

Ruby student at your service

Ruby is getting a lot of attention these days - and I've scratched the surface of it myself and can understand why. These days I just want to get some more experience with it myself, but as with anything one has not done yet its kinda hard to get started. Sure, Googling things will get you going with the language itself but the flow of working with it takes a lot longer.


Another point is - if one comes from a different environment, one tends to look at new stuff with old glasses.


Therefor, I'm reaching out - is there a Ruby shop on the east-coast of Norway that would like to have me passively sitting besides/behind a developer for a day in order for me to pick up the flow and routine of developing on Ruby. If you do your Ruby development on a Mac as well, that would be a major plus.


I can't promise much back, I'm afraid - unless your shop needs input or help on Microsoft .net based technologies.


If this is doable at your shop, please contact me either via email : einar [at] dolittle [dot] com, twitter DM : einari or by phone : +47 909 66 858.


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (3) | Post RSSRSS comment feed

DoLittle it is

Back in 1997 I started doing some moonlighting on the side - small projects and I needed a company in order to do be able to do the work according to Norwegian law. I started a company called DoLittle Studios, registered dolittle.com as my domain and was set to go. The reasoning behind the name was basically to not do much. :)

Turns out now that the name couldn't be more wrong. As of 1st of March I'm my own boss - working as an independent consultant and as a trainer for Programutvikling.


Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (2) | Post RSSRSS comment feed