microsoft web matrix

19

Upload: saurabhnet

Post on 15-Jan-2015

2.291 views

Category:

Technology


1 download

DESCRIPTION

WebMatrix is a free web development tool from Microsoft that includes everything you need for website development. Start from open source web applications, built-in web templates or just start writing code yourself. It’s all-inclusive, simple and best of all free. In this session we will walk you through on how you can create a full production feature rich open-source website from scratch.

TRANSCRIPT

Page 1: Microsoft Web Matrix
Page 2: Microsoft Web Matrix

Build Your OwnReal World Websites With Matrix

Page 3: Microsoft Web Matrix

Saurabh is a Microsoft alumnus and one of the first 500 professionals around the world to be awarded Microsoft Most Valuable Professional (Visual C#), MCT.NET, MCTS(Windows/Web), MCSD.NET, MCAD.NET and MCDBA (Microsoft Certified Professional since 1998)

About Me

Page 4: Microsoft Web Matrix

• What is WebMatrix?

• Razor Syntax

• Database Access

• WebGrid

Agenda

Page 5: Microsoft Web Matrix

Introducing Web Matrix

Customize PublishCreate

Page 6: Microsoft Web Matrix

Introducing Web Matrix

Web Server Database Development Tool

Page 7: Microsoft Web Matrix

Who is Web Matrix for?

I <3 Web Apps. I just need a tool that makes them easier to

configure, customize and publish them

I want to build web sites myself with an

easy to learn tool and framework

I’m a professional software developer and

I build complex, large scale web sites with a

team of developers

WebMatrix WebMatrix Visual Studio 2010

Page 8: Microsoft Web Matrix

A Lap aroundThe magic of Web Matrix

Page 9: Microsoft Web Matrix

• The easiest way to code websites

• Easy to mix HTML and Code

• Lots of useful Helpers

Introducing Razor

Page 10: Microsoft Web Matrix

Razor : Cut above the rest

<ul> <% for (int i = 0; i < 10; i++) { %> <li><% =i %></li> <% } %></ul>

WEB FORMS

6 markup transitions

<ul> <?php for ($i = 0; $i < 10; $i++) { echo("<li>$i</li>"); } ?></ul>

PHP

2 markuptransitions 1display

echo

<ul> @for (int i = 0; i < 10; i++) { <li>@i</li> }</ul>

RAZOR

2 markup transitions

Page 11: Microsoft Web Matrix

Razor : Code to Markup

@{ var name = “John Doe”; <div> Your name: @name </div>}

OPTION 1

HTML block

@{ var name = “John Doe”; <text> Your name: @name </text>}

OPTION 2

TEXT block

@{ var name = “John Doe”; @: Your name: @name}

OPTION 3

SINGLE line

Page 12: Microsoft Web Matrix

Razor : Commenting Code

@* <div> Hello World </div>*@

OPTION 1

MARKUP

@{ //var name = "John Doe”; //@name}

OPTION 2

CODE

@* @{ var name = "John Doe"; @name }*@

OPTION 3

BOTH

Page 13: Microsoft Web Matrix

Razor SyntaxExperience the change

Page 14: Microsoft Web Matrix

Databases

SQL Compact EditionFile-based, so it’s portable. Runs without a server.

Easy to design, easy to code against

Designing

@{ var db = Database.Open("ArtGallery"); var product = db.Query("SELECT * FROM PRODUCTS); }

Coding

Page 15: Microsoft Web Matrix

Database AccessLet’s create our first database

Page 16: Microsoft Web Matrix

Display data using WebGridDisplays your data quickly and easilyLots of options to customize layout, appearance, paging etc.

@{ var db = Database.Open("ArtGallery"); var data = db.Query("SELECT * FROM PRODUCTS);

var grid = new WebGrid(data);}

<div id="grid"> @grid.GetHtml();</div>

<div id="grid"> @grid.GetHtml( columns: grid.Columns( grid.Column("Name", "Product", style: "product"), grid.Column("Description", format:@<i>@item.Description</i>), grid.Column("Price", format:@<text>[email protected]</text>) ) )</div>

@{ var db = Database.Open("ArtGallery"); var data = db.Query("SELECT * FROM PRODUCTS); var grid = new WebGrid( source: data, defaultSort: "Name", rowsPerPage: 3);}

Page 17: Microsoft Web Matrix

Display DataUsing WebGrid

Page 18: Microsoft Web Matrix

• What is WebMatrix?

• Razor Syntax

• Database Access

• WebGrid

Summary

Page 19: Microsoft Web Matrix

How do you reach me?

[email protected]

8826.935.555

get the latest at

http://www.facebook.com/ysaurabh

follow me at

http://www.twitter.com/ysaurabh