A Few Tips for Developing Web-based Applications

John Reeve | August 17th, 2010 | , , , ,

Take a quick look at the online productivity software landscape and you will see there are plenty of options to choose from.ย This as a good thing, after all, project managers, web designers, web developers, and creatives are a thorough and intelligent bunch and highly capable of vetting out the best web-based applications that will work for their needs. The large number of online software options available means any small business can find a unique set of features โ€” time tracking, task management, document sharing, reporting, invoicing, and so on โ€” to match their workflow.

The ever-growing landscape of web-based applications is analogous to the rise of the coffee shop in the ’90s. Starbucks, Peets, and Coffee Bean and Tea Leaf created a culture of coffee drinkers who don’t think twice about ordering a non-fat-half-caf-no-foam latte. In the online productivity marketplace we have apps like Basecamp, Freshbooks and Intervals creating an online culture of small businesses growing accustomed to getting things done with web-based time tracking, task management and project management applications. Small business are becoming increasingly more comfortable entrusting their business to online software, and more demanding in the features they expect their online software to include.

Each week, several more web-based applications join the fray. If you are designing and developing online software, first, welcome to the club, second, take these tips into consideration to cut down on your development time. We’ve been designing and developing web sites and web-based applications for ten years and have learned a lot along the way. Following are some web development best practices and tips that are useful for staying out of your own way and launching a successful online app.

Test. Test. Test. Then, test again.

When developing web-based applications, testing is essential but it is not always practical. It is often times more efficient to get your product out there and let your customers do the testing for you. That doesn’t mean you should not test at all. Test as much as you possibly can without holding up your online software, then launch it and test some more. There are several ways to test your web-based app โ€” peer review, unit testing, ad-hoc testing, load testing, and good old-fashioned QA. Incorporate some blend of testing techniques into your development routine before you go live to avoid making rookie mistakes. Then let your customers find the more obscure bugs that are more difficult to catch in testing. Embrace the more forgiving iterative process that the culture of online software allows and use it to your advantage to get your app out and improve it with real-time feedback.
Additional resources for testing: PHPUnit, Selenium, pizza, beer and a few buddies with some time to spare.

Get to the problems sooner rather than later

Despite all the testing you can throw at your web-based app, problems are still going to sneak through. I was reading a story about Pixar in a recent issue of WIRED magazine. They talked about the fact that any project is always going to have problems. The trick, Pixar found, was to discover and fix the problems at the beginning of the project instead of towards the end. The same is true for web-based software. To limit your customers exposure to problems you have to find the problems before they do. We do this by using our own online project management software, Intervals, to manage ten years of web design and development work. We are able to find and fix most problems before our customers do because we are intimately familiar with our product.
Additional resources for identifying problems early on: Weekly scans of your error logs, Anticipate customers breaking your software in new and unconventional ways.

Most problems are self-created

Once you do detect problem with your app it’s most likely to be a programmatic one you introduced. Web developers will be inclined to blame the technology. But unless you are developing in FORTRAN, technology is rarely the problem. Switching over to the latest, over-hyped programming language or database is not going to solve your problems. That’s because the problem is likely your code. At the time you wrote it, it may have seemed like a good idea, but now it’s slowing down your software and needs to be fixed. It could be something as simple as a Javascript function duking it out with IE, or it could be a more complicated problem involving a seemingly simple SQL query slowing to a crawl as data accumulates in the database over time. Either way, it’s your responsibility to fix it.
Additional resources for avoiding mistakes: peer code review, an understanding of proven design patterns, committing to your current technology stack.

The database is often the bottleneck

Not only are most problems self-created, they usually come from the database end of the online application. The database is the single most important entity of any web-based application and yet database design and query optimization is one area web developers are least familiar with. As the database grows your web-based software will change its behavior. You need to be ready to get neck-deep in SQL, optimizing and rewriting queries to shave off a few milliseconds. It takes a truly creative mind to devise contingencies for how your app might grow and the problems that growth will create at the database.
Additional resources for freeing up the database: Memcached, PgBouncer, EXPLAIN, a basic understanding of SQL Query Optimization.

It’s hard to find problems before they become a problem

