The most similar javascript framework to Silverlight
I like Silverlight because of the following, in brief:
-declarative GUI language (XAML) -data and command binding -GUI designer -MVVM pattern -strong typed language.But Silverlight isn't available everywhere. I'd like to investigate alternatives which doesn't involve any browser plugin. Basically javascript frameworks with a compiler that compiles from a strong typed language (mostly JAVA) to javascript.
Basically I want to develop "Silverlight apps" without Silverlight.
I know that SL grade graphics and animation is impossible because of the limitations of HTML. But that is not an issue. The point is not about features but development style. One exception is that the resulting UI should be customizable. Not just colors and fonts, but layout and structure. So not all the applications look the same.
I have found two frameworks so far(I've sorted out at least 5):
-ZK - seams the best so far -GWT with UIBinder (new in GWT 2.0), but UIBinder isn't supported in any designer.So...
-Is this a valid ques开发者_StackOverflowtion at all? (I hope so :))
-If it is, which is the best in your opinion? Not necessarily from the two above.I don't think there are really any that completely match Silverlight, but I'd say besides highly graphical apps, you can do almost everything with just JS. You may have to mix and match libraries or develop your own, but here's a few from the top of my head that can do some of what you ask about:
- You can use
<canvas>
tag or SVG to do graphics, for this you can use f.ex. Raphael and dojox.gfx - For UI widgets, there are various libraries like Dojo, Ext JS, SproutCore
- Ext JS has a UI designer tool
- Dojo's dijit templates and Ext JS's components have sort-of data binding'ish features (maybe others too but these I'm familiar with)
- Most libraries (incl. the ones I've mentioned) should have capabilities for animating UI elements smoothly
- As for static typing stuff, GWT is probably your best bet since you actually use Java to write it. Besides that there isn't much you can do - personally I'd recommend (ab)using the JS language's features for what they were meant for, and not attempting to emulate something it is not.
It may take some getting used to since JavaScript is not Java or C#, but I would say that you can develop RIA's very well with it. There are some things you may need to work around a bit due to limitations, but most things are doable and work well in modern browsers.
精彩评论