At my office, we've somehow ended up with a critical graphql server that's written entirely in Kotlin, which is cool but completely impossible to hire for or get any kind of community support for it. It feels like absolutely everything you want it to do, you have to do build yourself, whereas if we'd used a normal off the shelf graphql server it all already exists.
I'm so sick of maintaining old weird forks and unnecessary custom code that doesn't need to exist.
Of course you shouldn't be doing that, is the thing, but that's how most job ads read.
Kotlin is fine, and GraphQL is fine, but when you combine those, you have a very small niche.
GraphQL and (Kotlin or C# or Java or Scala) probably isn't that small of a niche.
Edit: Also, Kotlin does have near total compatibility with Java and can use any Java library (aside from the most magical bytecode-rewriting annotation processors) so I don't understand what you're saying about having to rewrite things that exist.
Recently, I've been spending it on Vuejs/TypeScript (with Go backend) at a company that uses React/TypeScript, GraphQL, Rails/Ruby, and Go.
A 3MB bundle size instead of 1MB does make a difference, and if you're working on the kind of site that relies on conversions/purchases to succeed then you're absolutely leaving money on the table. Not to mention that Google factors in page load time to rankings.
> our UX was worse than our competitors
If your competitor has a < 1MB bundle and yours is 3MB then any user on a low end Android phone is absolutely going to have a worse UX experience. Maybe stakeholders aren't aware of all this. Maybe you should tell them.
It's like all engineering: use the right tools for the job. If low-end Android users are a significant portion of your target audience you have to design your system around that.
SEO. Google also takes into account page / paint times.
These are the things your stakeholders probably don't know about but you should.
It's all about picking the right tools for the job. If low latency is a business requirement by all means don't use a framework.
[1] https://github.com/Kotlin/kotlinx.html/blob/master/README.md
Kotlin solves this by using the programming language for the whole thing, allowing you to extract repeating parts using plain functions as you would with any other code. Of course it's not as well suited as HTML itself for writing HTML, but it might be better than HTML + some template language + some programming language.
Another way to go, to avoid having a mysterious mixture of almost-HTML embedded within some other syntax, is to do what Thymeleaf does[1] and have the template language be embedded inside HTML (rather than the other way around) so that the template file is actually valid HTML.
[1] https://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.h...
I don't do JavaScript professionally anymore, but I've worked with jQuery, BackboneJS, lots of AngularJS, some Elm, some VueJS, and some React, but being the curious person that I am, in search of greener pastures, I checked out Svelte, by first watching Rich Harris' video https://www.youtube.com/watch?v=AdNJ3fydeao on "Thinking Reactivity", then seeing the benchmarks: https://twitter.com/Rich_Harris/status/1200807516529147904, and watching Rich and Dan Abramov spar a bit over their challenges. From an outsider with no skin in the JS game, it is clear that Svelte seems far superior now and into the future...
1. it is a compiler (it's like comparing C/C++ to Python) 2. the joy of out-of-the-box animations that use the GPU in CSS (reminds me of the joy of using jQuery for the first time w/ it's OOB animations) 3. you can drop in any other JS lib (doesn't have to be in a particular JS framework ecosystem) and have it inter-op! This is huge! It's because it's literally like writing vanilla JS 4. no need to learn some new syntax like JSX (not a huge fan)
Just take a peek. If you don't like Svelte, so be it, but at least you know what it is that you don't like rather than turning a blind eye because you don't want to be convinced -- that's tunnel vision.
I was trying to decide between React/Vue/Svelte for a project I started recently, and after having attempted to build to-do apps in each, I landed on Svelte.
You want to turn this into a framework/lib debate? I'm checking out. Angular is popular in the same vein that PHP is popular. People still use it. In fact, CodeIgniter is still very popular. It certainly has some use cases that certainly beat things like Rails, too. I see where you're going with this -- you care about popularity. Got it. Well, Svelte will check out now.
I could care less for any framework. I'm looking for the least friction, highest expressiveness, maintainability, and last, but not least, portability.
I just left a company that did React having spent the last year ripping out Nuclear for Redux and now there are React Hooks and Contexts. Hire massive teams to spin wheels rather than feature development and chalk it all up to tech debt sounds like fun.
WhatsApp would not exist if people didn't use more obscure technologies. 50 person team on Erlang for nearly a billion-user product while some organizations want to run 500 person teams to refactor the code written only a year ago be it Java or JavaScript.
A react app has massive abstraction to render on every frame, Svelte compiles out the framework to render instant straight vanilla js (wins all perf tests).
Pre-compiling allows for beautiful syntax and more flexible app structure, since you aren't limited to the runtime.
SSR and code-splitting are significantly easier and more straightforward.
React is designed for a billion-user site and it shows.
There really is zero cost to pre-compiling except mind-share, and only benefits. Of course an F100 company has many concerns above tech awesomeness, so no judgement on your selection criteria. But I assure you this movement is coming, react/vue/angular will adapt/change and/or people will move to Svelte-like solutions.
You can already see it happening in the article facebook released today [1]:
"By using rems, we can respect user-specified defaults and are able to provide controls for customizing font size without requiring changes to the stylesheet. Designs, however, are usually created using CSS pixel values. Manually converting to rems adds engineering overhead and the potential for bugs, so we have our build tool do this conversion for us."
I highly doubt that one can build a ReactJS app that loads faster than a Svelte one. I encourage you to try and share it. This is coming from someone that is a backend engineer that doesn't really do JS, but have had to for my own personal project and both perf and the subjective bit of expressiveness and joy of writing are important. Contrary to popular belief, people think that Svelte is trading perf for ugliness and lack of expressiveness.
Looking at the framework benchmarks (https://krausest.github.io/js-framework-benchmark/current.ht...), svelte is indeed a good bit faster than React. However, Inferno which takes a react-like virtual DOM approach but better optimised is faster still. So I'd be more inclined to go with that if I were willing to give up the React library ecosystem.
1) Their app is pretty small
2) Their machine is really fast
However, Dan and Andrew haven't actively touched Redux library code since mid-2016. (Dan occasionally drops into an issue to comment, like his suggestion to not ship a `useActions` hook for React-Redux, but that's it.
The _current_ maintainers (Tim Dorr and myself) do not work for Facebook, and Redux has never been a Facebook-sponsored project. We're an independent open source project.
We chat with the React team frequently via Github and Twitter and such, but that's just OSS collaboration work.
See https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet... for more details.
Also same ecosystem story there: redux-saga, redux-form, etc are all low/no budget projects.
But otherwise, I think you tend to be right, in a lot of areas even an extra second of latency doesn’t matter, and more features will move the needle more.
T1's maximum data transmission rate is 1.544 megabits per second. [0] While 3G's theoretical maximum is 21.6 Mbit/s for HSPA+. [1]
[0] https://en.wikipedia.org/wiki/T-carrier#Transmission_System_...
As cloud costs become tougher to swallow, this is going to change.
At a guess, I'd say that a webapp for a financial services company is going to be loaded once then interacted with heavily? Single Page App model. In that instance the time taken to download, parse and execute JS upfront isn't a big deal. Same as Gmail: when it loads, it takes a couple of seconds, then I leave the tab active for who knows how long. Plus in this situation the audience is relatively monolithic: a lot of desktops, and most of them fast.
The problem is people taking lessons learned in that environment and applying them elsewhere. Shopping sites, news sites, essentially anything that people arrive to from a Google search pay a much bigger price for a giant payload. Users can and will leave your site if it's taking too long to load. They'll be running on all kinds of devices, including low-end Androids with very underpowered CPUs.
Whenever I see a site like that implementing a full React page with Redux and who knows what else bolted on, I cringe. It's not an appropriate use of tools. But these days people only look at developer productivity (we can add so many more features so much faster!) rather than focusing on the experience in the user's hand.
I don't think JS will fall out of favor for a long time.
Languages that compile to wasm are unlikely to be competitive until native dom access has broad browser support, which could be years. On top of that, compilers will have to be written to do code splitting and compile times will have to drop.
Languages with strong type systems are unlikely to be competitive because TypeScript is good enough that JS projects are now manageable.
If someone is good at JS why not hot hire him? Wouldn't a professional be up & running with ANY framework you throw at him in a month or less?
But, I wouldn’t work for any company crazy enough to hire me as a modern front end developer.
Tech like Blazor and related asm.js type thinking will eventually replace JS when it bypasses asmjs completely and ships bytecode that the browser executes directly.
I doubt these frameworks will be much different compared to what we are doing today, because we will still need to deal with layouts, alignments, the color and shape and proportion of things, event handlers etc. The usual stuff.
Ragging on React, Vue, Angular is misguided. These frameworks allow developers to write front-ends as if they are applications, because in a lot of cases, this is what the modern "website" really is. They are training the next generation of front-end developers much like how jQuery did in mid 2000s.
Why not use JavaScript itself for this? That is the strategy employed by Next.js/Nuxt.js/Sapper/etc. Your React/Vue/Svelte components are rendered on the server and then hydrated on the client.
Same reason we didn't settle with everyone coding in C. Or C++. Or Java. Or Python.
The web is just a method of distribution. Not every problem or domain takes equally well to each programming model or language. It would be nice to be able to pick a tech stack that works for my domain and the characteristics of my project, rather than picking a tech stack because of how users access it.
Unless the other thing you target instead is similarly well-developed, you're gonna have real trouble with accessibility.
I think you are looking for Nim. It compiles to assembly (through C), javascript, wasm and more.
Start-up times are an issue. But once warmed-up the JVM is very performant provided tuned well.
> Except Java is extremely performant and if your engineering team doesn't know exactly what they're doing there's often a good chance they'll both use more time and create a slower product with a low level language as far as I know.
So agreed that it'll probably take more time if the team doesn't know what they're doing. But as for slower product? Ehh I think that was the point GP was making; Yeah, its' an overenginnered product that results at times, but it's got just enough guardrails that you hopefully just get a slow, or at worst buggy product, versus a product that doubles as a loot box of future CVEs.
There are absolutely times when Java doesn't cut it but at that point your options are getting increasingly limited in many ways: who can build and maintain it, what kind of languages and libraries you can use, the hardware you use, tuning etc.
Leaving bytes and bundle weight aside, in 2020 JS frameworks like React are far and away the best approach for front-end engineering from a large organizational standpoint.
1)Not difficult to hire for. JS frameworks are currently in the sweet spot where they're both widely popular and "cool". Consequently it's not hard to find good candidates. That wasn't the case 5 years ago where React/Angular developers were still uncommon.
2) The HUGE and helpful community of developers. There are so many excellent resources for learning and solving problems with JS frameworks. JS developers are eager to show off on medium and similar sites. I've never seen such a large and enthusiastic community. This will inevitably subside as JS fall out of favor but I hope it doesn't for a long time.
2)Rapid UI development. The JS ecosystem make it easy to build UIs quickly that don't completely suck and look good for the ever-important demos to senior leadership.
3)Opinionated frameworks naturally enforce best practices and ensure relatively consistent architecture. This makes it easy to move engineers from one team to another and make grokking new codebases a lot easier. New engineers are productive quickly and begin creating value for the company. This was not the case with the inevitable jquery monstrosities that resulted after a critical mass of code or # of engineers.
4)Fewer bugs. JS ecosystem makes it very easy to write unit and integration tests.
Companies with IT budgets that are 9+ figures will happily pay for extra bytes across the wire in exchange for those benefits