While there are many challenges today with building web applications, there are also many options to address the issues we face with technology, process, and people, allowing us to reap the benefits of the web as an application platform.
While many of the challenges with today’s web applications come from the vast array of technologies that are available, there are clear strategies that can be employed to turn those same issues into advantages that can make building applications easier. The key is to use a technology portfolio that allows applications to be modular, simple, and isolated from any instability in the underlying platform. Another critical aspect of each member of this portfolio is that it must be able to maintain those abilities at the scale at which the application will be built.
Web applications provide many benefits. Most organizations seek to improve the efficiency and effectiveness of business processes through the use of software.
The benefits of web applications include:
- Simple distribution model for end users (e.g. no installation required)
- Instant propagation of changes
- Unified code base to support many platforms (desktop, tablet, mobile, etc.)
- Easy piloting of new features with a subset of users
- Lower total cost of ownership
- Well-established scalability models as user-base grows
Over the past few years, building the client-side portion of web applications has changed significantly. Web application development, while arguably better than any other platform available today, is not without its challenges. We categorize these issues as coming from three sources: technology, process, and people.
We thought it was a good opportunity to take a step back and look first at the challenges, and then the solutions for building modern web applications, and to share some of the strategies and techniques we use at SitePen to improve our approach.
In this installment, we’ll begin by looking at the challenges currently faced when building web applications.
While most developers are familiar with CSS selectors, this is not always the most efficient mechanism for referencing a particular element in a page.
XPath is a technology that is often overlooked by developers because of the perception that all things XML are overly complex. That said, XPath selectors can be a very powerful and flexible approach for finding an element.
Last fall, Mozilla announced its Mozilla Open Source Support program, specifically focused on supporting the Free & Open Source Software movement. AND THIS JUST IN: Intern was selected to receive a MOSS grant in the amount of $35,000!
Initially focused on awarding grants to fund projects used in its own development initiatives, Mozilla is giving back to the OS ecosystem by directly sponsoring development on these open source projects! With Intern specifically, the following improvements will be implemented:
- Performance with an emphasis on benchmarking and regression analysis
- Visual regression testing with screenshot comparison and image analysis
- Accessibility focused on analysis against known accessibility best practices
Intern, via the Leadfoot WebDriver library, provides a lot of low-level control over the browsers it uses to run tests. Tests can navigate to new pages, resize the browser window, examine elements on a page, and interact with controls like inputs and buttons. Unfortunately, with all this power can come great complexity. Many testing tasks will involve a large number of low-level operations and dealing with these can be error prone and make tests difficult to follow. Command helpers to the rescue!
Symbols are a new, unique, primitive type introduced in ECMAScript 6 (ES6). They were added to the language in order to solve the problem of extending the functionality of
We’ve recently made a number of updates to Intern, providing additional flexibility and integration for writing and running tests. Seth Holladay and sitecues by Ai Squared generously sponsored some of these efforts!
Intern has long supported continuous integration, officially supporting travis-ci, Jenkins, and TeamCity. Intern provides a very flexible reporter system, making it easy to add new output formats. We have received requests recently to support Bamboo and Codeship.
One of the nice features of testing with Intern and Leadfoot is the ease of authoring functional tests to mimic end-user behavior. The API for retrieving relevant DOM nodes is relatively straightforward, usually with a single line of code needed to get a reference to the relevant node.
When we started writing tests for Dijit, we realized that it was often a fair amount of boilerplate to get references to specific widget instances, attach points within those widgets, and property values of widgets. One of the advantages of Intern is you can integrate this boilerplate into a helper. So, we set out to create a simple Intern helper utility to make these operations as efficient to author as normal functional tests.