user3160567
user3160567

Reputation: 61

WebComponents App Architecture

I am trying to get my head around WebComponents and Potential Enterprise application architecture options. I went through the videos and articles on the polymersiJS and Mozilla's brick and WinJS. I am mostly looking at these from a packaged apps perspective not just website creation.

I am trying to get a 5000 foot view with out getting caught-up in the fine details. It feels like webcomponents are winforms/vbx/ocx/.net controls redone using web technologies. Am I thinking about this correctly?

Based on the historical perspective, I am thinking potential higher level application frameworks and architectures might be

  1. Event Driven - ( old windows form model, polymerjs samples seems to be using event driven model)
  2. MV*(C) - (guessing AngularJS 2.0 proposed view of the world - use the plumbing from web component infrastructure and create a higher level MVC framework )
  3. MV*(VM) - WinJS seems be going there, they are creating their proprietary controls now, I am hoping they will move to webcomponents as they mature

I am not trying to say these are the only frameworks out there. I am using them as examples think about the impact and future direction for a mental model.

Please help me by correcting my understanding or additional things I have not thought about.

Thanks, Niranjan

Upvotes: 2

Views: 797

Answers (1)

Scott Miles
Scott Miles

Reputation: 11027

This question is very broad. :) Here are a few thoughts:

  1. The core framework is DOM.

  2. Custom Elements are elements. So one can imagine expanding the vocabulary of HTML using Custom Elements without affecting application architecture. This is also the first answer to the question "how do Polymer or X-Tags inter-operate with framework X": if you treat those Custom Elements like regular elements, it can Just Work(tm).

  3. By favoring composition and encapsulation, Web Components generally promotes a divide and conquer approach. This means again that Web Components do not dictate large-scale application architecture. In fact, one could employ various MV* patterns as one composes objects. Iow, compose A, B, and C together into D, now compose D and E together into F, how A, B, and C communicate is internal to D and doesn't matter to F.

  4. Polymer (the Web Components library that I work on) can be thought of as using an MV* pattern. I think MVP is the simplest way to look at it, but it's not the most precise. In this notion, each Polymer element is it's own MVP system: element properties are the Model, element methods are the Presenter, and the DOM is the View. Data-binding and other conveniences blur these lines, but as I say, I'm being sloppy for the sake of brevity. =P

Upvotes: 2

Related Questions