Potete leggere il documento pubblicato da David Chappell, all’url seguente:
The SharePoint 2010 Developer Platform: An Introduction for ASP.NET Solution Architects
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.
Le funzionalità di SharePoint 2010 raccolte in una slide.
Non tutte per soli developer, non vi preoccupate.
Composites
Sites
Communities
Content
Search
Insights
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:
Le Sendboxed solution offrono le seguenti caratteristiche:
SharePointPermission.ObjectModel
SecurityPermission.Execution
AspNetHostingPermissionLevel = Minimal
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.
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
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:
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.
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.
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.
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.
Now that Visual Studio 2010 beta 2 has been released, you can have some fun exploring it, starting from the new splash screen :-)
In this post I’m going to explore some of the news for web developer, not all but at least some:-)
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.
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.
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.
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.
And than you can call the MathModule as a static class from Silverlight code as usual C# or VB.NET code:
You could imagine a sophisticated computations.
For more infos :
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:
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:
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:
Instead of the more verbose:
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.
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:
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.
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
And the editor generate some code for you:
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:
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:
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.
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.
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.
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:
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:
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:
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:
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.
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.
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:
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:
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:
Than I need to enter some site information, so, for example, Web Site name in step 1, as show below:
And some information for creating and configuring the database:
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:
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.
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:
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.
In my opinion one of the most interesting features of ASP.NET MVC 2.0 Preview 2 is the support for 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.
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:
I’ve put the code in my view page for editing some simple fields.
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.
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 :-).
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:
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.
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:
Now I can proceed with the installation, before I need to check the software I decide to install and related dependencies.
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.
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.
So I need to uninstall version 1.1 from Control Panel and install the version 2.0 beta from Web PI.
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:
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.
For an overview of the Web PI 2.0 you can read my previous post of these series here, before you proceed reading.
In this post I’ll dig into the options available for Windows XP users in the “Web Platform” tab, as show below (as they show on my machine):
Here you can see these sections: Web Server, Framework and Runtimes, Database and Tools. If I click customize you see the 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.
In the following section you’ll see more info trying to install some software on my Windows XP virtual machine.
For example if you click in the Internet information services 5.1
You’ll see the description for IIS 5.1:
Here you have the options to install some products, the most interesting ones for me are:
You can now select your preferred:
Then click the install button…
Now you can see that the WebPI add some dependencies for me. I’ll install the Web Deployment Tool 1.0, Italian version because I’ve selected the Italian language in the options link, see my previous post, and the Web PI added two dependencies : SQL Server 2008 Management Objects and SQL Server Native Client, nice !!
If “I Accept”, the setup starts:
And all works on my machine :-), and I can see the final screen:
et voila, we’re done.
In this section you can install .NET Framework 3.5 SP1, that is already installed on my machine and that you need if you’d like to run ASP.NET Web Forms applications. You can also install the ASP.NET MVC 1.0 framework, now you can use the Model-View-Controller pattern with ASP.NET core features. And you can install the PHP runtime 5.2.11; so you could run both ASP.NET and PHP apps on Windows Web Platform. OK I don’t suggest you using XP on production servers, but for developer purposes it could be done.
You have the review screen, again, and you’re ready to install.
From here you have the options to install SQL Server 2008 Express ( that it’ free) and related stuffs, for example the Management Studio: the console used to administer SQL Server 2008.
You can see the screenshot on my machine: SQL Server 2008 Express with Service Pack 1 and the Managements Objects are already installed.
In the review screen I can see that the Web PI installs even Windows PowerShell as a dependency from the Management Studio Express:
In the tools section you can download Visual Web Developer 2008 Express with SP1, a free tool, and the Silverlight 3 tool for Visual Studio, even this tool is for free.
Ok now you’re ready for building and running web apps. We’ll see in a later post how to install one app from the Gallery.
Now that the Web Platform Installer 2.0 is RTW, WebPI for short, I’ll have some fun exploring some installation options with a series of posts.
The Web PI is the easiest an quickest way to install software on Windows to run web applications. You can use it to run ASP, ASP.NET and PHP applications. If you are a developer that works both in ASP.NET and PHP or you need to run multiple apps running different runtimes, I think that it’ll be a useful tool and even for free! You can install IIS and related extensions, SQL Server 2008 Express, Visual Web Developer 2008 and others free tools or trial for web developers.
After you install the Web PI you can use it even to update your current installation. The Web PI allows you to install beta/RC and RTM components. If you run it when a new release is available you can install the latest ones.
Web PI is now available in 9 different languages.
From the Web Platform Installer 2.0 you have access to Web Gallery, where you can download and run the most popular open source apps, both for ASP.NET and PHP. If you choose one of that app you have a straightforward installation experience directly inside the Web PI.
The Web PI run on Windows Vista, Windows Vista SP1, Windows XP SP2+, Windows Server 2003 SP1+, Windows Server 2008 and Windows 7.
You can download the Web PI from here, from this link you can easily choose you language.
If you run it from Windows XP (I’m running an instance of WinXp from my Windows 7 machine using the XPMode feature), you’ll see something similar:
As you can see it’s easy to understand, there are three tabs:
If you look at the left-bottoms corner you can click the Options link that opens up a new dialog where you can see more options:
You can see two check buttons for more tabs for IIS Media Features and Developers tools. Because I’m running on Windows XP, no real Media Extensions are available and I only see the Developer Tools tab. At the end you can notice the preferred language you can use for software installation. At the end you can delete the installer cache. Flagging the Developer tools you can see a new tab on the menu:
Now you can click on the link “Click to include the recommended products”, or “Customize” to see the products suggested and start the installation.
I’m running it from Windows 7 now, and of course I can see more options, that we’ll see in more details in a different post.
After I flag the two check boxes in the options window (see the image upward for the XP) I can even see a new tab for Media stuffs: where, for example, you can install the necessary components for delivering on-demand and live contents via Media Services.
As you see from this post the Web PI is easy to use, in the following post we’ll explore some settings in the Web Platform tab in my Windows XP machine and Windows 7.
Full posts serie is now available here: