INFT 2064 Web Technologies Assignment 1
SA Expiation Data
All work is to be done individually and must be your own work. You must not use AI tools, discuss or share your @razor code or LINQ/Lambda C#, JavaScript code with anyone else. You must only submit code you have personally written (with the exception of utilising bootstrap html template examples). If you use resources, you must include direct links to those resources as HTML/@razor comments in the relevant files. In Week 10 you must be able to answer questions about your code and make changes to demonstrate your understanding.
Your task is to complete several web pages to search and view data relating to our SA Expiations database. But let's not leave things to the last minute
This assignment looks into a subset of the SA Expiations Database where you'll be digging through SA’s road rule breaches, turning raw data into something meaningful and interactive. But before you start hooning through code like a car on the open road, let's discuss approach. This assignment isn't a drag race; it's more like a scenic road trip. You'll need to take your time, enjoy the ride, and make regular pit stops to reflect and refine your work. You are expected to work on the project for at least 2 weeks to allow you time to investigate.
Alright, let's talk GIT – or as we like to 代 写INFT 2064 Web Technologiescall it, your “Expiation Logbook.” Just like you wouldn't drive without a license, you shouldn't code without tracking your every move. GIT isn’t just here to keep you in line – it’s your BFF on this journey. You must include a full development history of the project and be able to speak to and modify the code you developed or you will not receive marks for the assignment. Your commits should follow the steps outlines in the weekly practicals as you already know ViewModels and Detail Models along with changes to Views can’t be achieved in a single step. Fortunately, you have already used GIT before to make this easier.
You must have the following level of commits to obtain marks for the assignment:
The Speed Rush: No one likes getting caught speeding! Your commits should demonstrate that you’ve been working on this project over several days. If all your progress shows up in the last hour, it’s a red flag – and you know what that means. Steady progress is the way to avoid any late-night sirens.
Fatigue Avoidance: Trips are always better and more fun when broken up into small steps – we suggest approx. 10 lines of code or less. Complex aggregation queries should be shown as they were developed and not just magically “appear” like a speeder in the rearview mirror. That’s a ticket waiting to happen.
The Red Light Moment: Stopping at a red light is crucial – just like committing every time your LINQ or Lambda query works. Ignore it, and you might just find yourself in a crash when it breaks later.
ViewModel or Detail Model: the moment you create one, commit it. Modify it, commit it. Every time you complete a piece of functionality, it’s like signalling before a turn – let everyone know where you’re headed with a commit and the comment is telling us where you’re going. Skip this, and you’ll be causing confusion (and maybe a few crashes).
The Pothole Repair: Bugs and errors are the potholes in your coding journey. When you patch one up, commit it like you’ve just saved a low profile mag tyre from a nasty surprise. Celebrate the smooth ride ahead with a well-earned commit.
Tasks
A web application has already been created using the .NET Core MVC design pattern containing the Entity Framework and associated database models. Some Controllers and Views have already been created for testing purposes (Home, Offences). The project and Database Creation Script can be downloaded from the course website. Your task is to complete several pages with the necessary layout using the provided models, your own custom ViewModels, Detail Models in addition to, controller, HTML, bootstrap v5.x and @Razor code.
Task 1 [30%]: Ignite Your Search Engine!
For this task you will need to have a Controller Action + View to serve as your Search Starting Point. Start your engines and rev up your data skills! Choose one or more of these options and hit the road with an fast search:
Expiation Categories + Offences
Speeding Categories + Offences
Withdrawn Reasons + Offences
Photo Rejection Reasons + Camera Types and Codes
Local Service Areas + Country/State of Drivers and/or Registration
For this task you will need to implement:
1.A Turbocharged Search:
oLets start with an auto-complete text search or a drop-down list (or similar – see bootstrap doc)
oAdd an additional text search, powered by auto-complete suggestions.
2.A Custom ViewModel:
oTune up your ViewModel like a high-performance engine! Add those all-important decorations/annotations to make sure everything runs smoothly in your view. No ViewBag permitted!
3.A Detail Model:
oAdd a Detail Model that not only shows results but also packs in some serious aggregate stats based on the available data
Task 2 [30%]: Offences on the Radar!
For this task you will need to implement another Controller Action + View to view a more detailed breakdown of data relating to your previous search criteria. This view needs to use the Offences table with Expiations and your search selection from Task 1 to pull in the data and create a more detailed view.
For this task you will need to:
1.Merge Like a Pro:
oExecute precision JOINs between Offences, Expiations, and your chosen table, merging data seamlessly and efficiently
oCreate a search filter to restrict the data displayed and keep the page running smoothly.
2.Custom ViewModel:
oImplement a ViewModel with decorations/annotations to display your data in a pleasing way.
3.Detail Model:
oSummarise your data with dashboard of key insights from a detail model - totals, averages, frequency and more.
Task 3 [30%]: Caught in the Act - Expiation Insights Unveiled!
For this task you will need to implement another Controller Action + View to drill down into the Expiations and pull out the most fascinating stats. For this section you need to:
1.Complex Queries:
oEngage in some serious data interrogation with a complex queries. Craft a queries that goes beyond the basics—whether you’re tracking speeds, fines, or BAC levels, think about things like Min, Max, Avg Speed, BAC, fine amounts, or even the frequency of offences.
2.ViewModel:
oPass your data using a custom ViewModel that allows the user to interact with the data. Show off what you’ve uncovered in style.
3.Detail Model:
oNo aggregate info should be calculated in the View – it’s all to be done in the controller. Demonstrate your knowledge of LINQ and Lambda queries to populate your detail model and expose those law breakers!
Comitting Changes
Committing your progress is as easy as 1,2,3!
If your GIT window is not active, simply go to the GIT menu and select the “Commit or Stash” option.
Then:
1.Name your commit based on what you did
2.Commit the change!
Submitting
Please ZIP your entire contents of your solution folder and upload to LearnOnline. This folder must include your .sln file, your project directory, git directory and git support files as pictured. This is important:
Rubric Marking Guide (per task):
Do not use .Include() in an query except when loading a single related record.
High Distinction (HD):
One or more animated graphs for Each Task: A sleek looking D3 graph (version as specified in practicals) that clearly shows the aggregate information on the graph via axes and either tooltips on the graph or in a sleek compact table format beneath.
Masterful Queries: Your LINQ/Lambda queries are fast, efficient and powerful. Well crafted, demonstrating experimentation with conditional statements around aggregates. LINQ/Lambda queries demonstrate thought and include aggregate and sub-queries to provide additional and useful information.
Top-Tier Presentation: Your views are polished, your models are tight. Use Bootstrap V5.3 perfectly and your work looks consistent and professional.
Meets the criteria of a Distinction
Distinction (D):
Aggregate Mastery: You’ve aggregated data like a pro, custom Detail Models that showcase your skills. Details Models that contain Decorators – including formatting where appropriate. These should be reflected in the Views.
Sleek Queries: LINQ/Lambda Queries are optimised, well crafted, demonstrate efficient joins and aggregate data collection.
page structure shows in-depth knowledge and thought of functionality. HTML is optimised to reduce errors and improve user experience using Tag Helpers.
Meets the criteria of a Credit
Credit (C):
ViewModel Victory: You’ve successfully created and used ViewModels to express your data in the views.
DetailModel: You’ve detailed the car but it has a few dents – solid performer, just a little rough around the edges.
Solid LINQ/Lambda: Your queries are solid, getting the job done and incorporate search parameters and basic aggregate attempts.
Good bootstrap implementation and some investigation of bootstrap documentation. Basic usage of bootstrap utilities. Lambda/LINQ queries acceptable, somewhat optimised. Code quality basic including expected HTML Forms attributes with tag-helpers etc.
Pass (P):
Basic But Functional: Your page loads and searches work, even if they’re just cruising in the slow lane. Basic bootstrap implementation, basic LINQ/Lambda query implementation with ViewModels, very simplistic. Basic HTML and HTML Forms understanding using tag helpers.
Basic Querying: Your queries might be simple, but they’re on the right track.
Fail (F):
Hit the Brakes: The task isn’t complete or functional. Queries may have gone off-road, or the page might not load at all. Maybe the battery was flat. No detailed GIT history as outlined above or unable to explain code and make modifications during in-person assessment.
HTML Validation [10%]
Check that your final generated HTML is valid and does not contain any errors. You will need to run your page, then right click on it in the web browser and select “View Source” to check the html. Images should have custom alt text etc.
Late Submissions
No ifs, ands, or but-the-deadlines. Late submissions will not be accepted for this assignment.
Downloading the Database.
1.Create a new Database in MS-SQL called ExpiationsDB (or similar).
2.Locate the “Expiation DB Scripts” under the Assignment 1 tab.
3.Run the 1_LookupTables.sql queries to generate the lookup tables
> Check the number of records against the numbers published on the course page
4.Run the 2_ExpiationTable.sql query to make the Expiations table
5.Run each of the monthly data queries under the “3_Expiation Data 2024” to load the expiations table with data. NOTE: some of these files are large and will take time to execute. If your computer times out, you will need to highlight 3000-5000 rows of insert statements as necessary and execute them individually to get it working.
6.Run the Index Queries (note that you can choose indexes relevant to the tables you are using)
7.Over the next week, other years of expiations will be added to the list for interest only. As a minimum you need to load 2024 data, but you are welcome to try other data from 2023 etc to test Monthly breakdowns are functioning correctly etc and for your own interest :)