Ahmadreza's Notes

On Software Development

Posts Tagged ‘Sydney

WEBCAMPS Sydney Day 1 / Part 2

As first day continued Scott and James tried to demonstrate Microsoft ASP.net 4.0 and MVC 2. Same question about ASP.Net was asked and was answered. Fellows was worried about replacement of ASP.Net with MVC 2 and as it was answered and like before Scott and James defined that ASP.Net is not going to be replaced by MVC. It is just a new approach of implementing web applications and depending on website structure and content websites could either be implemented by ASP.Net 4.0 or MVC 2.

Couple of new project templates has been added to Visual Studio 2010 and in web. One of them is “ASP.NET Web Application”. When a new ASP.NET Web Application is created visual studio automatically creates folder and files which are needed for a simple application. This type of project unlike

previous web application is not an empty project and contains necessary files and folders to create a simpl

e application.

This template includes Microsoft ASP.NET Membership Provider and if SQL Server Express is installed on developer machine this type of project is automatically configured for ASP.NET Membership provider which connects to SQL Express. This type of Web application is similar to ASP.Net application because the theme and style looks like default theme of ASP.Net MVC Application. Good news is Micros

oft has added jQuery to ASP.Net web application and ASP.Net MVC 2 Web application templates.

I think one of best features of MVC is its testability and on top of that you can change test framework of testing if you want. I’ve find some good articles and posts about adding customized test framework for testing MVC 2 projects. How to: Add a Custom MVC Test Framework in Visual Studio and a post about NUnit Template for ASP.NET MVC 2 .

Presenters created a new MVC2 Web application and for beginning they created a project without database just to keep it simple. View, Mode was discussed in this session and they talked about partial views and templates. I wanted to describe creating templates in MVC 2 but I found a good sample in Microsoft that helps to understand how to create templates in MVC. Following is link to EditorFor extension method. On the bottom of page you can find a link to Template Helper Sample.

For describing model part of MVC a virtual project was defined named Plan My Night. It was a simple application to plan night. They described model and controller by creating a simple database and entity model to implement Plan My Night. During implementation o f Plan My Night they described partial views editor templates. For editor templates there is a good sample to create an editor template for datetime inputs called MVC2 Editor Template with date and time.

They combined sample with newly introduced feature called jQuery Templates Data Linking. You can find a complete sample in ScottGu’s Blog. Another cool feature of visual studio which is really useful is Dynamic JavaScript Intellisense in VS 2010. Not only client items in win form can be identified by intellisense of VS 2010 but also items which are being created by developer during development can be identified in VS 2010 like following picture. 1000 items with TestDev prefix is added to window object. Exactly after while command you all TestDiv0 to TestDiv1000 is added to suggestion list.

During the presentation Scott wanted to use a trick to cause a crash for visual studio 2010 (It was on purpose). He changed “while” condition to an infinite while condition and he expected VS to crash when suggestion list was being opened, but visual studio is clever enough and calculates list until certain amount of millisecond and if it’s going to be time consuming visual studio just ignores rest of computing and jump over next statement. There is a good post in ScottGu’s Blog about JS Intellisense and its improvements.

Other feature which was discussed in webcamps was about Web.config transformation and packaging and deployment of web application SQL server. There is a good clip about Web.Config transformation in channel9 about Web Deployment and Web.Config.

 Rest of presentation was about IIS extensions which are available on http://www.iis.net/download and can be downloaded and installed by Web Platform Installer. Among those extensions SEO Toolkit was fantastic which was shown by Scott.

At the end of presentation fellows were asked to pitch their ideas for next day. Following are some of projects and people voted for them

.

My Noisy Neighbour (I voted this project)

RaceDay Commander

MongoDB Management Studio

Due Date – lightweight task-tracking for uni students

Address Book Lookup

I voted for first project “My Noisy Neighbour” and in second day I had to join to a group of people to develop this web application based on what we’d learned in first day. In the next post I’m going to describe what was our project was and what had happened.

Advertisements

Written by Ahmadreza Atighechi

July 9, 2010 at 5:59 am

Posted in Blog

Tagged with , , , , ,

WEBCAMPS Sydney Day 1 / Part 1

WEBCAMP was a 2 days event that provides a chance to learn and build projects based on Microsoft Web Platform. WEBCAMPS is held in different cities around the word and I had chance to participate in Sydney WEBCAMP event in 28 and 29 of May 2010. Interesting point is performers of this event in Sydney were Scott Hanselman and James Senior who I really wanted

to be in one of their presentations specially Scott that you’ll never be tired in a conference in case Scott is one of presenters.

Map picture

This presentation is held on Powerhouse museum in Ultimo.  Seminar star

ted at 9:00 and in day one approximately 400 attendees was in event. However, in day 2 number of attendee had dropped sharply to less than half of day one. But that was predictable because day 2 you could participate in lab or build your own application or even participate in a group to develop an application based on what you’ve learned in first day.

Day 1 Contents:

Day 1 started with introduction of Microsoft Web platform installer.

Microsoft Web Platform Installer or Web PI is a free installation application which based on your requirements installs services, frameworks, tools or databases you need to install a specific application. Web PI helps you prevent redundant task which is common in installation different project. Web PI check you system and depending on your machine configuration suggest Framework, Servers, Databases and available applications. By aid of Microsoft Web PI you can install Web application like DotNetNuke or

Umbraco CMS or even Jumla! The good point is some application like Jumla is php based and Web PI know their installation requirements and install selected program based on setting. No need to say that depending of operating system and system Web PI suggest different set of application.

In day 1 James Senior tried to install Umbraco CMS in demo Umbraco CMS with database and other requirements was installed on demo machine.

Good point is Web PI installs on a machine as well as IIS and user can run it repeatedly to configure server and installed application and components.

In day 1 presentation has slides to justify that MVC is not a replacement for Microsoft web solution and MVC is just another approach for web development. ASP.Net MVC is an open source project done by Microsoft and you can find it here.

As the seminar continued one of features of ASP.Net 4.0 was introduced named “ASP.Net Dynamic Data Entities Web Application” Or “ASP.Net Dynamic Data Linq to SQL Web Application”. The first one uses entity framework for data layer but second uses Linq to SQL as data layer.

As far as I remember these two ASP.Net Extension projects was introduced by Visual Studio 2008 SP1 in 2008. Here is some useful videos for creating and customizing Dynamic Data web applications.

http://www.asp.net/dynamicdata

These project types are useful for creating administration pages from scratch. All you need to do is create your database and relations. Create a project type either Entity of Linq to SQL and select entities you want. Suddenly you find that All CRUD (Create/Remove/Update/Delete) of your entities is created in user friendly URL by using “DynamicDataRoute” class.

Following is steps to create an administration web site for Northwind in less than 2 minutes:

1. Create a new web project type Asp.net Dynamic Data Entities Web application.

2. Copy Nothwind Database files (MDF and LDF) in APP_DATA folder.

3. Right click on project and new data item type ADO.Net Entity Data Model.

4. In wizard form select “Generate from database” item.

5. And then select NORTWIND as data connection.

6. Select tables you want to be added to Entity Data Mod and then click finish.

7. Open Global.asax and then remark line starting with DefaultModel change this line as follow.

DefaultModel.RegisterContext(typeof(NorthwindEntities), new ContextConfiguration() { ScaffoldAllTables = true });

8. Press F5 and run the application.

Simple, Easy and beautiful, It’s a good solution for quick data administration generation. And the good thing is all templates are editable and you can change them.

Written by Ahmadreza Atighechi

June 7, 2010 at 1:39 am

Posted in Blog

Tagged with , ,