|
Helicity posted:Yeah, I was agreeing with what you said - there's no reason to sacrifice sanity when the performance gains likely aren't there. JavaScript VMs are insanely good at optimizing. Also agree on Redux being the poo poo Well then. Let's agree to continue to agree, and I'll work on my reading comprehension in the new year.
|
# ¿ Dec 24, 2015 15:56 |
|
|
# ¿ May 15, 2024 20:43 |
|
kloa posted:I really dislike the look of text-shadow, in an otherwise flat-design, but I can't really find a better way to display white text on a light background, such as yellow. Use a transparent not quite black shadow with 0 offsets and a big blur. Something like rgba(15, 15, 10, 0.5) 0px 0px 6px to start then play with the blur until it looks as least like crap as possible. Then hire a better designer for next time.
|
# ¿ Jan 22, 2016 06:35 |
|
Click Beelay posted:I hope this is the right place, looking for some insight. You are as far from hosed as you can be. Congrats on a job in what i think is a great environment to work on! Here's a couple additional links I found informative useful to go along with sim's list (that egghead course is A++ stuff): https://medium.com/front-end-developers/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4#.tt4ac93bv http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html (I am jealous as well!)
|
# ¿ Jan 28, 2016 15:57 |
|
caiman posted:I'm beginning to hit a pain point with my React project and am wondering if Flux is the solution. I'm still pretty unfamiliar with Flux, so my question here is basically "is this what Flux is meant to solve?" My issue is with the ever growing complexity of passing props down a long chain of components. And then sometimes I have a method in a child that needs to be called from its parent, which I know can be done but isn't recommended. So I begin second guessing my choice of which component should hold a particular state, but moving it will alter the way I call it elsewhere... and my head starts to hurt. Seconding using Redux instead of a Flux implementation. I think there's a bunch of links to other resources (the key one being that egghead video in the first reply to you) posted in the last couple days in here or the JS thread. Lumpy fucked around with this message at 19:00 on Feb 1, 2016 |
# ¿ Feb 1, 2016 18:58 |
|
Anony Mouse posted:So, trying to wrap my head around React + Redux. Saying the same thing as the other guys: don't' use forceUpdate, but subscribe to the store and set props based on it. React-redux makes this super easy and watch the egghead videos as they will show you how it all works from a 'here's how we could do it... Refactor a bit to a better way, oh, and we can improve this here and look, you just wrote react-redux!"
|
# ¿ Feb 12, 2016 06:50 |
|
Came across this article today and thought it would be of interest: "Learn React without React" https://medium.com/@sharifsbeat/learn-the-concepts-part-1-418952d968cb#.kjirx7mxl
|
# ¿ Feb 12, 2016 18:15 |
|
Thermopyle posted:Bookmarking this one. I wish I had something like this when I was first starting out as I always learn faster and better when I've got this sort of overview information. As of the other thing: Whoops! On it...
|
# ¿ Feb 12, 2016 19:09 |
|
Thermopyle posted:Time for my once-every-few-months complaint about modern front-end development. Yep. Working with a startup and did the front-end in React / React-Router a few months ago, and it's working / all is well. After customer feedback and so on, time to make some changes! The other person on the project is going to do them, but got a new laptop.... nothing works. Oh, node is at 5.X and we were on 0.12.x... time to install nvm! Oh, we need to tweak some router stuff... look, the current docs look totally foreign! But like you said, it's the price you pay for choosing those tools.
|
# ¿ Feb 16, 2016 17:19 |
|
abraham linksys posted:fwiw you can get away with using old versions of React/libs if you want, my main project is still on react-router 0.13.x and some old Flux implementation because it works fine Yeah, that's what we are doing (React 0.13, old router, old Alt, etc.) but it's just amazing that as a project that *started* six months ago, if you told someone to read up on React, Router, etc. today, they'd be seeing a whole different world in such a short time.
|
# ¿ Feb 16, 2016 20:00 |
|
Feral Integral posted:Aight I guess I don't really understand what people are really using angular for. In the past I've worked on django sites just rendering jinja templates to set the state of the page, but since this is supposed to be more of app, I'll need elements on the page to be dynamic without having to refresh the page. When this was necessary before, I'd just throw some javascript in the page to do ajax calls and update the page where it needed to be updated. I'm having trouble understanding how to replace this with something like angular, what advantages do I get? Seconding starting with React over Angular if you have no explicit need to learn angular. React, as Thermo said is smaller, in that it's only the view, so you'll get more done faster, and when you are done, build it again in angular to see what's different and which you prefer. React coupled with Redux for state management is really easy to get your head around. Lumpy fucked around with this message at 21:01 on Mar 6, 2016 |
# ¿ Mar 6, 2016 17:52 |
|
Time to play "What stupid and obvious thing is Lumpy missing" react-router version!!JavaScript code:
What stupid, stupid thing have I done? EDIT: As always, when I read my post, I instantly saw the problem! JavaScript code:
Lumpy fucked around with this message at 17:16 on Mar 11, 2016 |
# ¿ Mar 11, 2016 17:13 |
|
Elm has been touched on earlier in this thread, and it was on my //TODO: list for a bit, and I had some time the other day to check it out, and it's pretty drat neat. Even though I don't think I'd use it for anything "real", it's a very, very good way of thinking functionally which has given my lots of "Ah ha!" moments for making React / Redux apps. tl;dr: Elm:Two thumbs up!
|
# ¿ Mar 13, 2016 20:16 |
|
Analytic Engine posted:Thanks, sounds like a good tool for making complicated stuff that's reliabley "80% of the way there" As for "is React Fast Enough" this article: http://swizec.com/blog/animating-with-react-redux-and-d3/swizec/6775 uses d3 for calculations and React to draw the SVGs and it seems pretty snappy. Might be something to look into as well. As for "how to learn React", I'd read the Redux docs / watch the Redux egghead videos. Obviously very Redux specific, but those really get at the way React should work in my opinion.
|
# ¿ Mar 24, 2016 17:25 |
|
In other Modern Front End Development News™ I am almost done writing a standards compliant ES6 app with React + Redux..... and I haven't imported either of them yet. To me that's the biggest reason to use that combo. I have a fully unit-tested set of actions / action-creators / reducers that handle the UI, calls to remote services, etc. and have yet to use any "framework" code at all. The meat of the app is 100% portable in case I decide to use a different framework (or use additional frameworks like react-native.)
|
# ¿ May 6, 2016 17:19 |
|
Kobayashi posted:I have a very, very large project that uses LESS on the frontend. I'd like to integrate Zurb's Foundation Emails, which is written in SASS. Is there any non-idiotic way to integrate the two? Right now I'm considering some kind of awful two-phase compile process, where I have a small shim SASS file to override Foundation defaults and then the compiled CSS is imported to a LESS file, where all the project-specific classes are defined. modernFrontEnd.txt
|
# ¿ May 11, 2016 12:52 |
|
I know this gets asked semi-frequently, but since this is MODERN FRONT END, the answers change within seconds of Post being hit.... So: I am cranking away on a React SPA, and the last bit I have to flesh out is data storage. Right now I'm using localStorage, but I want users to be able to save in THE CLOUD because who doesn't love THE CLOUD, right? The data is effectively all JSON (it's actually all Immutable.js stuff, but thanks to .toJSON() we can ignore that for now) which means it's simple to send just about anywhere. First thought was just saving it in PostGRE and some sort of API I'd knock out w/ Django or something, but I'd like to both be lazy and try something new! So I am leaning towards using a service of some kind that allows me to store and retrieve JSON documents with user authentication and access control. I am looking at Firebase right now, and that seems like it will work, but might be a little overkill actually. What are you guys using this week?
|
# ¿ May 20, 2016 21:50 |
|
Soooo.... Firebase it is! Thanks for the input all!
|
# ¿ May 20, 2016 23:21 |
|
Noam Chomsky posted:Man Angular 2 really does seem to take simplish tasks and make you write super verbose complex code for them. I have been looking forward to Angular 2 but I keep seeing code that I have absolutely no interest in writing. This is why React / Redux exists.
|
# ¿ May 25, 2016 15:39 |
|
Noam Chomsky posted:Thanks for these. My $0.02: React is a pretty simple view framework. It also taught me about thinking the views of my web apps as simple state rendering machines. I can use React with whatever I decide to hand it state with, and I can use what I learned even if I dump React. Redux is a pretty simple state management framework. It also taught me about immutability, functional programming concepts, and other neat stuff. I can use Redux no matter what I decide to render my views with, and I can use what I learned even if I dump Redux. With Angular, I felt like I learned Angular, and when I ditched Angular, I "lost" everything.
|
# ¿ Jun 8, 2016 00:27 |
|
Noam Chomsky posted:It's weird that something that is dying keeps showing up in new courses, tutorials, and yeoman generators. Welcome to front end development!
|
# ¿ Jun 10, 2016 15:57 |
|
dupersaurus posted:Professional development question: React Redux SaSS Webpack ES6/2015 Django Angular 2
|
# ¿ Jun 11, 2016 15:11 |
|
Chenghiz posted:Yeah I consider the fact that react is almost completely vanilla JavaScript to be one of its major selling points, especially for a small team like mine. BUT JSX!!!
|
# ¿ Jun 15, 2016 14:45 |
|
dupersaurus posted:I've been using gulp and I'm starting to look into webpack, so I've got that step. The part I'm wondering about is how do you go from there to getting everything onto your production server. For example: my ward at work is an unholy mess of vanilla PHP and different flavors of JS, and pushing it is just checking in and merging into successive perforce branches until you get to live. So if I wanted to take the opportunity of an upcoming server rebuild to rethink how we do things, are there options out there? For font-end SPA type stuff where the "deployment" is new JS / CSS bundles and an updated index.html with the new chunkhash(es) for said .js and .css files, I have a Makefile that has a bunch of rsync commands in it like so: code:
Lumpy fucked around with this message at 17:01 on Jun 21, 2016 |
# ¿ Jun 21, 2016 16:59 |
|
Skandranon posted:Just saw this, thought it might be interesting for the thread. Didn't we already have the broughaha over this a few months ago?
|
# ¿ Jul 17, 2016 19:18 |
|
The Merkinman posted:Wow, no action for over a week on this thread? Skip them and use webpack or plain npm scripts They *why* is because you want to perform build step from the time you hit 'save' to the time code gets to the browser. For example, when I save a file, webpack:
Plus probably a bunch of other stuff I forget. If you write "raw" JS and CSS, then you don't really need that stuff.
|
# ¿ Aug 8, 2016 20:52 |
|
The Merkinman posted:Thank you so much for that list. It's useful in both dev and production. I have a webpack config for dev (with hot reloading, source maps, etc.) and one for production (file splitting, extracting CSS to files, minify, etc.) If you are using Angular 2, you'll need a transpiling step (typescript -> plain JS) already so, you can use npm / webpack to do that for you along with your SASS stuff all in one go. You can use these build tools either as glorified script runners (do SASS, then .ts, then...) or use them to for fancy stuff like bundle splitting and so on, so you can easily start on the simple side then add more stuff as you want.
|
# ¿ Aug 8, 2016 21:08 |
|
HaB posted:Quick question on the best way to handle this: sqlite or mongo
|
# ¿ Aug 9, 2016 15:25 |
|
I came across this and thought I'd share: I Peeked Into My Node_Modules Directory And You Won’t Believe What Happened Next I'm not sure what is funnier, the article or the comments from people who think it's real.....
|
# ¿ Aug 10, 2016 19:01 |
|
crazysim posted:It appears that some of it has been made real though! hahaha one of the comments on the commit: quote:You idiots! This is 186 lines long! If all of babel could fit on one line, this would be 186 times bigger than babel itself!! (Or 186% bigger!!)
|
# ¿ Aug 11, 2016 16:30 |
|
xpander posted:I'm writing a web app comprised of a frontend with Ember, and a backend with Flask. Currently I have the Ember app in a subfolder of the main project directory. I am about to do the initial git commit, and I'm wondering if I'm better off moving the Ember app into its own project folder and git repo. Any suggestions or comments in this regard? Yes, you should have the front and back end in totally separate repos. That's my opinion obviously, but since (hopefully) the two projects aren't coupled, there is no reason to have to pull down the entire backed to make a change to the front end. There are places that do "one giant repo for everything " but I forget the reasoning for that. Not that it was be, I just can't remember.
|
# ¿ Aug 14, 2016 15:20 |
|
M31 posted:But for a lot of projects, the front and backend are incredibly coupled from a functional perspective, which is the main reason you want them in one repository (often changes will require work on both the front and back). If that's the case, then sure. I was thinking of the "modern front end " style of the backend being only exposed as an API and isn't coupled in any way to the front. I guess if your API changes though....
|
# ¿ Aug 15, 2016 05:12 |
|
HaB posted:Any webpack gurus around? Have two configs. One for dev / hot reload (since dev server serves from memory) and one for build / prod (since that will put files places) Here's my dev config. It uses an index.html file in project root that just has a script tag for bundle.js and the root DIV. This is fine, since in dev all js and css are all mushed up together. JavaScript code:
JavaScript code:
JavaScript code:
code:
Lumpy fucked around with this message at 14:32 on Aug 15, 2016 |
# ¿ Aug 15, 2016 14:27 |
|
Depressing Box posted:On the topic of Webpack, this looks pretty cool.
|
# ¿ Aug 15, 2016 20:21 |
|
Thermopyle posted:Hot drat thats sexy. I just installed it and yes. Yes it is.
|
# ¿ Aug 15, 2016 21:06 |
|
HaB posted:So I have a similar setup mostly up and running after tweaking your configs to suit my setup. The sass-loader is throwing an error on an @import line: in my SASS files I import other sass files like so: code:
code:
code:
|
# ¿ Aug 16, 2016 15:28 |
|
The worst thing about Modern Front End Development is if you are attempting to learn something, and you find a nice tutorial that makes sense to you, then you see it was written over a month ago (gasp) so you probably shouldn't bother with it. Hopefully in the next six months or so, things will converge towards sanity, but yeah, right now it's a poo poo-show. Hopefully we'll all jump ship to Elm in the next year or so....
|
# ¿ Aug 17, 2016 15:24 |
|
Thermopyle posted:Yeah Elm is cool and good. I guess this thread will have to start a company. The Ultimate Goon Project....
|
# ¿ Aug 18, 2016 01:20 |
|
The Merkinman posted:Wait, so I shouldn't use Webpack? God dammit I hate this field. By the time I've leaned enough by reading the barebones documentation on a github page and typed in a bunch of npm install in a terminal like a 1990s hacker, then another articles comes along and says don't use X (use Y!). What the gently caress is the point in bothering to learn any of these, especially in my case where I only work on one website? You should still use Webpack.
|
# ¿ Aug 19, 2016 21:10 |
|
Anony Mouse posted:Never preemptively optimize unless you know you need to. But then what would we do all day?
|
# ¿ Aug 20, 2016 00:26 |
|
|
# ¿ May 15, 2024 20:43 |
|
The Merkinman posted:OK after the words of encouragement I did the tutorial for Webpack. I posted my dev and production configs here on in the JS thread a couple days ago. In dev, you bundle everything into one blob because you are just hot reloading out of memory. In production, your CSS is pulled out into a file, your 3rd party JS is pulled into a file, and your app code is pulled into a third file. These are all named by their chunks hashes, so if an update doesn't add any new deps or change styles, those files stay the same and cached. You can get more complicated and have different bundling with more splits / files, but I haven't built anything complex enough to need it.
|
# ¿ Aug 20, 2016 23:03 |