|
Context strikes me as something that, while useful, is going to require a lot of care to avoid becoming global variables by another name.
|
# ? Apr 23, 2018 21:54 |
|
|
# ? Jun 6, 2024 15:47 |
|
Munkeymon posted:Many people probably thought the same thing about SQL Server's XML column spec and now look where we are
|
# ? Apr 23, 2018 21:56 |
|
Capri Sun Tzu posted:Yeah but XML though The lesson's still the same. There are pros and cons to tightly coupling your datastore to your client-side representation.
|
# ? Apr 24, 2018 14:39 |
|
Thermopyle posted:Context strikes me as something that, while useful, is going to require a lot of care to avoid becoming global variables by another name. Every class I've encountered in the working world that had 'context' in the name ended up being a singleton housing hundreds of global variables.
|
# ? Apr 24, 2018 15:02 |
|
Anyone have any suggestions for resources to learn GraphQL? Howtographql is detailed but has a "here's a bunch of boilerplate code you've never seen before, no we're not going to explain any of it" problem. I will accept "suck it up and figure out howtographql" as an answer, if that's really the best option.
|
# ? Apr 24, 2018 15:04 |
|
Bruegels Fuckbooks posted:Every class I've encountered in the working world that had 'context' in the name ended up being a singleton housing hundreds of global variables. Yeah that's why I've always been a little confused about the excitement over context. You've always been able to design lovely systems with all your state in global variables, that's a large part of reason we ended up embracing Flux and the like...
|
# ? Apr 24, 2018 15:47 |
|
Webpack question: I'm trying to migrate an AngularJS app to Angular 2+, trying to go through the whole "Bootstrap AngularJS inside Angular 2 and then upgrade each component" thing. I'm stuck on upgrading it to use Webpack for module-loading, where the actual task keeps failing with `Module build failed: SyntaxError: Unexpected token { at exports.runInThisContext (vm.js:53:16) [...whole lotta files in node_modules]`. The Webpack.config.js file is code:
code:
E: Problem "fixed", I think, had been an issue with ts-loader v4 that went away when I downgraded to v2. Now I just have to deal with Typescript not properly loading and importing from AngularJS. darthbob88 fucked around with this message at 20:07 on Apr 24, 2018 |
# ? Apr 24, 2018 19:59 |
|
Capri Sun Tzu posted:NoSQL is great when you have deeply nested data or object structures. SQL is better suited to tabular data or transactions. NoSQL beats the hell out of SQL when you have to run analysis on say half a billion records. NoSQL also requires you to spend a lot more time thinking about how to structure your data for efficient querying. Yes if you can shove half a billion records in memory, it will certainly have better performance over traditional databases. Capri Sun Tzu posted:My favorite thing about JSON stores is fetching a record for your web app and BAM you just stick that sucker right into your model, no mapping needed because its all javascript I think most API's these days return JSON responses regardless of how they store the data behind the scenes.
|
# ? Apr 24, 2018 20:17 |
|
my bony fealty posted:Anyone have any suggestions for resources to learn GraphQL? Howtographql is detailed but has a "here's a bunch of boilerplate code you've never seen before, no we're not going to explain any of it" problem. The fun fun function vids on it were pretty good.
|
# ? Apr 25, 2018 05:00 |
|
poemdexter posted:I think most API's these days return JSON responses regardless of how they store the data behind the scenes. Hell, most relational databases can read, store, query, and return json at this point.
|
# ? Apr 25, 2018 14:39 |
|
What's the best way to manage interfaces when I'm working with TypeScript and GraphQL on the client-side? In an app that relies on a RESTful api I might have a bunch of types like Post, Author, Comment, etc. but in a GraphQL situation I never know what's going to be there. Should I define the top-level types and then just partials everywhere, or should I define custom interfaces for basically every component and forget about the idea of top level "model" types?
|
# ? Apr 25, 2018 20:18 |
|
Angular question: My app is refusing to bootstrap because it can't resolve the parameters for my component. So far as I can tell, everything should be resolvable; the services it relies on are all properly typed and decorated with @Injectable(). What else should I look for to troubleshoot this? None of my googling has found a solid answer.
|
# ? Apr 26, 2018 03:12 |
darthbob88 posted:Angular question: My app is refusing to bootstrap because it can't resolve the parameters for my component. So far as I can tell, everything should be resolvable; the services it relies on are all properly typed and decorated with @Injectable(). What else should I look for to troubleshoot this? None of my googling has found a solid answer. Did you declare everything in your app's AppModule?
|
|
# ? Apr 26, 2018 03:19 |
|
darthbob88 posted:Angular question: My app is refusing to bootstrap because it can't resolve the parameters for my component. So far as I can tell, everything should be resolvable; the services it relies on are all properly typed and decorated with @Injectable(). What else should I look for to troubleshoot this? None of my googling has found a solid answer. What specifically is the error? Do you have a component with an @Input that you're not giving a value in the parent?
|
# ? Apr 26, 2018 03:49 |
|
gmq posted:Did you declare everything in your app's AppModule? code:
code:
The Merkinman posted:What specifically is the error? code:
darthbob88 fucked around with this message at 16:29 on Apr 26, 2018 |
# ? Apr 26, 2018 16:23 |
|
darthbob88 posted:As far as I can tell, yes. Everything I created has been declared or imported, and all the Angular components I'm relying on. I don't see your imports in the LandingComponent. You are importing there, I assume? Are the services both @Injectable decorated?
|
# ? Apr 26, 2018 16:52 |
|
HaB posted:I don't see your imports in the LandingComponent. You are importing there, I assume?
|
# ? Apr 26, 2018 17:13 |
|
darthbob88 posted:I am indeed and they are. poo poo. poo poo's loving BROKE then.
|
# ? Apr 26, 2018 17:16 |
|
HaB posted:poo poo. poo poo's loving BROKE then. E: I moved the services out of the main AppModule and into the individual @Component({ }) decorators, following this article, so now those components are working fine, but now I'm getting the same issue with the service failing to resolve the Http/HttpClient I'm passing in to the constructor. I'm beginning to think I pissed off a gypsy or something. E2: I've added @Inject() to the parameters in every constructor, and now they're working fine. Current problem is with the templates; the AngularJS project I'm upgrading from was content to slap them on the layout template wrapped in <script type="text/ng-template" id="404template.html">, and now Angular is pitching a fit because it can't properly locate 404template.html. The other problem is that I'm also trying to use ASP.NET's resources to localize this, which means that I need it to process the files before Angular uses them as a template. Fun. E3: Solved the template problem by just dumping those templates directly into the component file, all 1-200 lines of them. Second order of business, after getting something I can actually demonstrate, is going to be pulling half of that out into smaller components. Current problem is StaticInjectorError(Platform: core)[telemetryService -> e]: \n NullInjectorError: No provider for e!, which supposedly can be fixed by just importing HttpClientModule and HttpModule in app.module.ts. I'd be a lot more pleased with that solution if I wasn't already doing it, though. darthbob88 fucked around with this message at 00:22 on Apr 27, 2018 |
# ? Apr 26, 2018 19:00 |
|
GraphQL and apollo are very cool. I need to get further along but so far it feels like I've reduced a lot of the boilerplate involved in fetching/serializing data that I would normally do with Redux.
|
# ? Apr 30, 2018 18:27 |
|
declare the access permissions of your methods and properties you gently caress
|
# ? Apr 30, 2018 21:28 |
|
Angular UI question: Is there a good way to toggle components between small/large screens? If clients are viewing my site on a large screen, I want to show them a carousel of options, if they're viewing it on a small screen, I want a dropdown or two, that sort of thing. Right now I'm looking at this StackOverflow response but I'm wondering if there's a better way.
|
# ? May 14, 2018 19:27 |
|
darthbob88 posted:Angular UI question: Is there a good way to toggle components between small/large screens? If clients are viewing my site on a large screen, I want to show them a carousel of options, if they're viewing it on a small screen, I want a dropdown or two, that sort of thing. Right now I'm looking at this StackOverflow response but I'm wondering if there's a better way. I would likely do it in a similar manner to that Stack Overflow answer, but without the magic numbers. Or dropping each one in a div and using a media query to toggle display would work, with basically no javascript required: https://stackoverflow.com/questions/11796297/div-show-hide-media-query
|
# ? May 15, 2018 12:45 |
|
HaB posted:I would likely do it in a similar manner to that Stack Overflow answer, but without the magic numbers.
|
# ? May 15, 2018 17:46 |
|
Has anyone successfully tried the new Custom Elements in Angular 6? Anything I find either has bad documentation or doesn't work
|
# ? May 15, 2018 20:32 |
|
Can anyone explain what they use the async pipe for in Angular?
|
# ? May 23, 2018 12:30 |
|
smackfu posted:Can anyone explain what they use the async pipe for in Angular? Think of it as binding a subscription directly in a template. Kinda like . (pseudocode here): code:
|
# ? May 23, 2018 12:46 |
|
Guys have any of you looked into developing at least a simple back-end system to layer your front-end application on top of? Something with a relatively simple idiot-friendly structure that could be deployed for small scale applications? I want to make a small application but it's doing to obviously need a DB and APIs to read/write too etc but I don't wanna be like urrrghhhh and start learning a whole new technology stack while I'm still really only just learning front-end myself.
|
# ? May 30, 2018 23:05 |
|
The WordPress REST API could be a good option for you. Works wonders with custom post types and Advanced Custom Fields. It's real easy to spin up a WP installation on DigitalOcean and use that as your backend.
|
# ? May 31, 2018 00:06 |
|
Firebase?
|
# ? May 31, 2018 00:14 |
|
Contentful, prisma, graph.cool There's lots of options if you just need CRUD
|
# ? May 31, 2018 04:45 |
|
my bony fealty posted:The WordPress REST API could be a good option for you. Works wonders with custom post types and Advanced Custom Fields. Good lord no.
|
# ? May 31, 2018 19:14 |
|
Lumpy posted:Good lord no. Why
|
# ? May 31, 2018 21:36 |
|
Its like putting this whole questionable layer between you and a simple CRUD database for no gain. As has been mentioned, there's a good selection of purpose-built services for this.
|
# ? May 31, 2018 22:03 |
|
Thermopyle posted:As has been mentioned, there's a good selection of purpose-built services for this. My main issue with these ORM as a service providers is that their pricing models are very large-product centric. If I want to spin off a dozen small scale business store websites without mixing into the same 'application' it's big bucks. Or I have to create dozens of free accounts with different email addresses, which is a pain and probably against TOS.
|
# ? May 31, 2018 22:48 |
|
I don't think it's typically against TOS to create separate accounts for separate applications. I think if you were weaving together multiple accounts to get around usage limits for a single app that would violate TOS. Obviously depends on the service though.
|
# ? Jun 1, 2018 05:18 |
|
Because forcing a blog engine to be your application backend is a bad idea. Plus there's all the WP security concerns, etc.
|
# ? Jun 1, 2018 14:36 |
|
Thermopyle posted:Its like putting this whole questionable layer between you and a simple CRUD database for no gain. As has been mentioned, there's a good selection of purpose-built services for this. That is fair, it is overkill for just CRUD for sure. The fact that it's open-source and easy to self-host is very attractive to me given that a lot of other options as mentioned are not great at the free tier. Isn't Prisma a rebranded graph.cool too? It looks like that is open source now which is great, but it's also rather complex and you gotta learn a whole new thing to even use it. Lumpy posted:Because forcing a blog engine to be your application backend is a bad idea. Plus there's all the WP security concerns, etc. WP hasn't really been a blog engine for years; yeah it started as such but has been a fully featured CMS and web platform for a long time now. The REST API has first-class support, there's nothing being forced. Security concerns aren't any worse than anything else if you know what you're doing (i.e. don't install a bunch of unmaintained plugins). There are lots of problems with WP, yes, but it's totally fine to use as a headless CMS for data storage. Tbh if you truly just want CRUD and having something that does "too much" is an issue then just learn to roll it yourself. If/when you start wanting more advanced things e.g. authentication then it's time to look at a third-party solution, either to integrate into your own setup or to pick one that does it all for you.
|
# ? Jun 1, 2018 22:19 |
|
Seconding just learn to do it yourself. I promise it is not anywhere near as difficult as you think, even things like authentication. If you just want a quick prototyping solution, you can set up a mongodb with mlab, then connect that DB to a node express layer. The whole process will take you about eight hours for the first time you ever see those concepts, then maybe an hour every subsequent time. Personally, I built a small crud server that is front end agnostic that I use and reuse for quick type stuff with create react app, then when it's time to get serious I can just switch to the servers Branch to the stripped down version, copy it over and start building for real. Things like graph.cool seem neat, but like everyone else said it seems really expensive for one guy loving around.
|
# ? Jun 1, 2018 23:37 |
|
|
# ? Jun 6, 2024 15:47 |
|
Learn to do it yourself and then use well tested open source solutions or shell out for SaaS options.
|
# ? Jun 2, 2018 00:41 |