contact us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right.

           

123 Street Avenue, City Town, 99999

(123) 555-6789

email@address.com

 

You can set your address, phone number, email and site description in the settings tab.
Link to read me page with more information.

Blog

Filtering by Tag: HTML5

Web Performance and Scenes from WDYK Melbourne (August 2012)

John Bristowe

Last Thursday, I attended What Do You Know (WDYK) Melbourne at The Apartment. WDYK is the brain-child of John Allsopp; somewhat akin to DemoCamp in that it features 5-minute presentations (with PowerPoint!) that highlight the speakers' knowledge on a particular topic. This was my second time at WDYK, having spoken at WDYK Sydney on the topic of CSS3 box-shadows.

I was lucky to make it to WDYK Melbourne at all. The weather wasn't doing me any favours. This was the scene as I left for the event from my house:

Ah, Melbourne in the springtime!

Ah, Melbourne in the springtime!

Before getting into the details, allow me to state that I thought WDYK Melbourne was a hit. I mean, there must have been over 150 people at the event. Everyone was super-nice and engaged. It was great to see and it's a testiment to John Allsopp and his crew. In the words of Kent Brockman, "I, for one, welcome to new event organizing overlords..."

For WDYK Melbourne, I decided to share some interesting sites and stats relating to web performance. Since my earliest days hacking on angle brackets and script, I've been incredibly in making my web pages fast.

Recently, I've noticed a few trends on the HTTP Archive that are somewhat concerning. As the amount of bandwidth consumed by pages is steadly increasing, Google Page Speed scores are heading down. Also, there's a large percentage of sites that don't leverage some basic optimizations like caching.

Anyway, I decided it would be a good idea to expose this to the audience at WDYK Melbourne in order to set the stage for some helpful sites and tools. These include:

It's hard to get everything highlighted in a 5-minute presentation.

I also took a few photos at the event:

All-in-all, it was an awesome event. I can't wait for the next one.

If you're in Melbourne, Sydney, or Brisbane, you owe it to yourself to get involved. Get out and attend! Or, better yet, raise your hand and share what you know with members of the developer community.

HTML5 Forms Support in Kendo UI Mobile

John Bristowe

HTML forms are used to collect data from the user through a series of input and selection elements. Prior to HTML5, the elements and input types defined for user input facilite general purpose scenarios. However, a number of challenges remain - specifically as it relates to the form and function of the elements when rendered to the user agent. Often, developers will have to use a combination of JavaScript and styling via CSS to achieve the desired result, which included the validation of data. The HTML5 specification helps to eliminate some of this work by defining new input types: tel, search, url, email, datetime, date, month, week, time, datetime-local, number, range, and color.

Currently, these new input types are broadly supported across the major browsers available today. This includes browsers available on mobile platforms like iOS and Android.

Recently, I attended Web Directions Code in Melbourne. At this event, Tammy Butow (@TammyButow) delivered a presentation entitled, “Fantastic Forms for Mobile Web” where she provided an overview of the form input types introduced in HTML5. It was encouraging to hear her evangelise their use in mobile web applications. And I was even more encouraged when I had a chance to show her the work we had conducted around these new elements with Kendo UI Mobile.

In the Q1 2012 release of Kendo UI Mobile, we introduced support for many of the new HTML5 input types, including text, password, search, url, email, number, tel, file (not in iOS), date, time, month, and datetime. With Kendo UI Mobile, we provide a consistent, native-like experience across the platforms we support:

HTML5 Forms Support in Kendo UI Mobile
HTML5 Forms Support in Kendo UI Mobile

Using these HTML5 form elements and input types is fairly trivial with Kendo UI Mobile:

In this example, you can see that we’re leveraging some of the new input field types introduced in HTML5. These fields are defined with a View structure with a nested ListView for displaying each element.

Some notes worth mentioning:

  • The input elements with a picker use the native one from the current platform if it is supported.
  • HTML5 form elements are fully functional only on the following platforms: iOS 5.x+, Android 4.x+, BlackBerry 6.x+, BlackBerry Playbook 1.x+.
  • The styling will still work on older platforms, but the functionality will be limited to text input only.

ASP.NET Web Forms and HTML5, Part 1

John Bristowe

HTML5 Development for ASP.NET Developers: ASP.NET Web Forms and HTML5

This is the fourth module in the ongoing course, HTML5 Development for ASP.NET Developers. In case you’re just joining us, here’s what we’ve covered so far:

  1. Hello jQuery
  2. Hello Services / WebAPI, REST, JSON and AJAX
  3. Hello HTML5

