counter free hit invisible
Welcome to MSDN Blogs Sign in | Join | Help

Pietro Brambati Blog

.NET development

News




Microsoft TechDays 2009 – Aggiornamento Sessione DEV327

Dopo il rilascio della beta di Silverlight 4 e dei nuovi WCF RIA Services (prima noti come .NET RIA Services) ho deciso di aggiornare il titolo della sessione DEV 327 che terrò a Microsoft Tech Days 2009 in:

“Sviluppare applicazioni di business con Silverlight 4 e i WCF RIA Services”.

Quindi scusate se trovate il titolo e abstract della sessione disallineati, è colpa mia.

Userò Visual Studio 2010 perchè vorrei mostrare alcune delle novità dell’editor, ma potete scaricare anche i WCF RIA Serives beta per Visual Studio 2008.

Una delle cose che mi sto divertendo a fare è sfruttare le potenzialità di far girare l’applicazione Silverlight 4 Out-Of-Browser in modalità Full-Trust, le nuove potenzialità di binding dinamico e di COM interop per acedere a Microsoft Excel.

1) Abilitare l’acesso Full Trust in modalità OOB da Visual Studio 2010 nelle proprietà Silverlight del progetto.

image

2) Quindi aggiungere reference a Microsoft.Csharp.dll e scrivere qualcosa del tipo:

image

Notate la keywork dynamic.

Ed ecco fatto, quando l’applicazione gira OOB. Potete pensare di usare la stessa tecnica per accedere anche ad Outlook, ad esempio, per accedere alle informazione del calendar etc.

image

Bene, ora vi aspetto alla sessione.

SharePoint 2010 Developer Training Course su Channel 9 (in Inglese)

E’ da poco disponibile un corso per sviluppatori su Channel 9 dedicato a SharePoint 2010.

Attualmente il corso è in Inglese ed è dedicato alle funzionalità presenti sulla beta, ma chissà …

Getting Started with SharePoint 2010
SharePoint 2010 Developer Roadmap

Visual Studio 2010 Tools per SharePoint 2010

UI Enhancements

List and Schemas

LINQ to SharePoint

Client Object Model

Workflow

Services Architecture

Accessing External Data

Enterprice Content Management

Extending Search

Performance Point Service

Sandboxed Solutions

SharePoint 2010 Security

Cominciate a tenere d’occhio il sito della SharePoint Conference 2010 e bloccare l’agenda, mi raccomado.

SharePoint 2010 Evaluation guides

Microsoft SharePoint Server 2010 Evaluation Guide

SharePoint 2010: Professional Developer Evaluation Guide and Walkthroughs

Community Tour e altri eventi : le mie tappe

Community Tour

In occasione del Community Tour organizzato tra Microsoft e le community .NET che hanno aderito all’iniziativa vi segnalo le date in cui sarò presente.

16 Novembre – Bologna da dotdotNet

In quest’occasione parlerò delle ultime novità per lo sviluppo di applicazioni di business con Silverlight e i .NET RIA Services.

Link per l’iscrizione e Agenda completa

4 Dicembre – Pordenone da XeDotnet, DotNetWork e PowerShell.it

In quest’ occasione la mia sessione sarà su alcune API di Windows 7 e su come programmarle da .NET: Multitouch, Sensor API etc.

Link per l’iscrizione e Agenda completa

9 Dicembre – Pisa da dotNetToscana

In quest’occasione parlerò delle ultime novità per lo sviluppo di applicazioni di business con Silverlight e i .NET RIA Services.

Link per l’iscrizione e Agenda completa

17 Dicembre – Roma da dotNetRomacesta

In quest’occasione parlerò delle ultime novità per lo sviluppo di applicazioni di business con Silverlight e i .NET RIA Services.

Link per l’iscrizione e l’agenda completa

Microsoft TechDays 2009

24-25-26 Novembre a Milano

Sviluppare applicazioni RIA Data-Driven con ASP.NET e Silverlight

Sviluppare con ASP.NET MVC

Agenda completa dell’evento.

AgileDay 2009  –  [da confermare]

20 Novembre Bologna

Le due sessioni che ho proposto (non sono state ancora confermate) sono le seguenti:

ASP.NET MVC : Programming

ASP.NET MVC : Testing

