How to generate PDF in ASP.NET MVC

Generating PDF, reports or any document in MVC is generally the basic requirement in most of the projects. To address this requirement, we can leverage a third party tool “Rotativa” to generate PDF documents. Rotativa is an asp.net library which helps in spawning PDFs from MVC controller. This tool gives us the flexibility to create PDFs directly from views, partial views or URL. We need to follow certain steps to generate PDF from Rotativa tool: Open Visual Studio. Select File -> New Project. Select ASP.NET MVC 4 Web Application under Templates-> Visual C#->Web->Visual Studio 2012. 4. Select Empty or Internet Application template, and select Razor as the view engine. 5. Add a class in Models folder with SampleModel name. 6. Add a Controller in Controllers folder with SampleController name. 7. Add a strongly typed view to create a view aligned with a particular class or a dynamic view for creating a generalized view. 8. To leverage the Rotativa tool in our application to generate PDF, we need to install Rotativa using Manage nuget packages. 9. Right click on References folder in Solution and click on Manage Nuget Packages. Search online and add Rotativa as shown below: 10. Add this line of code in SampleController class. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using RotativaSample.Models; namespace RotativaSample.Controllers { public class SampleController : Controller{ public ActionResult Index(){ return View(); } public ActionResult GetSamples() { SampleModel obj=new SampleModel(); List sampleList = new List(); sampleList = obj.GetSampleDetails(); return View(sampleList); } public ActionResult GeneratePDF() { SampleModel obj = new SampleModel(); List sampleList = new List<samplemodel< span=””></samplemodel<>>(); sampleList = obj.GetSampleDetails(); return new Rotativa.ViewAsPdf(sampleList) { PageSize = Rotativa.Options.Size.A4, PageOrientation = Rotativa.Options.Orientation.Landscape, PageMargins = new Margins(12, 12, 12, 12),// it’s in millimeters PageWidth = 180, PageHeight = 297, CustomSwitches = “–outline –print-media-type –footer-center ”Confidential” –footer-right [page]/[toPage] –footer-left [date]“ }; } } } How to add header and footer in Rotativa PDF To add header and footer in Rotativa pdf, we need to add “CustomSwitches” as mentioned in the above code. Sample.cs: Model Class using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace RotativaSample.Models { public class Sample { public int EmpId {get;set;} public string Name { get;set;} public string Email {get;set;} public string Country { get;set;} } public List GetSampleDetails() { List samples = new List(); samples.Add(new SampleModel() { EmpId = 491, Name = “abc”, Email = “abc@gmailcom”, Country = “India” }); samples.Add(new SampleModel() { EmpId = 492, Name = “xyz”, Email = “xyz@gmail.com”, Countr y = “India” }); return (samples); } }} Add another view in Views folder with “GetSamples.cshtml” name and add the below code: @model dynamic @{ Layout = null; } GetSamples @foreach (var item in Model) { } Employee Id Employee Name @item.EmpI @item.Name 1. To leverage the Rotativa tool in our application to generate PDF, we need to install Rotativa using “Manage nuget packages”. 2. Right click on References folder in Solution and click on Manage Nuget Packages. Search online and add Rotativa as shown below: How to add CSS in Rotativa PDF When we are using SSRS reports we are pampered with automatic features, such as paging, headers, footers, numbering. HTML to PDF converter lacks this feature, so if you need to add CSS, you need to use inline CSS. You need to add CSS to your html page in style section E.g.: Add a page break Then add this line of code before the starting of any page: Conclusion Many LOB applications require printable documents in PDF format such as invoices, receipts, etc. Generating such types of printable documents in Asp.Net MVC application is a little bit complex. By leveraging the Rotativa tool in MVC application we can easily generate the printable PDF docs with custom header and footer. You can follow the above process to generate PDF in asp.net MVCwith Rotativa. Rotativa tool is very easy to use and gives full control over header and footer elements such as adding page number, date, etc. NEED HELP IN ASP.NET MVC? CONTACT US NOW Alpa Sarupria Software Developer Advaiya Solutions Inc Udaipur, Rajasthan, India
Five Application development tools every developer must know about

Application development is a complicated iterative process. The development team goes through several rounds of revisions, testing and fixes before releasing a build. It makes the entire process complex, as well as time consuming. To ease the process, a number of application development tools can be used to improve the app quality and help in time and effort management. Here are Five Application development tools and frameworks described to help create your perfect app: 1. Pivotal Tracker Pivotal Tracker is a project management tool that helps to keep track the whole development process from the very scratch to the final build. This tool can help the team members to view the work items/tasks, the assignees, the estimated effort and time. Also, they can track the progress of other project’s team members and help them to meet individual deadlines. The basic features of the tool are: Track & prioritize tasks, share documents, one view of entire project, agile and iterative management workflow, developer friendly open API, third party tools, built-in integrations, real time, and focused collaboration and release management. 2. Bootstrap Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on web. Bootstrap provides libraries that offer ready to use pieces of code, which makes the website look pleasing. As it already has a built in set of design and styling aspects, it makes the work of developer less tedious. The main benefit of using bootstrap is that it is responsive, so the end results are uniform across varied dimensions, for example- laptop to iPad or iPad to mobile. Also, Bootstrap is fully customizable so the developer can tailor it according to the need and requirements of the projects. 3. GitHub GitHub is one of the most commonly used version control system. When more than one members are working on a project, it becomes very difficult to keep track of each other’s records. Thus, in such situations a version control-system such as GitHub resolves the issue of handling conflicts. The other predecessors of the tool required connection to central server while making changes, but GitHub enables the user to keep a local copy and only connect to the server when those changes have been finalized and need to be shared on the central repository. 4. Postman Postman is a strong HTTP client for testing web services. Postman allows to test, develop and document APIs by allowing users to quickly put HTTP requests. It has a very clean and intuitive user interface, which makes the features to be easily accessible and also allows users to get acquainted to its functionality without much effort. One of the most useful feature of Postman is its automation capability that helps to automate the process of making API requests and testing API responses, allowing developers to establish a very efficient workflow. Another important feature of Postman is the response viewer that showcases the response received from the API call. Postman REST client is a real time saver. Indeed, Postman is a must-have tool for developers who regularly work with APIs. 5. Debugger (F12) F12 tools allow web developers to easily debug JavaScript code without leaving the browser. Debugger is a set of developer tools to help developers build and debug the webpage. It provides tools such as breakpoints, watch and view local variables, and a console for messages and immediate code execution. Writing great webpages requires coding expertise, along with the set of right tools to find and debug issues that interrupt in smooth development. F12 tools provide a view of how the webpages are interpreted on code level. As most websites use dynamic code, debugger allows to trace out HTML content rendered and therefore helps in finding errors easily. Conclusion These application development tools are a choice of hundreds of software developers around the world. With feature-rich components, tools and services, these tools enable app developers to build and deploy business ready solutions, easily and efficiently.
URL routing techniques in MVC

