New answers tagged

0

If this problem were purely in memory, we would use OOP techniques. However, given that you are trying to persistent scoring results, and are likely to develop new scoring methods and next-question finders that will involve new code and restarting your server, a scheme that applies to your persistence layer seems indicated. Fundamentally, you need to ...


0

I think that could be usefull to implement your requirements with a static class factory and several "set methodology to score" class providers. The factory will concern to select the right provider based on some choice cryterion, for example the complessity of quiz(low, medium, high, etc..), the providers will concern to carry out the expected ...


0

Your logic works on data, if it worked on nothing, it would be useless. So your logic is going to be coupled to your data; but, that doesn't mean it has to be coupled to the exact format of your data. For example, there are many different kinds of lists: Arrays of objects, Linked lists of numbers, etc. To keep list oriented processing from becoming too ...


0

Ah, I see. This sounds like a PUT request would be the way to go, then. Semantically, a PUT request is made when you know the resource URL you're going to hit, and you want to either create or update the resource at that URL. Alternatively, have different endpoints based on whether a user is registering or logging in (which is how most sites do it).


0

So, if I have this right - you want a blackboard architecture where data is written to the DB, and then something triggers your WS to notify it that data is ready to be read. That's a fair architecture, it works even if the notification stops working for some reason (assuming the notification simply tells you to go look for all changes rather than specific ...


4

In most applications there's a need for admin access with permission to see and/or tweak everything. In your case, you're talking about changing the structure of the application via data - eg editing fields or system settings - but not changing data. This is perfectly suited for an admin user and you really shouldn't even worry about this level of access. ...


1

2 is the Best option. The only issue you have to worry about is load - One site can take down the other. I see no other downside. Option 1 has much more breakage points. I can't imagine why you feel it may be less stable


0

I may want to google for the term "ABAC" (Access based access control) Definition (wikipedia): Attribute-based access control (ABAC) defines an access control paradigm whereby access rights are granted to users through the use of policies which combine attributes together. The policies can use any type of attributes (user attributes, resource attributes, ...


1

I would go this way: This uses a service to expose all of the bussiness functionality. Then, your MVC app could grab all the data returned from a service a create a View with it, while the API would use the same service to return JSON/XML. Your MVC app and you API would then have the same funcionality and you mobile app could grab whatever info is needed ...


1

Can't you just set up an API path in your web app to track usage info? In my web app I have a path to start and stop session tracking for our lab's computers. The web app expects a username and creates a new tracking record. We have a simple script that runs on login - it gets the username of whoever is logged in and POSTS to /tracking/start. It works well, ...


2

While agreeing with most of the answer from @Minjun.Y, I think I would go take a slightly different approach to the REST and Web page layer. From my reading of your question, I think you are wanting to expose both a web interface and a REST interface to the outside world. There is little to be gained by reading POJOs from the database, turning the data into ...


2

Here is one of my favorite kick-off examples of structure for your spring rest app. 1. Separation of layers, each layer is an individual module/project REST API Packaged as war It has rest controllers that handle request/responses depends on Service Module below Service Packaged as jar Business logic abstractions, this layer has no idea how to ...


0

I'm having a fundamental difficulty in seeing much utility to this particular type of API in relation to SIP trunks. Do you regularly manage telephone systems for large corporations with hundreds of lines and thousands of phone numbers? If not that might be why you don't see the advantages of such a system :-) Is it really so time consuming to click ...


-1

I appreciate that the process can be automated Yes. That's a huge thing, because … Is it really so time consuming to click the buttons? … Programs can't click buttons. You are essentially asking why programming would be useful. On a site for professional programmers, the sample population for your answers is probably going to be pretty biased ;-)


0

The real question here is "what is the consequence of failure?" If you delete something and it's not there, who cares? You wanted it gone anyway. If you want to insert data and it fails, what can you possibly do? Nothing, really. How, or even if you communicate errors largely depends on the fault tolerance of that transaction. Deleting something that ...


0

I think you should use directives for the DOM elements and controllers for interaction between these directives. DOM manipulation should only be done inside a directive. Fetching a text file could be done inside the controller, but it would be better if you did that through a service. Services can be used for reusable business logic/fetching data. You ...



Top 50 recent answers are included