Link al sito dell’evento.

SharePoint 2010 Developer Platform per ASP.NET Solution Architect

Potete leggere il documento pubblicato da David Chappell, all’url seguente:

The SharePoint 2010 Developer Platform: An Introduction for ASP.NET Solution Architects

Lancio Windows 7: sessione sullo sviluppo .NET e nuove API

Ho pubblicato le slide e qualche esempio di codice visto durante la sessione sullo sviluppo con .NET per Windows 7 a questo link (potreste avere problemi con il download). Potete trovare anche il materiale sul blog di Mario Fontana, che ha tenuto la stessa sessione a Milano.

Qualche link utile

Video delle sessioni

Le sessioni della tappa di Milano, sono state registate e, salvo intoppi o problemi di registrazione, saranno disponibili in qualche settimana sul sito BEIT, nella sezione dedicata agli eventi da rivivere.

SharePoint 2010 overview per developer – parte 3

Le funzionalità di SharePoint 2010 raccolte in una slide.

Non tutte per soli developer, non vi preoccupate.

image

Composites

  • Business Connectivity Services
  • InfoPath Form Services
  • External Links
  • Workflow
  • SharePoint Designer
  • Visual Studio
  • API Enhancements
  • REST/ATOM/RSS

Sites

  • Ribbon UI
  • SharePoint Workspace
  • SharePont Mobile
  • Office Client and Office Web Application
  • Sandbox Support

Communities

  • Tagging, Tag Cloud, Ratings
  • Social bookmarking
  • Blogs and Wikis
  • MySites
  • Activity Feeds
  • Profiles and Expertise
  • Org Browser

Content

  • Enterprice Content Types
  • Metadata and Navigation
  • Documents Sets
  • Multi stage disposition
  • Audio and Video Content Types
  • Remote Blob Storage
  • List Enhancements

Search

  • Social Relevance
  • Phonetic Search
  • Navigation
  • FAST Integration
  • Enhance Pipeline

Insights

  • PerformancePoint Services
  • Execel Services
  • Chart Web Part
  • Visio Services
  • Web Analytics
  • SQL Server Integration
  • PowerPivot
SharePoint 2010 overview per developer – parte 2

Sandboxed solutions

Una delle novità più interessanti della prossima release di SP 2010 sono le Sandboxed solution. Un nuovo modo di creare e deploiare soluzioni in Share Point 2010 con VS 2010 che può essere scelto durante la fase di deploy, come si vede dalla figura seguente:

image

Le Sendboxed solution offrono le seguenti caratteristiche:

  • facilità di deploy nella farm e su SharePoint OnLine, sicurezza nel far girare le applicazioni che girando in una sandbox (=uno spazio a loro dedicato), offrendo maggior stabilità e basso rischio di compromettere l’intera farm.
  • Lavorano con un insieme ristretto di API SharePoint: Content Types, Site Columns, Custom Actions, Workflow dichiarativi,  Event Receivers, Feature Receivers, List Definitions, Site Pages, etc.
    • Un sottoinsieme di Microsoft.SharePoint. Qui trovate la lista completa dei tipi abilitati.
  • Un meccanismo di Code Access Security (CAS) ne limita le funzionalità rispetto ad una soluition che gira in full-trust. Le impostazioni sono le seguenti:
    • SharePointPermission.ObjectModel

    • SecurityPermission.Execution

    • AspNetHostingPermissionLevel = Minimal

  • Vengono deploiate in una Solution Gallery, che può essere gestita centralmente  e dal Central Admin è possibile stabilire quali risorse massime l’applicazione possa consumare.
    • Le risorse possono essere diverse: CPU, Memoria, SQL etc e vengono misurate in ‘Resource Point’.

image

SharePoint 2010 overview per Developer – parte 1

SharePoint 2010 è stato da poco prensentato al pubblico per la prima volta. Ho deciso di raccontarvi un po’ le novita che saranno presenti in questa release, poichè di sicuro interesse per molti sviluppattori web e, mi aspetto, sempre più nel prossimo fututo.

La beta di SharePoint sarà disponibile a novembre, mentre da poco è già disponibilie la beta 2 di Visual Studio 2010 per i sottoscrittori MSDN.

Per una overview della novità annunciate per SharePoint 2010 leggete il post di Jeff Teper, nei prossimi post cercherò di raccontare le novità più importanti per gli sviluppatori web.

Sviluppo in Windows 7 (x64) e Windows Vista SP1 (x64)

Il nuovo SharePoint 2010 supporterà solo l’archittettura a 64-bit, scelta che va a vantaggio di una maggiore scalabilità del prodotto grazie alla possibilità di sfruttare al meglio la memoria.

La novità più importante è che potrà essere instato, solo a scopo di sviluppo e non per la produzione, su macchine client a 64 bit, in partricolare su Windows 7 e Vista SP1. Potrete installare sia SharePoint Foundation 2010, che SharePoint Server 2010 in locale sulla macchina in cui avete VS 2010.

Setting up the Development environment for SharePoint 2010

  • “Install SharePoint on Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64”
  • “In any development environment, you should use a computer with an x64-capable CPU, and at least 2 gigabytes (GB) and preferably 4 GB of RAM for SharePoint Foundation, and 6 to 8 GB of RAM for SharePoint Server

Visual Studio 2010 SharePoint Tool

Visual Studio 2010 diventa lo strumento principale per lo sviluppo su SharePoint. Appena installerete  VS 2010 beta 2 troverete molti nuovi template di progetto (oltre che numerosi nuovi project item) per SharePoint 2010. Nella schermata seguente potete averne un’idea:

image

Lo sviluppo per SharePoint con Visual Studio 2010 si semplifica molto, infatti non solo potrete sviluppare su un sistema operativo client una progetto di tipo Visual Web Part, sfruttando l’IDE di Visual Studio 2010, ma di questo verrà creato un SharePoint Solution Package file (file WSP) di cui poi ne verrà fatto anche il deploy sul server.

Oltre ad i template di progetto presenti in Visual Studio 2010 potete anche crearne di nuovi o estenderli grazie alla nuova Visual Studio extensibility API, che vi permette di migliorarne il packaging, la validazione, il deployment, il tutto anche estendendo i nodi del Server Explorer. E’ possibile ad esempio personalizzare il processo di build e deploy fatto da VS 2010 di feault aggiungento eventuali azioni custom e/o rimuovendo quelle di default.

Infatti potete accedere ai sites di SharePoint 2010 direttamente dal Server Exporer e potrete guardare le impostazioni per siti, liste, content type, associazioni di workflow e altri oggetti. Nella figura seguente potete farvi un’idea di come si naviga in SharePoint da Visual Studio.

image

SharePoint Designer 2010

Il nuovo SP Designer è lo strumento per lavorare con SP rivolto ai “Power User”- ma non solo direi- per reallizzare applicazioni con SP 2010. Una volta che la soluzione è stata realizzata questa può essere pacchettizzata in una SharePoint Solution (WSP) per poi essere importata e modificata con Visual Studio 2010.

image

Nella schermata seguente vedete SP Designer come si presenta: il menu di navigazione sulla sinistra dà accesso alle componenti che potete sviluppare dal Designer: libraries, workflows,

content types, data source, entities, site level settings etc.

SharePoint Designer 2010: Workflow

Con il nuovo SP Designer si potrà importare un workflow preparato, per non dire illustrato, da un’ analista usando Visio e si potrà poi dargli vita attraverso uno strumento visuale senza scrivere codice: azioni tipiche dei power users. Il nuovo Workflow potrà essere quindi esportato in un file WSP e successivamente importato in VS 2010.

SharePoint Designer 2010: Business Connectivity Services Design

Il Business Connectivity Services sono l’eveoluzione del BDC, consentendo di esporre in SharePoint tramite le External List dati provienienti da sorgenti esterne allo SP. Lo SP Designer 2010 semplifica la creazione delle entità che rapprenentano questi dati tramite un  wizard che guida verso la creazione di una connessione a servizi WCF, oggetti .NET, Database etc.

Compatibilità

Il nuovo SPD 2010 può essere utilizzato solo con il nuovo SharePoint 2010,  non può essere quindi usato con le precedenti versioni di SharePoint. E’ supportatata però l’installazione side-by-side. Quindi sulla stessa macchina potete installare SPD 2010 e SPD 2007, ma va installata sulla stessa piattaforma x86 o x64, quindi usate la versione x86 di SPD 2010 se instllate side-by-side con SPD 2007, dato che quest’ultima verione è disponibile solom su piattaforma 32 bit.

Developer Dashboard

Nuovo utile strumento di debug, che ci consente di avere utili informazioni su quello che sta succedendo nella pagina: la developer dashboard colleziona informazioni statistiche relative al codice eseguito nella pagina ed eventuali eccezioni.

Può essere abilitata inizialmente così:

stsadm –o setproperty –pn developer-dashboard –pv OnDemand

Può poi essere spenta e/o accessa dalla pagina dello SharePoint.

Link utili

Visual Studio 2010 beta 2: a quick web tour

Now that Visual Studio 2010 beta 2 has been released, you can have some fun exploring it, starting from the new splash screen :-)

image

In this post I’m going to explore some of the news for web developer, not all but at least some:-)

A quick look at Silverlight 3.0

Silverlight 3.0 is now integrated in Visual Studio 2010 beta 2 : the developer runtime and the SDK are installed during the setup process.

If you take a look to the project template you can see an options section with a combo-box for multi-targeting even for Silverlight.

Multi-targeting is one of the main architectural changes of Visual Studio 2010: you can now use a single IDE for targeting different versions of  the full .NET and CLR. You can write code for .NET 2.0, 3.0 and  3.5: they use the CLR version 2.0 and the new .NET Framework 4 that instead uses the new CLR 4.

image

Note: the RIA Services are not completely integrated with this build.

With the beta 2, you can find an interactive editor for Silverlight , similar to the WPF. In the Following screen I’m using it to create some columns and rows and setting the columns size directly into the editor.

image

An you can now double-click on the button in the preview pane to go to the click event hander to start writing code.

Now that F# is a prime language for the .NET Framework 4 and Visual Studio 2010 you can even create a Silverlight Library in F# and start using functional programming, if you like it, even for Silverlight. The F# Silverlight Library is a project template in beta 2 that you can add to your solution.

image

To use it with Silverlight  you can add a reference from the standard Silverlight project in Visual Studio 2010 to the F# library for Silverlight, I ‘ve tried to build some simple code in a F# module as show below; a simple example of calculus for the factorial using a recursive function.

image 

And than you can call the MathModule as a static class from Silverlight code as usual C# or VB.NET code:

image

You could imagine a sophisticated computations.

For more infos :

A quick look at ASP.NET MVC 2

Visual Studio 2010 will be shipped with ASP.NET MVC 2 project template and you can start playing with it right now with the beta 2 bits. You can find all the stuffs that are already available with ASP.NET MVC 2 Preview 2 for Visual Studio 2008 as Validation based on Metadata, Client Side Validation and Single Project support for Areas: an easy way to logically divide you project in independent parts.

If you have already created a project with ASP.NET MVC 1.0 in Visual Studio 2008 you can’t open it in Visual Studio 2010 beta 2 and you have to migrate it manually or using this tool. If you have instead created a project with ASP.NET MVC 2 Preview 2, you should reasonably succeed to migrate it to Visual Studio 2010 beta 2. I’ve opened one of my project built on ASP.NET MVC 2 Preview 2 and the Visual Studio 2010’s wizard have done the hard work for me. A message box asked me if I wanted to update the project to .NET Framework 4, as show below:

image  

At the end the solution works fine, at least on “My Machine” :-).

If you run the web app with the ASP.NET Developer Server you can see now that it’s running with the version 4 of the .NET Framework, as you can see below:

image

Thanks to the new syntax of ASP.NET 4 you can even write code without the need of using HTML.Encode, using the syntax below:

image

Instead of the more verbose:

image

Ok, some syntactic sugar, but of course if you write it hundreds of times…

For more details you can read the Phil Haack post : VS10 Beta 2 From an ASP.NET MVC Perspective.

A quick look at ASP.NET 4 Web Forms

You have now the chance  to create a project structurally similar to ASP.NET MVC one: I mean with CSS, a Home and About pages. If you create a ASP.NET Web Application project and you press F5, for example, you’ll see the following screen:

image

In the project you can even find jQuery 1.3.2 in the Scripts folder.

If you came from Visual Studio 2008 and you prefer to have a blank solution, you have to choose  the Empty Project Template.

One of the most evident new feature of ASP.NET 4 (both Web Forms and MVC), already present from beta 1, is that you can have different config files for debug and release and other configurations. For example you already have a Web.Debug.config and Web.Release.config for the two different configuration.

image

For example you can use the two files to set different connection strings for debugging and production.

Code Snippets

You can now find some pre-build code snippets that works in the aspx editor, for example you can choose formview snippet as show below

image 

And the editor generate some code for you:

image 

This make more productive writing code directly into the editor, skipping the boring stuff.

ASP.NET 4 WebForms Routing

ASP.NET 4 WebForms can now use routing rules as much as ASP.NET MVC does. You can now use urls that are SEO friendly and human readable, for example

localhost/blog/archive/1

instead of

localhost/blog/default.aspx?Id=1

Just adding some code on the global.asax to define the rules:

image

You can then retrieve data used in the rules and using it in code-behind or even create a new url using the same rules. I suggest you reading the ScottGu’s post on this topic here.

ClientIDMode and ViewStateMode

If in the past you have had some problem with client id generated by Web Forms , “ctrl_” nested especially when you use master-page… now you have some good news, because you can set the behavior on a control:

image 

You can inherit from the parent, make it predictable so that it can be easily used with CSS and Javascript or just static.

And you can turn off view  state for a page and enable for a control using the control property ViewStateMode.

Download

To fully explore Visual Studio 2010 beta 2 I strongly encourage you to download from here.(from 21/10). MSDN Subscriber can download just from today.

You can read the official announcement from here.

Per gli italiani che leggono questo post, ci saranno diverse occasioni durante l’anno per parlare delle novità di Visual Studio 2010, una fra tutte sono i Microsoft TechDays WPC 2009.

Vi aspetto, enjoy.

Web Platform Installer 2.0: Installing ASP.NET Apps

You can read other posts of this series on Web PI 2.0 here:

In this post we’ll the Web PI 2.0 to install BlogEngine.NET, one of the most popular Open Source applications for ASP.NET.

Installing BlogEngine.NET (ASP.NET)

You can use the Web Applications’ tab to choose your preferred one, you can navigate by category or by name, for example. In the following pictures I’ve select BlogEngine.Net:

image

You can now press install and you’ll be redirected to a summary page where the installer show all dependencies needed to run BlogEngine.NET, a few on my machine, as shown in the following image:

image

I’m guided, inside the installer, to the process of installing the software, I need to enter site information, so for example Web Site name and others, as show below:

image

And at the end of installation you can run your application from the Launch Link and you have the first screenshot of BlogEngine.NET installation page:

image

And we’re done!

As you so you could easily use the Web PI both for installing and configuring your environment and for installing your preferred apps in some simple steps.

Enjoy.

Web Platform Installer 2.0: Installing PHP Apps

You can read other posts of this series on Web PI 2.0 here:

In this post I’m going to explore the most important feature for the version 2.0 of the WebPI: now you can install the most popular Open Source applications for both ASP.NET and PHP directly from the installer.

Installing WordPress (PHP)

You can use the Web Applications’ tab to choose your preferred ones, you can navigate by category or by name, for example. In the following pictures I’ve select WordPress:

image

You can now press install and you’ll be redirected to a summary page where the installer show all dependencies needed to run WordPress. Because I haven’t installed MySQL, the Web PI 2.0 will install it for me and even other components as the URL Rewrite module. I really love this feature!! The following is an image of that one:

image

I’m guided, inside the installer, to the process of installing the software.

First I need to set the password for MySQL’s root account as show below:

image

Than I need to enter some site information, so, for example, Web Site name in step 1, as show below:

image

And some information for creating and configuring the database:

image

And at the end of installation you can run your application from the Launch Link and you have the first screenshot of WordPress installation page:

image

As you have briefly seen you could easily use the Web PI both for installing and configuring your environment and for installing your preferred apps in some simple steps.

Enjoy.

Community dotNetRomacesta: il primo evento

Mercoledì 21 Ottobre si terrà a Roma, il primo evento organizzatto dal neonato User Group dal nome di sapore romano “dotnet Roma ce stà”, non sono sicuro di averlo scritto giusto, ma il senso dovrei averlo reso :-)

L’agenda è  molto ricca:

image

e per il loro primo incontro potrete avere modo di incotrare persone del calibro di Simone Chiaretta, per le sessioni su ASP.NET MVC 2 e Luca Bianchi per SQL Server e avere modo di conoscerne di nuove.

Per chi vuole registrarsi all’evento può procedere da qui e l’agenda completa la trovate qui.

Buon divertimento e soprattutto buon lavoro.

ASP.NET MVC 2 Preview 2: Client-Side Validation

In my opinion one of the most interesting features of ASP.NET MVC 2.0 Preview 2 is the support for client-side validation.

How-to enable Client-Side validation

Client-side validation enable your application to perform client-side validation based on model’s validation by JQuery validation library. Ok, it’s simpler than it sounds.

The client-side validation framework is even extensible, but for now it suits my simple needs.

In my post on ASP.NET MVC 2.0 Preview 1 I’ve added server-side validation to my application model using metadata as ASP.NET Dynamic Data does. So, for example, in the the picture below I’ve added a partial class to my model and a class for metadata describing my requirements for validation. In the following code the attribute ‘Titolo’ must be not null, and I’ve added an Error Message if something’s wrong.

image

If I run the application all works fine: I show a view page to the user, user enters some value and press Save to submit to server. If the user doesn’t fill the title field he gets an error as soon as we made a POST to server. You can see the page flickering in the browser.

Client-side validation prevent your app going to the server for validation and all happens client side, but using the rules you have defined on the partial class you saw before.

To enable client side validation, you can follow these easy steps:

  • use Html.EnableClientValidation method on the View file
  • insert three javascript files : jquery-1.3.2.js, jquery.validate.js, MicrosoftMvcJQueryValidation.js. These files are included in the Scripts directory coming with ASP.NET MVC 2 Preview 2 project template. 

I’ve put the code in my view page for editing some simple fields.

image

Now I can run my application and see the results, I’m using HttpWatch to see that no requests are performed to the server and the validation logic works as expected.

image

As soon as I type something into the textbox the red message disappears.

Nice feature! You can download the ASP.NET MVC 2 Preview 2 from here and read about all the features on Phil Haack post.

Enjoy :-).

Web Platform Installer 2.0: Web Platform for Windows 7

You can read other posts of this series on Web PI 2.0 here:

Now I’ll use the Web PI on my Windows 7 machine and I’ll show the options available.

You can start from main screen and select the “Web Platform” tab:

 image_thumb30

Here you can see these sections: Web Server, Framework and Runtimes, Database and Tools. If I click customize you see products/components you can install. If you expand clicking on customize you see the details, with a little info icon. If you click the little info icon you’ll see more info on the component to install.

Installing components from Web Server

If you look into the options for IIS 7.x web Server you can see a lot of functionalities that you can install. I’ve already installed ASP.NET module that I use for ASP.NET apps, the CGI that install the FastCGI module and that I use for PHP apps. IIS 7 is a modular web server and you can decide which module to install based on your needed. One of my preferred module is the URL Rewriter, version 1.1. You can use to build rules to implement nice URL  for users and for Search Engine Optimization (SEO). You can use Regular expression, pattern matching, Wildcard pattern matching or rewrite maps.

You can see a ton of features available for IIS 7.5:

image

Now I can proceed with the installation, before I need to check the software I decide to install and related dependencies.

image 

One of the component I’d like to install is the URL Rewriter 2.0 Beta, that it’s very attractive because it supports outbound rules: that can fix links on the fly in a response from the server.   Because is a Beta I don’t see in this section, so I go to the “What’s new Tab” and I can see the “Beta Extensions” where I can found the URL Rewriter 2.0 Beta.

image

Because the URL Rewriter 1.1 and the URL Rewriter 2.0 beta can’t run on the same machine, if I select the check box I receive a warning message.

image

So I need to uninstall version 1.1 from Control Panel and install the version 2.0 beta from Web PI.

Installing components from Database

In this section you can find the same components you can find for Windows XP, plus the SQL Server driver 1.0 for PHP, a native extension for PHP apps, that you can install on Windows 7, as see below:

image

Installing components from Framework and Runtimes, Tools

These two sections are basically the same as we saw on Window XP, and you can refer two the previous blog for details.

Next step, installing some application from the galley … stay tuned.

More Posts Next page »
Page view tracker