I have an excel with some constant values(these values would be updated quarterly), I need these values to make calculations and display in my front-end application. Currently there are 2 approaches to this problem that have been implemented:
to use any third party library and convert required excel data to json and store it in front-end application and then use it.
to create a data service that would read excel data and return whenever its called
Both these approaches work well but I am looking for is something more innovative and maintainable.
Thanks in advance for your help!
Related
I want to sync data between two different backends, one written in Javascript and the other in Java.
The JS backend has its data stored in a MongoDB but the Java backend contains some hardcoded data that I need to fetch in order to store it the DB of the JS backend.
Now my question is what are the possible solutions to do that from an architecture perspective?
You have a "Split-Brain". You can only use one Data Store. You have to migrate the Hardcoded Date to MangoDB an to read the data from there.
I have a MySQL database and retrieve data using php on a website where I would like to visualize the data in different ways. For this I also need to transform the data (e.g. creating sums, filtering etc.).
My question is now at which step of the data flow this kind of transformation makes most sense, especially regarding performance and flexibility. I am not a very experienced programmer, but I think these are the options I have:
1.) Prepare views in the database which are already providing the desired transformed data.
2.) Use a PHP script that SELECT's the data in the transformed way.
3.) Just have a SELECT * FROM table statement in PHP and load everything in a json, read it in js and transform the data to a desired version.
What is best practice to transform the data?
It all depends in the architectural design of your application.
At this time SOA (Service Oriented Architecture) is a very used approach. If you use It, logic use to be in the services. Database is used as a data repository, and UI manage final data in light weight format, only really needed information.
So in this case, e.g. your option number 2 is most appropriated.
Does anyone know how i can parse LinkedIn accounts? Or Any tool( not paid ).
For example:
I will look for "Software Engineer" from Dallas,TX.
Tool will automatically pick all candidates from linkedin or for example first 100 candidates, and store their First Name, Last Name , LinkedinLink and Experience in excel document? ( Or from specific company)
Is it should be done threw API, or there specific account which allow to do this? Or does anyone knows tools which will help to do this? Or Script?
I need to parse a large amount of candidates , 100+ maybe 1000+ and store them.
I have multiple thoughts about implementation but i feel that it 100% already implemented.
https://developer.linkedin.com/docs/rest-api
Use linked in APIs to fetch data and process it however you would like. I don't know how much of 'private' fields you can get access to but names seem to be there.
I use nodeJS to process excel data - xlsx is a very good option but it only allows synchronous execution so you would have to spawn another process. It also has filter function so you can do whatever you want with it.
The problem that I had faced with parsing large data into excel is that excel file is a compressed xml format so it takes a long time to parse both reading and writing. A faster option would be to create and read csv which excel can naturally do as well.
I am working with php and heatmap js to generate a heat-map.
I was thinking of going down the path of allowing the user to upload a floor-map jpg file initially and then allow him to add the sensor names to different locations in the floor-map.
Once the sensor locations are specified, I need to save that configuration to an XML file. Once I have this set of information (img_id, [sensorid1,x1,y1], [sensorid2,x2,y2],..,[sensoridn,xn,yn]), I can query my database for the latest values of sensors and then display as heat-map on the image (on the specific sensors' x and y coordinates) real-time.
I would like to know if saving the configuration as XML is the right way of doing it. Is there there a better way of temporarily storing the information using javascript/PHP?
There are likely a bunch of ways to solve this. My preference would be for JSON, as it is natively supported by Javascript and PHP. It is also MUCH easier to read and write.
When you say "saving", what do you mean? If you need it to be stored server side, then creating DB entities that the data structure can be mapped to and stored in will be far better than trying to create files server-side. Depending on how the app gets hosted, you may not have permission to do that, and if your server ever goes away you could loose that data (However, there are safe ways to create files using a service like AWS S3). Storing it in a database not only gives you a single place to worry about backups, but also lets you query the data in interesting and powerful ways (SQL etc) easily, without having to figure out how to do that for files with every new query.
I'm not really comfortable working with Ajax as I just started using it.
My question is as follows:
What is the best way to manage data fetched using Ajax?
I have a script that fetches data from a database and displays it in different ways depending on the users filters and order criterias. So far, I query the database for every requests and was thinking if it could be better to fetch all data at once, store it in an array of objects and run queries like ordering and category filtering locally using Javascript.
Any gains in termms of speed and/or performance?
Thank you.
Show an example first. An example of the data that is fetched from database and the required way to arrange them. You can use XML or JSON or straight JavaScript object. the question is which one do you like to work with? I would choose the returned data from database to be in XML format. Show us an example of code where you don't know what to do.