Maintenance Activities on the Sahana Eden Legacy System | Group Assignment

School

Multimedia University (MMU)

*We aren't endorsed by this school

Assignment Type

Individual Assignment

Subject

Computer Science

Uploaded by Malaysia Assignment Help

Date

01/10/2025

Assignment Overview:

This is a group assignment so you have been assigned some tasks. You have been assigned to perform maintenance activities on a legacy system assigned by the lecturer. The legacy system assigned to your group is Sahana Eden and it uses the web2py framework and Python language.

Assignment 1:

Figure: code in items.js before optimization

Figure: code in items.js before optimization

Figure: code in items.js before optimization

Before code optimization:
The code in the budget/item.js file demonstrates the use of an outdated JavaScript environment. This is evident from the reliance on jQuery for DOM manipulation and the usage of an older coding style and structure. Additionally, the presence of //<![CDATA[ indicates the use of XHTML documents, which are not typically used in modern web development.

To improve this code, the goal is to transition it to a modern JavaScript environment. This involves using features like const and let for variable declarations, employing native JavaScript methods to interact with CSS selectors for DOM manipulation, and adopting modern syntax such as arrow functions for cleaner and more concise code. Furthermore, updating the project to HTML5 is recommended for better compatibility and to align with current web standards.

Stuck in This Assignment? Deadlines Are Near?

Figure: code in items.js after optimization

Figure: code in items.js after optimization

After modification:
Hence, I have updated the items.js file to address these issues. Key improvements include caching DOM selectors. Rather than repeatedly querying the DOM with $(“#budget_item_…”), elements are now stored
in variables to reduce the number of lookups, improving performance. Additionally, repetitive code for hiding and showing elements has been consolidated into single selectors or loops, reducing redundancy
and making the code more efficient.

To align with modern JavaScript practices, I have used arrow functions for handling tasks such as toggling cost inputs. Arrow functions are more concise and improve readability, making the code easier to maintain. An error was also fixed in the form submission handling, where the outdated and invalid
event.default() was being used. This was replaced with the correct event.preventDefault() method to ensure proper behavior.

Despite these updates, there are still errors in the modified code. These errors are likely due to compatibility issues where modern JavaScript features are being executed in an older environment that lacks support for ES6+ features. As a result, further modifications are necessary, including addressing any
environmental constraints and ensuring that the rest of the related files are updated to be compatible with the optimized code. This ongoing process will ensure a fully functional and modernized codebase without persisting errors.

volunter management component of sahana Eden

Get 30% Discount on This Assignment Answer Today!

volunter management component of sahana Eden

volunter management component of sahana Eden part 3

Get Solved Your Assignment( variable) and Earn A+ Grade!

volunter management component of sahana Eden part 4

 legacy system Sahana Eden

Answer

UP TO 15 % DISCOUNT

Instant Paper Writing Services by Native Malaysia Writers

Plagiarism Free Solutions
100% Original Work
24*7 Online Assistance
Native PhD Experts
Hire a Writer Now
Convincing Features
Plagiarism Free Report
On-Time Delivery
Native Writers
A+ Quality
100% Confidential
24*7 Online Assistance

Get these features included in Your Assignment

Get Assistance for Assignments, online Exam, and Projects Writing