React JS - is there a way to have a variable number of checkboxes in a React UI? - reactjs

I've written a simple application in React-js/Spring boot which essentially generates software licenses (an xml file) and records basic facts about the license issued, such as customer name etc.
This has worked fine, but now the request is to store specific features of the software which are enabled via the license, e.g. reporting, notifications, etc.
These attributes are carried as name/value pairs in the xml file, most of which will never change. But there are a few that could change, and the request is to have checkboxes on the UI which allow the user to enable one or more of this small subset of features.
Since this list of features could vary over time, I'd like to create a text file which lists the names of these features. This file would then be used as the basis to dynamically create checkboxes on the UI.
This sound like it should be do-able, but as I'm not very familiar with React, I'm wondering if this is a little ambitious.
So the question is - can you create checkboxes on a React UI based on names you read from a file?

Related

Creating a platform that houses 2 existing platforms

I have 2 existing projects that are independent of each other, and I was tasked to bring them together under a suite of some sort and share some small data between them. The problem is one platform is using ReactJs and the other using VueJs.
Example:
To give you a small example, it's like having Facebook and Instagram using different JS frameworks, and bringing them together under one platform let's call it Meta so the user goes to one platform and finds all products that the company offers.
(Example of the data that needs to be shared: Dark/Light Mode, User is logged, ....)
And is it possible to wrap both apps inside another, like having a whole new project consisting of a Navbar and a body, and the body switches between showing the first and the second platform using the navbar links?
Please if you have any suggestions throw them at me.

Creating a Android catalog

Anyone seen an android app created with App Inventor that is a catalog?
I want to create app with a static DB, when a user selects a number it will display the item name, details about the item and image of that item.
I suggest this easy way if you're a beginner at programming in general and you know a bit of HTML and Javascript.
Have your database in JSON, most database management systems will export your tables in JSON format.
And here is how to insert your javascript in App inventor
http://puravidaapps.com/javascript.php
Using a javascript library will make the process even easier.
Let me suggest to store your data in a csv file. Just add it as asset into your project and import it using the File component. Your catalog could be displayed using a listpicker component.
Start doing the tutorials to learn the basics of App Inventor. Also take a look at How to work with Lists by Saj
How to work with Lists and Lists of lists (pdf) by appinventor.org
My suggestion would be to use a list stored in an online database like firebase or a custom tinyWebDB. That way you can change the items, their prices, descriptions without having to build the app all over again. As a bonus, you could use that database to track purchases. If by static DB you mean a database on the device like tinyDB, I would still recommend using lists because they are so easy to work with.
You could have 3 paired lists. One list could be for images, one for the description, and one for the name. Then when a user picks the item number, say 3, you display item 3 of names, item 3 of descriptions, and item 3 of images.

Database vs static html files for storage solution (Site Builder)

Project Description:
As a learning exercise for asp mvc 4, I'm creating a site builder / multitenancy site. It's nothing too fancy just wysiwyg editing on templates with custom routing to direct users to the correct template based on subdomain. So usr1.mysite.com is directed to the template edited by usr1. My main concern at the moment is my method of storing the edited templates.
Storage Dilemma:
At first I was simply going to make the templates into views and store the changes made by the user in the database. When usr1's template was displayed the system would pull up the view and populate it with usr1's data.
Instead I've implemented a system that takes the user's modified template and saves the whole thing as static html files in the file system. Only the path to the usr1's site (and some other details) are saved in the database. When usr1.mysite.com is called I just have a "content" controller to retrieve the correct html file.
Question:
Is there any reason to choose the database/view method over the static html file method?
Also I'm not concerned with having dynamic content in the end user pages. This is one reason I even tried the file method.
Decision (EDIT):
I'm implementing the file method. After more research (verifying my previous research), I have few doubts the file system will have trouble with even a few hundred sites. I will structure it in a way to group user data directories into group directories based on a naming convention I've yet to dream up, probably something like 000usr1, 000usr2 in 000 group directory. With a goal of less than 100 files/folders in any given directory and less than 4 levels deep. Which should give me the capability of holding 10000 sites. I have no plans of having any activity near that level with this software, but I do want to get up and running and torture it for awhile and see what it's capable of handling. If anyone expresses any interest I'll post back some results.

Salesforce: script to create custom object and fields

Is there a way to create custom objects and fields by using script or IDE ?
Salesforce is very easy to use, however, it's so time-consuming to create so many fields on Web interface. So, just wonder if there's ways to use script or IDE to create objects and fields in Salesforce?
You're looking for the Metadata API, or already developed tools which use the metadata api.
http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_intro.htm
http://www.salesforce.com/us/developer/docs/api_meta/index.htm
Though using it directly will still require some developement, which may not save you much time. you get metadata in XML, but would still need to process it to what you want to achieve.
Somewhat also depend on the nature of what you want to do. I for instance had a requirement today for 150 custom labels based on an input file. Was much faster to generate metadata XML than to ever do that in the web interface. Deployed the metadata using the force.com IDE.

linking gwt combobox with database

I created a gwt app with a gxt combobox. I have it where it pulls data (a list of names apprx 5000) from the database places it in an array which in turns places it in a store. That is then placed in the combobox using set store, so when a user starts typing in the combo it searches through the store for the name. My question: is this the best way to do this or is there another method.
How is the performance loading that list of 5000 names? Does it take a long time to load your page? You may want to think about loading them as you need them so that the gui loads faster.
This article suggest 'lazy loading' gui components
http://googlewebtoolkit.blogspot.com/2008/11/improving-performance-with-on-demand.html
How have you pulled down the list? I assume is via RPC, have you used a Data Transfer Object?, XML?
This link talks about options for serialization http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes
Michael

Resources