Universal Windows app with Web API - windows-store-apps

This question may broad to answer. But just give me idea/structure.
I'm planning to build a shopping cart app for Windows Store. My logic behind the app is
Developing Web API and hosting on server
Accessing those API through app and displaying data on XAML UI
Is that right? or any other logic that i need to follow?
Should i use MVVM?

Though it might be a little harder at first, using MVVM is always a good idea.
As for your logic, why do you need Web APIs for your cart app ?
Wouldn't it be more efficient to keep everything local ?

Related

SpringBoot-MySQL or ExpressJS-MongoDB which one is best for building rest API of online BookStore?

How are you all? I'm a beginner with the web programming. I am planning to develop my personal e-commerce Bookstore for myself. I've basic knowledge of ReactJS, ExpressJS, Spring MVC, MongoDB, and Mysql. I've already done some basic project in ReactJS, Spring MVC-MySQL and Express-MongoDB like Personal Diary, Cost management system, School management system etc. My future plan is to build a native mobile app for this Bookstore. I am a little bit confused to select the language and framework. I've some question and need experts opinion and suggestion like you.
ReactJS or NextJS(Server Side Rendering), which one will best for the frontend of this Bookstore?
Do I have any possibility to face any problem in SEO in the SPA?
Which Framework and Database will best for building the backend for better performance and lower hosting cost?
By using that backend service, can I use the same API endpoint to build a native app?
Any alternative technology to develop the bookstore?
Thank you all in advance.
-ReactJS has a vibrant and big community, so you would find plenty of support
-As far as i understand type of language for the front-end or SPA's shouldn't affect your SEO
-Java is rock solid, battle tested whereas NodeJs is new and a lot of experiments still going around it. Although it is claimed to be faster and easier to work with.
-Cost ? the cheapest would be PHP Apache shared hosting. Java and or JavaScript will both cost almost the same on platforms like heroku or digital ocean.
-Yes you should be able to build native apps using the same endpoints.
-With what you know do not look for alternate technologies. (What you have is more than enough)
-Moral of the story - If you are alone doing everything, JavaScript can save you a lot of time and effort. (Building web-apps, hybrid mobiles apps and server side APIs, all using JavaScript), however if you choose Java for server side, that knowledge may help you build a native android app and then you will need to learn Swift for a native IOS app and JavaScript anyway for web apps.
Everything boils down to what you are doing and how you are doing it.
All the best!

Xamarin: how to create views / UI of an app dynamically from a Json

Have you already developed a Xamarin app whose views are generated from a Json recovered when launching the application?
I met a client with this kind of need:
they are developing a web app to prototype the screens by adding and positioning some controls (TextBox, Label, ...)
this generates a Json that must be interpreted by the Xamarin app: this will build the different views dynamically
in a first version, the user's data would be stored locally (through a file or SQLite) and synchronized "manually" when the device is connected to a computer
the app will work on Android only in a first time, and then on WPF
The client has not yet decided between Xamarin.Forms or Xamarin native, but it's probably more interesting to do it through Xamarin.Forms, even if iOS is not required: this should make porting on WPF easier.
Have worked on similar cases? Have you some recommendations? Are there plugins or patterns that could be used to simplify this development?
I've found this one, but it doesn't seem to be the same use.
There is also this article on iOS, but there is not the same thing on Android.
This would in theory be possible using a massive code behind builder for a page but should NOT be done for a production app. Mobile apps have very specific requirements that need to be thought of before attempting.
Xamarin is great for simplifying code reuse, and if you use Xamarin Forms you can reuse the UI components for Enterprise apps.(the less fancy and pixel perfect the layouts need to be the better. )
Your client would be better served by making it a mobile compatible web page instead from the details you have shared.

Front end for an iOS web app using Django Rest API

I ve recently been asked to work in the front-end of a new app which will be written with Django for back end.(They said it will be for iOS).
Even though I have experience working with front-end I never wrote any code for iOS or Django REST API. What are the differences? Is it html/css ?
In another words lets assume that someone has a code in Django which asks user a question and stores the answer. The response will be in JSON(I think.) He wants me to write front end. Should I write it in html?
One more question: What will determine that our app will be working in iOS and will not work in android. They said the app will be for iOS at first but since it uses REST API what is the reason it cannot be available at the same time for android?
The usual process of using django rest framework is to have interactions with your backend exclusively using json.(most of the time, some people might use xml). So in general, all the information (requests and responses) will be JSON. Once you have that part setup, there are a number of technologies that will help you create user interfaces. You can use angularjs or JQuery to send JSON requests and responses to the endpoints and display the information obtained.(the whole interface is modified with javascript.)
Now, for your mobile apps. There are two approaches you either create what people call a native app using Java(for android apps) or Swift(for apple devices).
If you decide to use that approach you will have to mantain both apps in different languages. The other way of doing things would be to create an interface using something like angularjs and use a tool like ionic to convert that app into an android/apple app. Using that approach you will only have to mantain 1 application.
Here is a small diagram to represent the interaction.
(Django rest framework) <=JSON=> (front end app.)
I would suggest to start with django templates, it might just do the trick.

How to do a JSON webservice

I need to create a webservice that will be used in iOS, Windows Phone and Android apps.
I've found many tutorials on the Internet but no one uses real JSON files.
I have an example of what I mean:
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=tiste&count=2
Is it better to use a web service like Twitter or can we use only headers in PHP?
If it's the first, how can I do it?
Finally, is JSON the most suitable option for web service communication?
Most contemporary web apps are built around an api - they are called api-centric. Twitter is one of them. You are not the only one who needs to create a web frontend and apps for mobile platforms. Having an api for all those platforms is going to save you a lot of time.
This field is developing rapidly now. There are many frameworks(both client and server side) to choose from. Since you are not telling us which technology/programming language you are going to use, i can only suggest you to google an api-centric or a rest framework. If you extend your question, i'll give a more specific answer.
Meanwhile you can read the following general articles...
http://net.tutsplus.com/tutorials/php/creating-an-api-centric-web-application/
http://en.wikipedia.org/wiki/REST
http://en.wikipedia.org/wiki/OAuth
http://blog.programmableweb.com/2011/09/23/short-list-of-restful-api-frameworks-for-php/

Web application architecture design - HTML/CSS/JS frontend + REST Backend

I have some experience developing websites, but none with proper web applications.
But this time I'm creating more of a web application, my server will surely handle API calls from a mobile app (iPhone/Android/MeeGo (...or not)) or even from third party clients.
So I'm thinking, is it really necessary that the "website" --the frontend part of my application using HTML (5)/CSS (3) and JS--interacts with my backend in a different way than my other "frontends"?
Am I thinking wrong? I think this is a common problem, and I need some experimented advices on that. Thank you for your help.
Actually No. You're thinking it the right way. You can Javascript to interact with your Rest API, so you can focus only on writing a scalable API, and the UI.
That's the approach taken by Twitter. Their web site, is a Rails application that uses the twitter API, written mostly in Scala, and uses by the hundreds of twitter clients out there, whether mobile or desktop app.