webmatrix, see what the matrix can do for you!!

49
WebMatrix: See What the Matrix Can Do For You!! Frederic Harper Developer Evangelist Microsoft Canada

Upload: frederic-harper

Post on 13-Jan-2015

696 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: WebMatrix, see what the matrix can do for you!!

WebMatrix: See What the

Matrix Can Do For You!! Frederic Harper

Developer Evangelist

Microsoft Canada

Page 2: WebMatrix, see what the matrix can do for you!!

Agenda

• What is WebMatrix?

• Who is WebMatrix for?

• Razor syntax

• Database access

• Helpers

• App Gallery & OSS Apps

Page 3: WebMatrix, see what the matrix can do for you!!

My goals

Page 4: WebMatrix, see what the matrix can do for you!!

My goals

Page 5: WebMatrix, see what the matrix can do for you!!

My goals

1. Show you how it’s easy to use WebMatrix to

create awesome websites or Web applications

Page 6: WebMatrix, see what the matrix can do for you!!

WebMatrix

Page 7: WebMatrix, see what the matrix can do for you!!

What is WebMatrix

It’s a free tool that makes it easy to

Create

Configure

Publish your websites and web applications

Page 8: WebMatrix, see what the matrix can do for you!!

What is WebMatrix

1. Web App Gallery & Templates

Page 9: WebMatrix, see what the matrix can do for you!!

What is WebMatrix

1. Web App Gallery & Templates

2. Web Server: IIS Express

Page 10: WebMatrix, see what the matrix can do for you!!

1. Web App Gallery & Templates

2. Web Server: IIS Express

3. Standards Support: HTML, CSS, JavaScript

What is WebMatrix

Page 11: WebMatrix, see what the matrix can do for you!!

What is WebMatrix

1. Web App Gallery & Templates

2. Web Server: IIS Express

3. Standards Support: HTML, CSS, JavaScript

4. Scripting Support: ASP.NET & PHP

Page 12: WebMatrix, see what the matrix can do for you!!

What is WebMatrix

1. Web App Gallery & Templates

2. Web Server: IIS Express

3. Standards Support: HTML, CSS, JavaScript

4. Scripting Support: ASP.NET & PHP

5. DB Manager: SQL Server & MySQL

Page 13: WebMatrix, see what the matrix can do for you!!

What is WebMatrix

1. Web App Gallery & Templates

2. Web Server: IIS Express

3. Standards Support: HTML, CSS, JavaScript

4. Scripting Support: ASP.NET & PHP

5. DB Manager: SQL Server & MySQL

6. Optimization Tools: SEO & Performance

Page 14: WebMatrix, see what the matrix can do for you!!

Who is WebMatrix for?

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

and publish

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

Page 15: WebMatrix, see what the matrix can do for you!!

Two ways to build

Page 16: WebMatrix, see what the matrix can do for you!!

Two ways to build

Option A: From Scratch

Page 17: WebMatrix, see what the matrix can do for you!!

Two ways to build

Option A: From Scratch

Option B: From Web App

Page 18: WebMatrix, see what the matrix can do for you!!

demo A lap around WebMatrix

Page 19: WebMatrix, see what the matrix can do for you!!

Razor

Page 20: WebMatrix, see what the matrix can do for you!!

What is Razor

Page 21: WebMatrix, see what the matrix can do for you!!

1. A new view engine

What is Razor

Page 22: WebMatrix, see what the matrix can do for you!!

1. A new view engine

2. Compact, Expressive, and Fluid

What is Razor

Page 23: WebMatrix, see what the matrix can do for you!!

1. A new view engine

2. Compact, Expressive, and Fluid

3. Easy to Learn

What is Razor

Page 24: WebMatrix, see what the matrix can do for you!!

1. A new view engine

2. Compact, Expressive, and Fluid

3. Easy to Learn

4. Is not a new language

What is Razor

Page 25: WebMatrix, see what the matrix can do for you!!

1. A new view engine

2. Compact, Expressive, and Fluid

3. Easy to Learn

4. Is not a new language

5. Works with any Text Editor

What is Razor

Page 26: WebMatrix, see what the matrix can do for you!!

1. A new view engine

2. Compact, Expressive, and Fluid

3. Easy to Learn

4. Is not a new language

5. Works with any Text Editor

6. Has great Intellisense

What is Razor

Page 27: WebMatrix, see what the matrix can do for you!!

1. A new view engine

2. Compact, Expressive, and Fluid

3. Easy to Learn

4. Is not a new language

5. Works with any Text Editor

6. Has great Intellisense

7. Unit Testable

What is Razor

Page 28: WebMatrix, see what the matrix can do for you!!

Introducing Razor <ul>

<% for (int i = 0; i < 10; i++) { %>

<li><% =i %></li>

<% } %>

</ul>

Web Forms (6 transitions):

PHP (2 transitions & an echo):

Razor (2 transitions):

<ul>

<?php

for ($i = 0; $i < 10; $i++) {

echo("<li>$i</li>");

}

