Many of the best practices for writing testable code also conform to general code best practices. Code that is easily testable often also tends to be highly maintainable and resilient against changing business requirements.
Dojo’s store API is a common interface for providing data to user interface widgets, such as dgrid, Dijit Select, and Dojo Charting. The beauty of having a consistent API is that once you’ve defined an interface for a data source, that data becomes easily available to all widgets that support the store API.
In large JavaScript applications, it can be beneficial to dynamically load CSS stylesheets. For example, if a certain JavaScript widget, such as a complex grid, uses a large standalone stylesheet for its display aesthetics, it would be optimal to only load this stylesheet if the widget is in use, rather than always including the CSS source on each application load.
At SitePen, we have long been advocates for building web applications on a RESTful architecture. Over the last several years, it has been exciting to see organizations increasingly provide RESTful endpoints for the Dojo-based front-ends that we support and develop.
Modern browsers have powerful new database capabilities that enable applications to store data locally, and perform advanced indexed queries without a network connection. Applications can be built with offline support without any disruption to data interaction, including searching.
Intern is a great test stack for writing full-featured unit and functional tests, with remote WebDriver-based testing (e.g. BrowserStack) and continuous integration (e.g.
dgrid is SitePen’s lightweight, modular, and easily extensible modern grid component, designed for use with AMD and Dojo. The Selection and CellSelection mixins enable selection of rows or cells, both from mouse or keyboard actions and programmatically.
Last month, we conducted a live webcast to provide an Introduction to Intern, SitePen’s open source testing framework. Our webcast covered: An overview of Intern’s numerous functional and unit testing features and capabilities Mocking objects and data Injecting dependencies Troubleshooting Future direction of Intern While it’s too late to attend this webcast and heckle us with live questions, we recorded the session and have made it available for you online: We encourage you to use Intern in your current application and then tell us about your experience.
When working in an event-driven environment such as the web, it is important to utilize tools that allow you to create succinct, easy-to-read code that’s extensible and flexible. One great mechanism that Dojo provides is the ability to use extension events.
Receive Our Latest Insights!
Sign up to receive our latest articles on JavaScript, TypeScript, and all things software development!