umm-csci-3601 / 3601-lab4-mongo Goto Github PK
View Code? Open in Web Editor NEWSoftware Design Lab 4 - MongoDB, Javalin, and Angular
License: MIT License
Software Design Lab 4 - MongoDB, Javalin, and Angular
License: MIT License
The seed files in /database/
support seeding the Mongo database for both Unix-like machines and Windows machines, but the README only mentions the mongoseed.sh
Shell script. Students might not be aware that Shell scripts are specific to the Bash shell and become confused when attempting to seed the database on their personal (Windows) device. This is a relatively small issue; I'll open my own PR to hopefully address this.
Our case insensitive queries in the example UserController
code aren't actually case insensitive, which came as a non-trivial surprise this semester. Despite what lots of things say on this Internet, adding "i"
as a Pattern
property like this:
filters.add(regex(COMPANY_KEY, Pattern.quote(ctx.queryParam(COMPANY_KEY)), "i"));
doesn't actually work.
@miiiiip did some digging and shared a solution on Slack, which is to add a ?
in front of the i
:
filters.add(regex(COMPANY_KEY, Pattern.quote(ctx.queryParam(COMPANY_KEY)), "?i"));
I honestly don't get why we need "?i"
instead of just "i"
, but I'm sure it's in some documentation somewhere.
I also tried using the Pattern.CASE_INSENSITIVE
, but never got that to work. I was pushing pretty fast, though, so it might be worth revisiting that. This post on "Case-insensitive string matching in Java" might be a useful resource.
This also should be applied to the iteration template.
We presumably want to upgrade this Gradle and all the other Java-based-labs to the latest version, which is currently 7.3.3.
There was an old PR that I reworked a bit and pulled into main, but neither Nic nor I was completely satisfied that it was done-done. The test that was included in the merged PR used argument matchers and was not quite the same as the other tests that were also updated. It might make sense to look at these closely and see if we can explain why one approach is preferable over the other or at least talk about the differences between the approaches.
There's a Javalin testing tutorial that demonstrates using a library called Unirest to fake the HTTP requests and responses that we'd need to test the Server
class directly. If we added these tests we'd
Server
in the test coverage calculationsIt looks like at some point the docker-compose.yml
and Dockerfile
s for the client and server were removed but there are some other lingering related things that aren't needed.
In add-user.component.html the first line is a commment, with a link to
https://github.com/AngularTemplates/angular-forms-and-validations/blob/master/src/app/form-component/form.component.html
which 404's. But I think this is what it should be replaced with.
https://github.com/AngularTemplates/angular-forms-and-validations/blob/master/src/app/forms/forms.component.html
We could using Java logging tools to provide server side logging. This would allow students to (perhaps) better see/understand what's happening on the server side of their system. This is how "real professionals" would probably do it, but it's not clear to me if it would actually be helpful for the students.
Thoughts?
See the relevant PR in Lab 3 for more on how that went there.
See the relevant PR in Lab 3 for info on how that played out.
We don't appear to use this at all in Labs 2 and 3, but we do have it in Lab 4 and the iteration template. In reading the Internet on this, it feels like we might find it useful to use take(1)
or first()
in all this, but I'm not really sure what the best practices here are.
See this issue in the iteration template for more.
This the same as this issue in the iteration template, which was accomplished in this commit.
To do this I did:
ng add @cypress/schematics
npm uninstall @nrwl/cypress @nrwl/workspace
@nrwl/cypress:cypress
to @cypress/schematic:cypress
in angular.json
We ask them to use MongoDB to compute some summary data, but they have no examples of that in the starter code. We should fix that.
I did this on the intro-to-git
lab and it wasn't too difficult. We should be able to just do the same thing here and we'll be good.
We should debounce the input for age on the user list so it doesn't hit the server for every character input.
They're not horribly wrong, but they don't quite match the current look and should be updated.
I'm not going to leave individual comments for each of them but it seems in many places there are still attributes in html elements for the Angular flex-layout library that was removed. Anything starting with
fxFlex
for example won't be doing anything anymore. This was probably missed in the iteration template as well.
Originally posted by @floogulinc in #55 (comment)
There are places where the selector for flex-layout was replaced but other attributes are still hanging around (not doing anything to help... the freeloaders!). I'm putting this issue here since it came up here, but it might also make sense to refer to it in the iteration template.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.