arquisoft / agents_i3a Goto Github PK
View Code? Open in Web Editor NEWI3A Agents Module from the Software Architecture course 2018
License: MIT License
I3A Agents Module from the Software Architecture course 2018
License: MIT License
The 27 should be be a dynamic age. Else test will fail when actual time changes as the .getAge()
calculates the age as currentTime - birthday
.
In order to keep things clean please change the master.csv file from the folder in the root directory to the src/main/resources folder.
The new requirements does not longer has users only as actor of the system, therefore I believe the classes should be ranamed.
Also the new specification for the master CVS is different. Therefore at the moment we have useless attributes (Birth, nationality, ... ) on our User class so we should clean them from the sourcecode.
Proposal:
Please, with the previous example of successfulInsertTest
develop and implement the unSuccessfulInsertTest
method.
From the issue #35 we get to the point that we have to update the documentation of the project. Let's make a brain storm on how to do it.
Some JSON fields from the old implementations must be modified or replaced by others in order to match the new requirements.
Old JSON response:
{
"firstName": Nombre,
"lastName": Apellidos,
"age": Age (will be obtained from user's birth date and current time)
"ID": User ID,
"email": email
}
New JSON response:
{
"name": Name,
"location": Coordinates (optional),
"email": Email
"id": identifier,
"kind": agent's kind,
"kindCode": numeric code that represents the kind,
}
Changes needed:
Improve the domain tests so we can ensure the domain works fine 100%.
We should copy last year wiki pages .
Clone wiki pages using sh
When updating the kind of an Agent it is needed to throw an IOException from the domain model package which may not be a very good practice.
A possible solution may be to rethrow the IOException as other exception. However we'll need to figure out where to place this new exception and in which level it is thrown.
The new implementation of kind #14 is perfect, however dealing with files any time getKind() is called may have low performance
Instead it may be done as a private access only field which updates only whenever kindCode is updated (In the constructor and in setKind() )
As shown in the next JSON response the password is shown when shouldn't.
{
"email": "[email protected]",
"id": "45170000A",
"kind": "Person",
"kindCode": 1,
"location": "10N10W",
"name": "Clara Oswin Oswald",
"password": "khZZwjdhWwVbMdmOvz9eqBfKR1N6A+CdFBDM9c1dQduUnGewQyPRlBxB4Q6wT7Cq"
}
For the REST web service that allows to query info about an agent the input must be changed from
{"login": user, "password": password}
to
{"login": user, "password": password, "kind":kind}
Notice that the kind
field is new and its representation is an integer number that represents the agent's kind. The keyword identifier comes from a master CVS file that contains 2 fields separated by commas, where first field is the numeric code and the second one is the name of the user kind. For example:
1,Person
2,Entity
3,Sensor
If the agents kind name changes in the master file the system must be able to resolve the new ones
Agents_i3a/src/main/java/domain/User.java
Line 177 in 7ce6147
Strings like the one before must be externalized to a properties file. Easy one for someone who want to contribute.
In the pull #47 the readme was modified by adding this line:
curl -H "Content-Type: application/json" -X POST -d '{"login":"45170000A","password":"4[[j[frVCUMJ>hU", "kind":1}' http://localhost:8080/user
Please format it between to be like this:
curl -H "Content-Type: application/json" -X POST -d '{"login":"45170000A","password":"4[[j[frVCUMJ>hU", "kind":1}' http://localhost:8080/user
Here is a hint of hoy to do it:
```bash
curl -H "Content-Type: application/json" -X POST -d '{"login":"45170000A","password":"4[[j[frVCUMJ>hU", "kind":1}' http://localhost:8080/user
```
Hey, the feature that allows users to change the password is optional and sometimes fails because the agent stored in session. What if we just removed the feature from now for the first-deliverable version?
From command line tools you can run the module by setting the repo as working directory and running mvn spring-boot:run
. That sentence will bring live the module as if was run from eclipse. Same parameters as in the Working with agents part of the readme.
Notice that #6 that in theory is fix of #5 uses an enum for person entity and sensors, if tomorrow this changes in the cvs file and 1 mean cars is a problem. Fix to be completely live. Each time that is need to get a kind Code look for it in the cvs file.
Example:
public String toString() {
...
"Kind" + CSVFile.getKindForCode(1); // Will return an String containing "Person".
...
}
Ensure that there is no constriction to change the hole cvs file in execution time.
So then this Kind.class does not need to exists.
Added JDoc to the code should be mandatory, i will add it to the existing code but please for new upload add a little of documentation for future developers
The project participants-i2b
seems to be a perfect starting point to refactor and implement the required
functionality of I3A2.
As described during the last lab lecture the team has to select a project from
the last year delivered projects. From there the team will have to refactor and
add a certain functionality so it meets the documentation of the project.
Here is the list of last year delivered projects and their specifications.
Project | Meet Documentation Requirements | Easy to understand | Quality | Coverage | Build | Documentation |
---|---|---|---|---|---|---|
participants-i1a | ✅ | ✅ | ❌ | |||
participants-i1b | ❌ | ❌ | ❌ | |||
participants-i2a | ✅ | ✅ | ❌ | |||
participants-i2b | ✅ | ✅ | ✅ | |||
participants-i3a | ✅ | ❌ | ❌ | |||
participants-i3b | ✅ | ✅ | ❌ |
This will be one of the most important parts of the project, it will define an
starting point for the whole project. From here will begin the refactor and the
new implementation.
Also participants-i3b was
considered and it is a good alternative. But due to its complication and the
resources used was dismissed.
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.