I want to render a UI from a jSON string that has multiple layers.
The user should be able to enter data, which will then be stored and shared, without the overhead of the jSON Render Structure.
However, the assignment of the data must be possible.
The app renders a template from a multidimensional json string that can capture metrics (user inputs). The measured data are entered via text fields by the user.
There are different windows in the app, which are rendered from different json UI-render-files.
The stored algorithms in the windows at the Frontend differ.
The following should be possible:
All windows are created with different jSON strings (works with build_value now).
The user's input is saved. (Currently only works by saving the render json string with the data under a different name (with Package: Shared Preferences)).
The data entered by the user is copied from one window to the other window. (Data Binding / Data Mapping)
The data entered by the user will be sent to a backend.
I only have the idea to use id's in the render json, which allow a mapping.
Are there better solutions?
Saving the entered data is possible by saving the whole jSON - String with an other name.
The goal is to map the data.
It should also be possible for the user to insert another object for the measurement data acquisition at the client / device. The entered data must also be saved.
This sounds like a REST API. Then you would use a frontend framework like angular or react to take user input.
I could build this with a .net core web api with sql db as the backend. this would be a web service (REST API solution) on the backend of your solution.
Next I would integrate Swagger with dependency injection and add authentication.
now its time to create the front end that will use your tested Web Service.
you would have 1 side of your SPA POST new JSON to the Web service in a form.
you would have the other side GET the new record as a new tab with pagination or in a table with pagination.
This would be a good PoC for your idea and will let you learn the parts of the solutions architecture in your language of choice. the "design" would be the same no matter what language your choice.
backend web service can be done in a flask and with a MySQL DB. or with any other combo you have skills with.
the Frontend could be done in knockout.js, making it a little easier to learn than angular or react.
Please create new questions when you choose your software design. I would love to give answers for each:)
I would love to level up with you! ;)
Related
Do any of the front end frameworks (Like Vue.js) have the ability to generate a prototype form/view directly from various an Endpoints?
I am wanting to quickly knock up a few forms to capture and submit data to a set of JSON Rest Post APIs and Display pages to render data retrieved from other JSON Rest Get APIs.
I don't want to have to go through the pain of having to map each and every field out in a set of .js file, it would be great if the boilerplate could just be generated from interface in a similar way to what Apache Isis does from a Domain model.
The above would allow me/clients to generate a UI directly off the interface and interact with it using a web browser in a similar way one would using Postman, without having to install and understand Postman.
You can try one of these:
https://vue-crud.github.io/
https://github.com/dionmaicon/vue-crudgen
https://github.com/ais-one/vue-crud-x - described in https://codeburst.io/vue-crud-x-a-highly-customisable-crud-component-using-vuejs-and-vuetify-2b1539ce2054
https://api-platform.com/docs/distribution/
I have a field in my website where I want users to enter book names that they can checkout from the database. I want it so that when they start typing the names I want suggestions or drop down under the input box matching the name of the book they are typing.
Is it possible to achieve something like this? I have a books table in my MySQL database and I am using Nodejs as my backend. I have searched a lot online but did not find anything related to this online. Therefore, I decided to ask the question here.
You have to send AJAX request with type GET and send the typed character to the Backend.
and in backend you have to do query for ex :select * from book where name like %input%
Then you have to return the result as an array to the front-end.
Finally, in your front-end code you have to render the result array under the input.
Also, you can use any ready jquery plugin to do this task in front-end code.
The UI element is commonly called a "typeahead" or autocomplete.
Twitter release their frontend component as a jQuery plugin called typeahead.js. Most frontend frameworks will have an equivalent plugin or component.
The backend datasource for the books is up to you to implement.
For small datasets you can render the required book data within the page so it is directly accessible from your javascript.
For large datasets you will probably need to create a backend "book search" service in Nodejs. Typeahead libraries can send that user input to a URL via an AJAX request and the service returns the matching results, usually as a JSON object.
Code for geek example for your stack.
You can make a drop-down menu with book names and using ajax you can get value from the input and search in database and display data .
I suggest you to use mongo db as database.
You can find tutorials in w3 schools or
in malayalam https://www.youtube.com/c/Crossroadstalk
In its most basic form, what I want to do is access data on my web server, from an Android App I'm developing (to be clear, different apps accesses the same data set).
To be more specific, I would like to set up my Web Server so that it returns a JSON String, in response to an HTTP GET request sent from the app. (That's not a requirement by any means, it just seems like how most APIs work).
So far, it seems I need a Web Framework with an MVC, like Ruby on Rails that uses a controller that can decide what to do with an HTTP GET request.
What I don't quite understand yet (not that I understand what I've said so far), is this:
How the data is stored (I know I can use a database, but I'd like to know the best/other options)
How to get query parameters from the URI
How to retrieve the data
How to organize the data into a JSON object/string
How to send the JSON string in response to the GET request
Obviously, I'm not a web development expert. I'm trying to learn, but I don't have the experience yet to even know what to search for. So I appreciate any help and resources you may have.
I have an HTML5/Javascript web site. There is a form which updates JSON data. There are other pages which I would like to load that JSON data dynamically. I know how to do this via Tomcat/JSP but I'd like to keep this site solely apache2. Is there a way to persist and read the JSON data? It is ok if the data is temporal and is lost upon an apache2 bounce.
You may want to store the JSON data in localStorage/sessionStorage on the client side.
Store Item:
localStorage.setItem('storedItem', JSON.stringify(testObject));
Retrieve Item:
var json = JSON.parse(localStorage.getItem('storedItem'));
JavaScript Storage
I am developing a mobile app which retrieves data from a Liferay-based portal. I am using JSON web services to access the data which works well for e.g. Blog Entries. How can I make a new web service for existing tables? Each tutorial I have found starts with the definition of a new entity (i.e. database table), but I don't need that. I just want to access existing data in such a way which is not provided by system ws, e.g. to filter web content which have a specific structure.
Note: I tried also a workaround, I managed to make a struts action which prints out the desired JSON data and returns null. When I enter the address for the action in a browser, I see the JSON string. But if I put it in my mobile app, I see an HTML code, it seems that it is redirected to the home page of the portal.
Neat trick if you don't want to define a new entity with servicebuilder: Just leave the entity empty, this defines just a type, but no fields, e.g. no underlying table. Then implement your methods by just delegating to whatever persistence you'd like to access (or even without any persistence).
<Entity name="Foo" local-service="true" remote-service="true">
</Entity>
This will create FooServiceImpl and FooLocalServiceImpl that you can use to implement your business logic, without any attached database table.