Tag Info

New answers tagged

-3

You can use tags like section or article to group your controls based on their functionality. On the other hand, you can use an HTML Editor like jsFiddle to make the structure and then, copy to ASP.Net MVC.


4

No, they're not. The purpose of auditing is to determine who did what in the past. The current data is irrelevant for this purpose, but you will need to record which data changed - there's no point in saying "user Dave change the person table" without saying what he changed. This information doesn't have to be recorded so formally though. You might like to ...


1

This is what a conventional rails controller would look like: class HeroesController < ApplicationController before_filter :authenticate_user! before_filter :user_only def index @heroes = current_user.heroes.find_by_level(params[:level]) end end Controllers should map to resources, and your controller is returning a list of heroes. ...


0

This calculation is Business Logic and should go in the Domain Layer of your application, i.e. your models. The controller is the wrong place for this logic because it should be pretty dumb. It knows what to do (calculate a value) but not why it happens or the nitty gritty details of how it happens (the algorithm for the calculation). A view model should ...


0

I would say this is fine. You are using view templates, interacting with a controller, that's all good. You might want to consider having a model and using that for the static data. Models will normally be database backed "Active Record" objects but do not have to be, they can also be used to hold the kind of data you have.


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


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


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.


0

I don't think the separation of projects or repositories is really the important decision - the crucial thing is that the layers of the application are separated with clear interfaces between them. So you can choose to go with a single project early on but split out into multiple projects or repositories as the application grows. If you have tangled your ...


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.


0

A SDET role is pretty much what you make it, as evidenced by all its different names: QA/Developer, QA Engineer, Automation Developer. My current title is actually Test Engineer, which I had never heard it called prior to taking this job. Regardless of the specific title, it is a new position in most companies, so the expectations can be loose. "Help us ...


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


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


0

Short answer: Do the name to box resolution at the network tier, either setup a DNS server as the 'database' that holds the resolution table, or do it in the router. An easier approach might be to set up the routes in your web portal machine's hosts file. Depending on how you make the calls that might not need a redeploy. Longer answer: I you want to go ...


0

Use CNAMEs in your internal DNS. Then you just point your url at e.g. http://foo-service.example.com/ and leave it there. When you move the service from machine A to machine B, move the CNAME.


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


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


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


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


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


-1

API chaining is an IO monad that requires a pull/push mechanism like handlerInterceptor to be able to handle the automation and separated IO state to be able to relate the URI's to the data. see api chaining spec (https://github.com/orubel/grails-api-toolkit-docs/wiki/API-Chaining)


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


0

Developing a website obviously includes developing the HTML and CSS, because basically that is the web page. If developing a website doesn't include that, what does it include? So if you have a project where there happens to be a design in PSD, and that design has to be transformed into HTML and CSS, and you call that transformation "slicing", then yes ...


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


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


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

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

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.



Top 50 recent answers are included