Thursday, June 13, 2013

What's New in the .NET Framework 4.5?

This topic contains a summary of key new features and improvements in the following areas of the .NET Framework 4.5. This topic does not provide comprehensive information and is subject to change. For general information about the .NET Framework, see Getting Started with the .NET Framework. For supported platforms, see System Requirements. For download links and installation instructions, see Installing the .NET Framework 4.5.



.NET for Windows Store apps

Windows Store apps are designed for specific form factors and leverage the power of the Windows operating system. A subset of the .NET Framework 4.5 is available for building Windows Store apps for Windows by using C# or Visual Basic. This subset is called .NET for Windows Store apps and is discussed in an overview in the Windows Dev Center.


Portable Class Libraries

The Portable Class Library project in Visual Studio 2012 enables you to write and build managed assemblies that work on multiple .NET Framework platforms. Using a Portable Class Library project, you choose the platforms (such as Windows Phone and .NET for Windows Store apps) to target. The available types and members in your project are automatically restricted to the common types and members across these platforms.


Core New Features and Improvements

The following features and improvements were added to the common language runtime and to .NET Framework classes:
  • Ability to reduce system restarts by detecting and closing .NET Framework 4 applications during deployment. See Reducing System Restarts During .NET Framework 4.5 Installations.
  • Support for arrays that are larger than 2 gigabytes (GB) on 64-bit platforms. This feature can be enabled in the application configuration file. See the gcAllowVeryLargeObjects element, which also lists other restrictions on object size and array size.
  • Better performance through background garbage collection for servers. When you use server garbage collection in the .NET Framework 4.5, background garbage collection is automatically enabled. See the Background Server Garbage Collection section of the Fundamentals of Garbage Collection topic.
  • Background just-in-time (JIT) compilation, which is optionally available on multi-core processors to improve application performance. See ProfileOptimization.
  • Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out. See the Regex.MatchTimeout property.
  • Ability to define the default culture for an application domain. See the CultureInfo class.
  • Console support for Unicode (UTF-16) encoding. See the Console class.
  • Support for versioning of cultural string ordering and comparison data. See the SortVersion class.
  • Better performance when retrieving resources. See Packaging and Deploying Resources in Desktop Apps.
  • Zip compression improvements to reduce the size of a compressed file. See the System.IO.Compression namespace.
  • Ability to customize a reflection context to override default reflection behavior through the CustomReflectionContext class.
  • Support for the 2008 version of the Internationalized Domain Names in Applications (IDNA) standard when the System.Globalization.IdnMapping class is used on Windows 8.
  • Delegation of string comparison to the operating system, which implements Unicode 6.0, when the .NET Framework is used on Windows 8. When running on other platforms, the .NET Framework includes its own string comparison data, which implements Unicode 5.x. See the String class and the Remarks section of the SortVersion class.
  • Type reflection support split between Type and TypeInfo classes. See Reflection in the .NET Framework for Windows Store Apps.

Managed Extensibility Framework (MEF)

The Managed Extensibility Framework (MEF) provides the following new features:
  • Support for generic types.
  • Convention-based programming model that enables you to create parts based on naming conventions rather than attributes.
  • Multiple scopes.
  • A subset of MEF that you can use when you create Windows Store apps. This subset is available as a downloadable package from the NuGet Gallery. To install the package, open your project in Visual Studio 2012, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Composition package.
     
Asynchronous File Operations

In the .NET Framework 4.5, new asynchronous features were added to the C# and Visual Basic languages. These features add a task-based model for performing asynchronous operations. To use this new model, use the asynchronous methods in the I/O classes. See Asynchronous File I/O.
 

Tools

Resource File Generator (Resgen.exe) enables you to create a .resw file for use in Windows Store apps from a .resources file embedded in a .NET Framework assembly. For more information, see Resgen.exe (Resource File Generator).
Managed Profile Guided Optimization (Mpgo.exe) enables you to improve application startup time, memory utilization (working set size), and throughput by optimizing native image assemblies. The command-line tool generates profile data for native image application assemblies. See Mpgo.exe (Managed Profile Guided Optimization Tool).


Parallel Computing

The .NET Framework 4.5 provides several new features and improvements for parallel computing. These include improved performance, increased control, improved support for asynchronous programming, a new dataflow library, and improved support for parallel debugging and performance analysis. See the entry What’s New for Parallelism in .NET 4.5 in the Parallel Programming with .NET blog.


Web

ASP.NET 4.5 includes the following new features:
  • Support for new HTML5 form types.
  • Support for model binders in Web Forms. These let you bind data controls directly to data-access methods, and automatically convert user input to and from .NET Framework data types.
  • Support for unobtrusive JavaScript in client-side validation scripts.
  • Improved handling of client script through bundling and minification for improved page performance.
  • Integrated encoding routines from the AntiXSS library (previously an external library) to protect from cross-site scripting attacks.
  • Support for WebSockets protocol.
  • Support for reading and writing HTTP requests and responses asynchronously.
  • Support for asynchronous modules and handlers.
  • Support for content distribution network (CDN) fallback in the ScriptManager control.

Networking

The .NET Framework 4.5 provides a new programming interface for HTTP applications. For more information, see the new System.Net.Http and System.Net.Http.Headers namespaces.
Support is also included for a new programming interface for accepting and interacting with a WebSocket connection by using the existing HttpListener and related classes. For more information, see the new System.Net.WebSockets namespace and the HttpListener class.
In addition, the .NET Framework 4.5 includes the following networking improvements:
  • RFC-compliant URI support. For more information, see Uri and related classes.
  • Support for Internationalized Domain Name (IDN) parsing. For more information, see Uri and related classes.
  • Support for Email Address Internationalization (EAI). For more information, see the System.Net.Mail namespace.
  • Improved IPv6 support. For more information, see the System.Net.NetworkInformation namespace.
  • Dual-mode socket support. For more information, see the Socket and TcpListener classes.


Windows Presentation Foundation (WPF)

In the .NET Framework 4.5, Windows Presentation Foundation (WPF) contains changes and improvements in the following areas:
  • The new Ribbon control, which enables you to implement a ribbon user interface that hosts a Quick Access Toolbar, Application Menu, and tabs.
  • The new INotifyDataErrorInfo interface, which supports synchronous and asynchronous data validation.
  • New features for the VirtualizingPanel and Dispatcher classes.
  • Improved performance when displaying large sets of grouped data, and by accessing collections on non-UI threads.
  • Data binding to static properties, data binding to custom types that implement the ICustomTypeProvider interface, and retrieval of data binding information from a binding expression.
  • Repositioning of data as the values change (live shaping).
  • Ability to check whether the data context for an item container is disconnected.
  • Ability to set the amount of time that should elapse between property changes and data source updates.
  • Improved support for implementing weak event patterns. Also, events can now accept markup extensions.

Windows Communication Foundation (WCF)

In the .NET Framework 4.5, the following features have been added to make it simpler to write and maintain Windows Communication Foundation (WCF) applications:
  • Simplification of generated configuration files.
  • Support for contract-first development.
  • Ability to configure ASP.NET compatibility mode more easily.
  • Changes in default transport property values to reduce the likelihood that you will have to set them.
  • Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
  • Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
  • New asynchronous streaming support.
  • New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
  • Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
  • Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
  • Support for configuring services in code.
  • XML Editor tooltips.
  • ChannelFactory caching support.
  • Binary encoder compression support.
  • Support for a UDP transport that enables developers to write services that use "fire and forget" messaging. A client sends a message to a service and expects no response from the service.
  • Ability to support multiple authentication modes on a single WCF endpoint when using the HTTP transport and transport security.
  • Support for WCF services that use internationalized domain names (IDNs).
 

Windows Workflow Foundation (WF)

Several new features have been added to Windows Workflow Foundation (WF) in the .NET Framework 4.5. These new features include:
  • State machine workflows, which were first introduced as part of the .NET Framework 4.0.1 (.NET Framework 4 Platform Update 1). This update included several new classes and activities that enabled developers to create state machine workflows. These classes and activities were updated for the .NET Framework 4.5 to include:
    • The ability to set breakpoints on states.
    • The ability to copy and paste transitions in the workflow designer.
    • Designer support for shared trigger transition creation.
    • Activities for creating state machine workflows, including: StateMachine, State, and Transition.
  • Enhanced Workflow Designer features such as the following:
    • Enhanced workflow search capabilities in Visual Studio, including Quick Find and Find in Files.
    • Ability to automatically create a Sequence activity when a second child activity is added to a container activity, and to include both activities in the Sequence activity.
    • Panning support, which enables the visible portion of a workflow to be changed without using the scroll bars.
    • A new Document Outline view that shows the components of a workflow in a tree-style outline view and lets you select a component in the Document Outline view.
    • Ability to add annotations to activities.
    • Ability to define and consume activity delegates by using the workflow designer.
    • Auto-connect and auto-insert for activities and transitions in state machine and flowchart workflows.
  • Storage of the view state information for a workflow in a single element in the XAML file, so you can easily locate and edit the view state information.
  • A NoPersistScope container activity to prevent child activities from persisting.
  • Support for C# expressions:
    • Workflow projects that use Visual Basic will use Visual Basic expressions, and C# workflow projects will use C# expressions.
    • C# workflow projects that were created in Visual Studio 2010 and that have Visual Basic expressions are compatible with C# workflow projects that use C# expressions.
  • Versioning enhancements:
    • The new WorkflowIdentity class, which provides a mapping between a persisted workflow instance and its workflow definition.
    • Side-by-side execution of multiple workflow versions in the same host, including WorkflowServiceHost.
    • In Dynamic Update, the ability to modify the definition of a persisted workflow instance.
  • Contract-first workflow service development, which provides support for automatically generating activities to match an existing service contract.

Thursday, June 6, 2013

Building Apps for Windows Phone 8

It’s a very exciting time for developers! Last week, we launched Windows 8 and Surface. Microsoft launched Windows Phone 8 and introduced some awesome new smartphone devices. Today, we’re kicking off the Build conference, where we’ll join with thousands of developers in person, and with hundreds of thousands virtually, to explore the opportunities available with Microsoft platforms and tools. And now, in conjunction with yesterday’s Windows Phone 8 news and with our goal of having tools available on the same cadence as the platforms, I’m very excited to share that the Windows Phone SDK 8.0, including Visual Studio Express 2012 for Windows Phone, is now available for download.
With Windows 8, Windows Phone 8, and Windows Azure, developers using Visual Studio 2012 can build experiences that span the Windows ecosystem, from desktops to laptops to tablets to smartphones to the cloud. And with that in mind, today’s release of the Windows Phone SDK 8.0 enables some exciting new capabilities for developers, such as using C++ and DirectX to build stunning experiences, enabling in-app purchases to sell virtual and digital good within apps, helping developers to streamline their efforts with the advances we’ve made in Visual Studio 2012 and .NET, and more.
The Windows Phone SDK 8.0 works with the Visual Studio 2012 and enables you to get started today building great apps for both Windows Phone 8 and Windows Phone 7.x. It includes emulators for both environments, including the ability to validate for multiple chassis, and support for simulating various network conditions (e.g. ‘2G’, ‘3G’). It includes new templates for developing Windows Phone apps, such as for building apps with Direct3D, and it sports enhanced diagnostics for analyzing apps, such as power and network profiling and responsiveness monitoring. It enables building native apps as well as building managed apps that consume native libraries. It enables much easier portability between Windows 8 apps and Windows Phone 8 apps. It includes .NET portable library support, so you can write your libraries once and reuse them across all your apps. The list goes on.
As an avid user of Windows Phone, I’m looking forward to downloading and using the stellar apps you all create.

For a more in-depth tour through what’s new for developers in the Windows Phone SDK 8.0, see the Visual Studio team, .NET team, and Blend team blogs.

Improving the Modern Application Lifecycle

Microsoft recently hosted the 3rd annual ALM Summit, a gathering of Application Lifecycle Management (ALM) practitioners interested in learning more about the craft and sharing their own experiences with others.   Over the course of three packed days and across four tracks of discussions focused on DevOps, testing, agile development, and ALM leadership, attendees are discussing and collaborating with others in the field, all with the goal of improving how our industry delivers software and services.

A key set of themes during this summit focuses on real change happening in the industry.  In a world of devices and services, we’re seeing that feedback and iteration are the name of the game, with multi-year release trains replaced by faster and thoughtful build/measure/learn cycles, with a need for friction-free paths to production yielding advances in quality enablement and continuous deployment, with the blurring of development team roles, and with teams becoming more and more distributed.

All of this has led us to shift our approach in how we improve and release Visual Studio, while at the same time ensuring that new value includes capabilities to propel this “new normal.” In November, we shipped Visual Studio 2012 Update 1 (VS2012.1), an update to Visual Studio 2012 that provided not only fixes for bugs in the RTM release of Visual Studio 2012, but also a wealth of new features, spanning improved support for agile teams and continuous quality in addition to improved support for Windows and SharePoint development.  Today, I’m happy to share that we’ve released our first preview of Visual Studio 2012 Update 2 (VS2012.2).  This preview includes all of the improvements from VS2012.1 while also introducing web-based support for Test Case Management (TCM), improved support for work item tagging, unit testing features for Windows Phone 8, and more.  You can now download this preview, and you can expect subsequent previews and the eventual release of VS2012.2 to contain many more exciting capabilities.

However, while I’m excited by this VS2012.2 preview release, I’m even more excited by another of today’s announcements.  As Brian Harry just announced in his keynote this morning at the ALM Summit, we’ve added Git source code management to Team Foundation Service, with Git repositories hosted in Team Foundation Service available today for use seamlessly from any Git tool on any operating system.  Developers can now benefit from Microsoft’s fully-integrated ALM suite, while at the same time having a choice of using Git or TFVC (Team Foundation Version Control) for their source control repositories.  We’ll continue to invest in both Git and TFVC (Team Foundation Version Control) throughout future releases, as we see both centralized version control and distributed version control systems as being optimized for different types of projects and development workflows.

As part of this effort, today we’re also releasing a preview of an extension for VS2012.2 that enables connecting Visual Studio to Git repositories hosted in any Git host, including Team Foundation Service, CodePlex, GitHub, and any number of other 3rd-party services.  To create this extension, we utilized the open source library libgit2, and in the process, several of our full-time engineers worked as committers to the libgit2 project.  These capabilities will be built into a future release of Visual Studio, enabling it to serve as an incredibly robust Git client, one that provides seamless integration with the rest of the simplicity and power provided by Visual Studio.

Visual Studio 2013, ALM, and DevOps

Since launching Visual Studio 2012, we’ve been thrilled with the customer adoption and partner momentum we’ve seen.  Visual Studio 2012 has been downloaded more than 4 million times, the fastest adoption of any Visual Studio release in the past.  We’ve also delivered new value into Visual Studio 2012 through two VS Updates, VS2012.1 and VS2012.2, updates which are now being used on more than 60% of Visual Studio 2012 deployments. The functionality available in Visual Studio is further augmented by a robust ecosystem of extensions and integrated solutions, including almost 500 VSIP products in market, and more than 3900 products and extensions for Visual Studio in the Visual Studio Gallery.

Not only have we seen great adoption on the client, in the cloud we’ve continued to see terrific uptake of Team Foundation Service, which we released for general availability at Build 2012 and which we’ve been updating approximately every three weeks with new capabilities, including with Git support as announced in January at the ALM Summit.

Even with this progress, there are many great opportunities to advance the state of the art for developers and development teams building modern apps and managing the modern app lifecycle.  With multi-year release cycles vanishing and being replaced by shorter build/measure/learn cycles, development teams are more earnestly incorporating operations and other stakeholders into the development process.  Modern application lifecycle management practices enable teams to support a continuous delivery cadence that balances agility and quality, while removing the traditional silos separating developers from operations and business stakeholders, improving communication and collaboration within development teams, and driving connections between applications and business outcomes.  Microsoft is extending the ALM capabilities we’ve built into Visual Studio 2012 and its updates by further enabling such “DevOps” scenarios with our tools and services, yielding a more friction-free and higher quality path to production.

In this vein, today marks the start of TechEd North America 2013, and with it I’m excited to announce several key advances related to the modern application lifecycle.

Visual Studio 2013

I’m thrilled to share that our next major release, Visual Studio 2013, will be available later this year, with a preview build publicly available at Build 2013 in San Francisco at the end of the month.  In his keynote demo and follow-on foundational session today at TechEd, Brian Harry highlighted some of the new ALM capabilities coming in this release and in the cloud, including new features focused on business agility, quality enablement, and DevOps.  Here are a few of my favorites:

  • Agile portfolio management, which enables you to plan your agile projects “at scale” by showing the hierarchical relationship between work being done in multiple teams across your organization.
  • Cloud-based load testing, a new capability of Team Foundation Service that takes advantage of the elastic scalability of Windows Azure to generate traffic, simulating thousands of simultaneous virtual users so as to help you understand how your web applications and services operate under load.
  • Code information indicators that provide information about unit tests, work items, code references, and more, all directly within the code editor in Visual Studio, increasing developer productivity by enabling project-related contextual information to be viewed and consumed without leaving the editor.
  • A team room integrated into TFS, improving the collaboration amongst team members via a real-time and persistent chat room that integrates with data and interactions elsewhere in TFS.
  • Identity integrated into Visual Studio, such that the IDE is connected to backend services that support, for example, roaming the developer’s settings as the developer moves from installation to installation.
  • Support in TFS for integrated code comments that facilitate code reviews with increased transparency and traceability.
  • A .NET memory dump analyzer, which enables developers to easily explore .NET objects in a memory dump and to compare two memory dumps in pursuit of finding and fixing memory leaks.
  • Git support built into Visual Studio 2013, both on the client and on the server, including in the on-premises Team Foundation Server 2013.
  •  
These are just a few of the new capabilities available with this release, which we’ll be talking much more about in the coming weeks and at Build.  Many of these features are available starting today on Team Foundation Service.

InRelease

DevOps is an increasingly important part of application lifecycle management and is a growing area of interest as businesses need to develop and deploy quality applications at a faster pace. We continue to invest in improving the modern application lifecycle, with a particular focus on DevOps.

As part of this increased focus, today I’m excited to announce Microsoft’s agreement to acquire InCycle’s InRelease Business Unit, a leading release management solution for .NET and Windows Server applications. InCycle’s InRelease product is a continuous delivery solution that automates the release process through all of your environments from TFS through to production, all in one solution, and all integrated with TFS.

This acquisition will extend Microsoft’s offerings in the ALM and DevOps space. We look forward to continuing to offer customers new tools and capabilities to help them develop and operate the high quality applications and services they need to run their businesses with increasing agility.

MSDN and Dev/Test on Windows Azure

The technical improvements we’re making to Visual Studio represent just one facet of the work we’re doing to improve the productivity and success of teams using Microsoft platforms. For example, we’ve improved the Windows Azure benefit available as part of eligible MSDN subscriptions; you now have a choice as to how you use your Windows Azure credits for development and test, whether you apply them for Virtual Machines, Web Sites, Cloud Services, Mobile Services, Media Services, HDInsight, or beyond.  The Windows Azure MSDN benefit includes access to virtual machine images preconfigured with MSDN subscription software, such as SQL Server and BizTalk Server, and alternatively supports uploading your own virtual machine with your MSDN software.

Further, one of our goals is to make it easy for every member of a development team, whether dev or test, to be empowered to provision without friction the environments they need when they need them.  With the new Windows Azure MSDN benefit for dev and test, we are taking an important step towards realizing that goal. As of June 1st, MSDN subscribers now have use rights to run in Windows Azure VMs selected software they get through MSDN (see the Visual Studio and MSDN licensing white paper for more details).

These improvements help to make development teams more agile by providing them with simple and scalable access to development and test cloud-based resources.

via - MSDN Blogs

Saturday, June 1, 2013

Windows 8.1 Blue, a Deep Preview

Microsoft launched Windows 8 on last August, with a freshly designed user for the touch-based devices. Just after eight months, Microsoft is now keen to talk about some upcoming changes in Windows 8.1, entitled as Windows Blue, it sets the pace for changes to Microsoft's software that will continue in the future for both the x86 and RT versions of the OS.

Lets see some new and improved features of Windows 8.1 codenamed as Windows Blue.

Windows Start Button

The most important up-gradation in Windows Blue is the coming back of Windows Start Button in the left-hand corner of the Windows 8.1 to make it easier for non-touch screen users, Microsoft already got so many complaints and reports regarding the missing start button feature.
In addition to the start button, users will also be able to set and rename apps in “All Apps screen” (where Windows listed all installed applications on your system) as the default instead of the Start Screen. More details given below

All App screen (Default start screen)

As like Windows Phone Microsoft introduced small and larger live tiles in Windows Blue.
The size of tiles depend on the frequency of usage or the information you want to get from that app tile, if you are using an app so frequently size of the tile will become extra-large and for applications like weather app, it need to display more forecast data’s. Users also can redesign the size of the tiles

And new installed apps no longer automatically pin into default start screen, users have to manually pin it.

The best feature I liked in new tiles slide is, we can create four tiles (in the screenshot we can see video, game, music and photo) in a single tile space.
SkyDrive (cloud storage)

Microsoft’s cloud storage service, SkyDrive, is far more integrated than it was even in Windows 8, files can be saved directly to SkyDrive as like in windows office 2013. Users can access make SkyDrive files offline on PC.
Background image:

In default Start Screen, now we can set mirror image of Desktop Wallpaper, this feature will makes all app screen friendlier.

More color and texture:

Windows 8.1 offers a wider variety colors themes and textures, where Windows 8 had a limited number of colors and textures.
Freshly added features in Blue. 

Search:

"The boldest totally new feature that we've done in 8.1 is the Search feature," - Harris. As he said, MS improved build-in Search a lot more powerful in Windows Blue.
Microsoft pull result from a variety of sources, including the Web Results, Documents, Apps, SkyDrive and much more.


Customizable Snap views

Windows 8.1 brings variable, continuous size of snap views. You will have more ways to see multiple apps on the screen at the same time. You can resize apps to any size you want, share the screen between two Apps, or have up to four apps on screen.
If you have multiple displays connected, you can have different Windows Store Apps running on all the displays at the same time and the Start Screen can stay open on one monitor. This makes Multi-Tasking even easier. Also in Windows 8.1, you can have multiple windows of the same app snapped together – such as two Internet Explorer Windows.
Auto Updates: 

From Windows 8.1 there won't be any manual updates for apps, all installed apps will be automatically updates when new update releases for the app.

Better Multi-Monitor Support: 

A new Settings app, with moves several functions from the desktop to the modern user-interface, includes more options for Multi-Monitor setups and allowing users to set the resolution of secondary monitors manually if they wish.

IE Improvements:
Web browsing continues to be one of the most popular activities on any device. That’s why with Windows 8.1, you also get Internet Explorer 11 (IE11).

Internet explorer 11 builds on the advancements in IE10 and is the only browser that is built for touch. IE11 will offer even better touch performance, faster page load times and several other new features we think you will enjoy. For example, you can now adjust the appearance of modern internet explorer 11 to always show the address bar and you can have as many open tabs as you like. And you can access your open tabs in sync across your other Windows 8.1 devices.

Reading List: 

In any app with content (including IE), users will be able to save that content to a Reading List. It works with news apps like The New York Times and Microsoft's home-grown ones as well as web pages.

Active Lock Screen: 

The lock screen supports an intelligent slideshow that can do things like display photos from exactly a year ago. You'll also be able to take a Skype call without unlocking the device.

Photo Editing: 

The Photos app gets basic photo editing in Windows 8.1 Blue.

New Microsoft Apps:

Windows 8.1 introduces new Microsoft apps including a Calculator, and Alarm, Food & Drink (which has a nifty hands-free recipe mode that lets you wave your hand to advance to the next step) and Health & Fitness (with a WebMD-esque symptom tracker).
Users new to Windows 8 will probably get a lot of use out of Help & Tips, which will help walk them through the finer details of the modern user-interface.

App Syncing Across Devices: 

When you log into a second Windows 8.1 device, the same apps you have on your first one will automatically download and sync. Similar to iOS, you'll be able to opt individual apps and devices out of syncing.

Apps Enhancements: 

The Xbox-branded apps for Music, Video and Games all introduce new features that bring you to the content you interact with the most. News and Sports have similar enhancements, including customized sections and making stories and stats on your favorite teams more prominent.

When I get this update ?


The new Windows 8.1 will freely available from June 26 to all genuine Windows 8 users.
Are you satisfied with new Windows 8.1, please leave your valuable comments below

Wednesday, May 29, 2013

Real World - CSS3

If you’re reading this, the chances are you’ve seen some of the amazing things that have been done in CSS3. Unfortunately, most of them aren’t practical for you, or your clients.

No longer, I say!

Below is a carefully-curated list of real-world examples and snippets of CSS3 that can be safely used to enhance any piece of work you create.

To use any of the following snippets,
you’ll need to include a CSS file.
Please, feel free to ask me for the CSS file.

  1. Recreating the <blink> tag

    This was, by far, the best tag in HTML. Unfortunately, it got dropped due to its lack of semantics. Well, it’s back.

    This is some blinking text.
    This is some <span class="blink">blinking</span> text.
  2. Recreating the <marquee> tag

    You know when I said that <blink> was the best tag? Well, I lied. Presenting: a valid CSS3 marquee.

    You spin me right round, baby. Like a record, baby. You spin me right round, baby. Like a record, baby.
    <div class="marquee" style="width: 380px;"><p><span>You spin me right round, baby.
    Like a record, baby.</span><span>You spin me right round, baby. Like a record, baby. 
    </span></p></div>
  3. Peekaboo!

    Is your client not listening to any of your opinions, is throwing a tantrum when it comes to the invoice, or is generally acting like a toddler? They might be a toddler. If so, this will help.

    I see you!
    <p class="peekaboo">I see you!</p>
  4. Wibble-Wobble

    Got a fidgety client, who makes lots of stinging remarks? They’ll bee happy when their page wobbles, then.

    The 2nd man to walk on the moon was Buzz Aldrin.
    The 2nd man to walk on the moon was <span class="wobble">Buzz</span> Aldrin.
  5. The Third Degree

    It won’t take too much detective work to find this handy little snippet.

    Something’s not quite level here.
    <span class="third-degree">Something&rsquo;s not quite level here.</span>
  6. WordArt

    Finally, a standards-compliant way to unleash the best type in the world!

    WordArt

    <h1 class="wordart" title="WordArt!">WordArt!</h1>
  7. Nausea

    Remember spinning on roundabouts as a kid? I hated ‘em. After seeing this, hopefully you will too!
    Woah-oah-oah!
     
     
    <span class="nausea">Woah-oah-oah!</span>
  8. The Perfect Typography

    Why bother choosing a font, when you know what you and your client wants?


    It’s perfect!
     
    <p class="perfect">It's perfect!</p> 

Sunday, May 26, 2013

Style Scope with HTML5 Canvas

When working with HTML5 Canvas, we're constantly interacting with the canvas context object, which contains an abundance of cool styling properties and drawing methods.  For a typical block of code that draws something onto the canvas, we draw a path, set a handful of context properties to style whatever it is we're drawing, and then use methods like fill() and stroke() to actually draw things onto the canvas.  Piece of cake, right?
But what happens if we're creating large, complex canvas applications, and we have lots of methods and functions that draw things onto the canvas which can be executed in any order?  We certainly don't want styles from different parts of our code base leaking into other parts of the code base.  Here's an example:

Code Editor














As you can see, we're calling drawTransparentSquare() followed by drawSquare().  Since objects can be modified by reference in JavaScript, when the first function set the global alpha property to 0.5, the style leaked over into the next function call and made the second square transparent as well.  This obviously wasn't the desired result.
So what can we do do?  Should each of our methods and functions reset the context styles like a CSS reset for each function?  Although this could be achievable by creating a resetStyles() function which loops through all of the styling properties and sets them to their default values, it seems a bit odd to constantly reset all of the style properties each time a function call is made.  Is there a better way?

Style Scope Induction


Style scope refers to the scope of styling inside of code blocks, similar to the notion of variable scoping inside of code blocks.  When writing JavaScript code, for example, it's good practice to split the code base into a collection of modular methods and functions, such that variables created within each function are scoped only to that particular function, and aren't accessible outside of it.  This is called variable scope induction.  What we need here, is a way to induce style scope within a function, or any other block of code, in such a way that the styles applied to the context don't leak over into other functions or blocks of code.

The HTML5 Canvas State Stack: A Diamond in the Rough


One of the most powerful, and probably the most overlooked features of the HTML5 canvas, is the state stack.  The state stack stores snapshots of styles and transformations in a stack data structure via the save() method of the canvas context.  What's even more important is that we can also use the state stack to restore snapshots of styles and transformations with the restore() method.
So how can we use the state stack to induce style scope?  If we use the save() method at the beginning of a function definition, we can save the state of the canvas context in the state stack.  Once the state is saved, we can apply several context styles, draw things, and then restore the state stack back to the initial state with the restore() method.  Viola, we've just induced style scope.

HTML5 Canvas

Welcome to Basic Tutorials! In these tutorials we'll focus on the fundamental drawing capabilities of the HTML5 Canvas.

HTML5 Canvas Basic Tutorials Prerequisites


All you need to get started with Basic Tutorials is a modern browser such as Google Chrome, Firefox, Safari, Opera, or IE9, a good working knowledge of JavaScript, and a simple text editor like notepad.

HTML5 Canvas Element Tutorial


The HTML5 Canvas element is an HTML tag similar to the div, a or table tag, with the exception that its contents are rendered with JavaScript.  In order to leverage the HTML5 Canvas, we'll need to place the canvas tag somewhere inside the HTML document, access the canvas tag with JavaScript, create a context, and then utilize the HTML5 Canvas API to draw visualizations.

When using canvas, it's important to understand the difference between the canvas element and the canvas context, as often times people get these confused.  The canvas element is the actual DOM node that's embedded in the HTML page.  The canvas context is an object with properties and methods that you can use to render graphics inside the canvas element.  The context can be 2d or webgl (3d).
Each canvas element can only have one context.  If we use the getContext() method multiple times, it will return a reference to the same context object.

