5 ms·
Currently trying to find a new framework to do a front-end with because the company I'm currently interning doesn't allow React :^) Looking at angular code, it
by somerando7 7y ago
Currently trying to find a new framework to do a front-end with because the company I'm currently interning doesn't allow React :^)
Looking at angular code, it's pretty ugly. What would be the next best thing to look at? Vue?
- antjanus 7y agoI personally enjoy using Angular, but yeah, Vue is your best bet!
- brobdingnagians 7y agoI love Vue.js. I've never really caught onto the JSX stuff. If you have ".Vue" files then you get nice separation of the template html, methods, and the scoped styling. The Javascript syntax is pretty straightforward, and the templates just add nice directives like v-if, v-for, etc. I think it look pretty clean and is fairly easy for JS developers to pick up. Integration into a project is pretty straightforward as well. We have a webpack installation that pulls in the Vue files and bundles everything and it is quite clean.
- JMTQp8lwXL 7y agoI've never understood how people view the separation of template, styles, and business logic into separate files as simpler. Now, to work on a single component, I need to open three files in my editor, instead of one.
- Marazan 7y agoIt is an over reaction to bad PHP. Bad PHP pages mixes all kinds of shit together. This leads to the thought that to do it 'good' everything needs to be seperated. It's a wrong thought but I see how people got there.
- brylie 7y agoThe "separate files" argument is a red herring. It is really about separate "mindsets" or "modes of thinking". In effect, JavaScript logic tends to be procedural/imperative, while templates allow declarative semantics, and styles are nearly a 2.5D constraint language. "Separation of concerns" here means only having to think in a particular mode, rather than blending all of those modes of thought into a single eyespan. Notably, Vue allows for single-file components, while preserving the familiar and intentionally designed separation of declarative (HTML), imperative (JavaScript), and aesthetic (CSS) code.
- JMTQp8lwXL 7y agoI don't see how separate files forces you to think differently. It might aid in that effort, but it likely doesn't force it.
- gorbypark 7y agoIn vue (or atleast the way the majority of people use vue), each component is separated into a .vue file. That component's template, style and business logic is all encapsulated in that one file. A basic .vue file starts out with <template></template><style></style><script></script>. It keeps everything nice and simple, in my opinion. Each different "mode of thinking" is separated out, but still all together in one file.
- dirkg 7y agoVue's 'separation' is a myth. I don't know why people keep believing that separating templates and js is a good thig. Pete Hunt addressed this in the React into videos he did - you want 'separation of concerns', not 'separation of technologies'. React does the former. Vue/any other templating engine does the latter.
- jacobsenscott 7y agoWhy don't they allow react? One reason I can think of is they have a server side side rendered architecture and they want people to continue to use that. They don't want new devs to use company time to buff their resume with unmaintainable learning front end code. At least that's why I generally shoot down attempts at using FE js frameworks over here. We have some really awful react 0.11 pages that are years old that will take weeks to redo properly. Anyway, my point is you might want to check if it is okay to use any FE framework at all. It seems like a very strange policy to say "you can use any FE framework except React". But if you are going to do this use Vue.
- somerando7 7y agoLegal reasons.
- rhinoceraptor 7y agoThe patents issues was FUD, but now it's completely irrelevant, the patent clause was removed a while ago.
- Stratoscope 7y agoThey allow you to use anything you want, as long as it's not React? I am very curious about this kind of decision. I realize you may not be able to share details, but whatever you can share would certainly be interesting.
- somerando7 7y agoProbably not WHATEVER, but what's approved by legal. React currently isn't because of the license/company that owns it I believe.
- acemarke 7y agoWell, the _license_ certainly shouldn't be an issue at this point. It was changed to a standard MIT license a couple years ago, same as all the other major JS frameworks. If your company has issues with React being developed by Facebook, that's an entirely different question.
- Cederfjard 7y agoThere was a license controversy a couple of years back, yes, but that was solved rather quickly - I understand that you as an intern don’t necessarily have any sway over legal, but they’re not up to date.
- JMTQp8lwXL 7y agoMy company permits Vue and Angular, but not React. It isn't based in legal reasons, though.
- rhinoceraptor 7y agoWhat about Preact :)
- lacampbell 7y agoGreat suggestion. Preact is only 3kb so your users will appreciate it too.
- edoceo 7y agoThrow RiotJS into your eval queue too - I like it a lot
- spankalee 7y agoCheck out web components with LitElement and lit-html. You get a very React-like experience with components and functional templates in JS, but it's all standard JS, and there's no framework, just standard web components. The lock-in and risk is very low for enterprises.
- folkhack 7y agoWent down this rabbit hole yesterday and played with LitElement/lit-html for the first time... great experience for folks who don't want much "ceremony". Was also SUPER impressed with AppRun. The more that I depart from my "bare metal" web tooling the riskier/dumber things get. I always want to see a path back to a basic HTML5 shell, driven by almost-pure JS (w/tiny helper libs), and basic CSS. Just like basic UNIX tooling - basic web tooling just works! To those thinking about trying lit-html; it IS as simple as the example on the GitHub project page. I was able to build it into a semi-complex application within a couple of hours and it had massive performance payoff w/o compromising how I want to build things. It definitely gets my "KISS" approval stamp.
- madhadron 7y agoVanilla JS with a good understanding of MVC serves quite nicely in most cases. I wrote a few introductory programs to clarify it (https://github.com/madhadron/mvc_for_the_web https://github.com/madhadron/mvc_for_the_web).