IgorShare Thoughts and Ideas

Consulting and Training

Roslyn: C# is cheating on me with JavaScript (or how to compile C# into JavaScript)

Posted by Igor Moochnick on 08/20/2012

imageWhile working extensively on development of the Single Page Applications (SPA) I was facing a fact that my server-side data models were evolving quicker than their JavaScript counterparts. Both the client-side and the server-side data models were getting quickly out of sync.

The brute force solution of using the T4 templating engine to emit both the client-side and the server side data models didn’t look that appealing to me. Primarily due to a simple fact that it’s not that easy to refactor the T4 templates. And, the ReSharper junkie like me, can’t tolerate this fact.

So I’ve decided to give the latest release of Roslyn compiler-as-a-service CTP another spin and use it as part of my build sequence and compile my C# models directly into the appropriate JavaScript ones. This was giving me the advantage of using the C# as a primary development environment and leaving the JavaScript to follow the “big-brother”.

Jinx C#-to-JavaScript compiler was created as a result of this exercise. You’re welcome to get the Jinx source from the GitHub. I’ll appreciate any collaboration on this project.

Note: all of the code is an intermediate solution that was answering my personal needs for the project I was running. It is in no-way represent the full fledge solution. If you want something bigger and more feature-reach, you can either contribute to my solution or look into projects like Script# or SharpKit.

Read the rest of this entry »

Posted in Architect, C#, Compiler, Javascript, Tutorials, Web | 3 Comments »

ASPConf 2012: Content for my presentations

Posted by Igor Moochnick on 07/20/2012

Building complex Single Page Application should be as enjoyable as visit to a SPA

You can watch the full Video on Channel9 and get the Source on the GitHub.

Check out the video


Tips for Building Responsive Cloud Applications

You can watch the full Video on Channel9 and get the Source on the GitHub.



Posted in Azure, Cloud, Javascript, Presentations, Web | Leave a Comment »

ASPConf: Generating dynamic views, but Google Chrome was too smart for me

Posted by Igor Moochnick on 07/20/2012

I had a blast presenting for ASPConf 2012. I want to thank all the organizers, presenters and attendees. Without you it wouldn’t have been possible.

One of the questions from one of the attendees during my “Building complex Single Page Application should be as enjoyable as visit to a SPA” talk was:

Q: Is it possible to bring on-demand portions of the application that will be emitted by the Asp.Net MVC Views (aka: dynamic views generation)

