What is Modernizr, Normalize and HTML5Boilerplate [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
when i download a free theme or a demo tutorial in the web. I just noticed that now a days i always see those modernizr, normalise, and boilerplate thingy.
I have researched them but still i cant understand what they do? Maybe you guys can explain more or maybe use an analogy to explain it better.
It's like "Explaining New Web Development thingy for Dummies" Really appreciate it.

Due to the differences in browsers and platforms, these libraries try to make is so that you don't have to use browser-specific code to take advantage of all the new HTML5 features.
Another way of saying it is, since all browsers "interpret" the HTML5 standard differently, these libraries help to smooth out the differences between interpretations.
Modernizr: http://modernizr.com/
Taking advantage of cool new web technologies is great fun, until you have to support browsers that lag behind. Modernizr makes it easy for you to write conditional JavaScript and CSS to handle each situation, whether a browser supports a feature or not. It’s perfect for doing progressive enhancement easily.
Boilerplate: http://html5boilerplate.com/ (If this is the one you are referring to)
HTML5 Boilerplate helps you build fast, robust, and adaptable web apps or sites. Kick-start your project with the combined knowledge and effort of 100s of developers, all in one little package.
Basically this gives you a framework for laying out your webpages so you don't have to start from scratch every time.
Normalize.css: http://necolas.github.io/normalize.css/ (Again, assuming this is the one you're talking about)
Normalize.css makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.
Basically, this CSS file allows you to write standard CSS and then it helps to render it consistently in all browsers.
TL;DR Version
These frameworks/files make it so that you can focus on writing standard-compliant website code (HTML5, CSS or JS) without having to worry about browser-specific tweaks. In addition, a front-end framework like Boilerplate gives you some nice "style-helpers" to make your website look great from the start.

Related

Is it possible for browser to be NOT compatible with JQuery? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I saw that on jQuery website it says that jQuery is "cross-platform"
But isn't that obvious?
could a browser be not compatible with jQuery?
Given that every browser is essentialy an interpreter for JavaScript,
and Given that jQuery IS JavaScript code.
Is it possible for me to write a js library that will not be browser compatible?
please help me make sense about this issue
thank you
Of course.
More broadly, a particular browser may interpret some version of JavaScript which is not the same version jQuery is written against.
Is it possible for me to write a js library that will not be browser compatible?
Yes.
In fact one of the huge selling points of jQuery is that it normalizes older browser APIs so that you're actually able to write less code in jQuery, compatible with more browsers, than if you wrote plain javascript.
It's less so the case now with modern browsers
[edit] just as an example, older browsers didn't always implement 'addEventListener' in the same way, particularly Internet Explorer, so jQuery would have normalized that.
Netscape 2.0 probably ...
Else, currents browsers integrates the V8 javascript engine and are based (on some build) on chromium project (chrome, opera, vivaldi, etc), because that are best.
That is why is useless, on today, to prefix, again, in 2018, the css properties or lost time to try to support all old browsers < 2016.
Furthermore JQuery is relativly useless in full pack, because ... V8 who implements lots of evolution.
At this day, you can code in full vanilla JS without need jQuery and without difficulties.

webpage made entirely with canvas? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I really hate css. I try to do simple things and it gets really complicated really fast.
On the other hand, ive used canvas to code games which have a lot of functionality and menus..
So I was wondering if there is anything wrong with using a canvas element all over the webpage? Or even one giant canvas?
This article makes it seem like canvas is much better, but harder to use(which i think is the other way around) http://www.kirupa.com/html5/dom_vs_canvas.htm
Yet all the tutorials use css extensively. So is it bad practice? if so, why?
Using pixel drawing for web pages is a very bad idea, because own browser's viewport is almost the same but at the operating system level.
HTML and CSS are just simplifications of composing UIs without the hassle of forcing developers to draw what they want to show on screen by code.
I'm going to give you the best advice that you can find out there: learn CSS if this is the issue, because re-inventing wheels because of not reading the manual and a lack mind openness is just the worst decision we can ever made in software development.
Maybe taking a look at these pseudo-languages which compile into regular CSS might change your mind about HTML+CSS:
LESS CSS.
SASS / Compass
As others have said in comments...
...manual drawing means:
No SEO.
No search indexing (i.e. index your content in Google)
No user text selection
No way to save images (jpg, png...) using the "Save as..." dialog as regular HTML documents.
No viewport scaling depending on user's device.
...and dozens of cons.
OP said...
would this be acceptable in a professional environment? Say if I used
it in a portfolio to apply for a job.
No, because professional Web developers develop on top of Web standards: they're not creating alternate approaches to draw documents which aren't understandable by the mainstream development community!
If some tech recruiter with actual development knowledge discovers your way of developing the Web, he/she would say "impressive, but this candidate won't fit well in our development team".
In addition to the already excellent answer by Matías Fidemraizer I would like to add that it would be an interaction nightmare. You would have to manually track the position of all elements, get the position of all interaction events, coordinate them, and having an event loop running. You would, in effect, be replicating a good chunk of the browser in javascript.
Learning css is difficult for any number of reasons. If someone wrote a 'CSS: The Good Parts' it would arguably be even thinner than the Crockford book. There was recently a really great talk at CSSConf.Asia about this. Its css for back-end devs. It might give you insight into a more manageable subset of css.

browser compatibility using css3 js [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Im embarking on a project to build a new website.
From what I can see a lot of people are just going straight for css3 and ajax nowadays and not bothering to support browsers that dont have JS installed. They are using a number of workarounds such as enabling css3 through javascript in older browsers
Is this the ideal way now?
my suggestion would be what is called "progressive enhancement":
Progressive Enhancement means that each layer (content, followed by
markup, styles, and then behavior) builds upon the next, ensuring that
the core content is accessible along the way for less capable browsers
and devices. It’s not about specifics like whether your website works
with JavaScript, CSS3 Animations, or icon fonts. It’s not even about
technology. At its core, Progressive Enhancement means thinking about
a web page from the content out.
http://cognition.happycog.com/article/progressive-enhancement-its-about-the-content
start simple, and add Unobtrusive JavaScript and Css3 in a manner that, if not supported, they don't block the user from being able to navigate and use the website.
This really depends on the case. If you need to support older browsers like IE<9 and you need to do some fancy stuff not supported you can use a set of libraries 'faking' this new features for you. If you do not have to support older browsers or don't need to do fancy stuff you do not have a problem really. Check out http://www.caniuse.com to quickly see what features is supported in what browser (versions).
The question of cross-browser development, JS and CSS3 support, fallback, workarounds and degradation is the question of time and money. In some cases supporting of the old or non-trivial browsers could take about a half of the time you spent on development. Time is money. If you not sure such browsers will share a lot of the amount of visitors (which are your potential customers), should this time to be spent?
At the moment even IE8 shares only 4.31%. And it supports JS.

Prerequisites for Creating Chrome/Safari Extensions [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have been a programmer for a long time now but have majorly operated in C and Fortran. I like to believe I am good at scientific/numerical computing.
Recently, I had an idea for a browser extension. I did some googling and realized that Javascript is my best option to do so. I have never in my life looked at HTML or Javascript or CSS. The Safari and Chrome websites suggest that I should learn HTML, CSS and Javascript.
My question was- how should I proceed with this goal in mind. I don't plan to make web applications anytime but want to concentrate only on browser extensions. How much of HTML and CSS do I really need to know? Will the Web Fundamentals at CodeAcademy suffice? Do I need to get that out of the way before attempting to study Javascript? How should I plan this study?
P.S. I looked at a few books on Javascript and it looks eerily close to C which is a big plus for me. Learning Javascript isn't my concern, learning HTML/CSS is.
The Code Academy Web Fundamentals link should suffice for the HTML & CSS. Don't be afraid of HTML- you're just marking up, or rather describing the presentation of, a document. With CSS, for the most part, you're just declaring styles on the document: Make this paragraph bold; Change this background to red, etc.
I am still learning JavaScript but I bet It'll be easier for you because of your background in C. The syntax should look very familiar. Perhaps one of the most obvious differences is that C needs a compiler to run whereas JavaScript just runs in your browser.
Some nice sandboxes to try out snippets of code are http://www.jsfiddle.net and http://www.jsbin.com.
http://www.codecademy.com/ is a great place to start.
If you want a nice technical guide to the DOM, JS, the server, and really the web in general, this is also a good guide

How to get started with jQuery Mobile? (Programmers background) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a background in C++/C# and Java (Android). Now, I want to pick up what seems to me the best solution for mobile web applications: jQuery Mobile.
I know some of the very basics of HTML/DOM/CSS, but not in a structured/thorough manner.
Javascript-wise, it seems to be a rather different programming approach than I'm used to.
Where do you recommend I start? Javascript (and possibly Ajax) or jQuery or could I afford by immediately starting with jQuery mobile?
Plus, could you recommend me some good learning/example sources as well?
Thank you in advance.
-Thomas
jQuery mobile is a plugin written using jQuery in order to Enhance html5 elements appearance and behaviour to match iPhone design pattern for application behaviour (Progressive enhancement).
Whilst it is fairly easy to get started filling the templates jQMobile provides as a C# developer you need to understand that working with JavaScript and jQuery has some significant differences.
jQuery was a community necessity and is basically nothing but an abstraction layer on top of JavaScript to rectify the difficulties programmers were facing which mainly had to do with the difference of JavaScript implementation in different browsers and also the weakness in the DOM which is an API which allows JavaScript to access elements inside the document.
What jQ basically does is it takes care of those differences for you and exposes methods to you that are pretty much guaranteed to deliver the same results across supported browsers.
This will greatly help you get started by still wont allow you to learn the fundamental differences between the world you are coming from and the world you are getting into.
JS does not have classes only functions. However functions can have methods and be instantiated. The inheritance in js is Prototypal Inheritance.
new f()
produces a new object that inherits from
f.prototype
more info here
To learn the basics and understand more about this language before you use it! please watch this also

Categories