Tres Burritos posted:I started my first "real" programming job out of school 6 months ago and I was super surprised that this was a problem. However my co-workers fought to have IE 10 be the minimum. IE9 here, although the 'real' minimum is IE8 because if a client complains management bends over to get it fixed.
|
|
# ¿ Jul 7, 2014 15:54 |
|
|
# ¿ May 6, 2024 09:10 |
Munkeymon posted:Oh dang I didn't know TS got decorators. Tell me it can make generators work interchangeably with arrays and other iterables like in Python without importing a monkey patch library and I might never bother with vanilla JS again. Yup. https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Iterators%20and%20Generators.md
|
|
# ¿ May 5, 2016 01:00 |
geeves posted:So we're just not going to bother with 1.5.5 for now, which means we'll probably be stuck with 1.3.x til the end of time. I'd upgrade to the last 1.4.x version, chances are everything you need supports it. 1.5.x is much newer and once everything stabilizes you can upgrade again instead of having to deal with those dependencies issues.
|
|
# ¿ May 13, 2016 18:51 |
What's the best modern framework for non-SPA apps (as in server-side rendering with a touch of dynamic behaviour on the frontend, for forms and the like)? I actually like Angular 2 but in that use case it's completely useless as it really likes having total control of its templates (I found a temporary workaround using the upgrade module and downgrading ng2 components to ng1 directives but uuuugh).
|
|
# ¿ May 26, 2016 04:34 |
I doubt Rails will completely vanish, for a lot of people it still is the fastest way to get something sellable working and migrating from it only happens if it's actually needed (SoundCloud is migrating to microservices with Scala for example, but I doubt your local business has the same needs). I would recommend learning the basics of ruby/rails just in case and then focus on something else. EDIT: Basically you don't want to be a Rails developer, but knowing how to use it will definitely help. At least around here knowing how to use the asset pipeline and other miscellaneous rails stuff is a requisite for a lot of otherwise pure frontend jobs. lunar detritus fucked around with this message at 21:11 on Jun 11, 2016 |
|
# ¿ Jun 11, 2016 21:08 |
ModeSix posted:So having read all this and understood the drawbacks of webpack. Why would I choose webpack over say a gulp process that minifies, concats and uglyfies both js and css? Modules, but I guess there are plugins for that so...
|
|
# ¿ Jun 19, 2016 17:37 |
Skandranon posted:It's only on the way out in the sense that Angular 2 is out and looks to be an even better framework to use, if you like Angular 1. There is also a smooth upgrade path from Angular 1, and it is getting smoother as time goes on. The Angular 1 branch is going to be supported for 2 years after Angular 2 is fully out, and they may even extend that if there is enough demand. There's a smooth upgrade path only if you used Angular 1 for a SPA. Full stack apps (Rails/Django/Whatever server-rendered views + Angular) are hosed.
|
|
# ¿ Jun 29, 2016 01:40 |
Skandranon posted:How is Angular2 more of a problem doing this than Angular1? One of the big features of Angular2 is Angular Universal, which is all about doing server side rendering of Angular2 apps. Angular Universal looks great but changing the entire infrastructure of your legacy rails app just to add support for it seems unrealistic. There are plans to support other languages / frameworks but nothing yet. I encountered two problems when exploring upgrading to Angular 2 (and if any of you has a clean solution for them I'd very thankful):
Both problems can be worked around but by then the effort to achieve a working (but ugly) solution just wasn't worth it. Even the Angular 2 team says "Nope, SPAs/AU or get out": Angular Team Member posted:server side rendering is a huge part of angular2, today with angular/universal and soon with any number of other languages (drupal, .net, etc). that said, our vision is more that you'd write an angular application (that is, not separate client and server application) and bootstrap it server side, and then boot the SPA to take over. Angular Team Member posted:I don't think this is going to be supported, as angular is primarily designed as a single-page application framework, and the intent is angular should control the content inside the root app element. I mean, I really like Angular 2 but I think that using it for anything but a SPA is looking for problems. Maybe my use case of using Angular as dynamic layer on top of an app is rare? I'm crossing my fingers to get a working AU solution soon but for now I ended up migrating to Angular 1.5 + Typescript. A lot of the niceties of Angular 2 without having to touch anything else.
|
|
# ¿ Jun 29, 2016 06:22 |
Lumpy posted: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.... If your API is not versioned I'm pretty sure you're doing it wrong. But yeah, if your frontend is a couple of views in Rails' assets folder, sure, keep everything in the same repo. If your frontend is a bonafide API client and you want to keep it that way it should have its own repo, otherwise it just breeds laziness. EDIT: I mean laziness in the "Oh, let's just pass those values through the templating system". I mean, that's not inherently bad but it stops being a pure client. It all depends on your development process anyway. lunar detritus fucked around with this message at 06:25 on Aug 15, 2016 |
|
# ¿ Aug 15, 2016 06:20 |
I just had to upgrade from Angular 2 rc.4 to rc.5 and oh god stop with the breaking changes already
|
|
# ¿ Aug 17, 2016 17:18 |
HaB posted:Ionic is a great framework - but it's for mobile. On Desktop it's just gonna look weird. If you don't have an app and aren't planning on it, you don't need Ionic.It's built on top of Cordova/Phonegap - so it's basically for the express purpose of compiling to an app. This. Ionic is basically Bootstrap for Cordova.
|
|
# ¿ Aug 22, 2016 20:07 |
Anyone using Typescript and Vue 2.0? The one thing I really liked about working with Angular 2 was TS so I'm hoping it's not too much of a pain to keep using TS with Vue.
|
|
# ¿ Oct 7, 2016 02:12 |
What's the best pattern for handling auth http services on Angular 2? They are very pushy towards Observables but I'm not sure how they would be better than a promise in that particular case (one call to server, check if true or error, done).
|
|
# ¿ Oct 11, 2016 18:41 |
Kekekela posted:In case things were too stagnant, FB just published an npm replacement: It's very very fast, it solves by default the whole "my client can't boot up this 6-month old project" problem and it's backed by Google and Facebook. It honestly does a pretty good job solving common JS development problems.
|
|
# ¿ Oct 11, 2016 18:52 |
IAmKale posted:So is this the Angular way to do this? In all my time with AngularJS and Angular2, I've never come across anyone or any guide that's suggested that Components should contain as little logic as possible, and I've never seen it suggested that Services should handle all business logic. Is this another teachable moment for a team clinging to React practices, or do I just not know Angular enough and this is perfectly acceptable? Keeping logic out of the controllers is a popular MVC programming pattern (skinny controllers fat models) and in my own experience it makes sense in Angular because that way you don't have to instantiate the whole controller to test it, services are much easier to unit test. John Papa's Angular 1 style guide gives a much better explanation.
|
|
# ¿ Oct 15, 2016 18:30 |
I have some documents in a mongo database, what would be the best way to transform it into an api?
|
|
# ¿ Dec 12, 2016 13:16 |
Helicity posted:Yeah, you can (and should) do that with React too. To clarify, we've been using a variation of the "ducks" pattern along with "selectors" in the duck: Oh, the duck pattern looks very interesting. The main problem my boss has with the redux way of doing things (we're using ngrx/store) is the amount of boilerplate and extra files. I wish I could use Typescript 2.1 but Angular doesn't support it yet. I had to roll back a couple of things because of AoT breaking.
|
|
# ¿ Dec 17, 2016 07:55 |
VSCode is great, I have no idea how they managed to take Electron and actually make it feel responsive and good. It even boots up faster than Atom.
|
|
# ¿ Jan 12, 2017 18:07 |
I'm curious about state management. If you're using something like Vuex or Redux, what should go there? For example I have an accordion component inside a sidebar that can also be collapsed. I think that the accordion's state should manage its own state since I don't really care if the items inside are open or not BUT the sidebar's state (if it's open or not) should be in the store because it's much more probable I'll use that information somewhere else. Is this more or less correct or am I missing something? lunar detritus fucked around with this message at 17:52 on Feb 9, 2017 |
|
# ¿ Feb 9, 2017 17:49 |
Gildiss posted:The only articles I had seen about Angular 2 were about breaking updates and the modules it depends upon not being stable either. Angular 2's API was really unstable during their beta releases and RC but it has been like a rock for +6 months now.
|
|
# ¿ Mar 10, 2017 17:02 |
We actually switched to Angular 2 (mostly because of Ionic 2) and Vue because of Angular 1's probable demise. Vue is quite nice though.
|
|
# ¿ Mar 11, 2017 22:15 |
I'm having a problem with how determining what could be a component in a Rails + Vue app. The app has two dynamic sidebars, a couple of info bars, etc, and it all comes from a server-rendered html.erb. A lot of components have "inline-template" so it looks like a mess but I'm not sure moving a form outside the template where it's used makes sense. Anyone else doing this kind of mix?
|
|
# ¿ Mar 16, 2017 19:26 |
Pollyanna posted:Fun MomentJS puzzler: what's the difference between Without running it I bet anything weird that may be happening is because moment likes to mutate itself.
|
|
# ¿ Apr 26, 2017 15:32 |
ModeSix posted:Some of this is pretty interesting, especially when you see php/rails/sql for a "front-end" job. And react-native? Uhh... that's mobile, not front-end, or is mobile considered the new front-end? It's javascript and javascript == frontend for a lot of people, including those recruiters.
|
|
# ¿ Jun 21, 2017 16:53 |
Angular I think I complained about this at some point in this thread but Angular 4 is completely unusable unless you want a SPA. You have to fight against the framework to make it work in an environment where Angular doesn't control the entire DOM. Vue integrates perfectly well with whatever backend framework you want to use, with pre-cooked views with erb and all that stuff. If you do comply with what Angular 4 proposes, it's a perfectly good framework if a bit verbose compared to Vue or React.
|
|
# ¿ Jun 21, 2017 22:38 |
At least you have more than one job market in the entire country.
|
|
# ¿ Jun 22, 2017 23:10 |
Bikeshedding over rules is the worst. Install standard (or any other eslint package that doesn't allow configuring) and you're done.
|
|
# ¿ Jul 12, 2017 23:46 |
While I didn't get bit by that particular issue (my linter complained about defining private variables not used in the class and I went ok ) I had to change a lot of things to make our Angular apps AoT-compatible. It's... a lot stricter about what it needs. But AoT compilation still is an optional step so I wouldn't discard Angular because of that.
|
|
# ¿ Jul 17, 2017 16:36 |
Why would it be a problem to use JSX in TypeScript? You can use both without any problems.
|
|
# ¿ Sep 16, 2017 18:54 |
I have one of those awful style questions: Should every type be explicit in Typescript or maybe allow contextual typing for the ones that can be inferred?
|
|
# ¿ Sep 29, 2017 17:04 |
smackfu posted:Ahhh, Angular plus Typescript upgrade is making me feel like I know nothing. Have to actually take some training. Ugh. Be thankful you didn't have to use it in the beta days.
|
|
# ¿ Oct 5, 2017 02:07 |
Angular 1.5+ (AngularJS) is really good but I wouldn't use it for a new project. Angular (2+) is also really good but it's a monster and chances are you don't need everything it offers. It's mostly for SPAs, unlike AngularJS, Vue or React which are a lot more flexible. Typescript is loving amazing though.
|
|
# ¿ Oct 20, 2017 19:01 |
While using redux (or vuex, ngrx, or anything with that pattern), is there a pattern for reconstructing objects from what's in the state and adding methods to them? A (bad) example would beJavaScript code:
|
|
# ¿ Nov 4, 2017 16:21 |
I have been using https://github.com/date-fns/date-fns but there's also https://github.com/moment/luxon which seems to be immutable moment.
|
|
# ¿ Nov 30, 2017 16:09 |
Ape Fist posted:I've fiddled around with some very basic React stuff and yeah it's a little closer to JS I guess than Angular 2 is at this point. But honestly for someone whose still learning about programming from a not-a-pro-but-i-know-how-a-ternary-operator-and-classes-work-i-guess level ultimately it's all just more knowledge to me. If you want to add even more alternatives to your list, Vue is a (very) nice compromise between React's pure JS approach and Angular's angular-ish one. I tend to prefer it over both when I can choose.
|
|
# ¿ Jan 15, 2018 23:33 |
Pollyanna posted:IMO if you’re doing anything more complicated than conditionals and iteration in template logic you’re probably doing something wrong. I think that's all the logic Angular and Vue let you do in their templates anyway. React is more permissive about it since you use javascript directly but I'd expect someone using it would know better.
|
|
# ¿ Jan 16, 2018 16:14 |
Ape Fist posted:
Angular gives you Inputs and Outputs. Your child component should receive shitBalls through an input, do whatever it needs to it and then return the new value as an output event which needs to be caught by the parent component. This tutorial by Todd Motto looks good.
|
|
# ¿ Jan 26, 2018 02:15 |
Vincent Valentine posted:Dates are already native in JavaScript, there's like thirty different ways to display them, even! I'll give you everything else but dates are the worst.
|
|
# ¿ Feb 6, 2018 14:25 |
Google finally confirmed what everyone already knew: AngularJS is dead(-ish).
|
|
# ¿ Feb 17, 2018 18:15 |
|
|
# ¿ May 6, 2024 09:10 |
Ape Fist posted:There's probably no way you're going to convince anyone to change but for the love of god try to get them to move to Angular 2. Or Vue, which is much more friendly to hydrating server-rendered views.
|
|
# ¿ Feb 18, 2018 22:23 |