Tutorial: WebMatrix - By Shahrad Rezaei MSP



    A few weeks ago, Microsoft released Beta 3 of WebMatrix. Now if you’ve been sleeping in or playing video games, (I know I have J) you might not know what it is. In that case, you’re in luck! This is what today’s post is about.


    Microsoft WebMatrix is a new IDE which allows for easy and fast web development. It has an easy to use user interface which resembles that of the Office suite thanks to the ribbon on top, which allows users to quickly find the tools they want and focus on their code. It also uses the new Razor view model (basically, Razor is a different syntax for coding in ASP.NET), which simplifies the coding process and allows you to do what you want quickly, and without the ugly code. However, WebMatrix allows you to code in various formats, such as HTML, ASP.NET, ASP, Razor (the CSHTML format) and many others, so you’re not necessarily forced to use Razor if you don’t want to (although it’s really worth it, if you ask me.)

    Also, another thing I really appreciate love is the user interface. The WebMatrix team clearly went above and beyond to deliver a nice, polished (and dare I say sexy) interface that people will enjoy working in. And I think that this also adds to the value of the product as a whole, and people who felt intimidated by Visual Studio or NetBeans or any other complex IDE will find themselves right at home when using WebMatrix (I know some people who would rather code in Notepad than in an IDE because they find it too complex.)

    Feature-wise, WebMatrix provides all the basic tools for code-writing, such as compiling (on multiple web browsers), auto publishing and some other nifty tools such as reports and databases. However, for those who want the extra firepower, there is a conveniently placed button which allows you to write your code in Visual Studio, and take advantage of Intellisense and other advanced tools to make your tasks easier and faster. (No, there isn’t any Intellisense in WebMatrix, but it will be there in the next full release, so don’t despair.) If you’re trying to learn how to code and get around in an IDE, you can start by WebMatrix, and when you feel comfortable enough, you can easily switch to Visual Studio!

    However, if you don’t want to start from scratch, or if you are just looking for examples, there are a few pre-installed templates that you can use in order to get you started on your project. You can even create a web application based on an existing open source application by choosing it from the Web Gallery, so, for example, if you want a WordPress application, all you need to do is select it in the gallery, fill out the wizard and ta-da! You’ve just got yourself a WordPress website. Now, all that is left to do is to find some money to host it.


    Finally, the last thing I would like to discuss is the new Razor syntax. This new syntax allows you to code in ASP.NET in a simpler and more organized way. I’ve personally never coded in HTML, ASP or ASP.NET before, so I won’t even try to give a comparison, but I must say that I found the Razor syntax to be really easy to learn and understand. It’s kind of a mix of C# and HTML together, and it works very well. The compiler detects whether your code is HTML or C# using the ‘@’ character, and with that, you can easily mix your code together in a clean and organized way. I wrote a little Hello World page (well, it’s actually a Hello Me. I wanted to use a variable and I really had no other ideas. Sorry.)

    The Code

    The Page

    @{ var name = "Shahrad"; }


    <p>Hello, my name is @name</p>


    Another nifty thing I want to point out before I end this post is the various helpers that are available with this. Helpers are objects that you can use to quickly make some stuff for your webpage. They range from tables and charts to image and video management all the way to user authentication and website security. And, they are very easy to use too!

    So, as you can see, WebMatrix is really a simple and intuitive tool built around a language that shares the same ideology. Personally, I think that those of you who are looking for something a bit more advanced than Notepad, but still doesn’t feel ready for a big IDE, WebMatrix is a great place to start! Especially if you’ve just started programming, WebMatrix will provide you the tools you need to build your websites in the simplest way possible, without all the hassle and buttons of more complex IDEs. And when you feel ready, you can very easily transition to Visual Studio, where you’ll have access to all the more advanced tools you need to help you add that little extra to your website.  To download go to dreamspark!

    If you’re curious about this, here are some resources you should check out:

    ·         WebMatrix Download Page
    This is where you go to get the tools. You also have an explanation of what WebMatrix is and what it can do for you, as well as links to some tutorials.

    ·         The WebMatrix page on the ASP.NET website
    Here, you’ll find a bunch of tools to help you get on your feet and fast. The tutorials will walk you through the workings of the Razor syntax and the helpers as well as the IDE itself. You can also ask questions on the forums if you need help too.

    ·         Scott Guthrie’s blog
    Scott Guthrie is the Corporate Vice President of the Microsoft Developer Division. He ran the team that developed WebMatrix and he has some very interesting posts about the IDE and Razor that are worth a look.

    ·         Andrew Nurse’s blog
    Andrew Nurse is a software engineer who worked on the Razor parser. If you want a really, in-depth view of how everything works, that’s where to go. Or, if you prefer it in video form, Charles Torre interviews him in one of the episodes of “Going Deep” on Channel 9.

  • Go DevMENTAL

    Microsoft Research & Development: Kinect - Part 1: An Innovative New Approach



    Happy New Year! 2011 is going to be a huge year and wishing everyone the best!  2010 just passed us but it was not with some big announcements.  Microsoft released the much anticipated Kinect hardware for the XBOX 360 entertainment gaming console.  To kick start the new year, in this 10 part weekly mini series we will explore the origins, science, and applications behind the innovations of the Microsoft Kinect. This motionless controller extension for the Microsoft game console has already revolutionized the entertainment and video gaming worlds while more industries such as medical and business will soon follow.

    Never had we been able to experience human and machine interaction without needing to hold or wear some form of input device.  Microsoft Research and Development group is behind the innovation of the Kinect peripheral.  The company's initiative to develop ground breaking ideas into applications from within the company has led Microsoft to fund heavily in creating consumer market products.  The Kinect's functionalities and applications is still a work in progress but the core of its features has been an investment that was worth the wait.  Over 3 years of research, design, development, and proof of concept drafts has been invested across Microsoft's research operations in the United Kingdom, China, and Redmond United States.


    The idea behind the Kinect came abouts creating a better and more realistic gaming experience than what was on the market 3 years ago.  Taking what Nintendo Wii console had started with motion sensing game play, Microsoft completely took the idea in a whole new innovative direction and eliminated the need of having users hold hardware devices.  This new approach to gaming  has freed up the player's hands and allows for complete degree of freedom.  Microsoft's different research groups collaborated on machine vision language protocol/algorithm technologies which enables the XBOX console to recognize players in front of the hardware's camera.  In part 2 of the Microsoft Research & Development series, we will dive into the concepts and how Microsoft brought machine vision technology to life with XBOX Kinect. 


    Game Development Tools:  Dreamspark                


    Part 2:  Machine Vision technologies


  • Go DevMENTAL

    Welcome to Microsoft By Prashanth Gopalan - An Intern's Experience


    When I first heard that I was going to be working for Microsoft, the first thing I did was to sit back and take a deep breath. If I had had the energy I would have proceeded to do a mazurka, a jig and then finish off with a pirouette, before then tearing off my clothes and streaking down the hallway.

    Fast-forward to October 2010 and “hectic” was my new watchword. It’d been more than a month since I’d joined the ranks of Microsoft’s army of marketing assistants, and the work just kept on coming. If you thought your organizational skills were top-notch in university, wait until you’ve whetted your appetite at a company like Microsoft – you’ll soon be eating your words.

    The reality of the situation became clear on Day One. I sat at my desk, signed into my user account and within three seconds, fourteen emails had forced their way into my inbox. I spent most of the morning fighting a hungry tide of emails, memos and meetings, only to find that I was to test and deploy a newsletter, follow-up on three pending investigations from the previous coop’s to-do list and then attend two lunch-and-learn sessions – all in just 4 hours. My saving grace was four cups of coffee, two cokes and plenty of stubbornness to keep me ploughing through my own to-do list. By lunch time I was answering emails at a rate of 6 per minute and I was receiving a new email every 8 seconds.


    Was it worth it? Yes! It was insane. I was loving it.

    If you’re expecting to read a list of personal gripes – don’t. The real world doesn’t care if you’re a coop, or an intern – it expects you to pick off right where the last coop left off – and quickly to boot.

    At the end of the first day I still didn’t have a clue as to what my role in the organization was. Ok, I lie a little, but I can say that I was sane enough to realize that my job description only extended up until the front entrance, beyond which I was free to perform any manner of mental gymnastics to try and decipher how the myriad tasks being flung my way were in any way, shape or form, related to one another.  The truth is, I’m still not fully sure. Maybe they are related, maybe not. Maybe some are related, others aren’t. It really doesn’t matter. If I’m learning anything at Microsoft, it’s that I’m able to live a tangible re-enactment of the statement “reality is what we make of it.” I know my position mainly centres around metrics, reporting, deploying newsletters and managing websites (as most marketing assistant positions are wont to do), but I’ve also realized that if I spy an opportunity to get involved in a project or event that’s outside of my scope of responsibilities, and I choose to take it, or if I offer to make my manager or my colleague’s life easier by shouldering some of their workload, I will be rewarded with opportunities to develop new skills, make amazing contacts and learn more about myself in the process.

    What’s more, once people saw that I was willing to devote a little extra time and effort to participate in an event that I didn’t have a direct stake in, I started hearing back from them more often. I’d be sent a quick email, often as an afterthought, but it’d be enough for me to find another way to apply and hone my skills in a new direction.

    The truth is, I may come away realizing that I only carried a certain portion of my job description at Microsoft (the rest having changed or been made redundant over time), but I can safely say that I’d never have known what I would have been capable of if I hadn’t pushed myself to find out. And being on the lookout for challenging opportunities to get involved in belongs on the same long road to growth, development and – higher up on Maslow’s pyramid – self-realization and self-actualization.  I hope I can live up to that statement.  In the interim, as I progress through my work term with this organization, I’ll continue to serve you platters of my thoughts and ideas, garnished with my opinion and accompanied with my perspectives as a student.  In case you’re wondering, I haven’t yet found a way to reach out to Bill Gates, but I promise you…I’ll keep trying.


  • Go DevMENTAL

    The Imagine Cup Journey- Part 2: "Quitting"


    So this was the competition I have been waiting for.  This was the year where I said to myself that I will do something beyond and execute to the end.  Imagine Cup is about my big chance to bring world-changing concepts and designs to life.  And I quit.  3 weeks into the project and things did not go the way the team had envisioned.  Two good friends who I talked to extensively about the project had suddenly become uninterested.   As we progressed deeper into the design and mapping out commitments for each member, everyone realized what potential challenges and the degree of work that laid ahead.  This was a project that started in early September and a month had passed without much advancement.  Things lingered on and the team members dispatched when the first wave of midterms came swooshing in.  I lost motivation in the midst of everyone’s disbelief of a feasible solution to help developing nations.  I recall staring off in space for an hour at the library thinking of what to do next when my stomach started to growl.  It made this low constant tumbling sound and acted like a reminder that somewhere in this world, someone was suffering from hunger.  I quickly packed up and went to grab a cookie.  While munching on the cookie, I drafted up an email asking to meet with the dispatched team one more time to discuss the possibilities.  The meeting was successful and yet not.  Two of the original four members were still not interested based on the project ideas and their other commitments.  But what came out of that meeting was the root of our solution.  We mapped out together the reasons we believe problems exist in developing countries.  From those reasons we prioritized their importance on impact and how feasible a software solution might be given the time frame.  The only bright side of having two friends quit the team was finally finalizing the competition category we were competing in and deciding on creating a food churning machine.  This was exciting because we had an idea to grow from now and it was a refresh from the gloomy disbelief spirit.    



    The philosphy behind Imagine Cup is about working together and letting your ideas soar across and beyond any barriers that may exist.  It is about solving today’s toughest, most challenging issues on a global level and within your own region.   Visit www.imaginecup.com to find out how you can make an impact today!  Together we can change the world, one line of code at a time.       


  • Go DevMENTAL

    Sudoku3D: XNA Mobile Game Development Experience By Alexander Yakobovich - MSP


    Back in November of 2008, Microsoft launched the Xbox Live Indie Games Channel, giving indie developers a chance to publish to a platform that was once exclusive to major game studios. At the time, I was experimenting with C# bindings for OpenGL and DirectX purely out of interest. But the never before seen opportunity to publish directly to a game console, sparked a desire to create a complete game. The opportunity subsequently introduced me to the tri-platform game development framework, XNA.

    Back then I was a computer science undergrad, and managed to get a fellow classmate interested in developing for the Xbox as well. Together we came up with a few ideas for games, most of which though were just unrealistic for a development team of two with no background in 3D game programming. Eventually we agreed on a simpler start, with a unique spin – literally – on the classic Sudoku puzzle. 

    This variation of the puzzle was in full 3D and placed on the surface of a cube, where each face of the cube would contain 16 unique values, with all 6 faces ultimately contributing to one unique solution. We decided on a simple name – Sudoku3D. It was unique, simple to play, relatively easy to implement, and would still require an emersion into 3D graphics. We agreed that the game itself would have to appeal to both challenge-seekers and those who would prefer the classic Sudoku puzzle. As a result, one of the signature features of Sudoku3D is the ability to unfold and flatten the cube into 2D view and fold it back for 3D viewing in real-time.

    Soon after development began, the XNA framework became a lot more than a technical requirement to get published on XBLIG. It became an obsession!  Designed for accelerated managed game development, a team of computer science students (that would eventually grow to 4) could only feel blessed to work with XNA, which reduces amount of time spent on writing boilerplate code. Two years later, it would also become my tool of choice for my Masters project, which deals with significantly more complex 3D development than Sudoku3D.

    While developing Sudoku3D for Xbox, I was eventually slapped with the reality that a puzzle game (even in 3D) was not exactly a perfect fit on a console that was dominated by first-person shooters like Halo. At the time I wished that Microsoft would release a “phone version of Zune”, that – just like Zune – would support XNA runtime, but with added 3D capabilities. Eventually my wish was granted, and a Zune Phone (yes, I really did call it that) was announced.

    With the 4th release of XNA, we continued Sudoku3D as a Windows Phone 7 project and tested it with the emulator. Later, we received a special opportunity to test the game on a WP7 developer prototype. The joy of seeing the first screen rendered on the phone screen was quickly demolished by the horrendous frame rate that the game ran at. At barely 4 frames per second, the puzzle resembled a cartoonish slideshow more than a 3D game.

    Even though Windows Phone 7 is branded as an “Xbox in your pocket”, without prior mobile game development experience, we didn’t really know what to expect on the actual device in terms of performance. The fact that we were developing a simple puzzle game didn’t help either; it only added to complacency during development. In the initial promotion of WP7, the game “The Harvest”, a 3D extravaganza, ran at a smooth and steady 30 fps, whereas our simple puzzle on a cube was a slideshow. The lengthy optimization period (or as I would like to call it: “learning period”) lasted longer than the development of the game. In that time, we fixed more mistakes than XNA’s Shawn Hargreaves ever mentioned in his blog (and his blog is huge!).

    Fast-forward to present day, Sudoku3D is finally on the device it was meant for. After passing certification without a single failure, the game picked up over 4,000 fans on Facebook (facebook.com/Sudoku3D) in less than a week on the marketplace. And having learned many lessons in game development, we were able to push the first update to the game within the first week after publishing the game.  More information and video demos may be found on the Sudoku3D Facebook Page

Page 1 of 2 (7 items) 12