25
Thu, Apr
1 New Articles

7 Best Practices for Business Web Application Development

Web Languages
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Help your business Web app succeed by using standard coding practices and CSS, keeping the site’s purpose top of mind, testing, and fixing errors

Editor’s note: This article is excerpted from chapter 14 of Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript, by Laura Ubelhor and Christian Hur.

There are a number of things to keep in mind to help make your website more effective and productive. Some of these best practices include keeping the site’s overall purpose in mind, using a clear and easily maintained folder structure, and avoiding cutting-edge techniques. This article takes a closer look at these best practices.

1: Focus on the Site’s Objective

When designing your site and Web applications, keep the focus on your business and technical objectives for the website. Don’t add components and content needlessly. A high-quality site should meet the following criteria:

  • Offer site visitors what they want and need.
  • Be up to date.
  • Load and perform quickly.
  • Be easy to use.
  • Be simple.

If your site has too much content, slow-loading pages, is hard to use, does not provide current information, or does not provide what visitors are looking for, not only will visitors have an unfavorable experience, but you will also increase the potential for unfavorable results due to browser differences.

2: Structure Your Site

Keep your site’s file structure simple. Don’t haphazardly structure your site files or use no structure at all. This is especially critical for larger sites, but it is also important for small ones. It is easy to have a Web application’s structure get out of hand and become disorganized. Create a simple site structure to easily organize the components of your site. Use simple, meaningful filenames. For example, if you have a logo image, you might name the file Logo.jpg. Similarly, your “about us” Web page might be named AboutUs.html. Let’s consider a site with the following components: HTML, CSS, JavaScript, images, and document files.

The example in Figures 1 and 2 is simplistic, but the message is clear: organizing your files in a simple structure makes it easier to locate them. If you put all your image files in an “images” folder, then you know any code that references an image file will use the format images/imagefilename.xxx.

C:\BelhurSite

Abc.html

Abc.js

Abc.jpg

BBQ.html

CC.html

CC.jpg

CC.doc

DD.doc

Figure 1: Unstructured site files

ABC.html

BBQ.html

CCC.html

\JSFiles

Abc.js

CC.js

\Images

ABC.jpg

CC.jpg

\Docs

CC.doc

DD.doc

Figure 2: Structured site files

When defining path-naming and file-naming conventions, remember that Windows is not case sensitive, but other operating systems are. For example, Windows would deem \Images and \images to refer to the same folder, but some other operating systems would not.

The design of your site and applications is critical. The more complex your site and applications, the more important it is to have a great design. The time and effort spent up front on design will result in a good end product and will also save you support time in the long run. Incorporate the file-structure definition and file-naming conventions as a part of your development standards.

3: Avoid the Cutting Edge

It can be very tempting to use cutting-edge coding techniques. However, “cutting edge” can also mean “bleeding edge”; such techniques may end up causing unforeseen problems or be difficult to maintain or support. Be careful to choose your coding techniques and tools wisely. Choose proven tools that fit your business needs.

When choosing your Web development tools, don’t reinvent the wheel. Research available tools before committing to a particular tool or set of tools. Also keep in mind the browsers you’ll be developing a website or Web application for, and make sure your tools will work well on all those browsers. Choose tools and technologies with a track record and proven capability for use in Web development—tools like JavaScript, PHP, JSP, .NET, HTML, and CSS. It is likely you’ll use a combination of these.

Do not lose sight of your goal. Code to fit your application requirements, not to use technology for the sake of trying something new. If your company objective is to only use cutting-edge technology, be prepared to spend more time, money, and other resources on Web application development.

4: Use CSS

Use only Cascading Style Sheets (CSS) for layout consistency and put the CSS in files that all pages share. Browsers have many properties whose default values are not defined in the specifications, and these properties can vary from browser to browser. You should, therefore, specify CSS properties fully to prevent differences in browser defaults. For example, default margins and padding are not defined in the specifications and may differ for different browsers; to ensure consistent results, your CSS should set both. Make sure designers and application developers work together in developing the CSS and consider the business application requirements when you create your style sheets.

You might need to use different CSS code for different browsers and possibly for different versions of browsers. You can do this by detecting the version of the browser and coding to point to the CSS file designed for it.

5: Address Coding Issues

Coding errors are one of the leading causes of browser display problems. Making sure your code is error-free can have the biggest impact on preventing problems because of browser differences. Poor code can affect a page’s look, performance, and errors encountered. Poorly coded sites will result in browser issues.

Use well-formed HTML. Tags should be nested properly. No end tags should be omitted. Some browsers will not display your site as desired if the HTML is not well-formed. The same applies to script and program code. You might want to use a code checker to identify and make corrections. Code checkers warn about irregular or faulty code.

Don’t assume there are no coding errors in a page that appears correct. Some errors might not be obvious when you test your work. A browser that does not conform to the standards may produce the wrong results. Some browsers, most notably IE, try hard to recover from errors gracefully by guessing what the designer intended, which covers up errors. Often, the first sign of a problem with your code is that your page doesn’t look right when viewed a different browser or an updated browser. This also applies to Web application programming. Integrated development environments (IDEs) and other development tools like Dreamweaver, Eclipse, Komodo IDE, Microsoft Expression, Notepad++, Zend Studio, and many others can flag or help you avoid errors in your PHP, HTML, JSP, JavaScript, and .NET coding.

6: Use Accepted Coding Standards and Techniques

