开发者

Boilerplate Javascript scripts/plugins?

I've been really enjoying getting into Paul Irish's HTML5 Boilerplate which gives best practices for html5, javascript, css and even server side stuff with the likes of开发者_运维知识库 a boilerplate .htaccess file. However, the Javascript file that comes is empty- for us developers to put in what we like.

I am wondering what Javascript plugins and scripts developers tend to use across all their sites? I want to create a boilerplate site that I start off with when I start building a new site. I tend to use JQuery, so scripts and plugins that use that would be useful.

Ideas that I have would be:

  • swfobject
  • jPlayer? (for sites that have video and audio) Not sure about this one
  • The Fade Anything Technique
  • A clear inputs script (clear any inputs when clicked)
  • externalLink script (open in new tab/window when class=externalLink)
  • Break out of frame script

The above aren't particularly good examples, but that's why I am asking the question!


underscore.js. yepnope.js.

With the latter, it would be good if you used this to conditionally load plugins. Also it could be an idea to use module patterns for this boilerplate, possibly keep it namespaced.


Hmm I am not sure if these are applicable to "all" sites. We do recommend using good JavaScript patterns, but overloading a page with plugins is something I personally do not subscribe to :)


jQuery Validate is one that I use on any site where I have forms. It has excellent capabilities out of the box and is very customizable and extensible.

This should be done in addition to validation on the server, of course; it's just to give nice, immediate user feedback.


Well It seem to be that you have confused with selecting suitable JavaScript plugins, And following a proper JavaScript pattern for coding. So what I can suggest you is to use BoilerplateJS

BoilerplateJS is a reference architecture which you can use as the base code to kick start your development. It is bundled with reliable plugins required for a complete product suite but the full flexibility to use your desired plugins is there.It follows industry recommended JavaScript design patterns. And as you have highlighted all these scripts and plugins can be used with jQuery.

BoilerplateJS source code


Great boilerplate here: https://github.com/alan345/naperg Boilerplate for a Fullstack GraphQL App with React & Prisma

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