6 ms·
http://tjholowaychuk.com/post/27984551477/components http://tjholowaychuk.com/post/27984551477/components Those frameworks are great, but they all fail to take
by ilaksh 14y ago
http://tjholowaychuk.com/post/27984551477/components http://tjholowaychuk.com/post/27984551477/components
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://github.com/ithkuil/cureblog
https://vimeo.com/43784316 https://vimeo.com/43784316 Note that I have modernized the interface somewhat since I made that video.
- jmesserly 14y agoAgree on widgets. Have you seen the Web Components effort? http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/i... 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/shadow/index.html 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/ http://x-tags.org/ and http://html5engineers.com/projects/playing-with-web-components 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 http://angularjs.org.
- ilaksh 14y agoRight, web components and angular js components are an improvement, but they still emphasize manual ASCII coding, which defeats one of the main advantages of GUI components. Also the strong separation and lack of cohesion between the front and back end systems is a severe limitation.
- deafbybeheading 14y agoIs it? One could argue that divorcing widgets from backend infrastructure so thoroughly is an asset.
- ilaksh 14y agoAlmost everyone does argue that.. sort of.. only there usually is no argument. Its taken as a given in most cases. 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.
- vtry 14y agoAngular directive is pure genius. Much more reusable than traditional "widgets"
- lmm 14y agoComing from Wicket, the thing I'm really looking for to make reusable components more possible is a very weak templating system. I want inert, textual templates where literally the only thing they can do is define an anchor point at which the code inserts text, or another component. Maybe I have to write it myself.
- unwiredben 14y agoReusable widgets are the core of the Enyo JS framework (www.enyojs.com) that I work on under sponsorship of HP. We had a few of the Enyo engineers up at Throne of JS, but we didn't get a speaking slot. Maybe next time.
- nahname 14y agoWidgets are expensive to build into a framework and very limited in their application. They only fit the use-case of something that widgets are a core part of (iGoogle/widget pages) or something that is marketed at parttime programmers (Wordpress/blogging platforms). 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.
- ilaksh 14y agoWidgets are very limited in their application? 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.
- nahname 14y agoASP.NET is a nightmare. An absolute nightmare to work with. Sencha (assuming ExtJS) is one of the worst JS libraries you could pick. Not a great deal of experience with the others, so I cannot comment. 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.
- ilaksh 14y agoTo say that ASP.NET is a nightmare.. I just don't think that's accurate. None of the ASP.NET models are my ideal, and there are plenty of things that can become problematic with the different types of ASP.NET development, but that doesn't have to be the case. 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.
- 14y ago
- cutie 14y agoHow about the dojo widgets, do those qualify?
- tmbsundar 14y agoI was about to ask the same thing. How good is Dojo? This seems to be a complete framework with widgets support. How does this differ from the frameworks discussed above? When should I choose one over the other group?
- cutie 14y agoI like it and prefer the coding style to jquery. Unfortunately dojo (and everything else) has been overshadowed by it.
- ilaksh 14y agoHonestly, and this may sound like I am contradicting myself a bit, but I guess what I am talking about is not quite the same thing as Dojo Widgets etc. Its along the same lines, but if you are trying to choose between for example building on top of Dojo Wigets or Sencha and using something like Meteor, I would lean towards Meteor unless the UI you are building looks like a traditional desktop application and has a lot of classic desktopy widgets in it that you can map to the existing Dojo (or whatever) widgets. 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.
- nl 14y agoAngular.JS has widgets, eg: http://blog.angularjs.org/2012/05/custom-components-part-1.html http://blog.angularjs.org/2012/05/custom-components-part-1.h...
- rimantas 14y ago> The reason many web developers aren't able to either > grasp or accept <…> The reason is simple: they have already been burnt and know better.
- krosaen 14y agoIn knockoutjs, bindings (and the ability to create custom bindings) are akin to widgets in they define exactly how view model state maps to and from the dom. I've created a number of custom bindings to bind things like a number range to a jQueryUI slider widget.