?>

</ul>

<ul>

@for (int i = 0; i < 10; i++) {

<li>@i</li>

}

</ul>

Page 29: WebMatrix, see what the matrix can do for you!!

Code to markup easily @{

var name = “John Doe”;

<div>

Your name: @name

</div>

}

Option 1: HTML Block

Option 2: Text Block

Option 3: Single line of output

in markup

@{

var name = “John Doe”;

<text>

Your name: @name

</text>

}

@{

var name = “John Doe”;

@: Your name: @name

}

Page 30: WebMatrix, see what the matrix can do for you!!

Commenting @*

<div>

Hello World

</div>

*@

Option 1: Markup

Option 2: Code

Option 3: Both

@{

//var name = "John Doe”;

//@name

}

@*

@{

//var name = "John Doe";

//@name

}

*@

Page 31: WebMatrix, see what the matrix can do for you!!

demo Razor syntax

Page 32: WebMatrix, see what the matrix can do for you!!

Database

Page 33: WebMatrix, see what the matrix can do for you!!

Database

• SQL Compact Edition

• File-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 34: WebMatrix, see what the matrix can do for you!!

demo Database access

Page 35: WebMatrix, see what the matrix can do for you!!

Helpers

Page 36: WebMatrix, see what the matrix can do for you!!

What are Helpers?

Helpers make it easy to quickly add commonly used functionality into your websites

and many more…

Page 37: WebMatrix, see what the matrix can do for you!!

Two categories

HTML Helpers

• Facebook

• Twitter

• …

Make is faster and easier to render commonly used

markup to the page.

Make is faster and easier

to call complex APIs from

your website.

API Helpers

• PayPal

• Windows Azure Storage

• …

Page 38: WebMatrix, see what the matrix can do for you!!

demo Helpers

Page 39: WebMatrix, see what the matrix can do for you!!

App Gallery & OSS Apps

Page 40: WebMatrix, see what the matrix can do for you!!

OSS Apps

1. Free

2. Popular = large community

3. Gets you close to the solution quickly

4. Easy to configure

Page 41: WebMatrix, see what the matrix can do for you!!

Build on the success of Web PI

Web Platform Installer WebMatrix

Download

Install (inc. dependencies)

Customize

SEO Analysis

Publish

Page 42: WebMatrix, see what the matrix can do for you!!

demo App Gallery

Page 43: WebMatrix, see what the matrix can do for you!!

Conclusion

Page 44: WebMatrix, see what the matrix can do for you!!

Next steps

1. Install WebMatrix

2. Play with it

1. Create a new website with templates or from scratch

2. Edit an existing one

3. Deploy an app by using the App Gallery

3. Unleash the power of the Matrix & have fun

Page 45: WebMatrix, see what the matrix can do for you!!

Resources

• http://microsoft.com/web/webmatrix

• http://asp.net/webmatrixresource (v1 tutorials)

• http://www.webnotwar.ca/

Page 46: WebMatrix, see what the matrix can do for you!!

Remember To Complete Your Evaluations!

You could WIN a Samsung Focus Windows Phone 7!

Let us know what you liked & disliked!

Remember, 1=Bad, 5=Good

Please provide comments! No purchase necessary. The contest is open to residents of Canada (excluding government employees). The Toronto Tech·Days evaluation form contest begins on October 25th, 2011 and ends on October 26th, 2011. The Vancouver Tech·Days evaluation form contest begins on November 15th, 2011 and ends on November 16th, 2011. The Montreal Tech·Days evaluation form contest begins on November 29th, 2011 and ends on November 30th, 2011. Participants can enter the contest in one of two ways: (1) complete and submit an evaluation form by the contest close date; or (2) provide contact information by the contest close date. The draw for Toronto will take place on October 31st, 2011. The draw for Vancouver will take place on November 21st, 2011. The draw for Montreal will take place on December 5th, 2011. The chances of being selected depend upon the number of eligible entries. Selected participants will be contacted by phone and/or e-mail and will be required to answer correctly a time-limited skill-testing question. There are three (3) prizes available to be won. One (1) prize will be given away for each Tech·Days event in Toronto (October 25-26 2011), Vancouver (November 15-16 2011) and Montreal (November 29-30 2011). The prize consists of a Samsung Focus Windows Phone 7 (handset only; voice and/or data plan not included) (approximate retail value of $499 CAD). The prize will be delivered to the shipping address designated by the winner within 6-8 weeks. The winner may be required to sign a declaration and release form. For full contest rules, please see a Microsoft Tech·Days representative.

You can email any additional comments directly to [email protected] at any time.

Page 47: WebMatrix, see what the matrix can do for you!!

Q & A

Page 48: WebMatrix, see what the matrix can do for you!!

Contact me

Frederic Harper, Developer Evangelist

[email protected]

@fharper

http://webnotwar.ca

http://outofcomfortzone.net

Page 49: WebMatrix, see what the matrix can do for you!!

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should

not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.