Understanding Project Mini Category and Managing Project Mini Category

Introduction on Project Mini Category

Project Mini categories are Categories in Project Server Specific to a project in Project server

Project Mini Category gets created when you define a Project Level Permission.

Each project will have a Mini category and a Category Relation once you define permissions from Project Center (Project Permissions)

Individual Users or Groups can be given Specific Permission on a Project Using Mini Categories

Available Permissions

There are 7 Different permissions which can be defined on a project using Mini categories and each permission has a unique ID associated with it

View Project Schedule in Project Web App    e98573c8-7ea6-41ab-8ea4-ff8da9730d0a
View the Project Summary in the Project Center   a120a079-75bc-4f0f-b376-3fb0ae9ac940
Publish Project  0000c2b9-3f2b-48a4-b54f-a247cbbff5ba                                
Save Project to Project Server bf93a026-deac-4949-be19-c513701139ff
Open Project   3dee3fa0-1956-4b98-84bd-2259d5b8829c
Edit Project Summary Fields 0000c768-6d95-4c77-b7db-5d7cdafc1bea
View the Project Site 4B524550-2512-4D25-92B1-A4C888C66106

How Do we create a Project Mini category , Relation and Associate a user with Project Mini Category using PSI

Below Sample code is to Create a Project in Project Server and Create a mini Category for the newly created Project

const string RESOURCE_SERVICE_PATH = “_vti_bin/psi/resource.asmx”;
const string PROJECT_SERVICE_PATH = “_vti_bin/psi/project.asmx”;
const string QUEUESYSTEM_SERVICE_PATH = “_vti_bin/psi/queuesystem.asmx”;
const string SECURITY_SERVICE_PATH = “_vti_bin/psi/security.asmx”;

                    Guid resguid;
                    Guid projectID;
                    Guid jobId;
                    projectID = Guid.NewGuid();
                    ProjectWebSvc.Project projectSvc = new ProjectWebSvc.Project();
                    projectSvc.Url = PROJECT_SERVER_URI + PROJECT_SERVICE_PATH;
                    projectSvc.Credentials = nc;
                    ResourceWS.Resource PSIResource = new ResourceWS.Resource();
                    PSIResource.Url = PROJECT_SERVER_URI + RESOURCE_SERVICE_PATH;
                    PSIResource.Credentials = nc;
                    QueueSystemWebSvc.QueueSystem q = new QueueSystemWebSvc.QueueSystem();
                    q.Url = PROJECT_SERVER_URI + QUEUESYSTEM_SERVICE_PATH;
                    q.Credentials = nc;
                    ProjectWebSvc.ProjectDataSet projectDs = new ProjectWebSvc.ProjectDataSet();
                    ProjectWebSvc.ProjectDataSet.ProjectRow projectRoweng = projectDs.Project.NewProjectRow();
                    projectRoweng.PROJ_UID = projectID;
                    projectRoweng.PROJ_NAME = projName;
                    projectRoweng.PROJ_TYPE = (int)PSLibrary.Project.ProjectType.Project;
                    projectDs.Project.AddProjectRow(projectRoweng);
                    jobId = Guid.NewGuid();
                    projectSvc.QueueCreateProject(jobId, projectDs, false);
                    WaitForQueue(q, jobId);
                    jobId = Guid.NewGuid();
                    projectSvc.QueuePublish(jobId, projectID, true, string.Empty);
                    WaitForQueue(q, jobId);
                    string SESSION_DESC = “Check in Project from Custom code”;                  
                    jobId = Guid.NewGuid();
                    projectSvc.QueueCheckInProject(jobId, projectID, true, sessionUid, SESSION_DESC);
                    //Create Project mini Category
                    srvSecurity.SecurityProjectCategoriesDataSet updatedPDS;
                    Guid CatGuid;
                    Guid[] guidarray = new Guid[1];
                    guidarray[0] = projectID;
                    srvSecurity.Security SVSecurity = new srvSecurity.Security();
                    SVSecurity.Url = PROJECT_SERVER_URI + QUEUESYSTEM_SERVICE_PATH;
                    SVSecurity.Credentials = CredentialCache.DefaultCredentials;
                    updatedPDS = SVSecurity.ReadProjectCategory(guidarray[0]);

                    if (updatedPDS.ProjectCategories.Rows.Count == 0)
                    {
                        srvSecurity.SecurityProjectCategoriesDataSet projectCategoryDataSet1 = new srvSecurity.SecurityProjectCategoriesDataSet();
                        srvSecurity.SecurityProjectCategoriesDataSet.ProjectCategoriesRow row1 = projectCategoryDataSet1.ProjectCategories.NewProjectCategoriesRow();
                        CatGuid = Guid.NewGuid();
                        row1.WSEC_CAT_UID = CatGuid;
                        row1.PROJ_UID = projectID;
                        projectCategoryDataSet1.ProjectCategories.AddProjectCategoriesRow(row1);
                        SVSecurity.CreateProjectCategories(projectCategoryDataSet1);
                        updatedPDS = SVSecurity.ReadProjectCategory(projectID);

                    }
                    updatedPDS = SVSecurity.ReadProjectCategory(guidarray[0]);
                    CatGuid = updatedPDS.ProjectCategories[0].WSEC_CAT_UID;

Once the Mini Category is created for a project you can Create a Relation ship with the Mini Category and a User\Group  (below Sample is for creating a relation ship for a User)

DSUpdated.UserRelations.AddUserRelationsRow(categoryguid, resguid);   //DSUpdated is the Project Category Data set (SecurityProjectCategoriesDataSet )

Once the Relation ship is defines you can Add the respective Permissions for the data set for the above User  (below ID’s are for “View the Project Summary in the Project Center” and  “View the Project Summary in the Project Center”)

 DSUpdated.UserPermissions.AddUserPermissionsRow(categoryguid, resguid, new Guid(“A120A079-75BC-4F0F-B376-3FB0AE9AC940″));
DSUpdated.UserPermissions.AddUserPermissionsRow(categoryguid, resguid, new Guid(“E98573C8-7EA6-41AB-8EA4-FF8DA9730D0A”));
SVSec.UpdateProjectCategories(DSUpdated);

