Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Al Hobbs

Rancher
+ Follow
since Aug 30, 2017
Al likes ...
IntelliJ IDE Spring Fedora
Cows and Likes
Cows
Total received
6
In last 30 days
0
Total given
0
Likes
Total received
44
Received in last 30 days
0
Total given
78
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Al Hobbs

Hi All,

I am planning out how I will make an app.  It will handle all main interactions over websockets / polling.  

My question is about securing the websocket connection endpoints.
I will use other providers for authentication, like google. I was planning on using 2 different providers.


The client apps ( web and native mobile) will login and get a token from the provider of their choosing.
My idea is that the clients will send the outside authentication provider tokens to custom endpoints on the server side that will verify them.
The custom endpoints will return an access token generated by the server, that will be put in the header when they connect to the websocket endpoint.
The reason for generating my own token is so that I don't have to figure out where the token came from when the client tries to get a socket connection.

Another idea is instead of generating tokens, the server will just use the google / whatever tokens as it's own.  
I am leaning heavily toward the second idea because it would simplify the token system since I don't have to do anything except check if they are valid.

Is there any flaw with this?  Is there maybe something it looks like I don't understand?


Thank you

4 months ago
Hi All,

I've been reading about node js lately.  
When I search for why somebody would use node js for server side rather than java or asp, it really seems like they are saying things that java and c# can already do easily.  
Also, when they mention downfalls like it's not multi threaded it's not a bad thing but a feature.
Writing the server side in javascript because the frontend is also javascript doesn't really make sense. You can use json with java and c# easily.
You would be basically giving up all the better stuff that java or c# has just so you can write in javascript.
If there is a really good javascript developer I'm sure learning java or c# would not be hard at all.

Is node js faster?  Setting up a web project for spring boot or asp core is just as fast if not faster if you have an ide.

I would imagine the more complicated your project gets, the easier it would be in java or c#.  
Java and c# frameworks also scale well.

Is it because it's cheaper?  Is that the real selling point?

You shouldn't really expect to learn something in-depth by watching videos.  You can't get around reading books if you want your understanding to be more than shallow.
5 months ago
https://awesomeopensource.com/project/grzesiek-galezowski/tdd-ebook
This is a free ebook. Don't know if it's any good.
I will read it myself, since I haven't read any thing about tdd yet.  It seems good.
5 months ago

Junilu Lacar wrote:
A bunch of grunts right out of boot camp or a team of highly skilled and well-equipped operators?


I like the comparison between doing a project well and potentially killing people efficiently.
5 months ago
Have you been given a specific format for the invoices to be in? You could make the template in excel and then add the data with your program.  Then have it export to pdf and print it. You could have the locations of the details configurable just in case the template changes.
5 months ago
looks neat
5 months ago
where is myapp/index coming from?  I don't see that in the code.
5 months ago
If you are doing a simple project that you will not require maintenance then you could put all of those in a 'master' controller if you want.  It isn't a good design though. if you put logic combining that data into the controller, then what if you want to get the combined data in another controller or another service?
do people.. still use that..?
5 months ago
I'm not sure if there were lambdas before java 8.  I'm guessing they'd rather focus on big helpful changes, like lambdas, or referencing with val, instead of adding simple functions that a small library can provide.
5 months ago
Hello all,

I have a class that is basically responsible for talking on a socket with a specific protocol.
I have a service class that uses objects of this class to continuously check for changed values to send value changes from user input.
I'm guessing it's in the data layer because there is IO.
Right now I have it in my model namespace but that doesn't seem right.
The project doesn't have any database connections, just the socket class for talking, so there's no repository namespace.

How should I classify this class? What namespace should it be in?


Thank you for any insight.

 
Here's my javascript. I used signalr library for the websocket connection.  Everything works perfectly. I am open to any criticism.
Actually I put it together already with css grid. I still used bootstrap for dividing the two main layouts.  I did actually use rotate for those center buttons. They were still too far apart being centered so I moved them relative to top / left.

I used percent for everything so resizing works pretty well.
I'll post my html minus any private info.