5 ms·
IMO because of the poor building blocks of web dev (we are trying to build applications with document markup) things that should be simple are too complicated.
by simion314 7y ago
IMO because of the poor building blocks of web dev (we are trying to build applications with document markup) things that should be simple are too complicated. As an example say I give you an url that will respond with a json of an array of persons and you want to view this json in a table( just view some raw data, I do not want fancy themes or features).
So if we ask web developers how to solve the above problem we get at least 25 different ways to sovle with with JS , and some other 25 ways if we use some backend PHP,Python, Java. If you ask some Qt/Flex developers you will get the same response, Drag and drop the DataGrid and set the data
source to your data (and you get a ton of fancy features like adjustable columns, sorting,,,) and you don't have to install 300 dependencies.
- mattlondon 7y agoBut Qt/Flex is just one way of building desktop UIs :) Comparing the entire gamut of web development against a single library seems unfair. What about asking the same question of .net developers, VB classic developers, golang developers, electron developers, python developers, Java developers, c++ developers, swift developers? They'd all do it differently than QT developers would because there are different GUI frameworks that need to be used. This problem is not unique to web dev.
- simion314 7y agoI am not sure is true, For example the .Net Windows Forms have a DataGrid widget that works exactly the same , the only differences between competent GUI frameworks is that Widget names and functions might differ. so in summary in any GUI framerwork the reaponse is the same drag the DataGrid and connect it to the data(the names can differ), maybe some Delphi,GTK,JavaFX,WPF devs can confirm or disprove me.
- mattlondon 7y agoI think you are ignoring a lot of the complexity and assuming it is trivial in desktop GUI development, but complex for web development. I do not think this is the case - e.g. just look at the two different options just for Java (Swing vs JavaFx): https://docs.oracle.com/javase/tutorial/uiswing/components/table.html https://docs.oracle.com/javase/tutorial/uiswing/components/t... https://docs.oracle.com/javafx/2/ui_controls/table-view.htm https://docs.oracle.com/javafx/2/ui_controls/table-view.htm This is not just dragging and dropping some common component - each thing is implemented differently, and so has a different API to control it (and require huge tutorials to work out how to use them) so everyone has to do it differently. They're not just different APIs to the same underlying OS-provided control. A Java Swing developer will not just be able to do the same thing they always do just in Qt, TK, Wx, WPF, WinForms, Gtk etc etc etc - it is still totally different. Sure the .net languages are all the same (i.e. same API ... but then do you use WinForms? WPF? Gtk#? others?), but there is more to GUI development than .net.
- simion314 7y agoDo you think if I ask how to solve this problem with angularN I get 1 response like I get with Qt? I think I will get still at least 5 responses, one on how to implement it from scratch, other how ti implement it from scrratch but using a different abstraction, other how to wrap X jquery library in angularN, other on how to use the existing wrapper for the jQuery library, other on how to use a pure angular library, probably some response would say to just buy something from X and at least get a working thing etc. Replace angularN from above with React or even better Vanila? Make an Ask HN if you want on how to solve the problem with Vanila + vanila library (optional) and make a new question on how to solve it with Qt or WPF (optional with libraries) , as optional ask for sane funtionality like resizing columns, sorting data, re-arranging columns and performance when displaying more then 100-1000 rows.
- prox 7y agoAs a webdev, that is actually the beauty of the web, you get to solve / create / build in all these ways. Neither are wrong. Another point I really like is that I can view a webpage from the 90’s and it will look fine (maybe not great) And there are frameworks, platforms and plugins which allow you to do what you described without little coding. You can go up and down on the stack, switch stacks and still get to the same end result.
- simion314 7y ago>you get to solve / create / build in all these ways. Most of the time your solution is broken. Some examples I hit recently from giant companies, the PayPal amount input keyboard handeling is broken (Del button was not working), Youtube search inpout with it's dropdown can get stuck open and you are forced to reload the page , when you re-invent the wheel you probably are skiping or gorgetting to implement everything so your custom popup might appear outside the screen, or it does not implement Tab ordering correctly or is not accessible, or is not navigable with arrow keys etc. Where in other GUI frameworks you use the built-in one and on top of that all those GUI framework will let you provide/override a custom Paint function if you want (on top of existing customization) so you are not limited either in any way.
- TeMPOraL 7y ago> And there are frameworks, platforms and plugins which allow you to do what you described without little coding. Name three. I'm not joking. I'd love to know about a data table library that meets following requirements: - Doesn't commit me, the user, to one of the infinite combinations of ridiculous JS build chains. Instead, it should be accessible as a single-file JS dependency in transpiled form. It may use a ridiculous JS build chain for building itself, but I don't want to care about that. - Doesn't commit me to one of the few big JS SPA frameworks (which each comes with its own combination of ridiculous JS build chains). I want a table, not the kitchen sink, and definitely not the whole meat processing plant. - Doesn't commit me to particular styling. - Can handle thousands of rows on a single page. - Has the most basic ability to: sort each column, and sort by multiple columns. - Has the ability to do a per-column search across all data (that all matters if it paginates the data) - Doesn't interfere with browser search, and/or allows a full-table search on all data if paginated. - Has the ability to filter out ranges of values. Bonus points for extra type-specific affordances. - Bonus points for the ability to dump its contents into CSV (file or clipboard). Though this could presumably be handled with a small amount of code on my side. - Extra bonus points: has some minimal pivoting ability. I haven't found any meeting these requirements, where IMO these should be the default (and if browsers are ever going to standardize on some data table implementation, I'm going to petition for all of these to be included).
- at_a_remove 7y agoYes. I think I was first paid for a website I developed around 1997. As I continued along the path, it was clear that we're trying to implement a kind of remote generic programming environment on top of systems that were not originally designed as such, and that this happens on almost every level. HTML, at heart, is still a markup language designed to separate a stream of text into semantics and display them. CSS ... I am not even going to go into my feelings about CSS except to say that it suggests that people who look at design principles like C.R.A.P. were not near the discussion and were not in the room for some time. A programming language named after Java, in which it no way resembles, that had to be pushed out in almost no time at all given the irrational deadlines, dominates the landscape ... and we must transpile to it. And we're pushing video over HTTP. All of the first-mover advantages have locked us into this path and many very intelligent people are busy using their prowess to perform work under some very arbitrary conditions, like not being able to use the letter "e" in writing. While it is a challenge and stretches the abilities, no respite is offered, and so there's a tremendous amount of waste occurring as these initial conditions, propagated down through time, must be constantly worked around.