Category Archives: MSDN Blog - Page 2

CQRS with OData and Actions?

I love the Actions feature in OData – which is hardly surprising given I was one of its designers. 

Here’s the main reason why I love it: Actions allow you move from a CRUD architecture style, where you query and modify data using the same model, to an architectural style where you have a clear separation between the model used to query and the model used to update. To me this feels a lot like Greg Young’s baby CQRS, or Command Query Responsibility Segregation.

I’ll admit I’m taking some liberties here because these two models are actually ‘merged’ into a single metadata document ($metadata) that describes them both, and you can share types between these two models… however this feels insignificant because the key benefits remain.

Why would you want to move from a CRUD style application to a CQRS style one?

Let’s look at a simple scenario, imagine you have Products that look like this:

public class Product
{
   public int ID {get;set;}
   public string Name {get;set;}
   public Decimal Cost {get;set;}
   public Decimal Price {get;set;}
}

And imagine you want to Discount Marmite (a product in your catalog) by 15%. Today using the CRUD style, the default in OData before Actions, there is only one option: you PUT a new version of the Marmite resource with the new Price to the URL that represents Marmite, i.e. something like this:

POST ~/Products(15) HTTP/1.1
Content-Type: application/json

{
   // abbreviated for readability
   “ID”: 15,
   “Name”: “Marmite”,
   “Cost”: 3.50,
   “Price”: 4.25    // ( – 15%) 
}

Notice to support this you have to allow PUT for Products. And this has some real issues:

  • People can now make changes that we don’t necessarily want to allow, i.e. modifying the Name & Cost or changing the Price too much.
    • Basically “Update Product” is NOT the same as “Discount Product”.
  • When a change comes through we don’t actually know it is a Discount. It just looks like an attempt to update a Product.
  • If you need information that is not part of Product to perform a Discount (perhaps a justification) there is no where to put that information.

More generally the CRUD model is painful because:

  • If you want to update lots of resources simultaneously, imagine for example that you want to discount every product in a particular category, you first have to retrieve every product in that category, and then you have to do a PUT for each of them. This of course introduces a lot of unnecessary latency and introduces consistency challenges (it is hard to maintain a transaction boundary across requests & it the longer the ‘transaction’ lasts the more likely a concurrency check will fail).
  • If you want to update something you have to allow it to be read somewhere.

Back to our scenario, it would be much better to disable PUT completely and create a Discount action, and advertise it’s availability in the Marmite resource (to keep your system as Hypermedia driven as possible):

{
  “__metadata”: {
     // abbreviated for simplicity
     “Actions”: {
          “#MyActions.Discount”: [{ “title”: “Discount Marmite”, “target”: “Products(15)/Discount”}]
     }
  }, 
  “ID”: 15,
  “Name”: “Marmite”,
  “Cost”: 3.50,
  “Price”: 5.00
}

The name of the Action (i.e. #MyActions.Discount) is an ‘anchor’ into the metadata document that can be found at ~/$metadata that says you need to provide a percentage.

POST ~/Products(15)/Discount HTTP/1.1
Content-Type: application/json

{
    “percentage”: 15
}

This is much better. Notice this doesn’t allow me to modify the Cost or the Name, and indeed can easily be validated to make sure the percentage is within an acceptable range, and it is semantically much clearer what is happening.

In fact by moving from a CRUD style architecture to one inspired by CQRS but based on actions you can:

  • Give targeted update capabilities that:
    • Allow only certain parts of the ‘Read’ model to be modified.
    • Allow things that are not even in the ‘Read’ model to be modified or provided if needed.
  • Selectively give users permissions to only the ‘Actions’ or Commands they need.
  • Log every Action and replay them at a later date to rebuild your data (i.e. Event Sourcing).
  • Capture what is requested (i.e. Discount the product) and respond immediately before the change has actually been made, safe in the knowledge you will eventually process the request and achieve “Eventual Consistency”.
  • Capture more information about what is happening (i.e. User X discounted Marmite by 15% is much better than User X updated Marmite).
  • Create Actions that manipulate a lot of entities simultaneously (i.e. POST ~/Categories(‘Yeast Spreads’)/Products/Discount…)

Of course simply separating the read/write models in OData doesn’t give you all of these advantages immediately, but at least it creates a foundation that can scale to support things like Event Sourcing or Eventual Consistency later if required.

Some of you may be thinking you can achieve many of these goals by having a more granular model that makes things like “Discount” a resource, and that would be true. However for most people using OData that way of thinking is foreign and more importantly the EDM foundations of OData get in the way a little too. So for me Actions seems like the right approach in OData.

I love this.
But what do you think?
-Alex

More Json With Windows Phone

A few weeks ago, I did a short blog post on consuming Json from Windows Phone. I posted more as a reference for myself but I have gotten a few emails about it so I figured I would expand on it. Consuming Json is Windows Phone is not hard but it can be …read more…(read more)

More Json With Windows Phone

A few weeks ago, I did a short blog post on consuming Json from Windows Phone. I posted more as a reference for myself but I have gotten a few emails about it so I figured I would expand on it. Consuming Json is Windows Phone is not hard but it can be …read more…(read more)

Top 10 Tips for Building a Windows Phone App

In this Visual Studio magazine article, my colleague Max Zilberman shares top 10 tips for developers to build Windows Phone apps in a right way.

  1. Embrace Metro
  2. Leave Some Space
  3. Respect Margins
  4. Get Controls out of the Way
  5. Make Navigation Predictable
  6. Learn How to Pin Tiles
  7. Limit Results on Map Control to What the User Can See on the Viewport
  8. Tombstoning Should Be Transparent
  9. Properly Manage Network Failures
  10. Avoid UI Thread Blocking

Read the full article here.

To get started, developers can download free tools including Windows Phone SDK.

image

Top 10 Tips for Building a Windows Phone App

In this Visual Studio magazine article, my colleague Max Zilberman shares top 10 tips for developers to build Windows Phone apps in a right way.

  1. Embrace Metro
  2. Leave Some Space
  3. Respect Margins
  4. Get Controls out of the Way
  5. Make Navigation Predictable
  6. Learn How to Pin Tiles
  7. Limit Results on Map Control to What the User Can See on the Viewport
  8. Tombstoning Should Be Transparent
  9. Properly Manage Network Failures
  10. Avoid UI Thread Blocking

Read the full article here.

To get started, developers can download free tools including Windows Phone SDK.

image

Top 10 Microsoft Developer Links for Friday, February 3rd

  1. Visual C++ Team Blog: The Microsoft C++ Compiler Turns 20!
  2. Willy-P Schaub: Rangers Flash – January 2012
  3. MSDN Blogs: An introduction to Agile development with Team Foundation Server: But I’m not a .NET developer
  4. MSDN Blogs: Tips and Tricks from Students – Silverlight Phone app “Runner Pro”
  5. Dave Crook: Beginning Azure – Part 1, Introduction and Architecture
  6. Dave Crook: Beginning Azure – Part 2, Initializing Storage And the WCF Role
  7. On Channel 9: Jean-Christophe Cimetiere, Larry Lieberman – Inside Windows Phone #31 | Windows Phone Partners
  8. Visual Studio Toolbox: Web Essentials and CSSCop
  9. Shawn Wildermuth: Modern Web Development Series, Part 1
  10. Robert McMurray: Using URL Rewrite to Insert Different Scripts Based on Browser Type

Visual Studio on Facebook | Follow @VisualStudio on Twitter | Learn more about Visual Studio | Learn more about Visual Studio Testing Tools | Visual SourceSafe Upgrade

1478

Configuring AlwaysOn with SQL Server PowerShell

In this post, I’ll give examples of PowerShell scripts for configuring your SQL server instances for AlwaysOn. 

Before continuing, please review the system requirements for AlwaysOn Availability Groups: Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups (SQL Server) 

A note on running scripts: To run the script samples below, copy the samples into a local file on one of your domain-joined servers (ensure the file has the *.ps1 extension).  Then open a PowerShell console and launch SQLPS, the SQL PowerShell scripting environment, by typing “SQLPS”.  Note that you need to have SQL Server Management tools installed to run SQLPS.  Next, ensure that your execution policy is set to Unrestricted.  Since SQLPS has an execution policy separate from the system execution policy, you have to specify the -Scope parameter, as follows: 

Set-ExecutionPolicy Unrestricted -Scope Process 

Then, you can run the script from the local file. For example, if I copy a script to C:\scripts\temp.ps1, my session would look like: 

PS C:\> SQLPS

Microsoft SQL Server PowerShell
Version 11.0.2100.54
Microsoft Corp. All rights reserved. 

PS SQLSERVER:\> Set-ExecutionPolicy Unrestricted -Scope Process
PS SQLSERVER:\> C:\scripts\temp.ps1

Step 0: Creating a Cluster

All machines that host server instances in your AlwaysOn Availability Groups configuration must be members of a Windows Failover Cluster.  I’ll give a brief overview of how to create a cluster, in case you do not already have one.  First, ensure that the Windows Server Failover Clustering feature is enabled on all your servers.  You can do so through the server manager UI, see Install the Failover Clustering Feature, or you can use the following PowerShell commands from an elevated PowerShell prompt (in Windows Server 2008 R2 only):  

Import-Module ServerManager
Add-WindowsFeature Failover-Clustering

Run this command on every machine that you wish to join to the cluster.  Next you have to create the actual cluster.  Again, you can either user the server manager (see Create a New Failover Cluster in Server Manager) or PowerShell commands (see Using Windows PowerShell Cmdlets on Failover Clusters in Windows Server 2008 R2).  If you wish to use PowerShell, take a look at the Test-Cluster and New-Cluster cmdlets.  The former is used to run the Windows Clustering verification tests on your machines, a prerequisite for creating a cluster.  The latter is used to create the cluster.

Step 1: Enabling AlwaysOn and Creating Endpoints

Once you have created the failover cluster, you need to enable the AlwaysOn feature and create endpoints on all of your instances of SQL Server.  These endpoints facilitate the movement of data between servers.  Happily, we can do this entire configuration in PowerShell, as demonstrated in the script below.  

###########################################################
# SCRIPT VARIABLES 
# Set these values before running the script!
###########################################################

# Name of the server instances that will participate in the availability group
$ServerList = @(“mymachine\myinstance”, ”myothermachine\myotherinstance”)

# The default port used by the endpoints, if we need to create them
$EndpointPort = 5022

# The name of the endpoint created on each server, if we need to create one
$EndpointName = ”AlwaysOn_Endpoint”

###########################################################
# SCRIPT BODY 
###########################################################

foreach ($server in $ServerList)
{
    # Connection to the server instance, using Windows authentication
    Write-Host -Foreground Green ”Creating SMO Server object for server: $server”
    $serverObject = New-Object Microsoft.SQLServer.Management.SMO.Server($server) 

    # Enable AlwaysOn. We use the -Force option to force a server restart without confirmation.
    # This WILL result in your SQL Server instance restarting.        
    Write-Host -Foreground Green ”Enabling AlwaysOn on server instance: $server”
    Enable-SqlAlwaysOn -InputObject $serverObject -Force

    # Check if the server already has a mirroring endpoint 
    $endpointObject = $serverObject.Endpoints `
        | Where-Object { $_.EndpointType -eq ”DatabaseMirroring” } `
        | Select-Object -First 1

    # Create an endpoint if one doesn’t exist
    if($endpointObject -eq $null)
    {
        Write-Host -Foreground Green ”Creating endpoint on server instance: $server”
        $endpointObject = New-SqlHadrEndpoint `
                            -InputObject $serverObject `
                            -Name $EndpointName `
                            -Port $EndpointPort 
    }
    else 
    {
        Write-Host -Foreground Yellow ”An endpoint already exists on ’$server’.”
    }

    # Start the endpoint
    Write-Host -Foreground Green ”Starting endpoint on server instance: $server”
    Set-SqlHadrEndpoint -InputObject $endpointObject -State ”Started” | Out-Null
}

Let’s walk through this script. At the top, are a few variables that you should set based on your local environment.  The ServerList variable holds the names of the servers we wish to configure.  The EndpointPort variable holds the port number we assign by default to the endpoints we create.  The EndpointName variable holds the name we assign by default to the endpoints we create.   

In the body of the script, we iterate through the server list, and perform the following for each entry:  first, we connect to the instance using Windows authentication (therefore, the user running this script is assumed to have sufficient privileges on each server instance).  Next, we enable the AlwaysOn feature using the Enable-SqlAlwaysOn cmdlet.  It’s important to note the -Force parameter we provide to this cmdlet: enabling AlwaysOn requires a restart of the SQL Server service, and the -Force option tells the cmdlet to go ahead and perform this restart without user confirmation.  Without this parameter, the script will pause and ask you to confirm the restart.  Next, we check if a database mirroring endpoint exists on the server.  If not, we create an endpoint using the New-SqlHadrEndpoint cmdlet.  Finally, we use the Set-SqlHadrEndpoint cmdlet to set the state of the endpoint to “Started”.   

Some important notes about endpoints: In the example above, we assume that (1) the SQL Server service account on each server instance is a domain account, and (2) the same domain account is used for all service accounts.  If this is not the case in your environment, you will have to grant the CONNECT permission on the endpoints created by this script to all of your service accounts.  There is no explicit cmdlet support for this operation, but you can still script this step using the SQL Server Management Objects API (see the following API reference: Endpoint.Grant Method).  Otherwise, you can always use the Invoke-Sqlcmd cmdlet to directly execute Transact-SQL statements.

Step 2: Creating the Availability Group

Now we can, at last, create our availability group.  There are several steps to this process, all of which are supported by PowerShell cmdlets:

  1. First, we need to decide how the replicas in our availability group should be configured.  The two most important settings on a replica are its failover mode and availability mode.  There are a few other settings as well, for example whether the replica is readable in the secondary role.  In the script below, all of our replicas use the asynchronous-commit availability mode and the manual failover mode.
  2. Next, we need to decide which databases we want to include in the availability group.  Assume that these databases all exist on a single server instance, our initial primary.  Before we can create the availability group, we need to “seed” these databases to all of the secondaries.  That is, we need to take a backup of each database and its log, and then restore these backups on each secondary.
  3. Next, we can create the availability group.
  4. Finally, we need to execute a join command on the secondary replicas and databases.

Here is a script demonstrating these steps: 

###########################################################
# SCRIPT VARIABLES 
# Set these values before running the script!
###########################################################

# Name of the server instances that will participate in the availability group.
# The first server is assumed to be the initial primary, the others initial secondaries.
$ServerList = @(“mymachine\myinstance”, ”myothermachine\myotherinstance”)

# Name of the availability group
$AgName = ”MyAvailabilityGroup”

# Names of the databases to add to availability group
$DatabaseList = @(“mydatabase”) 
    
# Directory for backup files
$BackupShare = ”\my\backup\share”

###########################################################
# SCRIPT BODY 
###########################################################

# Initialize some collections
$serverObjects = @()
$replicas = @()

foreach ($server in $ServerList)
{
    # Connection to the server instance, using Windows authentication
    Write-Host -Foreground Green ”Creating SMO Server object for server: $server”
    $serverObject = New-Object Microsoft.SQLServer.Management.SMO.Server($server) 
    $serverObjects += $serverObject

    # Get the mirroring endpoint on the server
    $endpointObject = $serverObject.Endpoints `
        | Where-Object { $_.EndpointType -eq ”DatabaseMirroring” } `
        | Select-Object -First 1

    # Create an endpoint if one doesn’t exist
    if($endpointObject -eq $null)
    {
        throw ”No Mirroring endpoint found on server: $server”
    }

    $fqdn = $serverObject.Information.FullyQualifiedNetName
    $port = $endpointObject.Protocol.Tcp.ListenerPort
    $endpointURL = ”TCP://${fqdn}:${port}”

    # Create an availability replica for this server instance.
    $replicas += (New-SqlAvailabilityReplica `
            -Name $server `
            -EndpointUrl $endpointURL `
            -AvailabilityMode ”AsynchronousCommit” `
            -FailoverMode ”Manual” `
            -AsTemplate `
            -Version 11) 
}

$primary, $secondaries = $serverObjects

# Create the initial copies of the databases on the secondaries,
# via backup/restore
foreach ($db in $DatabaseList)
{
    $bakFile = Join-Path $BackupShare ”$db.bak”
    $trnFile = Join-Path $BackupShare ”$db.trn”

    Write-Host -Foreground Green ”Backing up database ’$db’ on $primary to $bakFile”
    Backup-SqlDatabase `
           -InputObject $primary `
           -Database $db `
           -BackupFile $bakFile `
           -Init
 
    Write-Host -Foreground Green ”Backing up the log of ’$db’ on $primary to $trnFile”
    Backup-SqlDatabase `
            -InputObject $primary `
            -Database $db `
            -BackupFile $trnFile `
            -BackupAction ”Log” `
            -Init 

    foreach($secondary in $secondaries)
    {
        Write-Host -Foreground Green ”Restoring database ’$db’ on $secondary from $bakFile”
        Restore-SqlDatabase `
          -InputObject $secondary `
          -Database $db `
          -BackupFile $bakFile `
          -NoRecovery 

        Write-Host -Foreground Green ”Restoring the log of ’$db’ on $secondary from $trnFile”
        Restore-SqlDatabase `
          -InputObject $secondary `
          -Database $db `
          -BackupFile $trnFile `
          -RestoreAction ”Log” `
          -NoRecovery
    }
}

# Create the availability group
New-SqlAvailabilityGroup `
  -Name $AgName `
  -InputObject $primary `
  -AvailabilityReplica $Replicas `
  -Database $DatabaseList

# Join the secondary replicas, and join the databases on those replicas
foreach ($secondary in $secondaries)
{
    Write-Host -Foreground Green ”Joining instance ’$secondary’ to the AG ’$AgName’”
    Join-SqlAvailabilityGroup -InputObject $secondary -Name $AgName
    $ag = $secondary.AvailabilityGroups[$AgName]
    Write-Host -Foreground Green ”Joining databases on ’$secondary’ to the AG ’$AgName’”
    Add-SqlAvailabilityDatabase -InputObject $ag -Database $DatabaseList 
}

As before, the script begins with a few variables that you should define based on your environment. ServerList is the same as before, however the ordering is relevant.  We assume that the first element of the list is the server instance that will host the initial primary replica, where all of the databases are stored. The AgName variable holds the name of the availability group we will create.  DatabaseList holds the names of the databases on the initial primary replica that we want to include in our availability group.  Lastly, BackupShare is the file system location where we shall store the backups done as part of the “seeding” operation.  

In the script body, we again iterate through the server list and establish connections.  Then, for each server, we create an Availability Replica object, using the New-SqlAvailabilityReplica cmdlet.  We pass the various replica configuration options, such as the failover mode and availability mode, to this cmdlet.  We specify the -AsTemplate parameter here, which creates the availability replica object in memory (as opposed to committing the change on the server, an impossibility since we haven’t created the availability group yet).  The -Version parameter indicates the server version for which we should create this in-memory object (this should match the version of the server where you ultimately create the availability group).  We access the endpoint on the server to generate an endpoint URL for the replica (explained here).  Next, we perform the data seeding step.  We back up each database and its log, using the Backup-SqlDatabase cmdlet. Then we restore the database and log to each secondary, using the Restore-SqlDatabase cmdlet.  Crucially, we use the -NoRecovery option when performing the restores, a requirement for AlwaysOn. 

Next, we create the availability group with the New-SqlAvailabilityGroup cmdlet.  We pass in the in-memory replica configurations that we created above, as well as the list of database names.  Finally, we iterate through all the secondary replicas, joining them to the availability group with the Join-SqlAvailabilityGroup cmdlet and joining the secondary databases therein with the Add-SqlAvailabilityDatabase cmdlet.

     

Resultado dos seus comentários sobre gerenciamento de arquivos

À medida que nos aproximamos da nossa próxima etapa pública, começaremos a voltar aos tópicos abordados no blog e a falar sobre as alterações que fizemos no produto a partir do Developer Preview. Como foi dito com frequência, nós lemos os comentários, as discussões dos grupo de notícias e as avaliações que foram escritas sobre o Windows 8 e acompanhamos o feedback atentamente. Consideramos esse feedback, levando em conta sua fonte e o público a que se destinam os recursos. Também tentamos conciliar os comentários conflitantes (não importa quantos votos de aprovação possa haver, para cada design que merece ser discutido, sempre há pontos de vista conflitantes e igualmente válidos). É claro que sempre consideramos a viabilidade de todas as alterações que fazemos sob o ponto de vista da engenharia: compatibilidade, segurança, desempenho, entre outros aspectos.

Ilana Smith, gerente de programas geral da equipe de sistema de engenharia, é a autora desta postagem.

–Steven


Publicamos anteriormente três postagens neste blog discutindo a nova experiência de gerenciamento de arquivos no Windows 8: uma sobre a nova experiência de copiar, outra que detalhou o processo de design que percorremos até chegar à nova experiência de conflitos e outra sobre as alterações no Windows Explorer, incluindo a introdução da faixa de opções.

Essas postagens geraram grande discussão e lemos aproximadamente 2.200 comentários deixados por vocês. Incorporamos esse excelente feedback ao nosso processo de design juntamente com as informações dos nossos outros canais de comentários.

Caderno com uma lista manuscrita de categorias de comentários e números ao lado de cada uma delas

Resumindo os comentários sobre as postagens no blog

Enquanto nos preparamos para a versão beta, achamos que deveríamos atualizá-los sobre alguns dos principais problemas e as alterações que vocês verão.

Conflito: identificando arquivos duplicados durante a resolução de conflitos

No Windows 8, temos uma nova experiência de seleção do arquivo certo quando ocorrem colisões de nomes de arquivo durante uma cópia ou transferência.

L. Brown disse:

Um botão de comparação para mostrar se os arquivos são iguais na caixa de diálogo “Choose” (Escolher) seria excelente!

Frequentemente, dois arquivos têm o mesmo nome porque são cópias. Escolher entre dois arquivos idênticos geralmente não faz sentido. Seria desnecessário em uma operação de cópia e normalmente desnecessário em um processo de transferência. Analisamos vários métodos de identificação de arquivos duplicados e chegamos à conclusão de que a verificação dos atributos nome, tamanho e data de modificação do arquivo é o mais eficiente deles. Esses atributos podem ser usados para identificar a vasta maioria de arquivos duplicados de forma rápida, eficiente e com boa compatibilidade com versões anteriores se comparado a outros métodos, como os hashes de arquivos.

Na versão beta, adicionamos uma nova opção à caixa de diálogo de resolução de conflitos detalhada. Selecionando a caixa na parte inferior esquerda da caixa de diálogo, podemos filtrar todos os arquivos com correspondência de nome, tamanho (incluindo o byte) e o tempo (incluindo a granularidade do carimbo de data/hora do sistema de arquivos: 2 segundos para FAT, 100 nanossegundos para NTFS). O sistema não copiará nem moverá esses arquivos. Essa funcionalidade não torna a operação mais demorada, funciona tanto localmente quanto em redes e em todos os tipos de sistemas e armazenamento.

Caixa de diálogo [File Conflicts] (Conflitos de Arquivos) com a opção [Skip 2 files with the same date and size] (Ignorar 2 arquivos com a mesma data e tamanho]. Na segunda imagem, a opção está selecionada e 2 dos arquivos não aparecem mais na caixa de diálogo de conflitos.

Não copiaremos arquivos com o mesmo nome, data e tamanho

Essa caixa fica desmarcada por padrão (para que os usuários optem por usar a alteração), mas após selecionada, ela é mantida.

Cópia: alterações no sistema

JL perguntou:

Sabe quando começamos a copiar uma material grande e, ao percebemos que o processo está sendo feito por conexão sem fio, conectamos um cabo de rede? A cópia de arquivos sabe utilizar a conexão mais rápida agora?

Se a cópia estiver ocorrendo entre dois computadores com o Windows 8, sim, ela poderá utilizar a taxa de transferência de rede maior imediatamente, graças aos avanços no protocolo SMB para dar suporte a vários canais.

Tobi perguntou:

Será possível pausar a cópia e retomá-la após uma reinicialização/suspensão/hibernação?

Na versão beta, quando há a suspensão ou hibernação de um sistema, a cópia é pausada automaticamente e, quando o computador “acorda”, você pode escolher retomar a cópia clicando no botão de pausa “pressionado”. (Decidimos não retomar as cópias automaticamente porque o ambiente do sistema pode ter sido alterado de forma significativa nesse meio-tempo e não desejamos causar erro.)

Cópia: lidando com confirmações e interrupções

gawicks solicitou:

Por favor, exibam todas as caixas de diálogo de erro após a conclusão da cópia, para que eu não precise ficar sentado na frente do computador durante todo o processo.

Temos dois tipos de interação com o usuário que podem ocorrer durante um trabalho de cópia: “confirmações” e “interrupções”. As confirmações do tipo “Tem certeza de que deseja excluir este arquivo permanentemente?” precisam ser feitas antes do início da operação de cópia. As interrupções são causadas por problemas encontrados pelo sistema durante a cópia, como “Arquivo não encontrado”, “Arquivo em uso” e conflitos de nome de arquivos.

O sistema apresenta todas as confirmações antes de começar a mover ou copiar arquivos. Durante a cópia, qualquer problema de interrupção é colocado na fila e apresentado assim que o sistema tiver concluído todo o trabalho possível. Na versão beta, fizemos aperfeiçoamentos na forma como as confirmações são apresentadas, para que elas não se percam entre as cópias em execução existentes.

Explorer: problema na rolagem do painel de navegação

xpclient disse:

Por favor, corrijam o péssimo bug existente na rolagem do painel de navegação do Windows 7.

(Consulte esta conversa no Microsoft Answers para obter mais informações.)

Isso foi corrigido! A partir da versão beta, não ocorrerá mais.

Explorer: respeitar os metadados da orientação da imagem

Raf perguntou:

Vocês darão suporte à rotação de imagem *sem perdas*?

Nos Windows 7 e 8, a rotação de um JPEG não apresenta perdas quando as duas dimensões da imagem são divisíveis por 16 (tamanhos de imagem padrão).

Além disso, o Explorer agora respeita as informações de orientação EXIF para imagens JPEG. Se a sua câmera define esse valor corretamente, você raramente precisará corrigir a orientação. Discutiremos isso mais detalhadamente em uma futura postagem.

2 das 3 fotos de flores são mostradas sem a orientação correta

Imagens no Windows 7 Explorer

Mesmas fotos de flores da imagem anterior, mas com a orientação corrigida
Imagens no Windows 8 Explorer

 

Explorer: alterações na sobreposição para aumentar o desempenho

No Windows 8, continuamos priorizando um ótimo desempenho. Estamos muito atentos aos milissegundos de retardo e procurando reduzi-los. No Explorer, encontramos uma oportunidade de diminuir os atrasos causados por sobreposições de ícones.

No Windows 7, temos uma sobreposição de ícone de cadeado para indicar que um arquivo é particular. (Você pode lembrar que, devido ao aumento nos arquivos compartilhados, ela substituiu a sobreposição “palma para cima” dos arquivos compartilhados.) Descobrimos recentemente que a verificação dessas sobreposições estava acrescentando cerca de 120 milissegundos aos nossos testes de inicialização da biblioteca do Explorer. Talvez não pareça muito, mas consideramos isso um grande atraso.

Exibição de 2 pastas: Bar e Foo. A pasta Foo tem uma sobreposição de cadeado no ícone e, na coluna [Sharing status] (Status de compartilhamento), aparece [Private] (Particular).

As sobreposições apresentam limitações: elas somente podem mostrar um estado, aumentam muito a poluição visual e podem ser confusas. A sobreposição de cadeado foi removida; essa informação é mais bem transmitida pela coluna “Sharing status”.

Essa coluna tem estas vantagens:

  • Desempenho: a coluna fica oculta por padrão, portanto, ocorre atraso somente quando optamos por mostrar essa informação.
  • Três estados: essa coluna tem três valores: Compartilhado, Não compartilhado e Particular, portanto, ela mostra mais detalhes do que a sobreposição de ícone.
  • Classificação/filtragem: você pode classificar e filtrar a propriedade de status de compartilhamento, permitindo funcionalidades de gerenciamento de arquivos mais avançadas.

Explorer: fixar na tela inicial

Na postagem de Marina sobre a tela inicial, Boots112233 disse:

Metade dos itens do meu menu Iniciar no Windows 7 são atalhos para pastas e um deles é um atalho para um arquivo […] Como poderei fazer isso no Windows 8 se a tela inicial não permitirá atalhos para pastas?

Na versão beta, você poderá facilmente fixar as suas pastas favoritas na tela inicial e usufruir de sua avançada funcionalidade de personalização que criamos para organizar as pastas em grupos e na ordem que você desejar.

"Pin to Start" fica na lista suspensa do controle [Easy access] (Acesso fácil) da guia [Home] (Início) da faixa de opções

[Pin to Start] (Fixar na tela inicial) na faixa de opções do Windows Explorer

Além disso, assim como no Windows 7, é possível fixar atalhos para que executáveis sejam iniciados diretamente do Windows Explorer, o que também pode ser muito útil para aplicativos que não são adicionados automaticamente à tela inicial por padrão.

Parte da tela inicial com os seguintes mosaicos: Internet Explorer, Store, Windows Explorer, [Documents] (Documentos), a área de trabalho, [My Executable] (Meu executável) e [eventvwr] (Visualizador de Eventos)

Pasta Documents, um executável personalizado e o visualizador de eventos fixado na tela inicial

Explorer: PowerShell

Jamie Thomson disse:

Eu realmente gostei da opção [Open Command prompt] (Abrir prompt de comando) no menu Arquivo, no entanto, como prefiro usar o PowerShell, eu gostaria de ter uma opção como “Abrir prompt do PowerShell” também.

Concordamos e adicionamos essa opção também. Vale observar que, às vezes, há pontos de vista conflitantes sobre se devemos incluir recursos avançados na GUI ou no PowerShell, e sobre sua posição (se dever ou não ficar mais à frente e no centro). Estamos sempre equilibrando a complexidade decorrente da existência de muitas opções e muitas maneiras de se fazer as coisas. Como você pode ver, não há uma única resposta certa, portanto, continuaremos pesando essas escolhas complexas.

No menu Arquivo, há as opções de abrir o Windows PowerShell ou abrir o Windows PowerShell como administrador

Botões do Windows PowerShell no Windows Explorer

Esses itens de menu iniciam o console do PowerShell. O ISE do PowerShell continua disponível no comando Editar em um arquivo do PowerShell.

Explorer: alterações na faixa de opções

Sabíamos que a introdução da faixa de opções no Explorer estimularia muito debate e podemos dizer que o número enorme de respostas confirmou as nossas expectativas. É estimulante trabalhar em algo que provoca tantas perspectivas diferentes.

Houve muita reação e, como esperávamos, um grupo de pessoas teve uma reação totalmente negativa à novidade e tem repetido isso de forma grosseira. A nossa opinião é que realmente precisamos tornar a interface do usuário mais avançada e aceitar que um conjunto ruidoso de pessoas simplesmente não está satisfeito com o caminho que estamos seguindo. De um modo geral, observamos que há uma maioria que está feliz e mais produtiva com as alterações. Lembramos que há ferramentas de terceiros disponíveis (provavelmente as ferramentas usadas por esse conjunto de pessoas) que geram vários paradigmas de interface diferentes. No entanto, sabemos que ferramentas de terceiros desempenham um papel importante na experiência do Windows.

Dito isso, incorporamos os seus comentários, experimentamos e testamos várias abordagens, e usamos colegas de trabalho como cobaias, e também realizamos os testes formais, claro. Você verá três alterações principais na faixa de opções da versão beta.

Faixa de opções minimizada por padrão: com a faixa de opções maximizada no Developer Preview, pudemos aprender bastante sobre como as pessoas interagem com ela, o que nos permitiu ajustá-la. Na versão beta, faremos uma grande alteração no Explorer de acordo com os nosso princípios de design do Windows 8. Como nas nossa caixas de diálogo de cópia, o Gerenciador de Tarefas e as experiências estilo Metro, reduziremos as distrações e os usuários serão incentivados a descobrir as funcionalidades por conta própria, minimizando a faixa de opções por padrão.

Windows Explorer mostrado sem faixa de opções

Faixa de opções do Windows Explorer minimizada por padrão

Testamos essa alteração durante um período e os resultados foram animadores. Esses foram os dados de uso interno da Microsoft, que, sabemos, não representam o grande público, mas normalmente representam pessoas como vocês, que participam do diálogo neste blog.

Nenhuma alteração: 71%, Minimizam se maximizada: 6%, Maximizam se minimizada: 23%

Usuários padrão comparados com aqueles que maximizam a faixa de opções. Quando nenhum comando é executado em uma sessão, os usuários padrão chegam a 85%, enquanto os que maximizam a faixa de opções chegam a 62%. Quando são executados entre 1 e 10 comandos, os que maximizam a faixa de opções são muito mais frequentes do que os usuários padrão.

Esses dados mostram que os nossos usuários especialistas em tecnologia gostam das duas configurações, mas aqueles que usam o Explorer mais intensamente são os que maximizam a faixa de opções. Para os cenários em que há menos procura de arquivos, podemos oferecer uma interface do usuário com menos distrações e deixar que os usuários que desejarem explorar mais as funcionalidades do Explorer maximizem e utilizem a faixa de opções.

Teclas de acesso visíveis: os nossos dados telemétricos nos mostram que os usuários que resolvem minimizar a faixa de opções têm forte preferência pelo uso de teclas de acesso. A faixa de opções oferece novas maneiras de acessar as funcionalidades via teclado com as dicas de tecla (aquelas dicas flutuantes exibidas em pop-ups quando pressionamos Alt), mas teclas de atalho tradicionais, como Ctrl+V, continuam sendo o método mais eficiente. Adoramos as teclas de atalho (internamente, seu uso chega a 85% de todos os comandos do Explorer), portanto, desejamos ajudar mais pessoas a descobrirem isso.

Na versão beta, adicionamos informações de teclas de acesso às dicas de ferramenta dos botões relevantes.

Dica de ferramenta no botão "New folder" com o texto [New folder (Ctrl+Shift+N) / Create a new folder.] (Nova pasta (Ctrl+Shift+N) / Criar uma nova pasta.)

A dica de ferramenta de “New folder” mostra o atalho de teclado

Roaming de configurações do usuário: desejamos garantir que você somente precise configurar as suas opções do Explorer uma vez. Se você maximizar a faixa de opções e adicionar as opções [Undo] (Desfazer) e [Map Network Drive] (Mapear Unidade de Rede) à [Quick Access Toolbar] (Barra de Ferramentas de Acesso Rápido), desejamos que o seu Explorer sempre apareça dessa forma para você.

Na versão beta, adicionamos as configurações do Explorer aos atributos que serão transferidos por roaming aos seus outros PCs com o Windows 8. Na interface do usuário [Sync your settings] (Sincronizar as suas configurações), isso aparece em [Other Windows settings] (Outras configurações do Windows). (Para obter mais informações sobre o roaming das configurações do usuário, veja a postagem de Katie.)

Tela [PC Settings] (Configurações do PC), com a opção [Sync your settings] (Sincronizar as suas configurações) selecionada. As opções de [Settings to sync] (Configurações a sincronizar) incluem [Personalize] (Personalizar), [Desktop personalization] (Personalização da área de trabalho), [Ease of Access] (Facilidade de acess), [Language preferences] (Preferências de idioma), [App settings] (Configurações de aplicativos), [Browser settings] (Configurações do navegador), [Other Windows settings] (Outras configurações do Windows), [Sign-in info] (Informações de entrada), entre outras que não aparecem na tela.

Sincronizando as configurações do Explorer entre PCs

Agradecemos muito todos os seus comentários sobre as nossas postagens anteriores. Acreditamos que eles contribuíram diretamente para uma melhor experiência de gerenciamento de arquivos do Windows 8.

–Ilana Smith

????????????????????????

??????? ?????????????????????????????????????????Developer Preview ????????????????????????????????????????????????????? Windows 8 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? (???????????????????????????????????????????????????????????????????)????????????????????????????????????????????????????????????????????

???????Engineering System (???????? ????) ????????? ????? ????????? Ilana Smith ????????

–Steven


Windows 8 ????????????????????????????? 3 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????? 2,200 ?????????????????????????????????????????????????????????????? ??????????????????????????

?????????????????????????????????????????????

??????????????????

??????????????????????????????????????????????????????????????????????????

??: ???????????????

Windows 8 ????????????????????????????????????????????????????

L. Brown ??????:

?????????????????????????????????????????!

?????????????????????????????????????????2 ??????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????? ???????????????????????????????????????????????????????????????????

??????????????????????????????????????????????????? ?????????????????? (1 ?????)?????? (???? ??????????????? (??) ???????FAT ?? 2 ??NTFS ?? 100 ?????) ????????????????????????????????????????????????????????????????????????????????????????????????????????

???????????? [????????? 2 ???????????] ?????????????????2 ???????????????????????????????????? 2 ?????????

??????????????????????????????

?????? ??????(?????????????????????????) ???????????????????????????????????

???: ????????

JL ??????:

??????????????????????????????????????????? ???????????????????????????????????????????????????????

?????????????? Windows 8 ??????????????????????????????????????????????????? ????? ???? (SMB) ????? (??) ??????????????????????????????????

Tobi ??????:

????????????????/????/?????????????????????

???????????????????????????????????????????????????????????????????????????????????????????????? (???????????????????????????????????/??????????????????????????????????)?

???: ??????????????????????

gawicks ??????:

???????????????????????????????”??? ?????” ??????????????????????????????

?????????????????????? 2 ???????????? “??” ?? “????” ????????????? “?????????????????” ???????????????????????????????”????????????”?”??????????” ????????????????????????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

????????: ??????? ??????????????

xpclient ??????:

Windows 7 ??????????????? ??????????????????????????????

(??????? Microsoft Answers ??????? (??) ???????)

????????! ??????????????????

????????: ????????????????

Raf ??????:

?????????????????????????

Windows 7 ??? 8 ???JPEG ???????????? 16 ??? (???????) ??????????????????????

??????JPEG ???????? EXIF ????????????????????????????????????????????????????????????????????????????????????????????????????????????????

???? 3 ???? 2 ????????????????

Windows 7 ???????????????

??????????????????????????????????
Windows 8 ???????????????

 

????????: ??????????????????????

Windows 8 ?????????????????????????????????????????????????????????????????? ??????????????????????????????????

Windows 7 ????????? ???????????????????????????? (???????????????????????????????????? “????????” ?????????????????????????????)???????????? ?????????????????????????????????120 ???????????????????????????????????????????????????????????????????????

Bar ? Foo ??? 2 ????????????????Foo ?????????????????????????[????] ?? [??????] ?????????

????????????????????1 ???????????????????????????????????????????????????Windows 8 ??????????????????[????] ?????????????????????????

??????????????????

  • ???????: ???????????????????????????????????????????????????????????
  • 3 ???????: “??”?”???”???”??????” ? 3 ???????????? ???????????????????????????
  • ????/???????: ???????????????????????????????????????????????

????????: [????] ????????

Marina ??? [????] ??????????? Boots112233 ??????:

?? Windows 7 ? [????] ???????????????????????????????????1 ????????????????? (…) Windows 8 ? [????] ??????????????????????????????????????????

?????????????????? [????] ???????????????????[????] ????????????????????????????????????????????????????????????????

???? [???] ??? [???????] ??????????? [?????????????] ????

?????????????? [?????????????] ?????

???Windows 7 ????????????????????????????????? [????] ????????????????????????????? [????] ????????????????????????????????

Internet Explorer?Store????????????????????????"My Executable"?"eventvwr" ?????????? [????] ?????

[????] ????????? ???????????????????????? ???????????????

????????: PowerShell

Jamie Thomson ??????:

[????] ????? [???? ????????] ??????????????????????? PowerShell ??????????”PowerShell ????????” ?????????????????

????????????????????????????? GUI ????? PowerShell ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

[????] ?????? [Windows PowerShell ???] ????? [Windows PowerShell ?????????] ????

?????????? Windows PowerShell ?????

????????????? PowerShell ???????????PowerShell ISE ????? PowerShell ????? [??] ?????????????

????????: ???????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?????????????????? ??????????????????? (???????????????????????????????????????) ????????????????? ????????? Windows ????????????????????????????????

??????????????????????????????????????????????????????????????????????????????Microsoft ????????????????????????????????????????? 3 ?????????

?????????????????: Developer Preview ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? Windows 8 ???????????????????????????????? ???????Metro ??????????????????????????????????????????????????????????

??????????????????

????????????????????????

?????????????????????????????????????????? Microsoft ??????????????Microsoft ?????????????????????????????????????????????????????????????????

?????: 71%???????????????: 6%???????????????: 23%

????????????????????????????????????????1 ?????????????????? 0 ???????????????????? 85% ????????????????? 62%?????????? 1 ? 10 ????????????????????????????????????????

?????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????? UI ??????????????????????????????????????????????

??????? ????????: ??????????????????????????????????????? ????????????????????????KeyTip (Alt ?????????????????????????????) ????????????????????????????????? Ctrl + V ??????????????? ???????????????? ????????? (Microsoft ??????????? ?????????????? ?????????? 85% ?????)????????????????????????????????????

??? ????????????????????????? ?????????????

[????????] ?????????"???????? (Ctrl+Shift+N)/???????????????" ?????????

[????????] ????????? ??????????????????

????????????: ??????????????????????????????????????????????????????????? ???? ??? ??? [????] ? [?????? ?????????] ????????????????????????????????

??? ????????? Windows 8 PC ?????????????????????????????????[PC ?????] ? [???? Windows ???] ?????????????? (??????????????????? Katie ??????????)?

[PC ??] ??? [PC ?????] ?????????[??????] ???[???????]?[??????????????]?[????]?[????]?[?????]?[????????]?[???? Windows ???]?[???????] ??????????????????????????

PC ??????????????????

?????????????????????????Windows 8 ?????????????????????????????????????????????????????????

–Ilana Smith

The Journey to Modern IT

 This is a guest post by Bob Anderson, senior director for IT Business Value Evangelism in the Global Strategic Initiatives team, Microsoft IT.

Like many of you who lead and work in IT departments, the leadership team within Microsoft IT regularly reflects on what we do and how we do IT. It’s ingrained in us, and our company for that matter, to be self-critical, accountable, willing to take on big challenges and to do so with passion and integrity.

Currently we’re in the midst of transforming how we do IT. This change is tied to the vision CIO Tony Scott established for our organization: connect the company, delight our customers, and inspire the industry. It’s also tied to the needs of the company. As Microsoft faces competitors across business and consumer segments, while pursuing the next billion customers, the company needs to be able to dynamically respond to rapidly evolving market conditions. This leads to new business strategies, new models, and executing them with more agility than in the past. One example of new models for us is the opening of Microsoft retail stores across the U.S., and plans to expand over the next few years.

Microsoft IT is in the midst of transforming the way it operates. I view it as a journey to modern IT, which is characterized by being more strategic, innovative and competitive. The destination of our journey is to build a real-time enterprise and we’re focusing on business processes and the end-user to complete this journey. Let me say more about each.

In terms of business process, we’re changing three things. First, we’re decoupling business process from technology, which should improve agility around the business processes. Second, we’re creating and managing process-oriented, composite applications to deliver highly-differentiated business capabilities, while eliminating redundancy. Third, we’re concentrating our IT organization’s efforts around activities that contribute to high business value and strategic differentiation from competitors.

In terms of end-users, we’re doing three things. First, we’re more focused on empowering employees the minute they walk through the door with productivity tools, collaboration tools and analytics. Second, we’re working to keep employees and their stakeholders connected, be it wired, mobile or social. Third, we’re working to improve innovation at the edges by enabling more people to propose and contribute IT solutions, such as app stores and social networking tools. We’re doing this because we’re hiring more people who are digital natives compared to five years ago. This trend will continue, and consistent with consumerization trends in IT, users want the same rich experiences in business as they have at home.

Another way to summarize the change in IT is to shift the balance to user empowerment with enterprise responsibility, from where IT has often been perceived as controlling and blocking. To achieve the right balance—while minimizing risks and maximizing benefits—could mean embracing certain consumer technologies into the workplace or providing enterprise alternatives that will keep both users and regulators happy.

The tipping point for this balance is innovation. How we as IT professionals conceive, build, deploy and manage IT projects relies on innovation throughout. Innovation is critical to the individual, departments and companies because it helps retain employees, inspire teams and differentiate the company in the market. As part of our change process within Microsoft IT, we have put tools and programs into place to enable and motivate innovative projects. These projects range from visualization of data to 3-D capturing and reporting. We’ve also sponsored the ‘Microsoft IT Garage’ where we encourage and enable all of Microsoft IT to experiment with cloud computing to drive innovative concepts and solutions.

We’re finding that the journey to modern IT has many positive implications for IT and the business. I’ll share a few results from a year-long pilot program with our licensing business, which is the heart of how we monetize products and services for Microsoft. The pilot was a model for our move to a real-time enterprise. Results showed that application build-time duration was reduced by 25% while the cycle time for a product launch was reduced by 60%. In the meantime, business partner satisfaction increased 44 points and channel partner satisfaction increased 83 points. This successful pilot validated much of the strategic change we are driving today within Microsoft IT.

I believe the modern IT organization is key for business success now more than ever as well as how IT will take on more of a business leadership role going forward. If you’re interested to know more about our journey you can ask questions here, or you can work through your Microsoft account team to schedule a presentation.

Bob Anderson