Confusing about using angularJS with Codigniter - codeigniter

I'm new to front-end MVC and I decide to create a SPApplication then I found this angularJS. Of course, other MVC as well but I prefer angularJS.
Ok, my questions here.
Before this, I normally store my MVC files at backend MVC folders which is codeigniter view folder if it is html partial or page.
So is it the time to move the backend MVC to frontend?
Another question, what is codeigniterRest? do I need it to use with angularJS?

No, the backend MVC in CodeIgniter and the frontend MVC in Angularjs have a separate role totally.
The backend MVC will handle the data sent to the app by your frontend.
The frontend MVC in angularjs will receive a response (usually in json) from the backend MVC in CI and handle that data using its views and controllers.
So your Single Page App will consist of all the bells and whistles of CI + 1 view page (or more if you break that page into partial includes) that will store the angularjs app in it.

Related

NodeJS MVC framework with partial ajax-loaded views

I'm looking for a NodeJS MVC framework that allows rendering partial views on client side using Ajax (without whole page refreshing).
As far as I know, you can declare partial views on server with almost any Framework (Express, Sails...), but this will lead to refresh the whole page even if there's only a small portion of your page that really changes. This problem doesn't exist with a SPA Framework (this one would just load the partial html file in a container via ajax).
I believe Microsoft ASP.NET MVC was able to handle this case, by comparing the previous version of the page with the new requested page, and just returning the portion of the page that really changed. This may be time and CPU-consuming but it just works.
Is any Node MVC Framework managing a similar thing today ? Or is it mandatory to use an SPA Framework when a reactive user interface is required (without any whole page refresh) ?
Thanks in advance !
sails.js! It supports partials as you requested. You don't need to refresh the page, if you send ajax-request or handle the stuff via websockets dynamically.

MVC Partial View with pagination in a WebForm

How can an MVC partial view with pagination be included in a webform from a different application? Both applications can reside in the same domain. How do you handle the page links and the post back of the new page?

How to fetch url data in asp.net mvc3 application?

I want to extract/fetch url data in my asp.net mvc3 application. How can i ectract url data. Its like facebook does in wall post.
http://www.9lessons.info/2010/06/facebook-like-extracting-url-data-with.html
How can i do that? any reference or demo available for asp.net mvc3 application?
You need to use the WebClient class to fetch an external page, and the HTML Agility Pack to parse it.

MyUpdatePanel.Update() in Razor

I am trying to convert my existing ASP.NET application to MVC 3 Razor. I use a lot of updatepanels, and I do conditional updates at the code behind using MyUpdatePanel.Update().
I am not finding this functionality with MVC 3. I can see a lot of blogposts talking about jQuery and how to use it to achieve the same, but I want to render other partialviews from my action conditionally. Is it possible to achieve it?
The way you'd work with Ajax in ASP.NET MVC is completely different from the ASP.NET way (i.e., Ajax toolkit with server-side controls such as UpdatePanel).
ASP.NET MVC is more basic and therefore more work. You handle Ajax calls on the client side using a library such as jQuery, and on the server side you implement a controller with Ajax methods.
Have a look at http://sweettam.blogspot.com/2011/06/aspnet-mvc-3-ajax-part-i.html.

Live Search using ASP.NET MVC and AJAX

I am looking to implement a live search in my MVC app similar to this site when you type in a question and results come up that are similar or like the search on http://www.krop.com/
I have the search code all working and results updated. I just need to know how to add the AJAX to the MVC framework (I know this site was built using it) so that when I type the results are updated.
I had this all working in normal ASP.NET Forms app.
what you need to do it attach to Jquery onchage event handler, and then call some ajax method of jquery ($.load , $.ajax etc...) and the information from a specified controller. asp.net mvc controller can return json results so you can later manipulate it in your javascript code.
if you have any other questions go ahead and ask.
An ASP.NET MVC site will have AJAX and JQuery available by default.
Mike Bosch's Blog can give you some pointers on this

Resources