Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
He’s not wrong though.
He should still write it though so you can assess his work. Unless you really need him, it’s his problem if he doesn’t get hired. -
@IAmAnIssue Yes he is right. For most common tables there are excellent libraries for sorting/filtering on front-end. The problem is when you are over that scope. Some of columns have user defined sorting order. At this point 90% of common libraries fail. Quick search ignoring accents like “é” and you’ve lost 75% libraries. We work on this project for 4 years, we’ve explored a lot :)
-
@NoToJavaScript makes sense.
Java has a built-in way to sort lists with a user-defined order (have your objects implement Comparable or pass an instance of Comparator to the sort function). So does python (pass function reference to sorted). I haven’t used JS/TS enough to know that it doesn’t have that. Shrug -
@IAmAnIssue Yes, but I was talking about quick search in the results already returned by back end. Thre is no API calls here. Filtering already present data.
We have our custom String.prototype.containsNoAccents. But very few external libraries actually allow to hook up custom compare/search function
Edit : Implementation (TS)
if (!String.prototype.containsNoAccents) {
String.prototype.containsNoAccents = function (s: string): boolean {
s = s.trim();
if (s.length == 0) {
return true;
}
var folded = (<string>this.foldAccents()).toLocaleLowerCase();
var foldedsearch = s.foldAccents().toLocaleLowerCase();
return folded.indexOf(foldedsearch) >= 0;
};
} -
@NoToJavaScript this sorting is backend logic. Why you are putting backend logic into frontend?
-
Where are you located? If you're willing to go remote you can hire top talent from my country with that kind of money
-
@Cultist Ohh ! We only have 2 methods on it ! (These 2 mentioned).
It allows shorter code and it is used a lot ! (basiclly at least 2-3 places on each page)
Related Rants
We are recruiting a front-end developer for 90k/year.
He refused to implement a simple ordering on our test, telling us “There are libraries to do that”. Apparently, TypeScript is not front-end.
Kindoff questioning our decision now.
question