A: Sure (see Picture #3).

But when, in fact, I’ve tried to demonstrate it right away – I hit a snag.

What happened is: my implementation was correct but Google Chrome was too smart for me to handle it and wrapped the partial HTML with the full “HEAD” and “BODY” tags [See Picture #1].

I’ve assumed that my server was returning more than the generated by the Raw view content itself. If I would’ve checked a network stream [See Picture #2] (or Fiddler) I would’ve seen another result – the correct one.

Picture #1


Picture #2


So, this is a simple example how you can import a dynamically generated content from an Asp.Net Mvc view into a SPA application:

1. Create a view

2. Create a Controller entry (when you’ll navigate to this view you should see a result on Picture #2)

3. Change a dependency path in your SPA view to point to the new content (and the final result should look like Picture #3)

Picture #3


Posted in ASP.NET, Javascript, Presentations, Web | Leave a Comment »

Just got one of my patents approved!

Posted by Igor Moochnick on 07/15/2012

One of the patents, filed during my tenure in Symantec, was just recently approved.

I had a blast working on this product and the team was amazing. We’ve learned so much about building highly scalable systems and NoSql storage from scratch. And we’ve been running a REAL Agile team.

US 8,214,490 B1


A computer implemented method for determining whether to block incoming electronic content based on running rates of content origination from sources, the method comprising the steps of:

receiving, by a destination computer, information concerning origination of incoming electronic content received from at least one external source over time;

aggregating, by the destination computer, the received information concerning origination of electronic content from the at least one source, wherein the received information comprises notifications from multiple sources;

calculating, by the destination computer, at least one running rate of content origination from the at least one source, based on aggregated information concerning origination of electronic content from the at least one source, wherein the running rate is indicative of a reputation of the at least one source, and wherein the running rate comprises a single number updated using at least an amount of time since the last update to control an influence of new information on the running rate;

receiving, by the destination computer, incoming electronic content from a specific source; and

determining, by the destination computer, whether to block the incoming electronic content from the specific source responsive to at least one running rate of content origination from the specific source.

Read more …

Posted in Thoughts | Leave a Comment »

PaaS requires new dictionary definition

Posted by Igor Moochnick on 06/21/2012

There is a big range of opinions on what PaaS means. Last week during the CloudExpo 2012, one of the representatives of the AT&T booth told me that they offer PaaS when I’ve mentioned that I’m an architect and a developer working to provide a cloud abstraction fabric. When I’ve asked him to elaborate, he explained that they provide a way to people to create some forms and workflows to collect customers’ data and aggregate it. When I’ve asked him about what development environment they support he looked at me like I was an idiot and said: “this is the whole beauty of it – no development or coding is required but if I need something extra, their smart support team will build it for me”. The explanation of their features reminded me of the Google Docs.

At this moment I felt I was talking to an alien from "Man in Black". I challenge the guy on the fact that their offering can’t be possibly called PaaS and that it’s closer rather to SaaS. The guy killed me with one simple statement: "we provide you a PLATFORM to build your forms, hence we provide a PLATFORM-as-a-Service".

This conversation represents a similar trend we had a couple of years ago when every vendor who was selling some type of virtualization was claiming an IaaS and cloud affiliation. This is exactly what is causing a huge confusion for the consumers and customers with what the cloud is and means, what it is for and what it can deliver.

I feel that there is a need for a good new dictionary definition that can coin and explain all the cloud-related taxonomy and can either clearly identify the boundaries between the realms or bring the new definitions to all these overlapping gray areas.

In my dictionary: PaaS is a realm for the developers only (no offense for the rest of the world). In this context I mean that PaaS is a systems that exposes a defined set of APIs for anyone who is willing to code new behavior and orchestrate new service and application on top of it. Only in this case it can be called platform.

I do agree that the word “platform” has a wider meaning but I’m looking to create a clear distinction in our verbal communications so we, between ourselves, will know what we’re talking about.

Posted in Cloud, Thoughts | Leave a Comment »

Hybrid cloud experiencing explosion rate

Posted by Igor Moochnick on 06/20/2012

During the “State of the Clouds” presentation (at the RightScale 2012 conference) I’ve noticed an interesting slide that indirectly proves my point that I was stressing for the last 2 years – the enterprise customers are not yet ready to start using public clouds for their production needs, but they entertain the idea of the hybrid solutions. The slide doesn’t say anything specifically about the type of the customers, enterprise or not, but shows the trend in the market which reflects the mind-set shift.

Take a look of the scale and the speed of the Hybrid Cloud adoption:


Posted in Cloud, Thoughts | Leave a Comment »

Azure-related source repositories

Posted by Igor Moochnick on 06/19/2012

Microsoft has started opening more and more of the internal source code. Here are a couple of starting points:

Posted in Azure, Cloud | Leave a Comment »

Trying to embed Gist in Windows Live Writer

Posted by Igor Moochnick on 06/17/2012

You need to put the following line in the “source” page of your post:

[gist https://gist.github.com/2944955%5D

Here is my test Gist:


Here you can find in-depth explanation how to do this: http://en.support.wordpress.com/gist/

Posted in Training | Leave a Comment »

CloudExpo in retrospective

Posted by Igor Moochnick on 06/17/2012

The visit to NewYork was a success from so many angles. Apparently I did a very bad homework but, accidentally and to my surprise, I hit New York’s Javits Center at a great point of time – at the same time there was a whole cluster of cloud-related events going on in parallel and I was able to get into a bunch of them:

My main goal was to visit CloudExpo and to network. I was looking to establish new connections and partnerships. CloudExpo, for me, was both a great success and a great disappointment.

It was disappointing to me as an architect because I didn’t learn anything new. I didn’t account for it to be a trade show in its purest meaning. Most of the sessions were presented by sales and marketing people and were targeted for clueless crowd that, as they thought, never heard about the cloud and was ready to eat any BS that was fed to it. This leads me to ask the CloudExpo organizers (and I got the same feedback from many attendees): please put names of the vendors and presenters’ titles on the Sessions schedule. This will greatly help attendees to make decisions on what sessions to visit.

The success of the CloudExpo concentrated in a bunch of great discussions I had with a couple of smart people and potential partners. Everyone was excited to hear about our BlueMetal ideas on the cloud PaaS abstractions.

One of the biggest ups and downs for me was a session from NetAxiom. The presenter, Sandy Zylka (VP Products & Technology), was speaking in a soft voice of a night time story teller that you use with your kinds when they fall asleep and you want to convince them to finally close their eyes at the end of the story.

  • When she said that now is the time to change the Cloud development paradigm – I felt enjoyment and excitement.
  • When she pointed out the current issues in the Cloud development and scaling – I felt I was flying.
  • But when she started mentioning some magic things that promise us automatic distribution of the program methods, automatic scaling across multiple machines and nodes – I started to feel dizziness and got a strong sense of DejaVu: we’ve been there. It was called RPC.
  • When the speaker mentioned that all of the current development methodologies are not valid anymore and we need to forget about coding functions and prescriptions for compilers – I started to feel really sick.
  • But when she said that it’s time to do development in graphical format which will produce some XML-like metadata instructions for the system that will ingest it and will figure out auto-magically what to do with all this – I vomited inside my mouth.

Our industry has experienced such disease in the form of UML code generation and COBOL that was promising business people to "describe" stuff without a need for developers (and then developers needed to fix and maintain all this crap).

5 minutes into the presentation and during the single slide, I felt as an institutionalized patient with a drooling moth that was fed by a spoon by a nurse. I couldn’t stand a single word more and left the session. I didn’t come to hear about unicorns pooping the rainbows.

Posted in Cloud, Thoughts | Leave a Comment »

Redis starting points

Posted by Igor Moochnick on 06/13/2012

If you’re interested I starting using Redis, here are a couple of start points:

Posted in Uncategorized | Leave a Comment »

%d bloggers like this: