Giter Club home page Giter Club logo

Comments (5)

jgw96 avatar jgw96 commented on May 18, 2024

Hey @Martinspire , thanks for the feedback! Just have a question:

On this I like the rest of the code and how it explains various features, but I had hoped it would show me a bit more. Now, of course, the whole system is already weird because you need an API (which never is documented what in this example should be supported or even a basic mock will do). Are you looking for recommendations on what real backend solution you should use? Currently, the API provider is basically a mock of what interacting with a backend would look like, but it does not mention any actual backend providers you could use.

from starters.

Martinspire avatar Martinspire commented on May 18, 2024

@jgw96 The problem is that I'm not looking to mock backend, I'm looking to use data in my app itself.

Basically where you store data that you already retrieved but want to use multiple times in various locations of your app. I've found in the meantime you can use Providers for this, just make sure you are only import them in the app.module.ts file once and grab their instance by injecting it via the constructor

public myData;

constructor(public someDataProvider: SomeDataProvider) {
    // some logic
}

someFunction(){
    this.myData = someDataProvider.getMyData();
}

And then keep using that someDataProvider to store your data.

For this Super Template example, I would suggest after getting the User, to store this in a UserProvider and set some "haveLoggedIn" value. And another for skipping the login (which allows you to skip the welcome but not the login page). And if both are set, it should go to home page.

I'm fine with how the backend is working, but I would like it if there was some more going on with the result and the way a normal user interacts with a new user experience.

Also perhaps it might be wise to accept any user input to the backend and instead of doing some error handling, continue to the home page. Because now it doesn't really look like a demo unless you have a backend (because you cannot login). Providing some extra help to show that we're ignoring the API result, would make that clear enough.

Right now the current example doesn't really do well as a "fully featured" example. It requires too much work to get it going to get an idea of what can be achieved. For me it gave the impression that it was going to be a nice demo, but running into problems soon put an end to that. Now fixing them was not hard, but it should not be required to have a backend for a demo, even though it is pretty basic backend.

Alternatively, something I've done in the past, let it ask a simple JSON file that acts as the backend. It doesn't matter if it goes to localhost:8100/assets/login/response.json and accepts that as your "backend". It would still have it work like it should without having to use a local server

from starters.

marutifh avatar marutifh commented on May 18, 2024

I would like to add a point here, If this template uses Ionic native HTTP client & WKWebView then it will be too good as we are in a phase to migrate every application to have these.

from starters.

MInesGomes avatar MInesGomes commented on May 18, 2024

Is this starter working for iv4?
I get this ...

$ ionic start superApp super
✔ Preparing directory ./superApp - done!
⠋ Looking up starter
[ERROR] Unable to find starter template for super

    If this is not a typo, please make sure it is a valid starter template within the starters repo: 
    https://github.com/ionic-team/starters

from starters.

mhartington avatar mhartington commented on May 18, 2024

Closing this as part of a repo clean up.

from starters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.