Does :remote=>true in Rails3 auto downgrade? - ruby

I have read about using :remote=>true in rails3 and know that it add data-remote=true attribute to the generated html tag. But data-remote is a new attribute introduced in html5. Will :remote=true auto downgrade to some compatible implementation(old js or something else) in a browser that doesn't support data-remote attribute?

You don't need to worry about that.
data-remote is not something the browsers support, but something implemented in rails-ujs (which is the jQuery-to-Rails integration lib). Pretty much all browsers today support data attributes (whey supported them even before HTML5 was introduced).

HTML5 introduced custom data attributes, i.e. you can add your own attributes to an element by prefixing them with data-. Rails uses data-remote="true" and adds functionality using jQuery.
Your browser just has to to be compatible with jQuery.

Related

Is HTML5 validation possible with the Web Plugin for SonarQube?

Does the Web Plugin for SonarQube allow HTML5 validation? Has anyone tried that?
I've read the plugin's documentation, and it mentions JSPs and HTMLs, but I need to know if it supports the new HTML5 tags.
I've just tested html5 validation with sonarqube 3.7 and the last web Plugin, and it works fine. There are a few specific rules for html5 tags. It's a good base to start working, and you can add more rules with regular expressions.

What ajax framework can i use for organize my javascript code in a single page application entirely server side rendering?

My website is an ajax single page application with serverside rendering. What are some javascript framework i can use for made a better organization of my javascript code?
BreezeJS you can use for rich data centric apps, which can be used with knockout or angularJS.
I prefer u to use HotTowel SPA template and take a look on this link
http://www.johnpapa.net/spa/
And before asking any questions You should be clear for what you need and why u need. So take your time and look around you will get.
You can look into breezeJS which is used to build rich Data-Centric application, for DOM manipulation you can use some JQueryUI or KendoUI, for dynamic Data bindings which will allow you to change the content of your Views you can prefer Knockout or Angular. Using AngularJS will be much appreciated as it provides rich AngularUI which helps you to change your view to manipulate DOM. Based on type of application you want to develop, you can select from the above suggestions.

remoteLink deprecated in Grails 2.4, now what?

I noticed in Grails 2.4 documentation (http://grails.org/doc/latest/ref/Tags/remoteLink.html), it mentioned the remoteLink tag is now deprecated.
But I don't understand the second part of the warning:
"Applications may provide their own Ajax tags and/or Javascript plugins may provide Ajax tags of their own".
So it will be simply removed so we shouldn't use it at all? What is the replacement for that?
Thanks.
Basically, they're removing the tags because they don't add much value, and instead contribute to bad design patterns - they're too low level. It's usually best to play within whatever Javascript frameworks you're using, and make higher level tags that make the AJAX calls for a purpose, rather than having a Grails tag JUST for making an AJAX call.
https://groups.google.com/forum/#!topic/grails-dev-discuss/IXvqDUr6CIE
https://groups.google.com/forum/#!topic/grails-dev-discuss/4yesijtFSB4

Joomla : Want to build custom form with my own back hand code

I just want to create custom html with good css form with my own php as backhand code and javascript for validation.. Is there any extension for this?
I have seen few extensions but none of them allows me to add my own php backhand code.
Thanks
If you are not going to use Joomla's framework, then you may as well build the form outside of joomla and insert it into the article via an iframe (you may need to change the editor's permissions to allow you to do this).
It is worth looking into using the framework properly, however, as it does have easy-to-use mail classes and actually makes things easier when you get your head around it.
(Though to answer your actual question - this module appears to allow you to add raw php http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules/3668 )

MVC sitemap provider & css styling

Does anyone know how to customise the rendering of the MVC sitemap provider so my ul element has a specific css class?
Try MvcSiteMapProvider hosted on CodePlex. You should be able to fairly easily migrate your existing Sitemap file to the slightly different but essentially compatible format. This will give you the ability to output your sitemap using the simple Html.MvcSiteMap().SiteMap() helper method.
The source of the project includes the default templates which you can edit to produce any rendering you like...or just pass in the name of a template in accordance with MVC convention. The model types you'll be rendering are SiteMapHelperModel, SiteMapNodeModel and SiteMapNodeModelList (namespaces removed for terseness).
I appreciate this may not be exactly what you're after as it relies on a 3rd party tool but its a useful project that supports much more than just rendering sitemaps. You'll want version 3.0.0 for MVC3.
Dan

Resources