Making the user follow specific steps [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Am not sure if the title describes what I want. Am developing an App on Android where kids start a new empty drawing project and finish with a full drawing at the end by dragging different shapes from a list of shapes that I created for the App. My problem is that I dont know how am going to follow the kid steps.
The kid is supposed to read a message in each step and try to apply it and then click on a next button to view the next step.
I want to make sure that he do exactly what the message is saying in order to view the next step.
Theoretically, how is this applied in Java ? If for example, there would be 20 steps how can I make the app follow up with him and make sure he is doing the right thing

You are looking to create a wizard. In Java use a MVC libray Spring-MVC or if its android you can use similar approach. Basically you want steps and views while saving the state - typical MVC pattern. Have a model object that is passed along to the views. Each view will have portions of the model that it can read/write to.
Android -refer to WizarDroid.
Spring - AbstractWizardFormController will help

Related

Rest Api design: resource archetypes, store and controller [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
i am currently in the process of looking more closely at the design of truly restful services.During my research I read something about resource archetypes at rest, four different types of archetypes come up frequently in discussion: document, collection, memory and controller. The first two I understand without any problems, but the last two I don't really understand. Can someone please give a clear explanation and example for both? Thank you.
Sure, there are four main archetypes at rest, the two that you're asking are:
Store: It'll never generate a new URI, we'll use the next URI http://api.example.com/song-management/users/{id}/playlists a user can PUT, GET and DELETE any playlist from its account but this store, the store is always managed by the client.
Controller: Are like functions, when HTTP verbs can't say the action which a resource will do, you should use this archetype. Eg. http://api.example.com/song-management/users/{id}/playlist/play will starts a playlist.
resource: https://restfulapi.net/resource-naming/

How to properly implement Multi-threading in a JavaFX MVMM application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm looking for a way to thread the ViewModels in a MVVM Architecture, without having to use tasks everywhere.
My ideal solution would be :
1 Application Thread (with the view)
1 Background Thread (with the viewModel)
Message passing between the 2
ViewModels still behave as normal Java Classes w/o Tasks/Service/Platform.runlater in every method
Is there a way to do this without bloating the code ?
This is probably not going to work the way you would like it to work. The view-models normally communicate with the views via bound properties. Therefore the properties of the view-models must always be updated on the application thread.
The proposed JavaFX way of dealing with concurrent background activities is to use Services. But if you don't like that it maybe worth it to have a look here: https://github.com/ReactiveX/RxJavaFX

Making a request to end points wrong [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I submitted my project about fetching popular movies data in Udacity, and when i saw my review there was one thing to change, "The end points are perfectly implemented and fetches the correct result every time a request is made. But there is a small problem that instead of making a request to end point top_rated you are making a request to vote_average which makes it fetch wrong result!" But when i change to top_rated, the app doesn't fetch at all what is the problem? I don't get it, it fetches perfectly like this,And I don't see in the moviesDB nothing in JSON that says top_rated..
ScreeenShot
Information about the Project>> https://docs.google.com/document/d/1ZlN1fUsCSKuInLECcJkslIqvpKlP7jWL2TP9m6UiA6I/pub?embedded=true
My project >> https://drive.google.com/open?id=1wxYsxio2kbo44anndE9_93h13pWKTk0J
What does your json look like thats coming back from the url.
It looks like you also never make a request to
http://api.themoviedb.org/3/movie/popular?api_key=[YOUR_API_KEY]
based on your code and the project it seems like you need to fetch the top rated, then add it to your movie object.
in the project description look for Stage 1 - API Hints

Where should I perform Retrofit operations? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm new to MVP, Retrofit and Dagger, so I've decided to make a simple app based on Riot Games API, that just shows some game's info in a list. Everything works fine, but it made me wonder: "Is presenter a good place to do such things, like Retrofit operations? I couldn't find anything about it. There are some simple examples how to use Retrofit, but they are sometimes shown even inside an activity class, which doesn't seem right to me.
So, here is my question: Where should I perform such operations to make the code as clean as possible?
My app repository: https://github.com/Mallorax/Rito_Api_Test
If the Model is what Retrofit returns, you can't put the call there.
The View is intended to separated from the Presenter, and subscribes via Callback interfaces, which Retrofit provides out of the box.
Therefore, your only option without involving some Service layer is to put Retrofit in the Presenter.
I suggest you to place some network call to plain class e.g. Interactors for example LoginInteractor which contains loginMethod, than when it finishes pass the result to the presenter class, which will handle the data and will convert (or not) it for some kind of model which is ready to be presented on UI.
Activity/fragment contains Presenter and Presenter contains Interactor(s)

Writing the UML for a java program [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
my first question;
I am new to Java, been playing around with object orientation for a few months. I want to write a UML class diagram however I am trying to research it for the past 4-5 hours. Every time I find information it opens up another can of words and quite simply, I haven't got the experience to understand the terms that it uses.
My program is constructed as follows:
class 1 (newMote) - creates a new instance of the object
class 2 (calibrator) - sets up all the gui for the system and registers components for events
Class 3 (Responder) - this is where the work happens, all my logic is in here and my actionevents
the following classes are for the api that I am using (sourced elsewhere)
class 4 (WiiUseAPI) - the api
class 5 (WiiUseAPIManager) - the manager for the api
class 6 (wiiMote) - lists all the methods from the wiiuseJ library
If I could get some instruction on where to look to better understand what I am doing that explains all details in real laymens terms or some instruction of how these classes would be constructed I would be eternally grateful.
For your code auto generate UML u can use ObjectAid an Eclipse plugin.

Categories