Tag Info

Hot answers tagged

6

Yes, your understanding is correct. Although, some REST services can be accessed directly, without passing by the server 2. Getting a response is a matter of milliseconds, especially when data centers are close to each other geographically (because indeed, speed of light matters). If we are talking about small web apps, the REST service and the app may be ...


3

... table in my database named "users", which has their username/password/mail etc, Of course you mean that you're storing the "hashed" or similarly calculated value derived from the user's chosen password. How do I best store a users status? I would go with an Integer value in the users record, which is a foreign key to a (tiny, little) look-up ...


3

I would probably start with basic HTML and CSS. It's not hard when you already know how to program. I would start by creating a personal project using HTML, CSS and Javascript. Move on to jQuery if you get familiar with js. I think the problem is that you are trying to achieve a lot at the same time. With that said, there are many resources online nowadays, ...


3

You don't want to check in the IDE created files, as you don't want Thumbs.db or .DS_Store. By making every developer create their own version, you are adding more work and the risk of laziness at absolutely no gain. Having a few extra lines doesn't hurt, and helps you make sure you are not creating files that could interfere with other developers' workflow. ...


3

There are several parts to your question I will attempt to answer them. Architecture As far as architecture goes I would suggest either a simple endpoint that returns the current status of a process or a web socket (if you only support modern browsers). Using a status endpoint the client can simply poll or listen to the socket for status updates. When the ...


2

First, I agree with amon's comment. Know what you want to do, then choose the technology. From that point of view, React.js seems to be overkill for a mostly static web. From React's website: We built React to solve one problem: building large applications with data that changes over time. React is a hammer for a specific nail. That would indicate ...


2

When it comes to API authentication, those are the three most used models (in random order): Credentials are sent with every response. Credentials are sent once to generate an access key. The access key is then sent with every request. Credentials are sent once, and then a session (relying on cookies) is used to avoid repetitive authentication. Since one ...


2

I agree with you, storing the status as integer will be enough. And I would prefer store it in different table, let's say user_status, since it will be updated frequently according to user activities.


2

In layman's words Since one back-end can have more than one front-end, it doesn't make sense to put the back-end codebase together with any particular front-end codebase in the same versioning system project/branch.


2

No - there is no harm in using an AWS Elastic Compute Cloud (EC2) instance for your development platform. But you will have to learn some extra skills that you wouldn't need when developing on a local machine how to use AWS Identity and Access Management (IAM), how to use AWS billing (if you exceed the one year free micro instance), and how to use SSH. ...


1

The users table is definitely the place to store it. Note that if you use MySql (and possibly some others?), you can also use an enum, so that you can be sure that the value that you write is in range, and you can refer it to it legibly in your application's code (e.g., onLine, instead of 1).


1

How did you start to be a backend developer? It must've felt very similar back then. Yet you managed it. I'm sure you'll do the same for frontend. Here's how I'd suggest your learning: Get to know html first. That should be very easy and quick. Learn CSS. Not master it. Get familiar with majority of its properties (no problem if you don't master flexbox ...


1

The short answer is to read a good book on Angular, read it again, and then practice coding, lots of it. That said, if you've never worked with UI, it can be an interesting challenge, because you might be missing some fundamental conceptual information to help you put it all together. What follows assumes that you know what an HTML tag is, and how a form ...


1

If the server blocks and responds only when the work is finished, HTTP 200 is indeed the way to go. Make sure you document the waiting time, since some clients may have shorter timeouts (and customers awaiting the reply may consider that something wrong happened). Otherwise, you may return immediately, in which case HTTP 202 is the correct code: HTTP ...


1

The example you provided actually uses a servlet. If you look at the web.xml here: https://github.com/javaee-samples/javaee7-hol/blob/master/solution/movieplex7/src/main/webapp/WEB-INF/web.xml You will see on lines 52-56: <servlet> <servlet-name>Faces Servlet</servlet-name> ...


1

What other really useful Django features would I lose? "Lose" is probably the wrong way to think about it. Never use and just take up space is probably more accurate. It could be argued that Django is too big a framework for what you are describing. Is there any particular reason why you have to use Django? A micro-framework like Flask might fit the ...


1

If this process really does take a long time, you could also consider moving the long-running work out of process. For example, when the request is handled by your Web API, you could write a message into something like a Message Queue and have MSMQ on the server activate a separate process to perform whatever work is indicated by that message. How that ...


1

Your three steps belong in the Model, not the Controller. If it's a long-running operation, make it an asynchronous one. See Using Asynchronous Methods in ASP.NET MVC 4 and C#5, ASP.NET MVC 4, and asynchronous Web applications for more information.


1

Storing files in memory doesn't seem such a bad idea if there are only a few of them. 1Mb of data isn't very much on modern servers so it's all down to the level of simultaneous users you have and what happens when you 'run out' of memory. In my experience I try to reduce the memory footprint size of each web service request because the server is usually a ...


1

To echo what MainMan said, there are two different concepts at play here, REST and microservices. Your diagram is a micro-service set up. You can do this with RESTful architecture, or with any other architecture. While micro-services and REST are often used together they are not the same thing. REST is a way of thinking about communication between clients ...


1

You should design your backend around the resources you are exposing from the backend. These do not have to match up exactly to your model (the exposed resources and the internal model are two separate things), but often you will have a lot of overlap. For example you might have a "user" model object and a "user" resource exposed by the server. A ...


1

If each client you intend to service requires different output from your back end. Then write your back-end in a way where is can serve each type. Do some abstraction. Ask yourself, what things will all clients need the same way, and what things will each client need in a specific different way. Put all the stuff that is the same for all clients together, ...


1

I think option 2 is your best bet. While the public and admin sites are related and use the same DB most likely, admin use cases and work flows typically have little overlap with the use cases and workflows in the public site. So the admin site will likely have its own distinct set of business logic. You can certainly move code which is common into ...



Only top voted, non community-wiki answers of a minimum length are eligible