|
本帖最后由 black_zerg 于 30-9-2013 15:08 编辑
I don't agree. I would prefer HTML is HTML, CSS is CSS and JS takes care of dynamic logics.
The fact that Jquery is so popular has proved that we can create sophisticated apps without fancy data-binding or in-line tags. and in most really life cases, people are quite happy about that.
Let s look at the problem at a higher level, the view is supposed to be isolated from the 'domain logic' or 'binding logic'. I don't see why having ugly tags in html is a good thing. I was never a fan of struts, webwork or JSF, and so happy when I found AJAX makes life so easy. Now I see people are bringing these old clumsy designs to JS world, just makes me sad.
'two-way-binding是必须的,只要有UI录入,你必然不可避免这个逻辑的存在'. That is a good point. I would agree there must be some glue logic to fetch data from server (Model), then populate them to HTML DOM tree(view). In MVC, the logic is in controller; in mvp, it is in presenter; in MVVM, it is supposed in ViewModel. However I would suggest the 'GLUE' logic needs to be inside code as we can't guarantee the fancy background magic always fits the needs. because the 'glue' logic are not always the same.
Still, I am very interested in your project. Maybe you can explain your idea from a high level when you have time.
As I said before, my experience about 2 way data-binding is normally it makes simple things easy and difficult things impossible. And since it is a 'framework', during project development, you can't simple stop using it when the framework doesn't fit the need, doesn't improve productivity or becomes a burden. Then the team will have a long and painful fighting with the framework until everyone is exhausted. |
|