{'fraction_non_alphanumeric': 0.022713687985654513, 'fraction_numerical': 0.002390914524805738, 'mean_word_length': 5.463320463320463, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards generic representation of web applications: solutions and trade‐offs

Server pages (also called dynamic pages) render a generic web page into many similar ones. The technique is commonly used for implementing web application user interfaces (UIs). Yet our previous study found a high rate of repetitions (also called ‘clones’) in web applications, particularly in UIs. The finding raised the question as to why such repetitions had not been averted with the use of server pages. For an answer, we conducted an experiment using PHP server pages to explore how far server pages can be pushed to achieve generic web applications. Our initial findings suggested that generic representation obtained using server pages sometimes compromises certain important system qualities such as run‐time performance. It may also complicate the use of WYSIWYG editors. We have analysed the nature of these trade‐offs, and now propose a mixed‐strategy approach to obtain optimum generic representation of web applications without unnecessary compromise to critical system qualities and user experience. The mixed‐strategy approach applies the generative technique of XVCL to achieve genericity at the meta‐level representation of a web application, leaving repetitions to the actual web application. Our experiments show that the mixed‐strategy approach can achieve a good level of genericity without conflicting with other system qualities. Our findings should open the way for others to better‐informed decisions regarding generic design solutions, which should in turn lead to simpler, more maintainable and more reusable web applications. Copyright © 2008 John Wiley & Sons, Ltd.