+ All Categories
Home > Technology > Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Date post: 22-May-2015
Category:
Upload: jun-ichi-sakamoto
View: 1,373 times
Download: 0 times
Share this document with a friend
Popular Tags:
31
Building CLR/H Registration Site with ASP .NET MVC4 and EF4.1 Code First
Transcript
Page 1: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Building CLR/H Registration Site

with

ASP.NET MVC4 and EF4.1 Code First

Page 2: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Requirements of registration site.

• Attendees can do registration from Web.

– Entry name, e-mail, twitter id ...

• Share attendees list only within CLR/H staffs.

– The list is used by staff at reception.

Page 3: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Today’s key words

ASP.NET MVC4 Visual Studio

11 Beta

Entity Framework 4.1

Code First

Twitter Bootstrap

AppHarbor

ASP.NET

Web API

Git

Web Pages View

“Razor” Syntax

SQL

Server

2012

LocalDB

NuGet

Page 4: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Create It!

Live Demo

Page 5: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Publish to internet It!

Next step...

Page 6: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Why AppHarbor?

• The most reason is... I interested in it! :)

• Second reason, it is low cost at start up.

– Form $0 for ASP.NET Web Site hosting.

– From $0 fot Rent SQL Server (20MB limited).

Page 7: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Notice

• You must store the all NuGet packages which

installed into Git repository.

– I tried “NuGet Package Restore” feature, but it didn’t work.

• EF4CodeFirst “DropDatabase” initializer

doesn’t work.

– Because the database is not mine.

It is only rental.

So, we can not drop it.

– You must use “CreateTablesOnly” initializer.

(install from NuGet.)

Page 8: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Publish to internet It!

Live Demo

Page 9: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Authenticate & Authorize It!

Next step...

Page 10: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

How to

authentication?

Page 11: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Windows

authentication?

Page 12: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

No.

It is internet site,

not intranet.

Page 13: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Forms

authentication?

Page 14: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Sorry.

I do not choose

Forms

authentication

today.

Page 15: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

My choice is...

Page 16: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

HTTP

Basic

Authentication!

Page 17: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Why HTTP Basic Authentication?

• Becase, it is HTTP standard.

• So that, we can authenticate any clients by

standard way.

• For example...

Microsoft Excel

“Web Query” feature!

Page 18: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

How to add in Basic auth function

in your Web app?

• Not use IIS function.

– It depend on Windows local user account, or

Active Directoy.

• Instead, install “HTTP Auth Module” from

NuGet.

Page 19: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Authenticate & Authorize It!

Live Demo

Page 20: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Provide web api!

Next step...

Page 21: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Provide web api!

Live Demo

Page 22: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Extra Stage!

Next step...

Page 23: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

I think, it is not Best solution...

• There is no function to manage user

account s, yet...

– We can configure HTTP Auth Module to use

MembershipProvider, but...

• Excel Web Query is Very convenient, but it

is not full automatic.

– We have to sync manualy.

Page 24: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

I have an idea :)

Page 25: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Google

Spread Sheet :P

Page 26: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Using Google Spread as a Database

• Install “GDataDB” from NuGet!

• Then, you can use Google Spread Sheet as

a Database.

– Spread Sheet Documents = Databases

– Work Sheets = Tables

– Rows = Entities

– Columns = Properties of Entity

– Column name mapped to property name.

Page 27: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Store into Google It!

Live Demo

Page 28: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Advantage

• Easy to share and access control.

– Based on Google Documet platform.

• Nothing to do.

– “Sync” is not required.

• But... It is very slow :(

– It is not “real” database.

Page 29: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Conclusion.

At last...

Page 30: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

• VS11 is very powerfull, and EF41CodeFirst

allows you to develop rapidly!

• You can get anything you want from NuGet!

– Many many usefull libraries, modulues...

– Many many nice girl friends...

• Excel Web Query is nice feature!

– Keep the way to HTTP standard.

• You can publish your Web apps without cost by

AppHarbor!

– With SQL Server, not only Web app hosting!

Page 31: Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst

Thank you!


Recommended