4 ms·
Great survey, very excited to see the results. The option of complexity really spoke to me. If you’re building a small one-off website, then you want something
by SoylentOrange 8y ago
Great survey, very excited to see the results.
The option of complexity really spoke to me. If you’re building a small one-off website, then you want something short of a framework like React, but something more modern than Jquery (manage state, reactive style programming). What can you use?
I feel modern client side JavaScript assumes you’re working on a large, long lived site that you plan to maintain. There’s no equivalent of “I just want to create something quickly for use by about 100-1000 people for a few weeks”
- niyazpk 8y agoVuejs is a good option for lightweight websites. Just include the library as a <script> tag and you are good to go.
- runarberg 8y ago100-1000 people a week seems like a lot. I’m mostly into ”something to impress my friends and forget about in a month” which—in my utopia—would account for the majority of all websites. But when I was most active in having fun building websites for fun and showoff, about 3 years ago, I would use [microjs](http://microjs.com/# http://microjs.com/#) quite a bit. I don’t know if that is relevant anymore though EDIT: Vanilla JS is also a good option and has been getting exponentially better over the years.
- JoshMnem 8y agoIf you're building a content-based site, use a static site generator. If you're building an application that genuinely needs front-end interactivity, then Vue is quick and easy. (See also nuxt and vuepress.) https://www.staticgen.com/ https://www.staticgen.com/ https://vuejs.org/v2/guide/ https://vuejs.org/v2/guide/ https://nuxtjs.org/ https://nuxtjs.org/ https://vuepress.vuejs.org/ https://vuepress.vuejs.org/
- SoylentOrange 8y agoThanks for the suggestion. These sites are usually for quick and dirty prototypes within my company and won’t live very long. They usually have a little client side functionality because that’s what users expect. I’ll definitely check out Vue.js
- spankalee 8y agoWeb Components are really a great option here. You don't need any library to use them, because they're built-in, or if you choose a library, they're very small.
- pjmlp 8y agoFor me a small one-off website means server side MVC rendering with minimal JavaScript (vanilaJS) for the dynamic parts.
- was_boring 8y agoThis is how I coach my team through this: use the right tools for the job. Now what does that mean? Just displaying some data and accepting some input, or requirements are unclear? No js required. Now they want some interaction, like a hover effect? Use vanilla js, jQuery, or plain css. Requirements keep changing and you have more the 25 lines of js? Maybe start thinking about vuejs to enhance the page and using a simple script tag. Starting to have several hundred lines of js and you can't remember where in the file that function is, or you are required to minify? Start thinking of vuejs plus a build tool. Do you need js everywhere? The answer is almost certainly no. Do you need to enhance a page with js? That's about a 50/50. Obviously this is just my advice, but was born from working on small teams, at startups where requirements are often unknown, change frequently, and time to market matters.
- jkoudys 8y agoPlenty who will disagree and say they do want JS everywhere. I can build my dom much more cleanly using nice declarative js than html with all its silly and inconsistent rules, and letting react do the rest. I'm happier writing my style rules as objects, then having emotion apply it to style elements. Much happier using JS for everything than some old html+CSS that uses JS to add a few bells and whistles.
- dagoat 8y ago> html with all its silly and inconsistent rules Can’t the same be said of js? > old html+CSS What’s wrong with html & css being old?
- jkoudys 8y agoNothing wrong, it's just a more common tradition. JS used purely as a declarative language is actually remarkably consistent. And if you have inconsistencies, I'd rather have the same inconsistencies than have 3 different languages to worry about.
- was_boring 8y agoI gave you an up vote, because that's the great thing about this industry -- there are many valid opinions and options for each problem. Its more about balancing tradeoffs then anything else. Mine stems from working in the industry for nearly a decade, and shipping 100% js projects in a variety of frameworks (angular, react, vue and backbone to name a few). Most of the time, but not all of the time, I see iteration and maintenance costs far exceed simpler js enhanced pages. If js everywhere works for you and your team better, then that's what you should do.
- deleted 8y ago[deleted]