Problems are difficult to anticipate. We design and develop web-based applications to run on servers, but we don’t think like servers do. Problems arise when a machine interprets code differently than we did when we wrote it. The online software you create will be a living entity that does not sleep. Be prepared to be woken up at 3am and wipe the grog from your eyes to fix a few lines of code or a database query that is wreaking havoc on your servers. Be prepared by tracking everything you possibly can and identifying patterns in how your app uses resources. There are great products out there for tracking and monitoring your online application’s ecosystem. Establish acceptable usage patterns and look for exceptions to identify potential problem areas.
Additional resources for monitoring your application: Cacti, monit, Munin

Don’t let your code make assumptions

Frameworks are good in that they decrease the amount of design and development time it takes to get your online software executed and launched. However, they do this by making assumptions about your code so that you don’t have to write as much of it. The fill-in-the-blank nature of frameworks is what will cause you the most problems because it is the part of the web-based app you will be least familiar with. Vanilla SQL queries will become problematic in a production environment, requiring you to get under the hood and replace them with your own SQL specific to the needs of your database. Or you may need to write some code on the model layer of the framework to use up less system memory. The better you know your app, the better you will be at addressing issues that are unique to your app.
Additional resources for writing code: CakePHP, write your own framework, don’t use a framework.

Break the rules. Elegant code is not always the fastest code.

Another benefit of frameworks is that they enforce well established design patterns, which flows well with web designers and developers who appreciate clean and elegant code. Your customers, however, don’t really care what your code looks like. They want a web-based application that is responsive and reliable. There are times when we have to break the rules to make this happen. As a project manager, it is not fun having to twist a developers arm to get them to write faster, uglier code. But a project manager is also an advocate for the customer’s user experience. Web designers and developers need to understand the relationship between their work, customer satisfaction, and ultimately, company revenue.
Additional resources for breaking the rules: Breaking the “rules” of web development.

Response times are the single most important metric

The single most important factor your web-based app will be judged by is response times. If your online software is well designed, beautifully coded, structurally bulletproof, but not fast enough, customers won’t use it (Apple fanboys are the only exception to this rule). Compress and mungify your javascript. Install an accelerator on your servers. Incorporate load testing to benchmark response times. Monitor your database for slow queries and fix them. Do whatever you can to keep making the app faster.
Additional resources for improving response times: Closure, APC, eaccelerator, siege, pgfouine, pg_stat_statements.

Learn as you go

There is no right or wrong way to develop a web-based application. Most of the problems that do arise will likely have already been solved by others, so Google around for answers before slamming your head against the wall. Your online software is going to be unique to you and your customers, which will present its own set of business problems to resolve. Hang in there, give your customers honesty and transparency, and the problems you encounter will be more like hurdles and less like mountains. And if you have any questions about developing any type of web-based applications in general, drop us an email or comment below. We’d love to share more about what we’ve learned over the years. Meanwhile, good luck!

Photo credit: www.free-photo-gallery.org/photos/coffee-stain/

Leave a Reply

Intervals Blog

A collection of useful tips, tales and opinions based on decades of collective experience designing and developing web sites and web-based applications.

What is Intervals?

Intervals is online time, task and project management software built by and for web designers, developers and creatives.
Learn more…

John Reeve
Author Profile
John Reeve

John is a co-founder, web designer and developer at Pelago. His blog posts are inspired by everyday encounters with designers, developers, creatives and small businesses in general. John is an avid reader and road cyclist.
» More about John
» Read posts by John

Jennifer Payne
Author Profile
Jennifer Payne

Jennifer is the Director of Quality and Efficiency at Pelago. Her blog posts are based largely on her experience working with teams to improve harmony and productivity. Jennifer is a cat person.
» More about Jennifer
» Read posts by Jennifer

Michael Payne
Author Profile
Michael Payne

Michael is a co-founder and product architect at Pelago. His contributions stem from experiences managing the development process behind web sites and web-based applications such as Intervals. Michael drives a 1990 Volkswagen Carat with a rebuilt 2.4 liter engine from GoWesty.
» More about Michael
» Read posts by Michael

help.myintervals.com
Videos, tips & tricks