In this module, we’ll focus on ASP.NET Web Forms.

ASP.NET Web Forms has been around for a very long time. Over the years, it has evolved dynamically. Today, it provides a robust platform for building web applications, including those that target HTML5.

In the previous article of this series, Burke Holland (@BurkeHolland) provided an excellent overview of HTML5 and its support in Visual Studio. I would strongly urge you to review his blog post if you’re new to HTML5, as it provides a number of great tools and resources worth checking out.

In this blog post, I’ll be taking a different viewpoint on HTML5; developers targeting ASP.NET Web Forms and HTML5. In part 1, I’ll cover the high level aspects and a bit of the background. In part 2, I’ll go into much deeper detail about the technical aspects of ASP.NET Web Forms and HTML5.

Background

I remember my first experiences with ASP.NET Web Forms quite well. This was over a decade ago when ASP.NET was known as Active Server Pages+ (ASP+). I recommend reading Dave Sussman’s MSDN article on ASP+ if you’re interested in taking a trip down memory lane.

Back in 2000, ASP+ represented a complete departure from the way websites were traditionally built on the Microsoft stack. Prior to its introduction, developer cobbled together websites with a combination of VBScript, server-side includes, COM components, and a lot of coffee. The developer experience of ASP was incredibly frustrating to say the least.

When ASP+ introduced the concept of Web Forms, it took off like a rocket. For developers, it was a huge boost to productivity:

  • It supported an event model that enabled developers to build web applications in a similar manner as the rapid development environment of Visual Basic 6.
  • It provided a framework and runtime environment that elevated object-orientation to the forefront.
  • It enabled developers to build web applications in a much more productive manner than ASP through its rich object model.

While the branding for ASP+ eventually changed to ASP.NET, the ideas remained the same. And for the most part, not a great deal has changed. In fact, many of the original abstractions introduced in the first version of ASP.NET, such as Web Forms, remain in-place and are widely used today.

This, of course, begs the question: if a technology ASP.NET Web Forms is such a mature technology, can it be used to build applications in HTML5? I’m happy to state that the short answer is a resounding “yes”. However, the longer answer is somewhat nuanced. Depending on which version of ASP.NET you’re building against, your experience (and productivity) will vary. However, the good news is that much like wine, the story around HTML5 support in ASP.NET (and in ASP.NET Web Forms) is getting better as time goes on.

ASP.NET Web Forms and HTML5

There’s nothing preventing you from supporting HTML5 in ASP.NET Web Forms today. The reason for this is simple: HTML5 elements are defined as markup with a client-side event model. There’s no requirement on the server. Also, it’s worth noting that the HTML elements and attributes emitted by ASP.NET server controls are well formed and validate against the HTML5 specification. That stated, there are many developers who would like built-in server controls to leverage the new aspects of HTML5 like semantic elements. Until recently, this scenario was generally supported two ways: custom controls or content adapters.

Custom controls have been supported since the beginning of ASP.NET. Often, they are created as aggregates of other controls found in the framework. However, they are also created to new server controls that developers can use in-place of existing ones found in ASP.NET. Creating a custom control is fairly trivial and there a many articles online that show you how to do this. In the case where you’re looking to emit specific HTML5 elements, you can accomplish this through the Render method of the UserControl class.

Another mechanism of supporting HTML5 elements is through content adapters, which were introduced in ASP.NET 2.0. Content adapters are powerful because they allow you to specify how specific controls should emit markup – including build-in controls like the Calendar. Don’t like the default rendering of a particular control? Why not write a control adapter to modify its output to include HTML5 semantic elements? For more information about content adapters, make sure to check out Fritz Onion’s article on MSDN.

Today and Tomorrow with ASP.NET Web Forms and HTML5

Web Standards Update

There have been a lot of improvements made to ASP.NET Web Forms over the past year. Developers targeting ASP.NET Web Forms and looking to support the latest trends in web development should be encouraged by recent announcements made by teams at Microsoft. However, that doesn’t mean you should wait until HTML5 is supporting entirely by ASP.NET and Visual Studio. The reality is that the specification continues to evolve. This means that has parts of HTML5 start to stablize, one should expect to see a gap in its support in Visual Studio and ASP.NET. However, as we demonstrated throughout this blog series, these gaps are easily bridged through other tools and framework that are available.

Preliminary support for HTML5 IntelliSense and validation was first introduced in Visual Studio 2010 SP1 in the beginning of 2011. However, it was somewhat limited in its effectiveness; integrating support for HTML5 IntelliSense and validation presented some serious challenges given the flux in the HTML5 specification at the time. In June 2011, the Web Platform and Tools team released the Web Standards Update, which added HTML5 and CSS3 support to Visual Studio 2010 SP1. If you haven’t taken the time to download and install this extension, I would strongly encourage you to do so. Essentially, it’s an extension that adds HTML5 and CSS3 IntelliSense and validation to Visual Studio.

I would recommend reading Scott Hanselman’s blog post that covers the Web Standards Update from a high level perspective. While I can appreciate all of the work that’s gone into supporting HTML5 and CSS3 through the Web Standards Update, some important parts – such as HTML5 form elements – are left unsupported. The good news is that support is coming in the next version of ASP.NET.

Looking Ahead to Visual Studio 2012 and ASP.NET 4.5

Visual Studio

There are many exciting improvements planned for Visual Studio 2012 and ASP.NET 4.5. For developers targeting HTML5 with ASP.NET Web Forms, there are a number of features worth noting in the next release. Here’s a table I stole repurposed from MSDN that highlights just of the few things to look forward to:

 

Feature

Description

Model binders

Web Forms now supports model binding, which lets you bind data controls directly to data-access methods. ASP.NET automatically converts data from form fields, query strings, cookies, session state, and view state into method parameters. You can use these parameters to select data from or make updates to the database. (This technique is similar to model binding in ASP.NET MVC.)

Strongly typed binding expressions in data controls

You can now write strongly typed, two-way data-binding expressions in Web Forms data controls, instead of using Bind or Eval expressions. This approach lets you access complex properties in data controls. These expressions can be used with the new model binding feature.

Unobtrusive JavaScript for client-side validation

Unobtrusive validation moves the code for client-side validation into a single external JavaScript file, which makes pages smaller and faster to load. It also provides better caching of script files.

HTML encoded data-binding expressions

New syntax lets you encode HTML output in page markup.

Fallback support for content distribution networks (CDNs) in the ScriptManager control

When you set the EnableCdn property of the ScriptManager control, the control tests whether the script was loaded successfully from the CDN. If not, the control falls back to loading the script from an alternate (local) location.

Support for HTML5 form types

You can use HTML5 elements like email, tel, url, and search in Web Forms pages.

Improved paging in the GridView control

The new AllowCustomPaging and VirtualItemCount properties of the GridView control let you customize paging functionality. These new properties remove the need for the control to retrieve all rows from the data source each time a new page is displayed.

Reference: ASP.NET Web Forms - ASP.NET 4.5 and Visual Studio for Web Release Candidate

Although it’s not specifically related to HTML5, I am also looking forward to leveraging the new bundling and minification support that’s being introduced to ASP.NET 4.5. Effectively, this will allow you to structure your server-side markup to point to a script or style directory, and have the ASP.NET runtime automatically bundle and minify all of its resources:

@Styles.Render("~/Content/themes/base/css")
@Scripts.Render("~/Scripts/js")

Awesome stuff!

Related Links and Resources

There are many sites worth checking out if you’re interested about learning more about HTML5 in ASP.NET Web Forms. Here are just a few:

Kendo UI v1.0 Released!

John Bristowe

Earlier today, we took the wraps off Kendo UI, a framework for creating interactive web applications with modern web standards. My colleague, Todd Anglin wrote about today’s release in a blog post where he highlights what’s new in Kendo UI, the breakdown of products (Kendo UI Web, Kendo UI DataViz, and Kendo UI Mobile – currently, a preview), and the official licensing that underpins it. The good news? Existing customers will have access to Kendo UI Web in both the Telerik Premium and Ultimate Collections.

There’s a lot to like in the v1.0 release. In addition to some of the new UI widgets, we’ve added an integrated ability to modify themes. We call this the ThemeBuilder.

ThemeBuilder for Kendo UI

ThemeBuilder for Kendo UI

The ThemeBuilder is a tool that lets you modify the Kendo themes with ease, so that they match the look and feel of your site or app. Through a series of mouse clicks, you can quickly customize the look and feel of the Kendo UI widgets. Once you’re done, the ThemeBuilder will generate LESS or CSS text, which you can then integrate into your web application.

It’s pretty freaking sweet.

We’ve also introduced two new aspects of the Kendo UI framework: globalization and validation.

Globalization is the process of designing and developing an application that works in multiple cultures. The culture defines specific information for the number formats, week and month names, date and time formats, etc. Kendo UI exposes the culture(cultureName) method, which allows you to select the culture script corresponding to the “culture name”. This method then uses the culture name to select culture from the culture scripts that you have included and then sets the current culture. You can check out a live demo of this in-action by visiting the Kendo UI demos.

The Validator in Kendo UI provides an easy mechanism of client-side validation to web developers. Built around the HTML5 form validation attributes, the Validator supports a variety of built-in validation rules, but also provides a convenient way for setting custom rules handling. A live demo of the Validator can be seen on the Kendo UI demos page.

There’s certainly a lot more to cover. Fortunately, we’ll be hosting a webinar that provides you with everything you need to know about Kendo UI to help you get started. Simply register, attend, and you’ll hear everything you need to know about building awesome web experiences with Kendo UI.

In the meantime, make sure to follow Kendo UI on Twitter, Facebook or Google+. Also, don’t forget to check out our forums. They’re a great way to provide feedback to the team.

An Introduction to HTML5 Canvas

John Bristowe

A few months ago, I delivered a presentation at Make Web Not War entitled, “An Intro to HTML5 Canvas”. The purpose of this presentation was to provide folks with a primer on this new element, which allows web developers to draw directly to the 2D context that it provides.

Here’s the video recording of my presentation:

Intro to HTML5 Canvas from Make Web Not War on Vimeo.

Here are the slides:

MSDN Update: Windows Phone Developer Tools for Mango

John Bristowe

Last week, we previewed many of the new features coming in the next major release of Windows Phone, code-named “Mango”. As part of this event, we also announced the availability of the Windows Phone Developer Tools for Mango . With these tools, you can start building cool apps and games that take advantage of all of the functionality that was announced. Go download them and get building those apps!

From a high level perspective, there’s a lot to be excited about as a developer with Windows Phone Mango. We’re delivering outstanding new features including background processing, massive Live Tile functionality updates, direct camera access, sockets, a new profiler and emulator, deep linking into apps, local database support, and a new web browser control based on IE9 that supports HTML5.

In addition to the release of the tools, we’ve updated our docs in the  What’s New in Windows Phone Developer Tools  topic in the MSDN Library, created 22 new code samples , and released 10 new  hands-on labs  specific to Windows Phone Mango. We’ve also updated our  Game Development page  to highlight some of the new resources available for phone game developers using Windows Phone Mango.

Finally, to aid you in your learning about Windows Phone from a developer’s perspective, check out the following videos posted to Channel 9: 

Also check out this interview with fellow Canadian developer, Mark Artegea on .NET Rocks! on Window Phone 7 and Mango . A great listen and recommended if you’re looking for a high-level discussion on Windows Phone.

Go Canucks Go!

 

Fun with Arcs and Canvas in HTML5

John Bristowe

Earlier today, I spent a few minutes playing around with the 2D drawing context for the HTML5 canvas element and came up with the following simple example:

This example (above) shows how to animate a series of arcs (i.e. circles) over time on the HTML5 canvas. The blending of arcs that occurs is accomplished by applying a decreasing alpha value to each arc for each pass the drawing code executes over time. Alternatively, these arcs are removed if they hit the top of the context boundary.

HTML5 Meet-Up in Vancouver

John Bristowe

With HTML5 being all the rage these days, I reached out to the super-awesome Boris Mann (@bmann) to discuss the possiblity of getting a HTML5 meet-up group up and running in the beautiful city of Vancouver. Well, leave it to Boris to make this happen: Presenting the Vancouver HTML5 Meet-Up Group!

Meet-ups are a great way to connect with folks in your local community who share similar interests. In that context, the HTML5 Meet-Up for Vancouver will focus on providing a forum for folks to discuss modern web standards and browsers. This includes HTML5 itself, but also some of the many associated technologies and topics of discussion like CSS, audio, video, web fonts, WebGL, and much, much more!

Our inaugural meeting is scheduled for next week (Friday, May 6, 2011) at iQmetrix (250 Howe Street - Suite 1210). We’re planning to meet at 7 PM and to have a meaningful conversation around what we - as a community - would like to see with this group. Afterward, we’ll head out to a local pub to continue the conversation and to chat about modern web standards and browsers.

If you’re in the technical community in/around Vancouver and you’re looking to chat with folks about modern web standards, this is the meet-up for you! Join today!