Now you are all set with the Mini category……………..

Happy coding ……Cheers .. Ajith

 

 

 

Apps.co: Nuevos Cursos Presenciales con Opción de Certificación empezando en Junio

Si estás participando en los Bootcamps de Apps.co y ya terminaste tu curso de Windows 8 o de Windows Phone, éste mensaje es para ti.

En Junio empiezan más Cursos Presenciales con Opción de Certificación en Bogotá, Medellin, Barranquilla y Bucaramanga. Cali, pendientes para la primera semana de Julio.

Si no estás en ninguna de éstas ciudades, escríbenos a appslab@microsoft.com, para darte las opciones de Cursos Remotos. Recuerda revisar las condiciones para los cursos remotos en nuestro anterior post.

Estos son los horarios en las diferentes ciudades:

Ciudad Fecha Inicio Duración Horario Tecnología
Barranquilla 4-Jun 2 Semanas 6:00 pm – 10:00 pm Windows 8
Barranquilla 4-Jun 2 Semanas 8:00 am – 12:00 pm Windows Phone
Bogotá 4-Jun 2 Semanas 6:00 pm – 10:00 pm Windows Phone
Bogotá 17-Jun 2 Semanas 6:00 pm – 10:00 pm Windows 8
Bucaramanga 17-Jun 2 Semanas 6:00 pm – 10:00 pm Windows 8
Bucaramanga 17-Jun 2 Semanas 8:00 am – 12:00 pm Windows Phone
Medellin 4-Jun 2 Semanas 6:00 pm – 10:00 pm Windows 8
Medellin 11-Jun 2 Semanas 6:00 pm – 10:00 pm Windows Phone

 ¿Cómo te registras para los cursos presenciales?

Debes ingresar al sitio web http://www.cplsdesarrollocol.com.co/. Allí encontrarás la información de los diferentes cursos abiertos, ciudades y horarios disponibles. Allí mismo encontrarás el formulario de registro, el cual debes diligenciar completamente.

Cuando ingreses tu información en el formulario de registro, se validará que seas uno de los beneficiarios. Si todo está correcto, podrás programar tu curso presencial. El Centro de Entrenamiento se pondrá en contacto contigo, para darte más información. El contacto será a la cuenta de correo o al número de teléfono que registraste en Apps.co.

Si aparece que tu información no es válida al momento de registrarte, puedes indagar la razón escribiendo un correo a appslab@microsoft.com. Recuerda enviar Nombre Completo, cuenta de correo con la que estás registrado en MVA y Tecnología que terminaste en MVA.

Recuerda revisar las condiciones de los Cursos Presenciales con Opción de Certificación en nuestro post anterior.

Free ebook preview: “Rethinking Enterprise Storage: A Hybrid Cloud Model”

Greetings. You might already know that we now and then publish free ebooks on new technologies. (There are 13 here.) Today we’d like to share a preview of a free ebook that will be available in July: Rethinking Enterprise Storage: A Hybrid Cloud Model, by Marc Farley. Below is Chapter 1, which introduces the ebook’s topic. Please note that this material is in DRAFT form. And enjoy!

 

Chapter 1

Rethinking enterprise storage

The information technology (IT) world has always experienced rapid changes, but the environment we are in today is bringing the broadest set of changes that the industry has ever seen. Every day more people are accessing more data from more sources and using more processing power than ever before. A profound consequence of this growing digital consumption is that the corporate data center is no longer the undisputed center of the computing universe. Cloud computing services are the incubators for new applications that are driving up the demand for data.

IT managers are trying to understand what this means and how they are going to help their organizations keep up. It is abundantly clear that they need the ability to respond quickly, which means slow-moving infrastructures and management processes that were developed for data center-centric computing need to become more agile. Virtualization technologies that provide portability for operating systems and applications across hardware boundaries are enormously successful, but they are exposing the limitations of other data center designs, particularly constraints that hinder storage and data management at scale.

It’s inevitable that enterprise storage technologies will change to become more scalable, agile, and portable to reflect the changes to corporate computing. This book examines how storage and data management are being transformed by a hybrid cloud storage architecture that spans on-premises enterprise storage and cloud storage services to improve the management capabilities and efficiency of the organization. The StorSimple hybrid cloud storage (HCS) solution is an implementation of this architecture.

The hybrid cloud management model

As a subset of hybrid cloud computing, hybrid cloud storage has received far less attention from the industry than the larger dialogue about how to enable hybrid applications. However, pragmatic IT leaders are also anticipating new hybrid cloud management tools to help them improve their IT operations. Hybrid cloud storage is an excellent example of this type of hybrid management approach that uploads data and metadata from on-premises storage to the cloud, fulfilling the roles for a number of storage and data management practices.

Don’t just take it from me

Another example of the power of hybrid management is the Hyper-V Recovery Manager which is described in an article written by John Joyner and published on the TechRepublic website titled "Hyper-V Recovery Manager on Windows Azure: Game changer in DR architecture." The article can be found by following this link: http://www.techrepublic.com/blog/datacenter/hyper-v-recovery-manager-on-windows-azure-game-changer-in-dr-architecture/6186. In the article Joyner explains how a cloud-based service controls the operations of on-premises systems and storage.

As a management abstraction, hybrid cloud management can provide centralized monitoring and control for on-premises and in-cloud systems and applications. If there are going to be applications and data that span on-premises and in-cloud resources, it only makes sense that there will be a need for management tools that facilitate those applications. Figure 1-1 depicts a hybrid cloud management model where three separate on-premises data centers are exchanging management information with resources and management services running in the cloud..

image

Figure 1-1 Three on-premises data centers exchange management information with cloud resources and management services across the hybrid cloud boundary.

 

We’ll now turn our attention from the general case of hybrid management to focus on storage.

The transformation of enterprise storage with cloud storage services

Storage has been an integral part of information technology from its inception and will continue to be throughout the cloud computing transformation that is underway. That’s because all the data we create, use, and share has to be stored somewhere if it has to have more than fleeting value. A lot of this data is stored in corporate data centers, but a rapidly growing percentage is being stored in the cloud.

It follows that enterprise storage architectures will adapt to this reality and integrate with cloud storage. Just as cloud services have changed the ways we consume data, they will also change how we store, manage, and protect it. It is short-sighted to think of cloud storage merely as big disk drives in the sky when there is so much compute power in the cloud to do interesting things with it. If it is possible to find information needles in data haystacks using data analytics, it is certainly possible to discover new ways to manage all that data more effectively. For example, the implementation of erasure coding in Windows Azure Storage demonstrates how advanced error-correction technology can also be used to effectively manage cloud storage capacity.

But the advancements in enterprise storage won’t all be cloud-resident. In fact, many of the most important changes will occur in on-premises storage management functions that take advantage of hybrid cloud designs. The section "Change the architecture and change the function," later in this chapter, examines how extending traditional storage architectures with the addition of cloud storage services makes familiar storage management functions much more powerful.

The constant nemesis: data growth

IDC’s Digital Universe study estimates that the amount of data stored worldwide is more than doubling every two years, so it’s no surprise that managing data growth is often listed as one of the top priorities by IT leaders. IT professionals have ample experience with this problem and are well aware of the difficulties managing data growth in their corporate data centers. Balancing performance and data protection requirements with power and space constraints is a constant challenge.

IT leaders cannot surrender to the problems of data growth, so they need a strategy that will diminish the impact of it on their organizations. The hybrid cloud storage approach discussed in this book leverages cloud storage to offload data growth pressures to the cloud. Storage, which has always had an integral role in computing, will continue to have a fundamental role in the transformation to hybrid cloud computing—for its primary functionality (storing data) as well as its impact on those responsible for managing it.

Increasing the automation of storage management

Historically, storage management has involved a lot of manual planning and work, but as the amount of data continues to grow, it’s clear that the IT team needs more automated tools in order to work more efficiently. This book describes how hybrid cloud storage enables higher levels of automation for many different tasks. Chapter 2, "Leapfrogging backup with cloud snapshots," for instance, examines how hybrid cloud storage technology virtually eliminates the manual administration of one of the most time-consuming IT practices—backup.

People expect that their data will always be available when they want it and are unhappy when it isn’t. Traditional data center solutions that provide high-availability with remote data replication are resilient but have high equipment, facilities, and management costs—which means there’s a lot of data that companies can’t afford to replicate. Automated off-site data protection is an excellent example of a storage management function that is much more affordable with hybrid cloud storage. Chapter 3, "Accelerating and broadening disaster recovery protection," explores this important topic.

Virtual systems and hybrid cloud storage

IT teams use virtualization technology to consolidate, relocate, and scale applications to keep pace with the organization’s business demands and to reduce their operating costs. Hypervisors, such as ESX and ESXi from VMware and Hyper-V from Microsoft, create logical system images called virtual machines, or VMs, that are independent from system hardware, enabling IT team to work much more efficiently and quickly.

But virtualization creates problems for storage administrators who need more time to plan and implement changes. The storage resources for ESX and ESXi hypervisors are Virtual Machine Disk Format (VMDK) files and for Hyper-V hypervisors they are Virtual Hard Disk (VHD) files. While VMs are rapidly moved from one server to another, moving the associated VMDKs and VHDs from one storage system to another is a much slower process. VMs can be relocated from one server to another without relocating the VMDKs and VHDs, but the process of load balancing for performance usually involves shifting both VMs and VMDKS/VHDs. Data growth complicates the situation by consuming storage capacity, which degrades performance for certain VMs and forcing the IT team to move VMDKs/VHDs from one storage system to another, which can set off a chain reaction of VMDK/VHD relocations along the way. Hybrid cloud storage gracefully expands the capacity storage, including VMDKs and VHDs, eliminating the need to move them for capacity reasons. By alleviating the pressures of data growth, hybrid cloud storage creates a more stable environment for VMs.

Data portability for hybrid cloud computing

VM technology is also an essential ingredient of cloud computing. Customers can instantly provision cloud computing resources as virtual machines running in the cloud without spending capital on equipment purchases. This gives the development organization a great deal of flexibility and allows them to test their work in a way they couldn’t afford with their own equipment in their own data centers. The end result is rapid application development that brings innovations to market faster.

Organizations want to develop software in the cloud and deploy it there or in their data centers—or in both places, using the hybrid cloud model. For example, Microsoft Windows Azure provides an environment that allows customers to deploy applications running on Windows Server 2012 with Hyper-V on Azure virtual machines.

If VMs can run either on-premises or in the cloud, companies will want a way to copy data across the hybrid cloud boundary so it can be accessed locally ("local" in the cloud context means both the VM and data are located in the same cloud data center). But if copying data takes too long, the hybrid cloud application might not work as anticipated. This is an area where hybrid cloud storage could play a valuable role by synchronizing data between on-premises data centers and the cloud. Chapter 7, " Imagining the possibilities with hybrid cloud storage," discusses future directions for this technology, including its possible use as a data portability tool.

Reducing the amount of data stored

Considering that data growth is such a pervasive problem, it makes sense for storage systems to run processes that reduce the amount of storage capacity consumed. Most new storage arrays incorporate data reduction technologies and the hybrid cloud storage design discussed in this book is an example of a solution that runs multiple data reduction processes—on-premises and in the cloud.

Know your storage math

Many of the advancements in storage and data management today are based on advanced mathematical algorithms for hashing, encoding, and encrypting data. These algorithms tend to assume that there is enough processing power available to not impact system performance and that the data being operated on is stored on devices with sufficient performance so as not to impact overall system performance. Much of the design work that goes into storage systems today involves balancing the resources used for serving data with the resources used for managing it.

So, if data growth has been a problem for some time, why hasn’t data reduction been used more broadly in enterprise storage arrays? The answer is the performance impact it can have. One of the most effective data reduction technologies is deduplication, also known as dedupe. Unfortunately, dedupe is an I/O intensive process that can interfere with primary storage performance, especially when device latencies are relatively high as they are with disk drives. However, enterprise storage arrays are now incorporating low-latency solid state disks (SSDs) that can generate many more I/O operations per second (IOPS) than disk drives. This significantly reduces the performance impact that dedupe has on primary storage. The StorSimple HCS solution discussed in this book uses SSDs to provide the IOPS for primary storage dedupe.

Chapter 4, "Taming the capacity monster" looks at all the various ways the StorSimpleHCS solution reduces storage capacity problems.

Solid State Disks under the covers

SSDs are one of the hottest technologies in storage. Made with nonvolatile flash memory, they are unencumbered by seek time and rotational latencies. From a storage administrator’s perspective, they are simply a lot faster than disk drives.

However, they are far from being a “bunch of memory chips” that act like a disk drive. The challenge with flash is that individual memory cells can wear out over time, particularly if they are used for low-latency transaction processing applications. So, SSD engineers design a number of safeguards—including metadata tracking for all cells and data, compressing data to use fewer cells, striping data with parity to protect against cell failures, wear-leveling to place dormant data in cells that have been the most active and active data in cells that have been the least active, “garbage collecting” to remove obsolete data, trimming to remove data that was deleted and metering to indicate when the device will stop being usable.

SSDs manage everything that needs to be managed internally. Users are advised not to use defrag or other utilities that reorganize data on SSDs. They won’t perform faster, but they will wear out faster.

Best practices or obsolete practices?

The IT team does a great deal of work to ensure data is protected from threats such as natural disasters, power outages, bugs, hardware glitches, and security intrusions. Many of the best practices for protecting data that we use today were developed for mainframe environments half a century ago. They are respected by IT professionals who have used them for many years to manage data and storage, but some of these practices have become far less effective in light of data growth realities.

Some best practices for protecting data are under pressure for their costs, the time they take to perform, and their inability to adapt to change. An example of a best practice area that many IT teams find impractical is disaster recovery (DR). DR experts all stress the importance of simulating and practicing recovery, but simulating a recovery takes a lot of time to prepare for and tends to be disruptive to production operations. As a result, many IT teams never get around to practicing their DR plans.

Another best practice area under scrutiny is backup, due to chronic problems with data growth, media errors, equipment problems, and operator miscues. Dedupe backup systems significantly reduce the amount of backup data stored and help many IT teams successfully complete daily backups. But dedupe systems tend to be costly and the benefits are limited to backup operations and don’t include the recovery side of the equation. Dedupe does not change the necessity to store data off-site on tapes, which is a technology that many IT teams would prefer to do away with.

Many IT teams are questioning the effectiveness of their storage best practices and are looking for ways to change or replace those that aren’t working well for them anymore.

Doing things the same old way doesn’t solve new problems

The root cause of most storage problems is the large amount of data being stored. Enterprise storage arrays lack capacity "safety valves" to deal with capacity full scenarios and slow to a crawl or crash when they run out of space. As a result, capacity planning can take a lot of time that could be used for other things. What most IT leaders dislike most about capacity management is the loss of reputation that comes with having to spend money unexpectedly on storage that was targeted for other projects. In addition, copying large amounts of data during backup takes a long time, even when they are using dedupe backup systems. Technologies like InfiniBand and Server Message Block (SMB) 3.0 can significantly reduce the amount of time it takes to transfer data, but they can only do so much.

More intelligence and different ways of managing data and storage are needed to change the dynamics of data center management. IT teams that are already under pressure to work more efficiently are looking for new technologies to reduce the amount of time they spend on it. The StorSimple HCS solution discussed in this book is a solution for existing management technologies and methods that can’t keep up. .

Introducing the hybrid cloud storage architecture

Hybrid cloud storage overcomes the problems of managing data and storage by integrating on-premises storage with cloud storage services. In this architecture, on-premises storage uses the capacity on internal SSDs and HDDs, as well as on the expanded storage resources that are provided by cloud storage. A key element of the architecture is that the distance over which data is stored is extended far beyond the on-premises data center, providing disaster protection. The transparent access to cloud storage from a storage system on-premises is technology that was developed by StorSimple and it is called Cloud-integrated Storage, or CiS. CiS is made up of both hardware and software. The hardware is an industry-standard iSCSI SAN array that is optimized to perform automated data and storage management tasks that are implemented in software.

The combination of CiS and Windows Azure Storage creates a new hybrid cloud storage architecture with expanded online storage capacity that is located an extended distance from the data center, as illustrated in Figure 1-2.

image

Figure 1-2 In the hybrid cloud storage architecture, CiS accesses the expanded capacity available to it in Windows Azure Storage over an extended distance.

Change the architecture and change the function

CiS performs a number of familiar data and storage management functions that are significantly transformed when implemented within the hybrid cloud storage architecture.

Snapshots

CiS takes periodic snapshots to automatically capture changes to data at regular intervals. Snapshots give storage administrators the ability to restore historical versions of files for end users who need to work with an older version of a file. Storage administrators highly value snapshots for their efficiency and ease of use—especially compared to restoring data from tape. The main limitation with snapshots is that they are restricted to on-premises storage and susceptible to the same threats that can destroy data on primary storage. Implementing snapshots in a hybrid cloud storage architecture adds the element of extended distance, which makes them useful for backup and disaster recovery purposes. Cloud snapshots are the primary subject of Chapter 2, "Leapfrogging backup with cloud snapshots".

Data tiering

CiS also transparently performs data tiering which moves data between the SSDs and HDDs in the CiS SAN system according to the data’s activity level, with the goal of placing data on the optimal cost/performance devices. Expanding data tiering with a hybrid cloud storage architecture transparently moves dormant data off site to the cloud so it no longer occupies on-premises storage. This transparent, online "cold data" tier is a whole new storage level that is not available with traditional storage architectures and it provides a way to have archived data available online.

Thin provisioning

SAN storage is a multi-tenant environment where storage resources are shared among multiple servers. Thin provisioning allocates storage capacity to servers in small increments on a first-come, first-served basis, as opposed to reserving it in advance for each server. The caveat that is almost always mentioned with thin provisioning is the concern about over-committed resources, running out of capacity, and experiencing the nightmare of system crashes, data corruptions, and prolonged downtime.

However, thin provisioning in the context of hybrid cloud storage operates in an environment where data tiering to the cloud is automated and can respond to capacity full scenarios on demand. In other words, data tiering from CiS to Windows Azure Storage provides a capacity safety valve for thin provisioning that significantly eases the task of managing storage capacity on-premises.

Summary

The availability of cloud technologies and solutions is pressuring IT teams to move faster and operate more efficiently. Storage and data management problems are front and center in the desire to change the way data centers are operated and managed. Some of the existing storage technologies and best practices are being questioned for their ability to support business goals.

A new architecture called hybrid cloud storage improves the situation by integrating on-premises storage with cloud storage resources. This provides the incremental allocation and use of cloud storage as well as remote data protection. Extending the traditional on-premises storage architecture to include cloud storage services enables much higher levels of management automation and expands the roles of traditional storage management functions, such as snapshots and data tiering, by allowing them to be used for backup and off-site archiving.

The rest of the book explores the implementation of the StorSimple HCS solution and how it fundamentally changes how data and storage management is done.

Introducing Web Based Test Case Management

 

The Visual Studio 2012 tools (both Visual Studio Clients and Team Foundation Server) have seen a new delivery cadence introduced so that customers will get additional features on a regular basis (roughly quarterly).

The great thing about this is that you will see great new features on a regular basis. You will see these updates referred to as a 2012.x release. At the current time we have shipped two versions of these updates delivering a range of new features and bug-fixes that you can read about here and here.

Specifically one of the really great examples of a completely new are of functionality introduced in the 2012.2 release of Team Foundation Server 2012 was the ability to work with our Test Case Management tools through a web based environment. You can find more details on this great new feature area here.

Developing a Windows Store Business App using C#, XAML, and Prism

About patterns & practices

The Microsoft patterns & practices team is responsible for delivering applied engineering guidance that helps  Software architects, developers, and their teams take full advantage of Microsoft’s platform technologies in their  application development project.

They have a simple goal of helping software development teams be more successful with the Microsoft application platform.

They do this by delivering guidance that:

?     Helps to simplify the Microsoft application platform.
?     Provides solution guidance to common problems.
?     Helps development teams grow their skills and learn.

For more information: http://www.microsoft.com/practices

Guidance on how to create a Windows Store business app using C#, XAML and the Prism library.

Ever wanted to know how to start building Windows Store Business app take a look at the AdventureWorks Shopper reference implementation and the Prism for Windows Runtime library.

clip_image002

The AdventureWorks Shopper reference implementation uses the Prism library to demonstrate modern development practices such as the Model-View-ViewModel (MVVM) pattern with navigation and app lifecycle management. Additionally the reference implementation demonstrates validation, application data management, accessibility, localizability, touch, search, tiles, tile notification, and multiple view states. It also provides guidance on testing your app and tuning its performance.

Similar to the Prism library for WPF and Silverlight or “Prism Classic,” Prism for Windows Runtime makes it easier to design and build flexible and easy-to-maintain Windows Store business apps using modern development practices.

These apps are “built to last” and “built to change.” They use design patterns that embody important architectural design principles, such as separation of concerns and loose coupling.

What’s in the Box?

?     Reference Implementation (RI) – the Adventure Works Shopper RI demonstrates validation, application data management, accessibility, localizability, touch, search, tiles, and tile notification.

?     Quickstarts:

Hello World – demonstrates how to create a Hello World app for the Windows Store using the Prism library. Event Aggregator – demonstrates how to send loosely coupled messages between components.Validation – demonstrates how to validate data on forms in a Windows Store app.

?     Prism library

Model-View-ViewModel (MVVM) with app lifecycle management and navigation
Event Aggregator in a Portable Class Library
Validation
Delegate Command
Flyout, Search, and Settings

?     Guide – Developing a Windows Store business app using C#, XAML, and Prism for the Windows Runtime” is designed to help developers create Windows Store business apps using the Prism library.

clip_image003

How to Get It?

The Prism library source code is available with the AdventureWorks Shopper reference implementation on the MSDN Code Gallery at http://aka.ms/prism-winrt-code. The Prism binaries are available on NuGet. Search for prism.storeapps and prism.pubsubevents.

You can view the documentation at http://aka.ms/prism-winrt-doc or download a PDF version at http://aka.ms/prism-winrt-pdf.

Videos

Introducing Prism for Windows Store Apps:

clip_image004

ZipApp Perfect tool for non-programmers to build Windows 8 apps quickly.

This post was originally posted at The Developer Movement , I wanted to share this with UK educators and students to demonstrate how easy it is to get started as a Windows 8 app publisher. http://www.zipapp.co.uk The promise : “Quick, simple and faster than hell”, “You don’t need to be a programmer” The reality : Yes, a non-programmer can build a useful app in an afternoon. What will the app be able to do? ZipApp supports creating apps with the following types of content Static content (hardcoded…(read more)

Guest post: Utilizzare gli SMS per l’autenticazione nelle app Windows Store

Questo post è stato scritto da Giancarlo Lelli (@itsonlyGianca), Microsoft Student Partner di Cagliari.

In questo articolo vedremo come implementare un’autenticazione SMS nelle nostre app Windows Store, ovvero come Windows 8 permette questo tipo di procedura, quali sono le classi che permettono di interfacciarsi ad un dispositivo mobile broadband e soprattutto i prerequisiti hardware e a livello di ambiente di sviluppo necessari per usufruire di tutte le potenzialità di questo particolare metodo di autenticazione.

Prefazione

Prima di addentrarci nell’argomento preciso che le procedure riportate in questo articolo non si possono applicare a coloro cha hanno intenzione di sviluppare app per operatori di telefonia mobile, ma solamente a coloro che vogliono utilizzare all’interno della loro field application (per cui mi riferisco a coloro che svilupperanno app del tipo LOB) questo tipo di layer di sicurezza. Gli esempi di codice forniti in questi articolo saranno in C#

Background

Il supporto alla tecnologia mobile broadband non è qualcosa di nuovo al dir la verità, infatti era già presente ai tempi di Windows 7, tuttavia la maniera in cui poteva essere utilizzata risultava piuttosto problematica, dovuta alla necessità di installare software e driver di terze parti per rendere operativo il nostro mobile broadband device. In Windows 8 queste problematiche sono state risolte, introducendo delle funzionalità che ad oggi permettono all’ utente di avere un esperienza utente sempre connessa, permettendo di considerare le connessioni a consumo come qualcosa (in certi casi) analogo al Wi-Fi. A questo proposito è stato fatto un lavoro di re-ingegnerizzazione dello stack di wireless networking che ha portato una serie di interessanti novità, due delle principali sono:

Introduzione del Mobile Broadband Interface Model (MBIM) ovvero sia una nuova specifica hardware che i produttori potranno adottare nei loro dispositivi garantendo così un hardware experience di gran lunga superiore a quella a cui eravamo abituati. Infatti all’ interno di Windows 8 la specifica MBIM viene fornita come qualcosa out of the box, ovvero già nativamente supportata, infatti il class driver che è destinato a supportare questo particolare tipo di device è già nativamente disponibile all’ interno del SO, quello che dobbiamo fare noi è semplicemente connettere il dispositivo al nostro pc/tablet, senza nemmeno preoccuparci di eventuali aggiornamenti perché è tutto gestito da Windows Update.

Introduzione di due nuovi namespace strettamente collegati:

· Windows.Device.Sms: che espone classi e metodi gestiti e fruibili da tutti i linguaggi supportati da WinRT per interfacciarsi ai dispositivi mobile broadband connessi al nostro pc/tablet.

· Windows.Networking.Connectivity: permette di ottenere informazioni sulla connettività, l’uso e il piano dati per la connessione a consumo attiva. I dati ottenuti tramite questi metodi possono essere usati per evitare il cosiddetto bill-shock, ovvero costi superiori al normale dovuti a sfori sul piano dati.

In questo articolo ci concentreremo soprattutto sul primo del due namespace illustrati sopra.

Windows.Device.Sms – Features

Le funzionalità messe a disposizione a noi developer da questo namespace sono innumerevoli, le principali, e quelle che consumeremo noi negli esempi di questo articolo sono elencato di seguito:

· Invio e ricezione di SMS in formato di testo

· Interfacciamento con il dispositivo mobile broadband

· Letture, scrittura e cancellazione di sms dal message store (memoria della sia card)

· Enumerazioni di tutti i dispositivi mobile broadband connessi

· Nuovo event trigger per background task

Ovviamente molti dei metodi di questo spazio dei nomi rispettano la filosofia asincrona di Windows 8 perciò supportano pienamente le due nuove keyword async/await, tuttavia alcune operazioni sono ancora collegate al vecchio concetto di callback associati ad un evento, a questo proposito mi riferisco agli eventi che riguardano la ricezione di un nuovo SMS e al cambiamento di stato del nostro mobile broadband device.

Per facilitare l’integrazione di un app mobile broadband con il sistema operativo è stato introdotto anche un nuovo event trigger che potrà essere usato nella definizione di nuovi background task per permettere ad un app la cui funzione è strettamente di messaggistica di potersi svegliare qualora venga ricevuto un sms, sganciandosi così dal vincolo dei callback che ovviamente vengono eseguiti solo quando l’app è in esecuzione.

Operazioni preliminari

Prima di buttarci nei meandri di Visual Studio ci sono alcuni step preliminari da eseguire, che permettono alla nostra app di avere i privilegi di accesso al MB device, ovvero, definire il metadata package per il nostro dispositivo MB e impostare le capabilities nella nostra solution di VS2012.

I requisiti software sono i seguenti:

· PC con Windows 8 (preferibilmente Pro) installato

· Visual Studio 2012

· Windows Driver Kit installato

I requisiti hardware invece:

· Dispositivo mobile broadband che sfrutta lo standard MBIM collegato al pc/tablet. [List]

Completati questi step strettamente preparatori, la prima cosa che dobbiamo fare (se non lo abbiamo già fatto) è collegare il nostro MB device al nostro pc/tablet. Non appena il device verrà collegato, il sistema operativo riconoscerà che si tratta di un dispositivo che sfrutta il MBIM e quindi attraverso il Device Metadata Retrieval Client (DMRC) controllerà in primis che all’interno del nostro computer non ci sia già un metadata package relativo a quella periferica (device metadata cachedevice metadata store), qualora non esistesse o ha bisogno di essere aggiornato il DMRC farà una query al Windows Metadata and Internet Services website (WMIS) per determinare l’esistenza di un package per tale dispositivo, qualora esistesse il DMRC lo scarica lo scompatta e lo memorizza all’ interno della cartella che contiene la cache dei metadati. (%PROGRAMDATA%\Microsoft\Windows\DeviceMetadataStore\). Arrivati a questo punto possiamo aprire VS2012, subito noteremo che nella barra dei menù è apparsa una nuova voce ovvero “Drivers”. Navighiamo come mostra la figura uno sino ad arrivare al menù relativo ai MB device metadata.

clip_image002

Una volta aperto quel menù ci ritroveremo davanti il wizard per l’authoring di service metadata, noi per comodità sceglieremo di modificarne uno già esistente (quello scaricato dal DMRC) e una volta che verrà aperto muoviamoci nella scheda “Applications” e andiamo a riempire i campi raggruppati nelle sezioni Metro Style device app e privileged application. Una volta fatto andiamo nella scheda finish e salviamo il newly edited package sostituendolo a quello già esistente. Con questa procedura abbiamo aggiunto la nostra app alla whitelist di tale dispositivo. Una feature collegata ai metadata package è la possibilità di specificare degli URL di app già nello store di modo che una, volta fatto il deploy del pacchetto, quando verrà connesso un dispositivo qualsiasi che abbia dei metadati già definiti, Windows 8 scaricherà automaticamente l’app indicata dallo store.

Il prossimo step sta nel definire le capabilities nella nostra solution di VS2012, questo step è abbastanza banale ma leggermente diverso da quello a cui siamo abituati poiché il file *.appxmanifest non permette l’aggiunta di tale feature tramite interfaccia grafica. Per cui dovremmo aprire tale file in modalità di testo e inserire il seguente codice:

clip_image004

Adesso siamo pronti a sviluppare la nostra app.

Code snippet per app di Windows Store C#

Presupponendo l’aggiunta di questi namespace e la dichiarazione di queste tre variabili:

clip_image006

