Architecture evolution from knockout to angular

Source: Internet
Author: User
Tags silverlight

2008 The first time you've used the MVVM pattern in WPF, you've been passionate about coupling isolation, modularity and refactoring, UI and logical separation, unit testing, and later domain models. When it comes to the MVVM pattern, you've developed a framework, but without long-term updates and maintenance, you've been using prism and MVVM light. By the 2012, seeing the HTML5 of the big line and the decline of Silverlight, decisively put the main energy into the development and research of ASP. NET MVC and Knockout, although knockout is easier to use and convenient But there's always a feeling that there's no use of MVVM in WPF and Silverlight.

Wpf/silverlight

Web

MVVM Framework

· Prism

· Mvvmlight

· Caliburn (Caliburn.micro)

· MVVM Helpers

· Cinch

· Mvvmfoundation

· AngularJS

· Knockout (or use Durandal)

· Backbone.js

· Ember.js

· Epitome

· Agility.js

Despite the subsequent attempts at other frameworks, such as the implementation of the SPA through the Durandal to make me before the knockout of the various inconveniences, but still have some shortcomings, until now use angular, especially angular + typescript found all the problems are no longer exist.

(The biggest problem with Wpf/silverlight is that it's hard to recruit the right people to do art and design, because few people specialize in blend and XAML research, but now use the web to find that resources are plentiful, whether it's human resources or the open source community)

Function

Wpf/silverlight

AngularJS

Ui

Xaml

Html+css

Design Tools Design/blend and Visual Studio All Professional design Tools

Control templates and custom controls

Control Templates or Custom control

Custom directives (Element)

Animation

System.Windows.Media.Animation

CSS3 animations and/or JavaScript via Nganimate

Styles and templates

Xaml/resources

CSS3 and less

Style inheritance and correlation

Implicit Styles and/or BasedOn

Less mixins

Conversion and filtering

IValueConverter

Filters

Binding model to UI

ViewModel and DataContext

Controller and Scope

Service Reuse

Prism Service Locator

Custom Services/service Factory

Event

Routed Events

$emit and $broadcast

Modular

MEF and/or Prism Module Catalog

Angular Modules

Services

WCF or WCF RIA Services

RESTful Services (accessed via the Angular $http/$resource Services)

Navigation and routing

Urimapper

Routing

Internal component communication

Prism Event aggregator or Messager

Shared Services

Video

MediaElement

HTML5 Video Element

Run out of browser

Yes

Yes, via Chrome Apps

Encapsulating UI Logic

Behaviors

Custom directives (Attribute)

UI and Logic separation

Control or Data Templates

Css/less

Cross-Domain requests

Access-policy

CORS

One-way data binding

Bindingmode.one

Ng-bind

Bidirectional data binding

Bindingmode.twoway

Ng-model

One-way data source binding

Bindingmode.onetime

Ng-model

So now adjust the architecture from knockout to angular and use the development of the new project, as follows:

So far, have not found angular have any big technical problems or performance problems, if there are angular project experience friends, may wish to comment on the discussion, Learning mutual encouragement!

In addition, many people send e-mails asking if WPF will die like Silverlight, which is a difficult question to answer, especially in the current Microsoft-led development environment (HTML5 is much more prevalent than Xaml,ios and Android's Big line and windows Phone's tepid, the fate of Windows is not yet known), may not even Microsoft itself can not be a good solution to this problem, so it is only by the market and time to slowly decide.

Architecture evolution from knockout to angular

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.