by ilaksh · 14y ago · 0 comments
Those frameworks are great, but they all fail to take advantage of a key advance in software development: the widget.
Reusable, composable GUI components that package front end and back end files together and can be distributed easily as plugins are the next step up in abstraction and superior from a software engineering perspective.
The reason many web developers aren't able to either grasp or accept that is because A) understanding and building those types of components that are truly generic enough to be applicable to a wide variety of applications as well as reusable, has a significant learning curve and is time consuming and B) the better you are at it, the less likely you are to get credit for your programming skills, because unfortunately if you can build an application without typing colorful ASCII text, then you didn't do any programming and aren't a programmer.
To get past B) we just need to redefine what programming is, and also grow up a little. Also realize that even if you are programming with GUI components, you still have to create new components sometimes, so you are still programming and still a programmer.
I have a very early rough draft system that I am throwing together on my own, mostly because very few people seem to be able to appreciate these concepts. Or the ones that do are happy to use existing systems like ASP.NET or WordPress.
https://github.com/ithkuil/cureblog
https://vimeo.com/43784316 Note that I have modernized the interface somewhat since I made that video.
It's an attempt to standardize widgets at the browser level. Really cool stuff.
It's based on ShadowDOM, which is an encapsulation notion: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shado...
There are a few polyfills for playing with web components, such as Mozilla's http://x-tags.org/ and http://html5engineers.com/projects/playing-with-web-componen...
Also some of the frameworks do have a "widget" or "component" notion. For example, see "Create Components" at http://angularjs.org.
Also the strong separation and lack of cohesion between the front and back end systems is a severe limitation.
That belief is more a result of where we have been than on a logical assessment of where we are now.
If your back end team is separate from your front end team, programming in a different language, building a codebase to support multiple departments or multiple third-party integrators with a single web API for a one-of-a-kind world changing application running primarily in HTML browsers, then it may not make a lot of sense to try to package together the back end and front end code the way I am suggesting.
However, if your goal is to create an easy to use desktop-like website/web application building/editing experience that maximizes code reuse across applications (built on the same framework) on a Node.js/WebSocket/MongoDB/HTML5 stack, however, then my approach with packaging the back end code along with the front end code makes more sense. Yes, you may need to add a REST API on top of the back end if you need that.
If you can create a website from scratch. Using widgets in place of custom code is a waste of everyone's time, including the person who is going to extending and maintaining that application.
[1] I know some JavaScript lovers are convinced that client-side rendering is better than server-side even for non-SPAs, but I'm of the rather strong opinion that they're wrong. For non-SPAs that are sufficiently complex, the sexp model of server-side rendering in Clojure, Common Lisp, and Racket produces applications that are so much more concise than their client-side DOM-manipulating equivalents. For the few sites small enough that the overhead of macro writing/bottom-up development outweighs productivity gain, rendering HTML in Rails or Django is probably better than an all-JS approach.
In my experience, widgets generally end up in the second category. This is also shared by people generally looking down on things like drag and drop development. Obviously nothing is going to be faster than dragging the complex control someone wants to use into an HTML page and clicking deploy. The problem is that it is almost never the case that the user or your needs are met by the default setup. Then you start configuring and customizing the control. Developers often spend more time configuring and hacking these widgets than it would take to write something that exactly met their needs.
I think that there may be a few full-time professional Swing, WPF, ActiveX, Wicket, Flex, ASP.NET, Sencha, WordPress, etc. developers who would disagree with you.
That said, there are no doubt good examples using those technologies to do useful things. I am not arguing that widgets make it impossible to create useful things. I am arguing that widgets by their very nature limit what the developer can do. At best you get indirect access to things you need (Application state, Database, etc...) and often times you have no access.
They are the worst form of abstraction. Extremely easy to do one thing. Hard to customize and nearly impossible to do something unintended.
I think that it isn't that hard to have a difficult experience with widgets, but that doesn't invalidate the model, and not all component frameworks are alike in regards to things like ease of extension/modification etc.
* [1] : library based on the author's definition and framework based on sencha's documentation.
* [2] : the learning curve is steep even for experienced javascript developers.
edit: I just had to fight the * * *
We had a few of the Enyo engineers up at Throne of JS, but we didn't get a speaking slot. Maybe next time.
The reason is simple: they have already been burnt and know better.
If the choice is between Meteor and my system, I would choose my system, of course (although I may be biased and honestly my system has a month or two of work left before its really ready for release). Whereas Dojo Widgets (for example) are only for the front end and designed to look like a desktop application, my components include both front end and back end code, with automatic database wiring, and the widgets are set up so that it is easy to customize their appearance.