|
Well, at minimum you could probably just take any one of a million JavaScript table libraries and plug it in and it would be fine. Beyond that you could cache your queries in a storage that persists across reloads and have some method of invalidating the cache and reloading it when needed. The approach du jour is to have a client side SPA that talks to a server component through a rest-like api interface. The server component would handle the database interface running the queries and caching data.
|
# ? Oct 16, 2019 05:24 |
|
|
# ? May 25, 2024 15:18 |
|
Can someone please explain to me what problem Graph QL solves? Its not an ORM, and I can already define the structure of API objects with typescript interfaces on top of something like Nestjs? Is there some fundamental huge advantage in not seeing here?
|
# ? Oct 16, 2019 07:09 |
|
Ape Fist posted:Can someone please explain to me what problem Graph QL solves? Its not an ORM, and I can already define the structure of API objects with typescript interfaces on top of something like Nestjs? Is there some fundamental huge advantage in not seeing here? GraphQL's biggest thing is the api is a request want you want, leave what you don't. If you don't need a specific data structure at the time you just don't request it. Now you can do that with a REST api but the way you do it is defining a bunch of endpoints that returns data in a predefined schema, adding complexity to the client and server. GQL does everything through a single endpoint so the backend is cleaner and easier to maintain.
|
# ? Oct 16, 2019 11:32 |
|
Ape Fist posted:Can someone please explain to me what problem Graph QL solves? makes life better for front end developers, shittier for back end developers (in my experience) that or im just used to rest
|
# ? Oct 16, 2019 12:53 |
|
Ape Fist posted:Can someone please explain to me what problem Graph QL solves? Its not an ORM, and I can already define the structure of API objects with typescript interfaces on top of something like Nestjs? Is there some fundamental huge advantage in not seeing here? I can make new pages/components/sections in my app without having to make new rest endpoints.
|
# ? Oct 16, 2019 15:16 |
|
The Fool posted:JavaScript table libraries Imma start with this, then play with Elasticache. Thanks!
|
# ? Oct 16, 2019 17:20 |
|
There's a certain cloud provider who just supports REST and I wish they had GraphQL. To determine if a user (given by email address) is a member of group (given by group name), my client code has to: - look up the user by email to get all their attributes and pull out their their UUID (even though I don't need the other attributes) - look up the group to get it's UUID (ditto) - Pull a list of the 1000s of group members and search client-side for the user's UUID. With GraphQL that'd all be done in one call with minimal traffic and no client-side searching.
|
# ? Oct 16, 2019 18:18 |
|
Sorry if I asked this before but I’ve been making WordPress websites and basic bootstrap sites for years as a hobby but I want to expand my skills now. What’s my next step? I’d say I’m pretty good with html and css. JavaScript seems the logical next step? Any recommended resources for learning that?
|
# ? Oct 17, 2019 12:51 |
|
Empress Brosephine posted:Sorry if I asked this before but I’ve been making WordPress websites and basic bootstrap sites for years as a hobby but I want to expand my skills now. What’s my next step? I’d say I’m pretty good with html and css. JavaScript seems the logical next step? Any recommended resources for learning that? If you want to do something similar to CMS backed sites, you could check out Ghost (a WP-like thing done in JS) or if you want to get into React in a static-site generator, check out Gatsby. If you actually need to learn the basics of JS, the resources here are pretty good and have a couple entry points based on your current comfort level.
|
# ? Oct 17, 2019 13:25 |
|
Empress Brosephine posted:Sorry if I asked this before but I’ve been making WordPress websites and basic bootstrap sites for years as a hobby but I want to expand my skills now. What’s my next step? I’d say I’m pretty good with html and css. JavaScript seems the logical next step? Any recommended resources for learning that? I like the courses on Udemy.com. You may want to try that ( if you have the time to sit through them, because sometimes they can get a little long) They are really cheap too. You never have to pay the list price. They will advertise courses for 89.99 or 149.99, but then they always seem to be on sale for $15 or $20.
|
# ? Oct 17, 2019 15:14 |
|
Javascript is definitely a good choice. If you like working with WordPress you should also consider picking up a common server-side language – PHP is a good choice if you think you'd like to continue using WordPress in the future. It gets a bad rap among picky developers, but it's a much loved platform and there's lots of business to be had working with it if you plan on making a career out of web dev.
|
# ? Oct 17, 2019 16:57 |
|
If you're learning Javascript might as well learn Node, if nothing else it's pretty fun to do stuff with it.
|
# ? Oct 17, 2019 17:06 |
|
Javascript in the front, Python in the back.
|
# ? Oct 17, 2019 17:30 |
|
Javascript in the street, Python in the sheets.
|
# ? Oct 17, 2019 17:30 |
|
The Fool posted:Python in the back. Isn't Python supposedly really slow for webdev compared to the alternatives? I've heard about it but being a Node boi in the backend I haven't really looked into it
|
# ? Oct 17, 2019 17:32 |
|
Inacio posted:.. Python .. slow .. Node I don't really know what to do with this.
|
# ? Oct 17, 2019 17:39 |
|
Inacio posted:If you're learning Javascript might as well learn Node, if nothing else it's pretty fun to do stuff with it. I completely agree with this. I already knew JS but was using an old framework nobody uses anymore. I learned React, but then took a course on Node and I think React would have gone a lot easier for me if I had taken the Node course first. e: I took this course: https://www.udemy.com/course/the-complete-nodejs-developer-course-2/ (It's listed at 84.99, I paid $11.99) It was really long (34 hours of video), the guy looks like Pee Wee Herman and speaks with an an odd cadence that can be annoying at times, and yet I thought the course was absolutely awesome. NotWearingPants fucked around with this message at 18:28 on Oct 17, 2019 |
# ? Oct 17, 2019 17:41 |
|
The Fool posted:I don't really know what to do with this. I don't get it? But yeah, did some very shallow googling and it seems to confirm what I thought I'd read: https://dev.to/wrrnwng/nodejs-vs-python-3-performance-1ok6 https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-python3.html Now, synthetic benchmarks are all well and good, but whether that matters in real world applications... highly unlikely.
|
# ? Oct 17, 2019 18:24 |
Inacio posted:I don't get it? And if you really care about speed in Python you can use PyPy https://pypy.org . Though as I often tell interviewers, okay, let's say you get a real-world 10% speed increase in your whole web app written in X language versus Python. Is that speed improvement really worth it over the benefits — namely, a language everybody knows, full of mature frameworks and active development, where you can always staff up and have coders immediately fluent in code that's stylistically opinionated so they'll all write the same way, and you can get to market that much faster and maintain it easily years down the road after staff turnover? You can make up that 10% with a bigger server.
|
|
# ? Oct 17, 2019 18:59 |
|
Thanks for all the help folks. I know a little bit of Python and have messed around with Flask in the past so I’ll jump into learning Node I guess. Seems to be more resources out there for learning Node than any form of web version of Python Atleast.
|
# ? Oct 17, 2019 19:17 |
|
NotWearingPants posted:I like the courses on Udemy.com. You may want to try that ( if you have the time to sit through them, because sometimes they can get a little long) Internet signing up for stuff pro tip: Udemy, and many companies like it, offer massive discounts for new sign ups.(90% for udemy) Google Gmail ignores periods ( . ) in email addresses. Make an email named imjusthereforfreestuff@gmail.com and sign up to get 90% off your first udemy order(multiple courses together counts as one order) Then when you're done with those if there's no sale up, in incognito mode, sign up again as im.justhereforfreestuff@gmail.com, get the sale price, repeat by moving the period down one place each time.
|
# ? Oct 17, 2019 19:56 |
|
Even better, just use labels. imjusthereforthefreestuff+udemy@gmail.com will automatically label it.
|
# ? Oct 17, 2019 20:36 |
|
Inacio posted:Isn't Python supposedly really slow for webdev compared to the alternatives? I've heard about it but being a Node boi in the backend I haven't really looked into it Pythons slowness almost never matters for web dev. Your speed constraints are almost always somewhere else...like database access. That being said, a lot of python land is migrating to async, which is one of the things that makes node servers faster than python servers. For example, Django 3.0 has made the first steps to becoming async-native. But, anyways, theres a 99.999 percent chance you will never be affected by the speed of python as a web backend. Hell, Instagram runs on Django. If you need more requests per second (you don't) you just scale horizontally...which is pretty easy in the era of AWS and the like.
|
# ? Oct 17, 2019 20:38 |
|
post on my site:12 year old idiot posted:I know this sounds crazy, but I have found lots of serious vulnerabilities with SQL injection if you look good. I don't have the sources though.
|
# ? Oct 17, 2019 22:04 |
|
Inacio posted:Now, synthetic benchmarks are all well and good, but whether that matters in real world applications... highly unlikely. That's kinda what I was getting at. Empress Brosephine posted:Thanks for all the help folks. I know a little bit of Python and have messed around with Flask in the past so Ill jump into learning Node I guess. Seems to be more resources out there for learning Node than any form of web version of Python Atleast. Don't confuse quantity for quality. Prejudice aside, the V8 engine that node uses is pretty good, but it's wrapped around one of the worst package managers in popular use right now. Python with Django, Flask and others is a very good, mature, and well documented ecosystem and it is absolutely worth giving Python a consideration. That being said, you're probably still going to be using Javascript on the client-side whatever you do.
|
# ? Oct 17, 2019 22:18 |
|
Inacio posted:post on my site: Better watch before Zero Cool hacks your First National Bank of Shelbyville Kentucky website... once he figures out what hacking is and how to do it (!!!))
|
# ? Oct 17, 2019 22:33 |
|
When I was 10 i used to tell kids I would hack their computers but I really had no idea what that would entail and also most people did not have internet access at that point (if they had computers at all)
|
# ? Oct 18, 2019 19:29 |
|
I genuinely thought I could hack any computer at any time. I couldn't, and had no idea what hacking even entailed or how it worked. To be totally honest, I still don't. But I was so sure I could do it. I was so good at video games, hacking a computer should be easy by comparison.
|
# ? Oct 18, 2019 20:12 |
|
One of the first programs I ever wrote simulated a login prompt on terminals at my HS and stored the usernames/passwords in a text file in a hidden directory of a public account. e: not exactly hacking, but my heart was in the right (wrong?) place. NotWearingPants fucked around with this message at 17:38 on Oct 19, 2019 |
# ? Oct 19, 2019 17:19 |
|
Social engineering is always the right answer, friend.
|
# ? Oct 19, 2019 21:21 |
|
Yeah that's been my experience. If you want someone's username and password, just ask. They'll tell you.
|
# ? Oct 20, 2019 03:20 |
|
Inacio posted:I don't get it? I was a bit surprised by those benchmarks, but reading more about it Node uses a JIT compiler into machine code, so it would make sense. It's still considerably slower than "real" compiled languages like C/C++ or Rust, but surprisingly efficient otherwise. One thing I'm wondering about is multi-core performance. This is actually fairly important for IoT embedded in terms of performance. Though you'd use something like Tornado with asyncio rather than Django for python on that. Private Speech fucked around with this message at 13:03 on Oct 20, 2019 |
# ? Oct 20, 2019 12:59 |
|
Private Speech posted:I was a bit surprised by those benchmarks, but reading more about it Node uses a JIT compiler into machine code, so it would make sense. It's still considerably slower than "real" compiled languages like C/C++ or Rust, but surprisingly efficient otherwise. I don't know if it counts, but I do use "multithreaded" Node on my site and it seems to scale pretty well. But I wouldn't really use Node (or Python for that matter) for IoT anyway.
|
# ? Oct 20, 2019 15:27 |
|
I'm new to node.js, and am find hosting to be a bit more confusing than I expected. I've been used to the CPanel/PHP/MySql world where there are a plethora of hosts that let you host unlimited domains with unlimited databases, along with basic email accounts, for a small monthly fee. I pay for one of these myself, and I still have access to two others through a friend and an old job. None of these hosts support Node.js or MongoDB, and maybe I'm looking in the wrong places but I'm not seeing similar cheap all-in-one type hosts for node.js apps. Netlify and Heroku wipe everything every time you deploy so there's no permanent storage for things like image uploads. It seems like cloud MongoDB can get expensive (though now I don't remember exactly what my blocker was here) So, I've been thinking I'd try deploying my app using AWS's elastic beanstalk, AWS s3 for image uploads/storage, and switching back to MySql using Sequelize and a DB on one of the standard webhosts I have access to. Is there a better way, particularly is there anything like the shared hosting world where I can deploy node.js apps, create unlimited mongoDB databases, limited only by high storage/bandwidth limits, for under $10 a month? And also some basic email hosting would be nice too.
|
# ? Oct 20, 2019 16:42 |
|
I just use a DigitalOcean droplet and throw my poo poo in there.
|
# ? Oct 20, 2019 16:53 |
|
Private Speech posted:Though you'd use something like Tornado with asyncio rather than Django for python on that. No I wouldn't! I'd use FastAPI or Starlette. Or I'd travel into the future a year or two and bring Django with it's currently-in-progress async refactoring into the present.
|
# ? Oct 20, 2019 17:51 |
|
Thermopyle posted:No I wouldn't! I'd use FastAPI or Starlette. Oh, those are neat! I think I've seen Starlette before, but not FastAPI. e: Maybe the bit I had here was sharing a bit too much. Private Speech fucked around with this message at 21:57 on Oct 20, 2019 |
# ? Oct 20, 2019 21:41 |
|
NotWearingPants posted:but I'm not seeing similar cheap all-in-one type hosts for node.js apps The key thing you're missing here is that PHP is designed around every page access being a one-time script access that's also silently passing stuff through Apache or nginx, while Node servers stay active and handle responses. The latter does not at all lend itself to shared hosting. NotWearingPants posted:Netlify and Heroku wipe everything every time you deploy so there's no permanent storage for things like image uploads. The Node world expects you to have your server separate from your data, using services like S3 for uploads, CDNs like Cloudflare for unchanging static files, or even stuff like PostgreSQL Large Object support. See the gigantic list of Heroku addons, for example. NotWearingPants posted:Is there a better way, particularly is there anything like the shared hosting world where I can deploy node.js apps, create unlimited mongoDB databases, limited only by high storage/bandwidth limits, for under $10 a month? And also some basic email hosting would be nice too. Heroku hobby tier is $7/month fully pro-rated, so that's $0.0000027 per second per instance. Assuming you properly optimize stuff around the server shutting down when inactive and spinning up again on new requests, that's going to be dirt cheap. Adding mLab MongoDB with a max of 496 MB storage is $0/month on top of that. NotWearingPants posted:And also some basic email hosting would be nice too. Any Node hosting that bundles email service is almost certainly junk that should be avoided. Roadie fucked around with this message at 05:32 on Oct 23, 2019 |
# ? Oct 22, 2019 09:09 |
|
Inacio posted:I just use a DigitalOcean droplet and throw my poo poo in there. This is a good solution for cheap hosting if you're ok with admining stuff yourself. I've got several sites on their hosting.
|
# ? Oct 22, 2019 15:44 |
|
|
# ? May 25, 2024 15:18 |
|
Interacting with Docker for the first time is as unpleasant or perhaps more unpleasant than interacting with Git.
|
# ? Oct 22, 2019 16:41 |