Every programmer has his or her favorite coding techniques. Whatever your preferred coding methods, make sure you create code being mindful that someone else might have to maintain the application. Following accepted coding standards will minimize inconsistencies in code written by different programmers and will make it much easier to maintain and support the application in the future. This advice applies whether your organization is new to Web development or is experienced. The time spent on standards up front will minimize development and support requirements later.

When creating new pages or changing existing pages, do your work one step at a time, and after each change, verify that the code works as intended. This approach makes it easier to develop and test your work. If a new problem appears, you know that it is caused by what you have just done. Therefore, you only have to review the little bit of work since your previous step. This process is called incremental development. Making massive changes before testing any of them can make testing and debugging a time-consuming and frustrating task.

7: Test the Website and Code

Testing is a critical part of your Web project, just as it would be in any other application development project. This step should not be skimped. The goal of testing is to find any fundamental flaws in the design, to identify coding errors, and to ensure that your site displays as expected for your audience. The test plan should include testing of all pages in your website. If you have a large, complex site, we recommend that you complete the first round of testing after only a few pages have been coded. Initial testing will identify design flaws early on and minimize the time required to address them.

Testing needs to be comprehensive, and testers should try hard to make the design fail. A well-designed test plan will uncover flaws well before your audience views your site and Web applications. Test first with the browser most commonly used by your audience. After you are satisfied with your test results, move on to test the rest of the browsers your site will support. You might want to incorporate the use of automated tools to validate and test your site. As discussed earlier, a variety of automated tools are available, including code validators and checkers. The expense of such tools may well be justified by minimizing coding errors and saving time testing a large, complex site. Testing should not be considered complete until the problems identified have been corrected and retested.

Consider your tolerance for defects. It would be easy to say that you have zero tolerance for errors, but this is not practical, taking into consideration browser differences. If your website caters to a small or informal audience, your bug tolerance will be much higher than if your website represents your company to the public. The purpose and audience of your site will likely provide the key to determining your tolerance for errors and defects. You will have to consider how large an audience you will support and how much expense you are willing to expend to support it.

Make a formal test plan. Use your list of browsers, settings, hardware, and operating systems as a test checklist, as shown in Table 1. Incorporate the test plan as part of your standard development procedures. The test plan should be designed so it can be used for new development and for site changes. The test plan should include a detailed identification of the problems encountered, with planned actions to be taken to correct the errors.

Table 1: Test Plan Support Example

Browsers Supported

Operating Systems Supported

Monitor Resolution Supported

Monitor Size Supported

Connection Speed Supported

Chrome

Windows 8

800 x 600

17”

Cable Internet

Firefox

Windows 7

1024 x 768

19”

DSL

IE

Windows 10

1366 x 768

14.1”

3G/4G Wireless

Safari

Apple Mac OS. 7.0.2

1280 x 1024

18.4”

Satellite

Opera

Windows 8.1

1366 x 768

15”

DSL


Summary

Web design projects have some similarity to traditional application design projects. There is no substitute for good planning, design, documentation, and testing. Developing and following coding standards improves your ability to create functional and easily maintained websites. Be sure to test your Web pages with the most common browsers. Also test them with the most common screen resolutions. We highly recommend using both CSS and JavaScript to extend the capabilities of your website and to make it easy to maintain.

About the Authors

Laura Ubelhor owns and operates Consultech Services, Inc., a Rochester, Michigan-based technology consulting company. She is an author of HTML for the Business Developer (MC Press, 2008) and many technology articles. She also helped write the COMMON certification RPG and Business Computing Professional exams.

Laura has been involved in the Southeast Michigan iSeries User group since 1988, and has served as group president for over 15 years and as lead organizer for the group’s annual MITEC conference. She is also a longtime volunteer for COMMON, the IBM i and Power Systems user group, and has spent much of her career advocating for IT professional education.

Christian Hur is an IT-Web Instructor at Gateway Technical College in Racine, Wisconsin, where he teaches courses in Web Development and Microsoft SharePoint. Christian also manages Gateway’s Ubuntu (Linux) Web server, which runs on an IBM Power 8. Christian has a BLS from the University of Wisconsin-Oshkosh and is an MSCIS candidate at Boston University.

Christian has more than 20 years’ experience in Web development and has built many websites and Web applications using HTML, CSS, JavaScript, PHP, and ASP/ASPX. He has managed dedicated Web servers and maintained websites using various CMS applications. He is also an entrepreneur who cofounded two companies.

 

Laura Ubelhor
Laura Ubelhor owns and operates Consultech Services, Inc., a Rochester, Michigan-based technology consulting company. She has written many technology articles and is co-author of Developing Business Applications for the Web and HTML for the Business Developer. Laura also helped write the COMMON certification RPG and Business Computing Professional exams. She has been involved in the Southeast Michigan iSeries User group since 1988 and has served as group president for over 15 years, as well as lead organizer for the group’s annual MITEC conference. Laura is also a longtime volunteer for COMMON, the IBM i and Power Systems user group, and has spent much of her career advocating for IT professional education.

MC Press books written by Laura Ubelhor available now on the MC Press Bookstore.

Developing Business Applications for the Web Developing Business Applications for the Web
Gain the knowledge you need to build Web browser front-end applications that let users interact with business data.
List Price $79.95

Now On Sale

HTML for the Business Developer HTML for the Business Developer
Learn how to develop and deploy robust, data-driven, Web-based interfaces for your business applications.
List Price $49.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: