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?
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.
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?
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.
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?
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.
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?
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.