I have successfully developed a simple grid using MVC 4 and kendo UI. Everything works as expected and I dont have an issue with it. The other day, I was talking to another developer who told me that I could completely bypass MVC and just use a Javascript to read from SQL Server(my data source) and call it on my HTML page. There, I could use Kendo UI helpers to display the page the way I wanted.
My question is, is that possible? And if it is possible, is it advisable? I primarily work only with databases and this is the first time I am playing with MVC, Kendo and HTML as such, so please bear with me.
Thanks for the help.
Your colleague is absolutely right. You can use the client version of Kendo UI and write jQuery code on HTML/.cshtml/aspx... files and connect to your MVC/Web API controllers or a RESTFul/HTTP service using Ajax calls. This will work like a charm.
This is advisable only if you are good with Javascript/jQuery. This method will provide better user experience and you can easily build Single Page Applications which is the future of web apps.
if you see Kendo UI demos, all the examples are built on pure HTML pages using jQuery.
I hope I answered your question clearly, but in case you need any clarifications, feel free to ask.
Related
I have a project handling in which already built most of its features and uses laravel and knockout js. But I want to use Vuejs on this one because I dont know yet about knockout and I like vuejs. My concern is, is it possible that I can use both witout conflicting, or im thinking to use vue for specific part of the applicaiton like, live web alerts.
please let me know the pros and cons about this, thank you.
I am ASP.NET MVC to develop my application on web. This app requires a grid to display, sort, and modify the data. User can perform all crud operation using this grid and needs to hide any column as per need. I have searched a lot on internet to find any free HTML based control which fulfill this requirement but I did not find.
I just want to have a grid which fulfill the above requirement either that only based on java script or it have some dependencies on ASP.NET MVC frame work like other grids which are based on server side scripting which generates HTML on run time.
Any kind of help will be appreciated.
You may take a look at the Telerik Grid.
Here are some links that may help:
Ext Js - Javascript solution... maybe a little overkill, but tons of stuff out of the box.
Tutorial - Using CRUD Operations with jQuery igGrid, Entity Framework and ASP.Net MVC3
StackOverflow - Some more javascript solutions here.
I need to implement an MVC JavaScript framework for my next project, but it's as much as a website as it is a web app. Is it possible to expose the data server-side, then parse the URL to show the 'JS version'?
(I plan on using Rails for server-side code)
I wrote a small blog series on exactly this subject...
The first part introduces the problem and the previous solutions, as well as the current solution: HTML5's PushState (history API)
http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-1-introducing-pushstate/
Part 2 shows how to use progressive enhancement with Backbone, so that when you have your server render HTML you can then have your Backbone code take over the existing HTML content instead of rendering new content:
http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/
Part 3 is a (slightly blurry) video of a presentation I gave on this subject, at a conference:
http://lostechies.com/derickbailey/2011/10/06/seo-and-accessibility-with-html5-pushstate-part-3-the-video/
And while it's not directly a part of this little series, I also wrote a blog post about using Routers with PushState. The gist of that post is: you don't need a router:
http://lostechies.com/derickbailey/2011/10/17/tips-for-using-backbone-js-routers-with-html5-pushstate/
Hope that helps
Im not really sure if I understand your question the right way. I think you have some data and you want to work with it on the server side using rails and then provide it to your javascript and proceed working with the data? Thats right?
Then yes thats possible. Lets say you have a model called article and you access one article by the following url:
http://site.com/articles/1
then you can add an .xml
http://site.com/articles/1.xml
and you will get xml and of cause Javascript can parse xml. This is the default setting of rails.
i am building a site. There are two choices for me.
asp.net mvc 3.0 + ajax.
build whole site with ajax(javascript). Firstly, use ajax to get data with json format, and then fill the whole page with the data. In this way, the page will be produced only via javascript.
Could anyone tell me the advantages and disadvantages of these two ways?
Thanks in advance.
Javascript is not for building entire markup and rendering it. Don't shoot yourself in the foot.
Use ASP.Net MVC to build your site. Along side of ASP.Net MVC use jQuery/javascript to build ajax functionality.
If you choose the second option, it won't work in browsers with no JavaScript support. This may not seem all that important to you, but consider: most search engines don't support JavaScript. If search engines can't get the content on your site, it won't get ranked well.
Is there any way to use server controls in ASP.NET MVC?
Specifically I need to use the FarPoint Spread control in my application to display an Excel file that exists on the server with the ability to display updates on the client in real time.
The reason that I want to use MVC instead of webforms is that eventually we're going to scrap the excel files and create the views programmatically but I have to display these files now since we don't have time to create that functionality in this phase.
My suggestion would be to use WebForms for pages that need the custom control and MVC for everything else. In order to mix WebForms in MVC in the same application you'll need an IgnoreRoute call so MVC doesn't try to process .aspx files and you need to make sure everything needed for WebForms gets added to the web.config. Scott Hanselman has a great blog post here with the details.
FarPoint recently released a Spread component which is supported on the MVC platform .You can go through which blog which gives detailed information on using Spread with MVC 3 .I hope this helps.
http://www.gcpowertools.info/2011/12/using-grapecity-spread-for-net-with-mvc.html
I'm not sure how FarPoints control works, but if its anything like the aspose cells component I use, I dont think you'll have any problem.
As far as I'm aware, theres nothing to stop you using normal webforms controls anywhere in your MVC app, it's just that most rely on ViewState and the postback model (which arent present) and hence don't work properly.
There isnt really any UI rendered for the aspose excel control, so you should be able to just create an object, call some methods to set things up and then stream the generated file out to the response just the same way you would in a button click event.
This is all hypothetical, and I apologise in advance if this doesnt work!
Paul.
http://www.tumelty.com/