nicmx / rdap-data-access-api Goto Github PK
View Code? Open in Web Editor NEWInterfaces a Red Dog's data access implementation should inherit from.
Home Page: https://www.reddog.mx
License: Apache License 2.0
Interfaces a Red Dog's data access implementation should inherit from.
Home Page: https://www.reddog.mx
License: Apache License 2.0
In the mentioned directory "src/main/test" there are some classes used for unit tests, I have 2 observations for this:
Conclusion: if the classes are moved to the project rdap-core the 2nd point doesn't apply (or only applies if there are going to be some test classes for this project), if they are going to stay in this project they could be placed as mentioned in the 2nd point.
Java has a standard IP implementation called User input parsing is being deferred to the model. This goes against every self-respecting software architectural pattern. Parsing and validating user input is the rdap-server's responsibility; please move these validations to the server so implementations only have to worry about data access.InetAddress
. I don't think there is a reason why we should be torturing every single implementation with validating and parsing this string.
I created a class that's trying to implement mx.nic.rdap.db.spi.DomainSpi
. The interface wants me to implement a method called storeToDatabase
.
This looks like rdap-migrator
debris. It has no place in an API called "rdap-data-ACCESS-api". And I get that I can return a dummy value to silence the compiler, but this is bad API design, bound to get in the way forevermore and to annoy our users.
Please refactor all these out-of-place methods out of the way.
The manifest file placed at src/main/resources/META-INF seems to be useless, since it doesn't have any special data/information in it. Beside this, maven adds the default manifest file when the application is built. I suggest that this file shouldn't exist, it should be deleted just to be clear.
Taking this in consideration, the whole folder resources could be deleted since is going to be empty, but of course, this is something to consider by who's going to solve the issue (assuming that my opinion is useful).
This:
public SearchResultStruct searchByName(...
Should read like this:
public SearchResultStruct<Domain> searchByName(...
To prevent users from doing whatever.
Because it's not like we're allowing them to return anything. rdap-server
crashes if it gets something that's not Domain
s.
This was just an example. This issue applies to every use of SearchResultStruct
.
The boxing is inconsistent through the API. Most primitive arguments to the API methods are boxed, but some are not.
The tendency seems to be to box everything, but I find this practice annoying. The resultLimit
argument, for example, is present in every search function, and as such every single search function needs to include a remark stating that null
is not an option by contract. With no gain, as far as I can see.
What is the rationale that led to boxing most of these variables?
Every method in DomainDAO requires a boolean argument named useNsAsAttribute
.
There are several reasons why I feel this argument should be removed from the API:
The nameserver_as_domain_attribute
property should be moved to data-access.properties
and nameserverAsDomainAttribute
should be moved to the SQL provider, as a private member of DomainDAOImpl
.
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.