Inizializziamo il MB device

clip_image008

Il codice sopra riportato è abbastanza autoesplicativo, ovvero per prima cosa creiamo un grande blocco try-catch, poi inizializziamo la variabile mai device con l’istanza del dispositivo Mb di default, se non vengono sollevate eccezioni utilizziamo una messagebox per far visualizzare alcune info sulla periferica collegata, altrimenti visualizziamo il tipo di errore. Le info base che visualizzeremo sono: il numero di telefono della sim inserita, la classe cellulare della scheda lo stato del device e la capienza della memoria della sim.

Enumerazione di tutti i dispositivi mobile broadband

clip_image010

Tralasciando la parte identica allo snippet precedente notiamo come il metodo .GetDeviceSelector() permetta di utilizzare una stringa AQS per identificare all’ interno del nostro pc/tablet tutti i dispositivi mobile broadband, dopodiché con un semplice ciclo for visualizziamo tutte le info base per ogni device, identificando il singolo device attraverso il suo Id univoco utilizzato il inizializzare ad ogni ciclo la variabile di tipo SmsDevice a meno di eventuali eccezioni.

Invio SMS

clip_image012

Lettura messaggi dalla memoria della sim

clip_image014

In questo snippet vediamo come è possibile legge gli SMS dallo store della sim, vale la pena evidenziare due cose, ovvero, l’enumerazione SMSMessageFilter permette di identificare la tipologia di msg da leggere (inviati, ricevuti, eliminati, bozze, tutti) e il fatto che all’ interno del ciclo i messaggi sono convertiti dal formato binario al formato testo con il metodo della classe SmsTextMessage .FromBinaryMessage().

Cancellazione messaggi dal message store

clip_image016

Tralasciando il codice già spiegato nello snippet precedente, le righe 6-7 mostrano come sia possibile cancellare in massa più messaggi semplicemente specificandone il tipo grazie all’ enumerazione spiegata prima, oppure come cancellare un singolo messaggio specificandone l’id al’ interno della lista instanziata in riga 3. La sottile differenza dei due metodi sta nel fatto che uno è singolare e l’altro è plurale!

Sottoscrizione e cancellazione ad eventi (messaggio ricevuto, stato device cambiato)

clip_image018

L’Intellisense provvederà creare i metodi di callback, nel primo caso un parametro del metodo sarà una variabile che permetterà di ottenere info sull’ SMS appena ricevuto, mentre nel secondo caso si potrà capire in che modo il dispositivo ha cambiato stato tramite la proprietà .DeviceStatus

Autenticazione via SMS concetti e algoritmi

Ora che abbiamo visto come poter sfruttare un MB device in Windows 8 per poter fare inviare sms alla nostra app, vediamo che tipo di approccio dobbiamo avere per essere sicuri dell’ efficacia di questo metodo. In questo articolo vedremo l’implementazione .NET degli algoritmi più usati in questi casi ovvero quelli definiti nei documenti RFC4226 e l’ RFC6238. Il primo fornisce una autenticazione basata su contatore mentre il secondo una basata su un determinato time span calcolato sul tempo UNIX. In questo articolo vedremo nel dettaglio il primo algoritmo (dato che per il secondo l’unica differenza sta nel primo valore fornito in input, che varia da un intero, ad un valore intero random dipendente dalla seguente formula calcolato su un intervallo di 30 secondi)

Y = (Now-UNIX_time) /30

 

 

 

Algoritmo RFC4226

L’algoritmo è definite come segue:

1. Prendi in input il numero di volte che è stato eseguito l’algoritmo + 1 insieme alla secret key

2. Incapsula tutto in un array di byte e calcola il SHA1 HMAC

3. Esegui delle operazioni bitwise e calcola il modulo del risulta dividendolo per 10^x dove X è il numero di cifre che vogliamo abbia il nostro codice di verifica.

4. Nel caso in cui il risultato dello step 3 abbia meno cifre di X fai un padding con zero

Code snippet dell’ algoritmo e chiamata del metodo

clip_image020

Il codice appena riportato è inserito dentro una Task<T> poiché proviene da un cloud service hostato su Windows Azure.

clip_image022

Questo snippet mostra la chiamata a tale funzione e l’invio del codice via sms. La classe SmsAuthServiceClient esiste perché deriva da una service reference che punta al cloud service dove è definito l’algoritmo della pagina precedente

Per quanto riguarda l’algoritmo RFC6238 il metodo avrà un parametro ovvero la chiave segreta e il resto sarà tutto definito a run time. Sotto è riportato l’algoritmo.

clip_image024

Grazie per avere letto questo articolo e per ora è tutto, se hai suggerimenti dubbi o domande contattami pure all’ indirizzo email: gcarlo.lelli@outlook.com

ZipApp – Create your own Windows 8 App

Got an idea for a Windows 8 app for your class or institution but don’t know where to start? ZipApp can help.

image

ZipApp gives you the ability to simply add some data or hook up one of your existing online services, such as Twitter or an RSS feed, to create a Windows 8 app that complies with store rules, without the need for in-depth coding knowledge or experience.

To get started, and build an app in only 10 minutes, firstly go to ZipApp.co.uk and sign in with a Twitter, Google, Facebook or Microsoft Account. Once you are signed in you will be able to create a new app. It will ask for some basic information such as the App Name, and a description etc. You are then on your way to being able to share your app in the Windows Store.

When you build your app you get the source code so you can extend the application to your hearts content. Furthermore, with dozens of templates that are available, you can be confident that you will be able to find a design that compliments your institutions branding etc.

Additionally, you can sell your app, add advertising or give it away for free. Flexibility sits at the heart of ZipApp!

Get started today by visiting www.zipapp.co.uk. Let us know your ideas for an app or post a link to your app in the store in the comments below.

Unit Testing Delay Signed Assemblies on the Hosted TFS Build Service

Using the hosted build service available in the Team Foundation Service is great because you don’t have to build and manage build servers. You can even get the hosted build server to run your unit tests automatically. To help maintain quality on a project I am doing with the ALM Rangers, we use a gated checkin that runs all our unit tests, so we can’t check in code with any failing unit tests.

Of course, using a standardized build server can have its restrictions. One of these is that you can’t configure strong name verification skipping. So if your code has to be delay signed then your unit tests will not run because they will be unable to load the assemblies due to a “strong name validation failed” error. I want to show you here one way to get around this problem. It is not necessarily suitable for everyone, so please consider whether it can work for you before committing to this solution.

The Idea

The idea is to have two strong name key files, one for development only that contains both public and private keys, and one for production use that contains only the public key and requires delay signing. You then create a new solution configuration for signed builds that uses the production file, while still using the development file in Debug and Release builds, through the use of conditionals in the project files.

Your normal gated checkin will build a Debug or Release configuration. The builds you use for testing may also use the Release configuration, unless you actually deploy fully signed assemblies to the test environments. You need to create a new build definition that uses the Signed configuration to generate the assemblies that use the production strong name key file, this build cannot run the tests though because the strong name verification skipping cannot be configured.

Step 1: Create a New Solution Configuration

The new solution configuration will be used to build the assemblies using the production strong name key file with delay signing. To create the solution configuration open the Configuration Manager from the BUILD menu. In the Active solution configuration drop-down select <New…>, this will open the New Solution Configuration dialog where you can create the new solution configuration. I named the new configuration “Signed” and based it on the Release configuration, like this:

 

It is best to verify that your solution still builds using the new Signed configuration. Fix any build issues before proceeding.

Step 2: Add the Strong Name Key Files

If you haven’t already done so, make sure you have the development and production strong name key files in the solution and in source control.

In my projects I put these in the solution directory and refer to them by relative path from the individual projects in the solution. Visual Studio likes to always copy the strong name key files into the project directory, you can correct this while doing the next step below.

Step 3: Make the Strong Name Key Files and Delay Signing Conditional

In this step we are going to make the choice of strong name key file and delay signing conditional on the solution configuration. This step requires you to manually edit the project file (i.e. .csproj or .vbproj). Open the file in a text editor. You can also open it in the Visual Studio XML Editor if you wish, but you will need to unload the project first. You will need to edit the project file for each assembly that needs to be delay signed.

Strong Name Key File

Locate the <AssemblyOriginatorKeyFile> element. This will appear in a property group like this:

<PropertyGroup>

<AssemblyOriginatorKeyFile>..\Development.snk</AssemblyOriginatorKeyFile>

</PropertyGroup>

Replace this with the following:

<PropertyGroup Condition= ‘$(Configuration)’ != ‘Signed’ >

<AssemblyOriginatorKeyFile>..\Development.snk</AssemblyOriginatorKeyFile>

</PropertyGroup>

<PropertyGroup Condition= ‘$(Configuration)’ == ‘Signed’ >

<AssemblyOriginatorKeyFile>..\Production.snk</AssemblyOriginatorKeyFile>

</PropertyGroup>

This means that when building the assembly the Development strong name key file will be used in any build configuration that is not the Signed one, the Signed one will use the Production strong name key file. Notice that I have used relative paths at this point too so I can keep the strong name key files in a single location.

Sometimes the <AssemblyOriginatorKeyFile> element appears together with other settings, as in this example:

<PropertyGroup>

<Configuration Condition= ‘$(Configuration)’ == ” >Debug</Configuration>

<Platform Condition= ‘$(Platform)’ == ” >AnyCPU</Platform>

<SchemaVersion>2.0</SchemaVersion>

<ProjectGuid>{792AC23B-5A04-4C5C-A7E5-70D22423CF4C}</ProjectGuid>

<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

<OutputType>Library</OutputType>

<AppDesignerFolder>Properties</AppDesignerFolder>

<RootNamespace>Microsoft.ALMRangers.GenerateUnitTest</RootNamespace>

<AssemblyName>GenerateUnitTest</AssemblyName>

<SignAssembly>True</SignAssembly>

<AssemblyOriginatorKeyFile>..\Development.snk</AssemblyOriginatorKeyFile>

<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>

</PropertyGroup>

In this case remove the element from this section and then use the two conditional property groups above.

Delay Signing

We do a similar thing for the <DelaySign> element. If you were already delay signing then locate this element and replace the property group it is in with the property groups below, otherwise just add the property groups:

<PropertyGroup Condition= ‘$(Configuration)’ != ‘Signed’ >

<DelaySign>false</DelaySign>

</PropertyGroup>

<PropertyGroup Condition= ‘$(Configuration)’ == ‘Signed’ >

<DelaySign>true</DelaySign>

</PropertyGroup>

As before, if the <DelaySign> element is in a property group with other settings then remove the element from the property group and add the conditional property groups above.

Step 4: Create Build Definition

The final step is to create a new build definition on the build service. The simplest thing to do is to clone an existing build definition and then in the Process section, under Items To Build set the Configurations to build to be Signed. You will want to disable the unit tests in the Automated Tests node as these will not work any more.

Limitations

This solution allowed me to build and unit test Debug builds on the hosted build service and also to build delay signed assemblies on it too.

However, I have not lived with this solution for long so there may be limitations that I am not yet aware of. One possible issue that comes to mind is when putting assembly references into configuration files. You will need to find a way to have configuration files change according to which solution configuration was built.

Windows 8 ?? DVD ??????

???????????????????????Windows 8 ???????DVD ????????????????Windows 8 Pro ??????? Windows Media Center Pack ?????????? Windows Media Center ?? DVD ??????????????Windows Media Center Pack ????????????Windows Media Player ??????????????Windows 8 RT ???????????Windows 8 Pro Pack ????????? Windows Media Center Pack ?????????????????

Windows 8 Pro ??? Windows RT ???????????DVD ???????? Store Application ?????????????????????????Windows 8 Pro ??????? DVD ??????????????????????????????? DVD ????????????????????????

 

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

 

DVD playback options for Windows

http://windows.microsoft.com/en-us/windows/dvd-playback-help

 

Add Windows 8 Pro Pack or Windows 8 Media Center Pack to your edition of Windows

http://windows.microsoft.com/en-us/windows-8/feature-packs

 

Making Windows Media Center available in Windows 8

http://blogs.msdn.com/b/b8/archive/2012/05/03/10299686.aspx