nx-js / framework

A modular front-end framework - inspired by the server-side and Web Components.
https://nx-framework.com
MIT License
467 stars 30 forks source link

Why another front-end framework? #4

Closed hs3180 closed 7 years ago

hs3180 commented 8 years ago

What's the difference between nx-framework and react/vue ?

NetOpWibby commented 8 years ago

Why not another front-end framework? Look at the code, see the difference for yourself.

solkimicreb commented 8 years ago

Hi!

The main difference I believe NX is different from all other mainstream frameworks today in these things:

In a nutshell it is a rewrite of the best old school things with the cutting edge technology to eliminate all the bad and frustrating parts from them.

Some concrete examples

If you have a solid JS and HTML knowledge, you should have very little to learn before mastering NX.

About comparisons in general In my opinion official comparisons are unfair. I will provide tutorial codes of other frameworks written in NX as an objective alternative. You can find my NX TodoMVC PR here.

Most benchmarks are unfair too. If I must I will think about a reasonable alternative. (Just forked some todoMVC benchmarks and all I can say is every single one of them is biased and bull****).

If someone independent feels like it, I would be grateful for some comparisons and benchmarks from them.

Final note for everyone I would love to turn this into a discussion. What are your opinion about NX and the current state of front-end frameworks in general?

smalluban commented 8 years ago

You would like to use data binding in Vue or with React and MobX. You must know that it doesn't work with expando props and getter/setters.

@solkimicreb Can you explain more specific what do you mean? React uses VDOM, so it just takes values from render() method, so it doesn't meter if property is expando or getter/setter.

solkimicreb commented 8 years ago

@smalluban

React uses one way data flow, so data binding solutions started to emerge. MobX is probably the most popular one right now. I meant that example for the React/MobX combo, not for React itself (from my experience React is best when paired with some extras, like Redux or MobX).

Hope this clarifies it.

szkrd commented 8 years ago

I think diversity is good, and it's good to see lightweight frameworks built from the ground up 👍 . Jfyi Vue uses getters/setters and no virtual dom so far, though Vue2 supports both virtual and real - I myself miss the vdom at times, but both has good parts and bad parts too.

You never mentioned in your articles Knockout I think, which has strong ties to silverlight, but uses callbacks, which is the simplest (and most fool proof) method for data binding. Then of course there is dirty checking (A), es5 accessors (V), proxies (NX). I'm not really familiar w ember though :(

lafe commented 8 years ago

I also think that diversity and competition is good. However, I suspect that NX is a little too advanced right now, because it does not support Internet Explorer 11. This is a huge issue, because many companies are still on Windows 7/Windows 8 and will be for the near future and have IE11 as there default browser. So embracing NX will not work if you are a corporate developer in these companies or will be a no go outside of the company (depending on your website/app) because it blocks too many potential customers.

NetOpWibby commented 8 years ago

I have an eCommerce web app that I'd like to use NX with and I'm totally fine with losing potential customers since mobile usage is rivaling or surpassing desktop usage these days, and IE doesn't exist on mobile.

solkimicreb commented 8 years ago

@lafe Yes, naturally browser support is what concerns most people about NX. I did some research and I found that new indie frameworks generally need around 6-10 months to get mainstream and 1-2 years until big companies start using them. By that time IE will be pretty much obsolete I think. I plan to implement this in the future for a (limited) legacy browsers support btw.

szkrd commented 8 years ago

Imo NX should be a testbed for bleeding edge technologies. People can use Vue2, A2, Ember or whatnot for commercial projects - they have a huge userbase and tons of plugins. On the other hand IE 11 has terrible problems under the hood - Edge is pretty good, I must admit, but I still have to fix things here and there (compared to Chrome and Firefox). Safari has very weird problems and lagging support for the newest stuff out there.