I am presently working on a Django project that requires the implementation of Ajax.
e.g adding model objects to the database, getting and updating model instances from the database etc without refreshing the page at all.
I have searched everywhere but am yet to come across any relevant material.
I would implore the gurus in the house to point me in the direction of materials you know could seriously be of help. Thanks
Django Ajax forms
Dajax project
Ajax and Django views
What you ask looks like implementing a RESTful API (create, update and get objects...)
You should have a look at Tastypie or Piston
For a comparison of those two look at this question
Related
I'm developing a personal project using Laravel with Inertia.js. I tried retrieving data from back-end to front-end through HandleInertiaRequests Middleware. I was wondering how will malicious people could get advantage of the data I show up in front-end. Inertia.js webpage discourages retrieving sensible data in this way, but I can't figure out how that will be possible. I apologize if my answer sound a little naive, still pretty new to Laravel ad never used Inertia before. Thanks for your time!
The HandleInertiaRequests Middleware is nothing but a way to merge data into the array that will be available to your JavaScript components (Vue, React, Svelte) on the client side.
It is just a way to avoid repeating yourself on every controller for things that you'll probably need on a lot of pages. For example, instead of getting the data for a Menu component on every controller, you do this only in the HandleInertiaRequests Middleware.
So, they only warn you to be careful with what type of data you put into it. For example, you probably don't want to pass the user password through this in the same way you wouldn't do that using a Blade view instead of Inertia.
I made my project in school with all request methods and get methods through ajax. Also i used data tables with ajax to do my CRUD related entities. What would be the disadvantage of my app?
Is there any bad behavior in my web project because i used ajax all the time?
I am using CODEIGNITER Framework and made ajax all for database methods like post and get. Please some piece of advice.
One Problem might be that there are users (or devices/browsers) out there who block scripts. For those your App wont work.
I'm pretty new to Dojo and I'm wondering about some best practises for building a MVC application. I know there are modules like dojox/app, but it seems like these are made for more complex applications.
It seems like the best way to go is to make custom page-level controller objects with will handle all the page logic, but I'm not quite sure how to fit this piece in the puzzle. What is the proper way to switch between views and passing through parameters through them following a MVC archtiecture.
I have an overview page with list items, each with their own ID. I want to navigate to another page passing through the corresponding item ID so I can retrieve the details for this item externally. What would be the proper way of doing this?
I could call a method on the corresponding controller (Page1 Controller or Page2 Details controller) directly using a button and passing the listID parameter directly?
Another way of doing this could be by working with transition states and addling listeners in the page controller to forward to the correct page. Although I'm not quite sure how to pass parameters in this scenario..
... any better solutions?
Can anybody shed some light on this? It doesn't seem like there is much documentation/examples on this with the latest versions of dojo (1.9).
Thanks!
I will recommend dojox/app since you are already using dojo mobile.
It's very simple to get started and can be use for simple apps or very complex apps
Take a look at this resources:
https://github.com/csantanapr/dapp-examples/tree/master/dapp-request
https://github.com/csantanapr/dapp-boilerplate
http://dojotoolkit.org/documentation/tutorials/1.9/dojox_app/contactsList/
I am trying to learn backbone.js to make a web application.This is my first time with a javascript framework and I am fairly confused with some of the stuff.
I have been developing in codeigniter for a while so I do have a understanding of the MVC architecture.
My question is how do I get the data from the backbone.js front end to my codeigniter controller and save it in the database. for example to implement a simple login/register functionality with CI and backbone, how should I proceed. If anyone can guide me step step then that would be great or point me to the right resource. Thank you.
PS: I know that I have to implement a REST api with my codeigniter but I don't know how? so if someone can provide a basic controller example it'd be really helpful.
Here's a tutorial to use the API mentioned in the above reply (by the author of the library himself)
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
I am using mvc3 and I want to create an API with the site.
MVC makes it really easy to return json from the controller which I know how to do.
I want to use a subdomain for the api something like http://api.mydomain.com
I have a few questions
Do I create an area for api or just place the controller and model in the root?
How can I point to the subdomain so the url is api.mydomain.com not mydomain.com/api
What is the best way to version the api? do I just create a new controller for each version e.g. V1Controller,V2Contoller etc etc
Any suggestions would be really helpful.
Thanks for your help
I have recently used ServiceStack, I really like working with it, you should take a look
http://www.servicestack.net/