Wednesday, May 22, 2013

Differences Between HTML4 And HTML5

Now that we've seen how to use some of the newer whiz-bang features of the draft HTML5 standard, it's time to take a few steps back and take a look at some of the other differences between HTML4 and HTML5.

This article is intended to be a useful overview, not an exhaustive reference, but remember that things are still and always changing. You also may want to refer to this document for the actual details of the HTML5 specification itself.

The first thing you should know is that, perhaps for the first time, the development of a language standard is acknowledging the real world. In order to keep file compatibility with the current standard - which is technically HTML 4.01 - the brave decision was made to separate the way the web browser renders files from the way we, as developers, must write them. So the browser, or "user agent", must still process HTML4 constructs like the center element, because there will still be millions of files on the Internet that happen to use it. But we won't be writing any more HTML with center; it's simply being dropped from the language (use CSS instead). This compatibility goes both ways: older browsers can (and will) simply ignore HTML5 code without screwing things up.

No More Frames


This is great news to those of us who slogged through the 1990s. To be exact, the elements frame, frameset, and noframes are being removed from the language, as well as acronym, applet, basefont, big , blink, center , dir, font, isindex, strike , tt and u. All of these can be handled using CSS or other methods.

You'll also have to learn to get along without using tables for layout; while tables themselves are still part of HTML5, they're not intended for placing pixels any more. Here's what the spec says:

"Tables must not be used as layout aids. Historically, some Web authors have misused tables in HTML as a way to control their page layout. This usage is non-conforming, because tools attempting to extract tabular data from such documents would obtain very confusing results."

So all the attributes that let people create those perfectly laid-out, tinted tables are gone, like align, bgcolor, border, cellpadding, cellspacing, height, nowrap, rules, valign, and the big one: width. The mantra: use CSS instead.

I've been trying my best to break it to you slowly, but frankly, all presentational elements are coming out of HTML5. My advice: learn lots more CSS, until you can quote chapter and verse in your sleep.

 

Good News


The good news is that even though this is a big change, it's a change for the better. Browsers of the future (just another month or two!) will become more powerful because of the move towards the cloud, so that they'll be able to handle more on their own. We've already seen that with things like Ajax, and now with video/audio embedding and such, it will be far easier for us to code in a straight forward manner and let the browser figure out the details. For instance, new structure elements include article, aside, figcaption, figure, footer, header, hgroup, nav, section, and summary, all of which refer to the structure of the document itself and leave rendering to the browser.

There are still some new elements that deal with text on a detailed level, however: you'll code wbr when you think it's possible to do a line break, but the browser will decide for you. Another hint element is bdi, used to mark an area where bidirectional text formatting can be done (primarily for mixing left-right and right-left languages in a single document). Its complement, bdo, lets you explicitly override and force a particular directionality. For even more slick internationalization, the elements ruby, rp, and rt are included for ruby annotations, which are meant for pronunciation aids rather than for Ruby On Rails programmers.

The more high-level new elements include things like canvas, meant for specifying an area for drawing a bitmapped graphic on the fly, such as a data graph or game graphic; meter is a placeholder for a numeric measurement of an expected size (and is eerily similar to format in ancient FORTRAN), while progress is its graphical counterpart, to be used where you want a progress bar. Last, but not least, there are the multimedia elements (audio, video, source, embed).

 

Sunday, May 19, 2013

Connecting with IPv6 in Windows 8

IPv6 is the future 

Microsoft, along with other technology companies, has been working on the deployment of IPv6 to ensure that end-users continue to have high-quality Internet access, despite the performance and connectivity limitations brought about by IPv4 address exhaustion

The most immediate benefit of IPv6 is that it provides more than 3×1038 IP addresses, enough for every person to have billions of addresses all to themselves, or enough to give every star in the universe a unique address. This will allow the Internet to grow and evolve. IPv6 also provides for many security and performance improvements, like built-in support for IPsec. (What happened to IPv5, you ask? Bing can help you find out why it’s being “skipped.”)

Upgrading the entire Internet to IPv6 isn’t something that can be done instantly. It has taken many years to get to where we are today, and we still have many years of work to do. Currently, around 1% of devices can connect to the Internet using only IPv6.

During the transition period, most networks will fall into three categories:
  • IPv4-only networks. This is probably what you have today, as most Internet Service Providers have only just started rolling out IPv6 support. Many devices that connect to the Internet might only support IPv4 as well.
  • IPv4 and IPv6 networks (dual-stack). This means your Internet Service Provider is configuring your PC with both IPv4 and IPv6 addresses. This model is common in cable and dial-up networks that are transitioning.
  • IPv6-only networks. This means your Internet Service Provider is configuring your device with only IPv6 addresses. Because many websites are still only on the IPv4 Internet, ISPs must use a translation device to allow access from your IPv6 network to the IPv4 Internet. This device is called a NAT64. This mode is becoming popular in the mobile environment, because having only one kind of Internet Protocol between the mobile device and the operator’s infrastructure is simpler to deploy and cheaper than a dual-stack configuration. Also, mobile operators are feeling the IPv4 address exhaustion pinch most severely. Here is a basic diagram of this configuration:

You might be wondering what kind of connection you have right now. We have a widget at the bottom of this post that can show you.

Windows 8 is designed to ensure connectivity across all types of network configurations. In Windows 8, you can launch DNS look-ups using the Resolve-DNSname cmdlets in Windows PowerShell. Open up PowerShell and run the below command, and you will see both IPv6 and IPv4 records returned. Only websites that support IPv6 will have IPv6 records

Windows 8 on IPv4-only networks

On an IPv4-only network, devices are configured with IPv4 addresses only. This model continues to work in Windows 8 as it has in the past. In addition, Windows hosts also provide IPv6 connectivity by tunneling that traffic inside various transition technologies – an example of which is Teredo, where IPv6 packets are encapsulated in IPv4 UDP packets. Now that we are starting to see the emergence of IPv6-only servers and services, Windows 8 automatically attempts IPv6 connectivity when the server does not offer an IPv4 address. Note that Teredo is enabled by default only on non-domain networks, and Teredo may not be available if your network blocks UDP

Windows 8 on dual-stack networks

During the transition period, dual-stack networks will be the common deployment model. On a dual-stack network, devices will be configured with both IPv4 and IPv6 addresses.

Our primary focus during this transition has always been to minimize the impact of the transition for everyday users. It shouldn’t matter whether your connection is over IPv4 or IPv6. You should have an Internet experience that is fast and reliable, with little evidence of the IPv6 transition, so you can just enjoy the content.

At the same time, it’s also a priority for us to help the IPv6 transition move ahead. To this end, Windows prefers native IPv6 connectivity over IPv4 connectivity, if both connection modes are available.

In summary we have the dual goals of ensuring a reliable user experience, and enabling the IPv6 transition. As you might imagine, this can sometimes involve subtle tradeoffs, which have been the subject of much debate in the Internet community.

In an effort to sort out those sometimes competing goals, major websites around the world--including Bing.com, Microsoft.com, and Xbox.com–organized an event called World IPv6 Day last year. During this one-day test of the IPv6 Internet, participating websites turned on IPv6 in addition to IPv4.

The good news is that most things worked. All that goes into the Internet’s correct functioning—servers, end-user devices, and content delivery networks—were able to work at scale without issue.

However, we also observed that a small subset of the population (0.01% of the world) was misconfigured with IPv6, seemingly because of a router or ISP issue. That’s not too surprising, as IPv6 is a fairly new technology, and mistakes happen. But for those unlucky users, it could cause a significant impact on everyday experiences with the Internet.

Ready for the future of IPv6-only networks

On an IPv6-only network, the best way to improve a user’s experience is to increase the number of services and experiences that are available over IPv6. On such a network, access to the IPv4 Internet is through a NAT64. These devices can be a fragile point of failure for connectivity, and can have severe performance limitations that lead to dropped packets. They also break IPv4 peer-to-peer connectivity, needed for some multiplayer games.

Across Microsoft, we have done a lot of work to enable the growth of IPv6 deployments, both in enterprise and Internet settings. One of our most important efforts is to ensure that our server products support IPv6. IPv6 support is part of our Common Engineering Criteria (CEC). This is part of a broad company-wide commitment to customers that our business products, such as Exchange Server and SharePoint, support IPv6 in either dual-stack or IPv6-only configurations. Most Microsoft products built since 2007 have supported IPv6, but you can find out about IPv6 support in other Microsoft products on Technet. Through this effort, developers and solution providers can support IPv6 in their own products

Microsoft is also working on IPv6 support for our own services. Earlier this year, the Internet Society announced the World IPv6 Launch, a major milestone in the process of upgrading the Internet to IPv6. In June, Bing and other websites will start serving traffic over IPv6 on a permanent basis. Hardware vendors are working on IPv6 support in home routing devices, and many ISPs will start large-scale deployments of IPv6. CDNs (content delivery networks) have also started enabling support for IPv6 within their networks.

With the release of Windows 8, some of our infrastructure services will deploy IPv6 support.
Windows Update is a critical service providing ongoing support and updates to millions of users every day. More and more PCs are going to be connected to mobile broadband networks, where IPv6-only is a popular configuration. We have to make sure that downloads are reliably available to you on those networks.

For this reason the Windows Update service now supports both IPv6 and IPv4. Windows Update utilizes CDNs for worldwide distribution of updates and we are partnering with them to enable IPv6 support. Windows 8 will use IPv6, if available, to download Windows Updates so that users always get the best possible connectivity when downloading updates

We are working with CDNs to extend IPv6 support beyond Windows 8. Once that work is complete, even Windows 7 and Windows Vista will automatically use IPv6, where it is available, for connecting to Windows Update.

Leading the way

Windows 8 is connected and ready to use, and our support of IPv6 is a key part of ensuring that connectivity for years to come. Because IPv4 wasn’t designed to handle the scale of connectivity today, the Internet is undergoing a radical change in its foundation. Every connection to every website, every multiplayer game, and every video call will gradually move to IPv6

As part of that transition, Microsoft is leading the way by ensuring that Windows 8 provides the most resilient connectivity to the Internet while providing IPv6-ready products and services.