Traditionally, in any web application, URLs are mapped to a physical location of the specified page in the virtual directory created on web server. But in MVC we don’t have specific physical files to be mapped for different page requests, so routing mechanism is used in MVC to decide that which action method of which controller class needs to be executed for the incoming browser request. Here the Index method of the ‘Book controller’ will be executed by passing book id 1 as a parameter. Routes are defined in the global.asax file and processed at the application’s startup when Application Start function is invoked. Inside this method, one call is made to the RegisterRoutes method of the RouteConfig class placed inside App_Start folder of the project. The default MVC project template comes with a Default pre-configured route as below. This route can handle any request that has a maximum of 3 segments ~/ {controller}/ {action}/ {id}. Using custom routes It is not necessary to use default pre-configured route only, we can create our own custom routes in the same route collection. The custom routes should be written always before the default route because the order in which we register the routes is followed by the routing engine and if we place the default route before the custom route, then default route will be called every time and custom route will never get called. In the below example route, the route name is ‘Library’ and the controller name is ‘Book’ that will handle the request. Default action name is ‘Details’ and the passed parameter name is bookId. then this new route named ‘Library’ will be called instead of Default route and ‘Details’ action of Book Controller will be executed passing 1 in the bookId. Custom routes by User Role If we want to use different routes for different user roles like admin, student etc., then we can register different routes with a prefix in the route URL to track the user role requesting the URL. For Ex: http:// mybookstore .com/Admin/Home/Index URL rewriting Suppose if our MVC application is publically available and any user has bookmarked the site URL . Now if the controller name in the application gets changed from BookController to BKController. then the new URL will be http://localhost/BK/index and the old bookmarked URL will not work for users of the application. To overcome this, we can define a route in the RouteConfig.cs file to re-write the URL as below: Here we’ve statically defined the controller name as “Book” and dynamically specified the Controller value as “BK”. After adding this route, the old URL will also work as is and we will get the result without any error. Route Constraints When we create a route, we can add constraints in that. For example, we can use below route constraint to limit the parameter bookId value to accept integer values only. If the parameter value in any route does not satisfy the constraint, then the route is not matched by the routing engine and it continues searching for the next matching route which would otherwise throw an exception if the constraint is not specified and wrong argument value is passed. So, here we can say that by routing we can make URLs more descriptive for the user’s action and henceforth are more easily understood by the users. MVC 5 introduced ‘Attribute Routing’, where the route can be defined on top of the controller action method. ‘Attribute Routing’ gives us more control over the URIs in our MVC web application, which I will be discussing in detail in my next blog.
All you need to know about NoSQL

