Click here to Skip to main content
13,095,445 members (65,765 online)
Click here to Skip to main content

Stats

16.5K views
17 bookmarked
Posted 27 Apr 2012

Improving Maintainability of Legacy Code With a JSON Architecture

This article details how to make a legacy code base more maintainable by utilizing a JSON architecture.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Sample Page</title>
<link type="text/css" rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.js"></script>
<script type="text/javascript" src="http://beebole.com/pure/wp-content/themes/BeeBole-pure/libs/pure.js"></script>
<script type="text/javascript">
	$(function () {
		var directive = {
			'#FirstName@value': 'firstname',
			'#LastName@value': 'lastname'
		};
		$('form[name=Main]').render(window.parent.jsonData, directive);
	});

	function save() {
		window.parent.jsonData.firstname = $('#FirstName').val();
		window.parent.jsonData.lastname = $('#LastName').val();

		window.parent.saveModule();
		window.parent.closeModule();
	}
</script>
</head>
<body>
<form name="Main">
<h1>Sample Module</h1><hr />
<label>First Name</label><input type="text" id="FirstName" /><br />
<label>Last Name</label><input type="text" id="LastName" /><br />
<input type="button" value="Save" onclick="save();" />
</form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

rcarlson-cayen
Team Leader Cayen Systems
United States United States
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Group type: Organisation

1 members


Cayen Systems
Cayen Systems
United States United States
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Group type: Organisation

22 members


You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 31 May 2012
Article Copyright 2012 by rcarlson-cayen, Cayen Systems
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid