How should I structure .net website to use a web api? [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm starting a project that will use a search bar to hit a web api and return the results. There will be no writing to the web api.
My biggest struggle when creating a new project is how it should be laid out. I never know when i should create a DAO, do it all via javascript, put it in a controller, etc.

For developing something like a search engine or any web application. You would need following:
A frontend, which is your application's GUI in browser of user or mobile application.
A backend logic, this could be in any server side scripting language, in your case you would be writing server code in .net
Now, your backend must expose a search api, Eg. If I send a HTTP GET with a variable q, it should return search results matching the query.
Your frontend must have input-box and a button for allowing users to send this request.
This answer isn't complete, just a vague overview of how this problem can be approached, also this isn't the only solution.

Related

trying to implement a search on mongoDB and get the results to display on page [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
search functiondisplays the searchimplements the search
React is completely back-end agnostic. This means you would have to implement the connection yourself.
The regular way is, you setup MongoDB and a Node.js server (or whatever back-end you like) then you connect the Node.js server to MongoDB (via MongoDBs JavaScript SDK) and your React client, which runs in the browser to your Node.js server (via HTTP, express framework could help here).
Browser -> Node.js -> MongoDB.
But MongoDB also has a REST interface you could use directly via the browser, like it's mentioned in the following answer:
https://stackoverflow.com/a/16277603/1016383
Would probably be okay for small proof of concepts or experiements,.

How to control Django with Javascript? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am building a web application with Django and I show the graphs in the website. The graphs are obtained from real time websites and is updated daily. I want to know how can I send graphs using matplotlib to template and add refresh option with javascript which will perform the web scraping script which I have written. The main question is which framework should I use? AJAX, Django REST, or what?
You're better off using a frontend framework and calling the backend for the data via JS. separating the front and backend is a more contemporary approach and has some advantages over doing it all in the backend.
From personal experience, it gets really messy mixing Python and JS in the same system.
Use Django as a Rest-ful backend, and try not to use AJAX in the frontend, then pick a frontend of your choice to deliver the web app.

Should i try to replace an api by minimalist website [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm working on a chrome extension and I need to get a schedule data from outside of the extension to let the admin broadcast the schedule to the extension users. I wanted to use hapi.js but I can't afford to buy any private server. I did find free website hosting. I thought I would do a minimal website with just a login system and some pages containing the data I would want and make some get request on the extension and extract the schedule on the extension.
Is it okay like a replacement plane for the API?
For almost the same purpose I was using WordPress website with json api plugin. (https://wordpress.org/plugins/json-api/) It is super easy to install and later you can simply run fetch requests inside of your application or extension.

Is there any advantage to use the Mantra.js architecture framework? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Meteor.js integrates well inside a Mantra.js architecture, but does it have advantages since it slows the running of my requests.
For instance a dummy request in GraphQL (get a random string from the server) runs in few ms using Apollo Client and 1 second and more using Mantra.js (exact same request wrapping Apollo stack).
It only depends what kind of project you want to work on.
Mantra.js is an architecture framework for Meteor.js, that means :
it helps a developer to follow the creation and development of its modules corresponding to the Mantra framework. The developer is free to use any kind of front-end library he/she wants, any Data Query and Client caching he wants, but in my opinion, it doesn't really improve the quality of the code. Someone can organize a project with own rules and it can be maintainable easily.
So if your team is comfortable with your code structure you definitively don't need something like Mantra.js.

Making my own website with server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am making my own website and I've never really done it before. I am familiar with each of the separate parts, but I've never put them all together before.
I want to have html and javascript on the front end. This would send HTTP requests to my PHP on the backend. The PHP would then have an open socket with my java server that would store data in mysql or mongodb.
javascript client, PHP backend, Java server, mysql/mongo database.
Is this the appropriate way to set up a restful api in a general sense? If not, how should I do it?
You have it right. Javascript on the front end and PHP on the backend is an incredibly popular and powerful combination. The Apache server seems to be more popular among PHP users, but a java server works just fine.

Categories