A quick intro about NoSQL A NoSQL or ‘Not Only SQL’ database is a non-relational and largely distributed database management system. It provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. NoSQL enables rapid, ad-hoc organization and analysis of extremely high-volume, disparate data types. NoSQL databases are sometimes referred to as cloud databases, non-relational databases and Big Data databases. It was developed in response to the sheer volume of data being generated, stored and analyzed by modern users and their applications. Scalability, availability, and fault tolerance are the key factors which has made NoSQL databases the first alternative to relational database like SQL. Some of the distinguished implementations of NoSQL are Cassandra database (Facebook), BigTable (Google) and SimpleDB and Dynamo (Amazon). Types of NoSQL Databases Document databases types – Lotus Notes, Apache CouchDB, and MongoDB. It pairs each key with a composite data structure known as a document. Documents can have different pairs of key-value , key-array, and the nested documents. Graph stores types – Neo4J and Hypergraph DB. Stores information about networks, such as social connections. Key-value stores types– Riak and Voldemort. It is the simplest NoSQL databases. Every single item is stored as Key-Value pair. Some of the key-value stores like Redis can contain each value with a type, say “integer”, which adds functionality. Column stores types – Cassandra and HBase data is stored in cells grouped in columns. It stores columns of data together, instead of rows. This Database have optimized queries for large datasets. 4 Factors which make NoSQL different from RDBMS (SQL) Here are the factors to nosql vs sql 1. Tables or collections: The primary difference between relational and non-relational databases is the way data is stored. Relational data is tabular by nature – and hence stored in tables with rows and columns. Tables can be related to one another and cooperate in data storage, as well as easy retrieval. E.g.: Data stored in RDBMS Id User_Name User_Age User_Gender User_Country 1 Abc 34 Male India 2 Xyz 25 Female India Non-relational data, on the other hand, is just not meant to fit in tables of rows and columns, but rather grouped together in chunks. Data is stored in JSON format. Each document in a collection has a unique _id field, which is a 12-byte field that act as a primary key for the documents. Non-relational data is often stored as Collections, like in documents, key-value pairs or graphs. Data stored in NoSQL { “_id”: ObjectId {“2fff324252fg2fff324252fg”}, ”User_Age”:34, ”User_Gender”:”Male”, ”User_Country”:”India” } { “_id”: ObjectId {“4hhh467854fg2jur32n652by”}, ”User_Age”:25, ”User_Gender”:”Female”, ”User_Country”:”India” 2. No Schema or Fixed Data model: Data can be allowed to insert in a database without prior definition of a rigid database schema. Therefore the format or data model being inserted can be modified any time, without application disruption, thereby providing immense application and business flexibility. On the contrary, relational databases require that schemas be defined before you can add data i.e. table structure, columns and datatypes are predefined. For example, you might want to store data about your customers such as phone numbers, first and last name, address, city and state – a SQL database needs to know what you are storing in advance. Here, even minor changes to the data model have to be carefully managed and may necessitate downtime or reduced service levels. E.g.: Consider 2 different document in same collection but with different schema in NoSQL. This kind of flexibility is very complex to handle with RDBMS. array(‘id’=> new MongoId{“4hhh467854fg2jur32n652by”}, ‘name’=> ’xyz’, ‘age’=> new MongoInt32(31), ‘country’=> ’India’ ) array(‘id’=> new MongoId{“2fff324252fg2fff324252fg”}, ‘name’=> ’abc’, ‘gender=> ’Female’, ‘email=> ’abc@gmail.com’ 3. Structured / Unstructured Queries: Relational databases manipulate data through what’s called Structured Query Language (SQL). SQL is incredibly powerful for supporting database CRUD (Create, Read, Update, and Delete) operations using primary and foreign key relations. On the contrary, Non-relational databases manipulate data in chunks (like documents) and use something called Unstructured Query Language (UnQL). There is no fixed schema and no joins. E.g.: Suppose, in RDBMS we have 2 tables’ User and User_Information, having the following Primary Key (PK) and Foreign Key (FK) Thus, In RDBMS each table has PK and User_Information table has User_Id has which act as FK. If we try to insert a row in second table, it would have dependency on values in first table. In case the corresponding User_Id is not available in first table, inserting a row in second table would throw an error. While in NoSQL, following would be the structure: Here, if we insert any data in User_Information table which does not exist in User table NoSQL database will not throw any error. 4. Bigger Architecture /Data Handling Capability: The volumes of data that are being stored have increased massively and so the transaction rates. Today, the volumes of “big data” that can be handled by NoSQL systems, such as Hadoop that outstrips the features of biggest RDBMS. In this blog I discussed about what NoSQL is and how it can handle huge volume of data. I will be discussing about “Challenges involved with NoSQL” in my next blog . Stay tuned!
Deploying an existing WCF service to Azure

If you want to use Azure as deployment server for your existing WCF service then one way is to create an ‘Azure cloud service’ project from inside cloud project template in Microsoft Visual Studio and then copy all the code manually from WCF service to the Azure cloud service project. Or, you can take advantage of the hosting services and scalability of Azure, by which the existing WCF service can be easily converted to Azure cloud service with minimal changes using Microsoft Visual Studio. [ Empower executives and employees across your organization to connect, converse, discover and work together at one central location to save time, increase productivity and boost engagement Know more at: Office 365 Based Intranet ] To migrate WCF service to ‘Azure cloud service’, Azure tools need to be installed in Visual Studio. If Azure SDK is not installed on your machine, then you will see an option to install Azure on launching of Visual Studio and selecting ‘Cloud’ project template. To install Azure, follow the steps as below: Open Visual studio Select File, New Project Select Visual C# or any other node from installed templates Select the ‘Cloud’ project template If you haven’t installed the Azure Tools, then it contains a project template named ‘Get Microsoft Azure SDK for .NET’ as shown below To download the Azure tools select ‘Get Microsoft Azure SDK for .NET’ option and click OK button. It will open an Azure Tools tab To start the download, click the ‘Download Azure Tools’ button to open the web installer. Now follow the instructions as provided by web installer to install the latest version of Azure tools and the Azure SDK. READ MORE RELATED ARTICLES CALLING AZURE REST SERVICE FROM VBA 10 REASONS TO MOVE YOUR INFRASTRUCTURE TO MICROSOFT AZURE After the successful installation and launch of Visual Studio, select ‘Cloud’ project template. Now it will list out all Azure cloud project templates including ‘Azure Cloud Service’ project template to start working with Azure projects as below. Now, let us see how to convert an Existing WCF service to Azure cloud service: Open your existing ‘WCF service’ project and then right click on the project. Move to ‘Convert’ option and then click ‘Convert to Microsoft Azure Cloud Service Project’. It will create an ‘Azure cloud service’ project using your existing ‘WCF service’ in the same solution as below. Now for deployment, build your Azure cloud service and then right click on the Azure project, click Package. It will create a package file and a configuration file which need to be deployed to Azure. After creating these files it will automatically open the file explorer, where you can view those files. Save this file path as it will be required at the time of deployment. Now to publish this ‘Azure Cloud service’, Open Microsoft Azure and login with your credentials. After logging into Azure, navigate to the ‘Cloud Services’ tab Create a new cloud service. Click on the ‘+ New’ at the bottom, then select Compute –> Cloud Service –> Quick create. Provide the URL for the new service. This complete URL (in this case – TestCloudService.cloudapp.net) will be used to browse the service later. URL name should be unique and it will display a green tick if the name given is available, as below. Click ‘Create Cloud Service’ in the bottom right, the newly created cloud service will be listed with already existing services inside ‘Cloud services’ tab. Click on the newly created service and then click on ‘Dashboard’ tab Click ‘UPLOAD A NEW PRODUCTION DEPLOYMENT’ and provide deployment label. Browse for the package & configuration files from the location where we have created the package in step five Check both the checkboxes and click the tick mark in bottom right. It will start deploying the cloud service, the progress can be checked in the details section below. It will display a success message after the successful creation of the cloud service. Also, it will display a failure message if any error occurs in between. After successful deployment of the cloud service, you can browse the service and check it using the URL displayed in the SITE URL section. Now the service is ready to be called from inside your application. IF YOU ARE LOOKING FOR ANY HELP IN AZURE, THEN CONTACT US NOW! Contact Us Nidhi Paneri Software Engineer Advaiya Solutions Inc Udaipur, Rajasthan, India TALK TO OUR EXPERT!
Performance Optimization – Bundling and Minification in ASP.NET MVC 4

Before getting you into the details of performance optimization, let me give a brief note on Bundling and Minification of JS/CSS files. What is a Bundle? Bundle is simply logical group of files that could be referenced by unique name and loaded with one HTTP request. You can create bundle for JavaScript and CSS. What is Minification? It’s a process of removing unnecessary whitespaces, line breaks and comments from code to reduce its size, thereby improving load times. Bundling and minification are the performance optimization techniques that can help to improve load time by reducing the number of requests to the server and reducing the size of requested assets (such as JavaScript and CSS.) Scenario without Bundling and Minification Most of the current major browsers limit the number of simultaneous connections to six per hostname. This means that while six requests are being executed, any additional requests for assets on a host will be queued in the browser. In the below image, the IE developer tool network tab shows the timings for assets required by the ‘Index view’ of a sample application. The brown bars show the time for which the request is queued by the browser waiting for the six connections to complete. The yellow bars show the request time taken to send the request and receive the first response from the server. The blue bars represent the time taken to receive the response data from the server. You can get detailed timing information by double-clicking on an asset. For example, the following image shows the load time details of the file. In the preceding image, ‘Start’ event shows the time that a request was queued because of the browser limit of only six simultaneous connections. This request was queued for 187 milliseconds waiting for another request to complete. Bundling Bundling makes it easy to combine multiple files into a single file. It can create bundles for JavaScript, CSS, etc. Lesser files mean lesser HTTP requests which in turn improves the initial page load performance. How to do it Adding reference: First of all, add the references for both WebGrease.dll and System.Web.Optimization.dll to your projects as shown below. These DLLs can be downloaded from Internet or using NuGet Package Manager. Creating Bundle After adding required DLL references, now create the bundle for your JS and CSS files within the Global.asax file as shown below. Here, I have created the bundle for all required JS and CSS files. You can also add your own custom JS and CSS files with complete path using ‘Include’ method. The preceding code creates a new JavaScript bundle named ~/bundles/jquery that includes debug and minified files in the ‘Scripts’ folder that compares the wild card string “~/Scripts/jquery-{version}.js” from bundle.config. This means in debug mode, jquery-2.1.3.js will be added to the bundle and in release mode, jquery-2.1.3.min.js will be added. Below common conventions are followed by the bundling framework: Selecting “.min” file for release when “FileX.min.js” and “FileX.js” exist. Selecting the non “.min” version for debug. Ignoring “-vsdoc” files (such as jquery-2.1.3-vsdoc.js), which are used for IntelliSense. The {version} wild card shown above is used to automatically create a jQuery bundle with the appropriate version of jQuery in your ‘Scripts’ folder. In the above example, following benefits are provided by using wild card: It allows to use NuGet to update to a latest jQuery version without changing the preceding bundling code or jQuery references in your view pages. It automatically selects the full version for debug configurations and the “.min” version for release builds. Registering Bundle You will now need to register above created bundles with in ‘Application Start’ event of Global.asax as below: Adding Bundles to Layout Page in MVC3 You can add reference for created bundles in the project’s view pages and layouts as below: @Scripts.Render(“~/bundles/jquery”) @Scripts.Render(“~/bundles/jqueryui”) @Scripts.Render(“~/bundles/jqueryval”) Allow Bundling and Minification in debug mode Bundling and minification doesn’t work in debug mode, so to enable bundling and minification, set the debug value in Web.config file to “false”. You can also override the Web.config setting with the ‘EnableOptimizations’ property on the ‘BundleTable’ class. The following lines of code within ‘Application_Start’ event of Global.asax enables bundling and minification, and in the Web.config file it overrides respective settings. protected void Application_Start(){ BundleConfig.RegisterBundles(BundleTable.Bundles); //Enabling Bundling and Minification BundleTable.EnableOptimizations = true; } How it works Now run your application and you can see that all the JS and CSS files are converted to single JS and CSS files as shown below: Minification Minification is a technique for removing unnecessary characters (like white spaces, newlines, and tabs) and comments from the JavaScript and CSS files to reduce the size which causes improved load times of a webpage. There are various tools to minify the JS and CSS files. YUI Compressor and JSMin are the most popular tools for minifying the JS and CSS files. Use these tools for minifying your JS and CSS files and in your application use with “.min” suffix, so that you can easily identify that this is a minimize version of your CSS or JS file. Minification with VS2013 and Web Essentials 2013 extension I would like to share how you can create minify version of your JS or CSS file using ‘Web Essentials’ extension and VS2013. Right click on JS or CSS file, select “Web Essential” option and click on the highlighted “Minify JavaScript/CSS file(s)” as shown in the below image. With the help of this tool, every time you update your code in original JS or CSS file, the minify version of these files get automatically updated. Busting Browser’s Cache by Bundling As you know, browsers cache resources on the basis of accessed URLs. The browser first checks its cache when a web page requests a resource to see if there is a resource with the accessed URL. If it exists in cache, then it uses that existing copy instead of getting a new copy from server. So, whenever you change the content of JS and CSS files, it will not reflect on the browser. To reflect these changes, you have to refresh/reload the browser. But bundles automatically takes care of this problem by adding a
ALM with Visual Studio Online – Part 3: Plan and Track Project Tasks

This blog is third in the series “Visual Studio Online features (VSO)”. In the second part I had talked about Scrum process template based upon Scrum methodology, how you can create a new team project using the Scrum Template, and how to use it for day-to-day operations. You can read the second part – ALM with Visual Studio Online – Part 2: Using Scrum Process Template Since its inception, Visual Studio has been a developer’s tools. With the ALM features becoming an integral part of Visual Studio 2013 and Visual Studio Online, you can now plan your project using Visual Studio. With ALM, Visual Studio has matured from a developer-only tool to a central tool that is usable by all stakeholders of the project team. Visual Studio uses the Kanban methodology to track work items and report status. Setting up the Project When you create a team project, you need to setup a basic set of parameters to allow Visual Studio to filter work items appropriately for tracking and reporting. Setup the Areas and Iterations Areas and Iterations define different phases of your project. The scheme is flexible to use and do not set a guideline. One way to set them up is to define major version releases as Areas and sprints as Iterations. You can choose your own scheme that you are comfortable with. Define start and end dates Each Iteration will require at least a start date. However, it is recommended to define both Start Date and End Date. This helps in determining the pending items that need to be reviewed at the end of an iteration and probably move them to backlog for re-scheduling. Determine team availability For each iteration, you can specify the team availability and days off. Using this Visual Studio calculates the work load for each team member in terms of hours and uses it to track project progress and slippages. Visual Studio Project Administration – Capacity Planning Setup task tracking Fire up Visual Studio 2013 and connect to TFS. Once the Team Explorer loads up, click on the “Work Items” tab.Setup task tracking in Visual Studio In the Work Item tab, click on “New Work Item”. This brings up a menu showing the types of work items you can create under the selected project. Bear in mind that the types of work items you can create are based on the project template you have selected while creating the Team Project. The one shown in the image below are the work item types for the Scrum template. Work items view in Visual Studio Pick a work item from the menu that suits your purpose. Visual Studio opens up a dialog editor with fields related to the work item type you have just chosen. To see the hierarchy of work items, read my earlier blog post on Scrum Template. Mention the effort required to complete the work.Product backlog item in Visual Studio Once you define a Product Backlog item, start defining the tasks that you will need to perform in order to complete the Product Backlog item. After you have defined the Product Backlog and Tasks, go to the Task Board. The task board is based on the Kanban methodology. Here you can drag and drop tasks into one of the three buckets – To Do, In Progress, and Done. As the project progresses, keep marking the status of the tasks as In Progress / Done. Visual Studio will begin providing beautiful reports on your project progress. Planning and tracking with Microsoft Project and TFS If you are comfortable using Microsoft Project Professional, then plan your tasks in Microsoft Project and synchronize them with Visual Studio Online or TFS. Then track the progress in Microsoft Project and synchronize it periodically with VSO or TFS. Both approaches provide the same results. Pick whichever you are comfortable with. Let me know in the comments how you use VSO / TFS to plan and track your project tasks. Do you do it differently? What approach other than the one I mentioned do you adopt in VSO to help you with day-to-day project management? Related links: Application Lifecycle Management with Visual Studio Online – Part I. ALM with Visual Studio Online – Part 2: Using Scrum Process Template.
ALM with Visual Studio Online – Part 2: Using Scrum Process Template

This blog is the second in the series “Visual Studio Online features (VSO)”. In the first part of the blog series we had talked about Microsoft’s strategy of TFS as an online feature with VSO, introduced VSO, its three variants, and the key compelling features that VSO offers. Read first part – Application Lifecycle Management with Visual Studio Online – Part I. In this second part we will talk about Scrum process template based upon Scrum methodology, and explore how we can create a new team project using the Scrum Template and how to use it for day-to-day operations. Source: Wikipedia.org Over the past few years, Scrum methodology has become an extremely popular iterative development process and it has gained quite an acceptance in the software industry. So in July 2010, Microsoft introduced a beta of the Scrum template for team projects. Today, the Scrum template in its third iteration, is being offered as part of out-of-the-box ALM offerings of Visual Studio and TFS 2013. Team migrating from Agile to Scrum methodology feels a bit of a learning curve because of different terminology used by Scrum process. For example: In Scrum, sprints are called “iterations”, “user stories” are called “product backlog items”, etc. However, the Scrum process offers more flexibility and adaptability to the modern software development and allows teams to be more productive while keeping the process constraints at a minimum. Using the Scrum process template To use the Scrum template in your team project, you can: Create a new Team Project using the Scrum Template Migrate a Team Project to the Scrum template using the Process Template Manager In Visual Studio, open the Team Explorer and click on “New Team Project…” Figure 1: Team Explorer panel within Visual Studio 2013 You will be redirected to the project portal page with a popup dialog as below: Figure 2: New Team Project dialog for Visual Studio Online. The TFS on premise version may differ slightly. Make sure “Microsoft Visual Studio Scrum 2013.3” template is selected in the Process template dropdown. Create your team project by filling in the necessary details. Following artifacts are created when you create a team project using the Visual Studio Scrum process template: Figure 3: Artifacts of Scrum process template To be able to plan and track work using the work items, following hierarchy is supported by the Scrum template Figure 4: Relationship hierarchy of work items in Scrum process template To monitor project progress, following reports are published by the Scrum template: Project Management Reports Backlog Overview Release Burndown Sprint Burndown Velocity Build Reports Build success over time Build Summary Test and Bug Reports Test Case readiness Test Plan Progress To be able to access these reports, your TFS installation must be configured with SQL Server Analysis Services (SSAS) and SQL Server Reporting Services (SSRS). If you are using Visual Studio Online, these services are pre-configured with your account. Scrum template also provides a “Release Dashboard” to help you view all critical project parameters “at-a-glance” on a single page to assess project health. Hope this article serves as a good starting point to enable you to explore the Scrum template and use it effectively in your next project. If you have already used the Scrum template in your project, I would like to know your opinions. Did using the Visual Studio Scrum template helped manage your project in a better way? Do you feel more features are required for the Scrum template to be effective? Let’s hear your responses in the comments.
Application Lifecycle Management with Visual Studio Online – Part I

Microsoft have been providing Application Lifecycle Management (ALM) tools for a long time in the form of Team Foundation Server (TFS). Till now TFS has been packaged as an on premise offering which needs to be installed on a server box. As part of cloud strategy, Microsoft has started offering TFS as an online feature along with Visual Studio Online (VSO). Visual Studio Online is an ALM tool hosted in cloud which has all the features of an on premise TFS, minus, the administration headache associated with an on premise version. Using VSO, you can create Team Projects, choose a Process Template that suits your project, and perform all the workflows associated with Sprint Planning and Project Management using the Agile as well as CMMI methodologies. VSO comes in three flavors – Basic, Professional, and Advanced. All of these offer five basic user licenses for free. Enterprise version additionally offers features such as Team Rooms and Feature that are introduced in TFS 2013. Although VSO comes packed with loads of features, the development services team at Advaiya has thoroughly explored VSO and are impressed with some of the important and ground-breaking features that VSO offers. In the sections below, I am highlighting some of the features offered by VSO that save tremendous amount of development time and helps teams respond quickly to production environment crisis situations. This blog is first in the series “Visual Studio Online features”, dedicated to exploring each feature of VSO from the perspective of using ALM processes to benefit your application development practice – whether in-house or for a client. Key features of Visual Studio Online Team Rooms Team Rooms are discussion areas created for project teams of group of users to record their discussions and refer them at a later stage. These help the team stay on the same page for every discussion and helps track reasons for requirement changes Git support Git is now supported out-of-the-box. This is especially beneficial if you have your code repository on Git, but want to use the ALM features of TFS. Eclipse, Xcode IDE support In earlier versions, code check-in/check-out was supported only through Visual Studio. Now you can integrated VSO with any of the major IDEs on the market such as Eclipse and Xcode to help you develop applications on non-Microsoft platforms. This combined with Git support, helps VSO to provide you with a complete ALM offering that can be used across all major development platforms. Scrum Process Template The Process Template of choice for VSO is the Scrum template. The Scrum template offers a simplified version of the Agile Process Template and provides the following work items and their workflows. Work items and workflows in Scrum process template Progress Visualizations VSO allows you to pin a TFS query on to the home page in the form of a tile or a chart. These serve as at-a-glance information to get the idea about the project progress and helps you to take more effective and speedy actions. Progress visualization – Project progress pinned on homepage Project Planning You can split your project into manageable sprints of your own choice of sizes. VSO also provides you the resourcing feature of sorts to help you determine how much of the effort is required of each team member to complete a sprint. Project and sprint planning Application Insights With Application Insights – a new feature of VSO – you can monitor your application for uptime, performance bottlenecks and identify the line of code that is causing the performance issues right from the Application Insights Dashboard and into the Visual Studio IDE. Because all the project metadata, code repository and builds reside on the same connected platform, VSO can directly debug into the line of code that is causing issues, thus saving tons of developer hours and helping solve issues on production site much faster than earlier. Application Insights Dashboard Load Testing on Demand You can perform load testing on your production server whenever you want to determine how the application performs under certain pressure. You create the load test data files as usual and then upload them to VSO. As VSO runs the tests, the results begin to show in real time to help you troubleshoot and fix the trouble area much quickly. Load testing on demand All in all, the VSO is a great leap from the on premise TFS and Visual Studio to the cloud-based and always available platform for developing applications. It can save valuable development time and help solve production level issues much faster. It also helps reduce costs of maintaining IT infrastructure to support development and maintenance of software applications.