11 ms·
Open-sourcing the Lightning Web Components framework
- tvphan 7y agoHow long has this been around? I had to recently build a React app for Salesforce and I had to set it up as something called a Lightning Container Component, which was pretty much a glorified iframe.
- vips7L 7y agoI think LWC has been GA for ~6 months. It is leagues better than the old Aura components.
- EGreg 7y agoWhat is the point of this? Where are the examples?
- mariocesar 7y agohttps://lwc.dev/guide/ https://lwc.dev/guide/
- megaman821 7y agoI only know because I happened to be looking at this yesterday, but stopped since it wasn't open source. https://developer.salesforce.com/docs/component-library/overview/components https://developer.salesforce.com/docs/component-library/over...
- vips7L 7y agohttps://lwc.dev/guide/introduction https://lwc.dev/guide/introduction
- sdegutis 7y agoTheir home page says: > Lightning web components are custom elements built using HTML and modern JavaScript. > The Lightning Web Components UI framework uses core Web Components standards and provides only what’s necessary to perform well in browsers. Because it’s built on code that runs natively in browsers, the framework is lightweight and delivers exceptional performance. Most of the code you write is standard JavaScript and HTML. > Build apps anywhere, any way. You can build an app with your favorite tools, like Webpack, TypeScript, and Babel, and run it on Heroku, Google, or anywhere else. You can also package an app to create a desktop experience in Electron. Which I think is equivalent to just saying this: > Lightning Web Components is a lightweight, cross platform, and framework-independent web components library that builds on the native Web Components standards to add some convenient functionality.
- elfogris 7y agoBeautiful as well :)
- elfogris 7y agoThe main website is here: http://lwc.dev http://lwc.dev Some examples here: https://github.com/trailheadapps/lwc-recipes-oss https://github.com/trailheadapps/lwc-recipes-oss More coming soon :)
- drudru11 7y agoLooks interesting. It would be cool if there was a list of components and live running examples.
- etchalon 7y agoI have a hard time getting excited about a framework whose announcement post fails to do something as basic as ensure their images resize on mobile.
- pcurve 7y agoI couldn't believe my eyes but you are right.
- elfogris 7y agoWe will work with marketing to fix it. Hopefully http://lwc.dev http://lwc.dev works better, but any feedback is welcome :)
- lucasverra 7y agoNow there are way to small on desktops :( https://drive.google.com/file/d/1V9qB8V9RcTQ9h-Og4YAIao8FOFeGtN5I/view?usp=drivesdk https://drive.google.com/file/d/1V9qB8V9RcTQ9h-Og4YAIao8FOFe...
- dmix 7y agoMarketing needs to have a web developer on the team. Can't leave this stuff to the sales guys.
- moocowtruck 7y agocan you ask marketing if they can just remove salesforce from my company
- ci5er 7y agoDo you have a CRM that you prefer? Back in the day when SFDC took off like wildfire, the choices were essentially Oracle and Siebel (who came from Oracle, just like Benioff did later). Unlike the top-down Enterprise sales approaches of Oracle and Siebel, there was a fair amount of bottom-up marketing/sales effort targeting individual sales people who could put $20/month on their credit card and expense it (regardless of what their retcon'd history book tells it). I guess that these days we have NetSuite (Oracle, again) and HubSpot. Are those any better?
- getpolarized 7y agoI don't understand the goal of this. Is it to replace React/Angular or are these components like tree controls, tab controls, etc?
- megaman821 7y agoIt looks like it is a set of components and helpers for building components of your own. The good thing about Web Components is that they are reusable across frameworks. You don't need jQuery-picker, react-datepicker, and vue-datepicker just <my-datepicker /> and its reusable anywhere.
- danvasquez29 7y agoI work in an org that is looking to provide a lot of the same experiences both within salesforce and outside of it, and I'm looking at this make sharing those components easier. Imagine if you have a calculator and it could be used by both your client relations team (working in salesforce) and on your retail-facing web site. right now we write two UIs and hook them up the same service. now maybe we get to write one UI.
- deleted 7y ago[deleted]
- erikrothoff 7y agoLooks a lot like Ember and their Glimmer.js components system.
- elfogris 7y agoCertainly Yehuda from Ember had some influence on us :), so as many others like Richard from Svelte or Evan from VueJs. A lot of good conversations happen within the last two years to be where we are today! Hopefully some of our solutions and ideas will help improve the ecosystem.
- miloandmilk 7y agoA lot of Salesforce sites use react - including: https://status.salesforce.com/ https://status.salesforce.com/ and ironically: https://www.lightningdesignsystem.com/ https://www.lightningdesignsystem.com/ Why do they insist on forcing their framework of the week on their dev community and make it much easier to bring your own framework? NIH syndrome? Lock in? We use react and visualforce to get our products built but the visualforce requirement to do so is sub optimal.
- pjmlp 7y agoI guess because React insists on going against WebComponents, while everyone else is adopting them. At least that is my understanding from Angular, Vue, Ionic, Svelte and plain VanilaJS point of view.
- hajile 7y agoReact can be used with web components if you want. https://reactjs.org/docs/web-components.html https://reactjs.org/docs/web-components.html The big issue is browser support. According to caniuse, IE and Edge simply have zero support while Opera and Safari have only partial compliance. The current Firefox ESR doesn't support it either (behind a flag). The polyfill incurs a big performance hit and a lot of devs need to support those browsers for several more years.
- pjmlp 7y agoEdge support is perfectly fine, and it is going to be replaced by Chrome anyway. Firefox, Safari and Chrome based browsers are perfectly fine. Opera is based on Bink nowadays. ESR is not something that I regularly see in the wild. In any case, I was speaking that only see this anti-WebComponents attitude in the React community.
- vetinari 7y agoSafari doesn't support customized built-in elements, at all, and isn't going to. That is pretty far from being "perfectly fine".
- couchand 7y agoI haven't used it, but I'll try to summarize what I know for the folks asking general questions. "The Lightning Experience" generally is a set of related products and tools from Salesforce. It's based on a live-updating model (as opposed to Salesforce's old-style whole page refresh model) and has a new visual and UX design system targeting mobile. They're trying to bring everyone along to their new model, but they clearly understand it will take a while: they've built an experience switcher in the main menu and have invested heavily in adoption tooling. If you want more specific info I'd suggest their training site Trailhead. Here's the Lightning Web Components introduction: https://trailhead.salesforce.com/content/learn/modules/lightning-web-components-basics https://trailhead.salesforce.com/content/learn/modules/light...
- hajile 7y agoThe honest truth is that Lightning Components are just vendor lock-in. Once you buy into lightning, you wind up using their proprietary communication channels and their proprietary component library (which this press release makes clear isn't open sourced). If you want to change backends to something better, you can't because while the backend will port rather directly, the front-end will not. Then there's also the fact (unless things have changed dramatically in the past few months) that writing your front-end in Vue or React will result in much faster UI experiences and finding developers to maintain it will be easier and cheaper (Salesforce devs are generally a bit more expensive).
- vips7L 7y agoI think the honest truth is that the only people going to be using LWC are Salesforce developers on the Salesforce platform, they're already locked in.
- ptx 7y ago> live-updating ... as opposed to ... whole page refresh Does that mean that changes in data on the server are automatically pushed to the client, i.e. if you're viewing a customer and someone else is editing that customer, you will see the data in your view change in real time? Or is it just using AJAX instead of traditional server-side rendering?
- drcongo 7y agoI may be entirely misunderstanding what the point of this is, but wouldn't it be better if they just made their API unhorrible and let people use their own components?
- iagooar 7y agoQuestion for the HN crowd: is your company using, or have you used Salesforce? On what scale? What kind of business? Was it worth it? Did you enjoy the experience? Does it make sense for smaller businesses? I have considered it for my company because it can do some neat things, but I feel a bit overwhelmed by it. Really curious about the feedback.
- couchand 7y agoI've never used it myself (edit: oh, wait, that's not actually true, though it was years ago), so I can't answer some of your questions. However, I have done a fair amount of Salesforce consulting and can give you that perspective. I'll speak in absolutes but I'm sure things are more nuanced. For established companies of a certain size, Salesforce is usually just assumed to be present, kind of like IBM in a previous era. This is mostly because everything integrates with Salesforce, and all salespeople know how to use it. For smaller companies, particularly startups, the ROI isn't as clear. Salesforce is expensive. The CRM that most startups need is marketing-focused, and you probably get one for free with whatever marketing automation tool you use. It's worth it for smaller outfits only if they have a long and involved sales process (say, institutional sales primarily), and perhaps if you are involved in education or a non-profit, since they have programs that reduce the cost in that case. Salesforce out of the box isn't particularly enjoyable to use, but it's learnable and usable. A lot of companies add on cut-rate customizations that end up making things a mess, but that's more a commentary on change management at large organizations than the platform itself.
- ramses0 7y agoFor startups, take a look at "Salesforce Essentials", which is ~$25/mo and allows you to grow into the rest of Salesforce. https://www.salesforce.com/editions-pricing/sales-cloud/ https://www.salesforce.com/editions-pricing/sales-cloud/
- cosmodisk 7y agoTo be honest,I never understood this argument that it's expensive. The enterprise version,which is essentially the bare minimum for any business that is more complex than a lemonade stand, is about $100/month/user. I'm talking about western countries here. If a business can't spend that kind of money on a user,it's time to have a think on whether it needs a CRM software or new business model. Also,if configured well, it can hike up efficiency by quite a lot. We do twice as many booking as we used to do with the team remaining the same size.
- chenster 7y agohttps://vaadin.com/ https://vaadin.com/ has been doing web components for a while now in open source.
- TotempaaltJ 7y agoCan we change the title to something like "Salesforce open sources Lightning Web Components framework"?
- sctb 7y agoUpdated from “Lightning Web Components Open Source”. Thanks!
- mrdoops 7y agoUsing the Lightning Web Components without the Salesforce back-end is a compelling idea. The design system is well tuned for standard business requirements (rich data-tables, modals, forms, etc.). If there's a good story around using those UI components without having to use the Salesforce back-end this could have value. The Salesforce back-end is a scary entity-attribute-value system coupled to an Oracle database on top of a layer-cake of legacy multi-tenant architecture constraints and years of Java/C code.
- davidbanham 7y agoI've done this with the older lightning CSS based toolkit and it was great. The front end was React/Redux and we just wrapped the bits of markup we needed into React components.
- mrtweetyhack 7y agoYep. Let's build for Salesforce and make them richer.
- tvanantwerp 7y agoI (thankfully) don't have to use Salesforce very often. But from my experience, the Lightning Experience always felt non-performant compared to the traditional server-rendered pages. Things always took a noticeable amount of time to finish loading. Even though the traditional interface is, by appearance alone, quite traditional, as least it felt fast. I don't know if Lightning's problems were with poor performing front end code, or poor API performance. But I was always underwhelmed when testing the SPA version of Salesforce.
- hliyan 7y agoI was using SFDC extensively when the Lightning experience first arrived, and my experience tallies with yours. I ended up switching back to the old experience to get my day to day work done.
- tdviking21 7y agoUgh, ya, I had to immediately switch back to the traditional. Lightning was so slow.
- rjldev 7y agoThis was also my experience with lighting components
- nullwasamistake 7y agoThe vast majority of Salesforce code is "legacy", so you don't get a lot of people sticking around that know modern web stuff. I saw the same thing happen at a previous employer. Nobody that knew modern web development would stick around and let their skills rot, so our "new SPA" interface was build by a team that only knows jQuery
- dzhiurgis 7y agoOne of the bigger mistakes Salesforce made with Lightning is moving from purely transactional model to default-cached-no-way-to-purge model. Without letting a single developer to know that they did it, what are the pitfalls or how to disable it (you can't). WRT Lightning motivation, sounds like a much better option would've been supplement older server-rendered pages with some JS, update the stylesheets and make server language more useable. In fact server language is still there, still heavily used and still lacking expressiveness so badly that it's 10x slower to prototype on it rather than client side JS...
- datpuz 7y agoJust poking fun, but I like how the post says "Many features that required frameworks are now standard" then introduces a... new framework!
- kls 7y ago<template if:true={isTrueTemplate}> Sorry been down this road with Angular before, logic in the template is a dumpster fire of a non-debug-able, bad idea.
- jefflombardjr 7y agoSalesforce is brilliant at marketing, I would take this PR announcement with a grain of salt. Lightning was already based on open source software - their Aura Framework. As of March 2019 they decided that they were going to continue to maintain it, but were ceasing to make it open source. You can read the notice here: https://github.com/forcedotcom/aura https://github.com/forcedotcom/aura