I don't like these frameworks, I especially don't like that elegant primitives like Object.observe were dropped because popular frameworks couldn't make use of it with all their custom baggage.
I don't like these frameworks, I especially don't like that elegant primitives like Object.observe were dropped because popular frameworks couldn't make use of it with all their custom baggage.
The switch in popularity from Angular to React this year was amazing to see. I wonder if something similar will happen the next year.
Huh, I just noticed that. I figured that it'd be seeing a lot of use with all those frameworks popping up.
Edit: Shouldn't it be possible to implement something similar with proxy?
That's a weird reason for not liking frameworks (showing that there's no need for a certain feature or spec, similar how the most popular frameworks accelerate specs that have been found working and useful in other implementations).
contains tons of caveats, making it easily disastrous to all devs a like. If you absolutely need , you can always use a polyfill, or maybe you could just use Proxies.
There is a need though, if you've ever seen how frameworks do observables (and many do) it's a mess of polling and wrappers and that's exactly why there is no upgrade path for them. Some of the stuff I was using it for resulted in huge code reductions and with good performance. Proxies are a bit of different concept but it's an out at least.
I have seen (and used heavily) observables across frameworks and languages and I was very hyped about Object.Observe few years ago (which in return is why I am so excited how React handles things) and there's obviously (some) need for observables in general: I just think that was the wrong way to go in general: side-effect heavy and hard to debug.
Anyone know a good tutorial on how to make a call to and connect an api?. I've never done it before and my friend may pay me as contract work for adding a functionality using JS/jQuery to his web app. Also feel like this may be an audition for a potential internship next year so wanna try and complete it on my own if possible. I've done some googling of course but was wondering if any devs here on GAF had any advice.
But besides that in other news posted in the programming thread but I finished my 1st web site. So confidence has gone up tenfold. And despite my best efforts I've continually failed to convince people I'm stupid since I've gotten 5 votes of confidence to start looking for dev jobs/internships already lol. Though aside from that I feel like I've had the network to land a job but I thought I needed to a minimum a beginner rock star to even be considered. And by that I mean I thought I needed a massive portfolio like all those bootcamp people usually have or a degree to even get my foot in the door.
You mean like a REST API?
I guess. Not gonna lie still not entirely sure what that means =/ lol. Like I said still new at this and still feeling that impostor syndrome despite being told otherwise. But without going into too much detail, I need to add a random amount of items to a web page based on a user's location. So say you're in the San Francisco, every time you check the web page x amount of random names from people using the app should pop up.
Thanks for the advice!. Some of that actually made sense to me since I've briefly used Ajax. I learned how it works at least when I was taking a class at a hackerspace. Also my friend did say just make an html file with jQuery and call the api. Anyway thanks again for making it clearer on what I have to do so I hopefully I'll have an easier time solving this.You'll be making AJAX calls to do this. Without getting too complicated, AJAX calls are for either sending something to a server or receiving something from a server. To make these calls work, you need two components:
1. A call from the client side. That's in your web page, done in JavaScript. There are a few different ways to do AJAX calls from JavaScript, but for simplicity's sake I'd Google how to do it using jQuery. You'll most likely want to do a Get call which uses the Get HTTP verb for getting data from the server.
2. A response from the server side. Since your client side call is reaching out to something to get data, there has to be something there to provide data. This is your API. You can host such an API on a webserver using a wide variety of technologies. The one I've used the most is WebAPI, which is Microsoft stuff. Basically I've just set up a bunch of C# code which is prepared to take calls to certain methods via certain verbs (Get, Post, etc.) and typically accesses a database and then returns the appropriate data.
So there's a good variety of different ways to accomplish both of these steps, but those are the broad strokes. You'll need to fill in on your own how to create whatever you're missing.
Interestingly was a great way to debug side effects.
Thanks for the advice!. Some of that actually made sense to me since I've briefly used Ajax. I learned how it works at least when I was taking a class at a hackerspace. Also my friend did say just make an html file with jQuery and call the api. Anyway thanks again for making it clearer on what I have to do so I hopefully I'll have an easier time solving this.
Scoped CSS was never really supported by browsers and I think it's not coming any time soon in favor of shadow dom, web components and all these fancy new techniques.
http://caniuse.com/#feat=style-scoped
Until we can safely use web components in ALL browsers (and not just chrome) we have to rely on other tools.
I for myself use BEM to get rid of css inheritance, specificity and other side effects with external libraries in my CSS. I can't recommend it enough, it solved so many problems that there is no way I can live without it anymore.
It looks a little bit ugly at first, but everyone I know got used to it.
There are other approaches similar to BEM, but I never tried them.
http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/
I'm a big fan of BEM - and right now I'm doing it with the ITCSS method for ordering my SASS and breaking them down, so adds the component/object notation to the start of a class, eg o-list, o-list__item. Learnt about it from a colleague who went to one of Harry Robert's workshops so there's not one link I can share, but this covers a bit (and the video) and you'll find a few slidedecks on Google: http://www.creativebloq.com/web-des...-projects-new-css-architecture-itcss-41514731Scoped CSS was never really supported by browsers and I think it's not coming any time soon in favor of shadow dom, web components and all these fancy new techniques.
http://caniuse.com/#feat=style-scoped
Until we can safely use web components in ALL browsers (and not just chrome) we have to rely on other tools.
I for myself use BEM to get rid of css inheritance, specificity and other side effects with external libraries in my CSS. I can't recommend it enough, it solved so many problems that there is no way I can live without it anymore.
It looks a little bit ugly at first, but everyone I know got used to it.
There are other approaches similar to BEM, but I never tried them.
http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/
Ahh thanks again for the advice. 5 lines of code?. That doesn't sound terrifying at all lol. Ok sounds like I can possibly finish it this week.It sounds like you only have to write the client-side portion so that shouldn't be too bad. You should be able to write code that retrieves the data you want in about five lines or so. Be aware that remote API's can have specific requirements for how they will serve data, so if the API method you're accessing only allows GET requests, you'll need to make sure your request is using GET. Also, they usually specify which type of data they'll return (typically JSON) so you'll want to be aware of what kind of data you expect to receive before you process it.
Maybe you want to post some example markup you have to deal with? You could replace the actual text with some lorem ipsum if needed.Thanks very much, my regex skills aren't too hot but it sounds like something I'd better put some time on.
Maybe you want to post some example markup you have to deal with? You could replace the actual text with some lorem ipsum if needed.
<p>Chapter 1.</p>
<p>Call me Ishmael.</p>
<p<Chapter 2.</p>
<p>Call me Queequeg.</p>
<p>ONE</p>
<p>I received the following letter:<p>
<p<Dear Sirs,</p> <!--I'd have to make this part a blockquote-->
<p>In which Ishmael writes a grocery list.</p> <!--I'd have to interpret this as a chapter head-->
<p>1. Apples</p> <!--I'd have to make this part a ordered list.-->
<p>2. More Apples</p>
It could be stuff like:
Code:<p>Chapter 1.</p> <p>Call me Ishmael.</p> <p<Chapter 2.</p> <p>Call me Queequeg.</p>
But it can also be stuff like:
Code:<p>ONE</p> <p>I received the following letter:<p> <p<Dear Sirs,</p> <!--I'd have to make this part a blockquote-->
Or stuff like:
Code:<p>In which Ishmael writes a grocery list.</p> <!--I'd have to interpret this as a chapter head--> <p>1. Apples</p> <!--I'd have to make this part a ordered list.--> <p>2. More Apples</p>
…so it's pretty darn variable. Seems like I'd better get my head around regex so I can figure out how to target stuff that's between the tags, based on search criteria that'd vary book-by-book, and I'd also better accept that there's a limit to what that can do and at best it'd just get me a decent "first pass".
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Your page has 30 blocking script resources and 36 blocking CSS resources. This causes a delay in rendering your page.
None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.
Hi all you people much smarter and more talented than me. I don't really know what I'm doing when it comes to web design some I'm hoping some kind soul here can help me out a little bit. I know you are all busy people and I'm not asking for a handout, just a little bit of help!
I'm working on a wordpress website, using a template, and trying to speed it up. Google gives it a 52/100 on the page speed insight page. Some of their suggestions I understand and am trying to fix myself, but the main one that Google says I "should fix" I am having trouble understanding what exactly I should do, even with googling solutions.
Google says:
Anyone got any kind of simple step by step guide on how to do this? I'd appreciate you forever.
Concatenation and minification is a good start. As you are using Wordpress, try https://wordpress.org/plugins/bwp-minify/ plugin first. There's an async plugin too: https://fi.wordpress.org/plugins/async-javascript/
Hi all you people much smarter and more talented than me. I don't really know what I'm doing when it comes to web design some I'm hoping some kind soul here can help me out a little bit. I know you are all busy people and I'm not asking for a handout, just a little bit of help!
I'm working on a wordpress website, using a template, and trying to speed it up. Google gives it a 52/100 on the page speed insight page. Some of their suggestions I understand and am trying to fix myself, but the main one that Google says I "should fix" I am having trouble understanding what exactly I should do, even with googling solutions.
Google says:
Anyone got any kind of simple step by step guide on how to do this? I'd appreciate you forever.
It's saying you likely have a lot of CSS and JS in the <head> tag. Best practice is to put non-essential CSS (i.e. CSS not needed to show the very first screen) at the bottom of the <body> tag. JS should always go at the bottom of the body unless marked async. Critical CSS used in the first screen should be inlined.
That said, separating your CSS by critical path like that is a huge amount of work for little gain so I'd worry less about it. The bigger is issue is that you seem to have huge amounts of separate CSS and JS files you're trying to load. The easy win here is concatenation. You can create a build script (most often gulp or grunt) that takes all your JS and all your CSS and lumps them into single files. Since the browser can usually only have about 4 open connections everything else has to wait until those are fetched before it can move on to the next thing and by reducing the number of files you greatly speed up the initial load.
I'm using a theme I bought so I guess all that stuff in the head is from them? I have no idea how to do a build script or anything else you said. So the easy win in my case would be hiring a web dev I guess?
The Wordpress plugins I provided before should do the things Somnid describes for you automatically.
Hotspots maybe?Does anybody know what this is called? It's just (in theory) an image with points that users can click on to get a text balloon. I want to do something like this, but that example seems crazy bloated. I don't know what to call it to start looking for tutorials though.
Hotspots maybe?
It's not that hard though. Place the marker absolutely above the picture with percentage values to make it responsive, and open the tooltip with a tooltip library or by yourself.
Cheers. Thanks again. Okay, so I got the absolute and all that good jazz, but I'm not grasping how to make it responsive.
Jfiddle: https://jsfiddle.net/d1L06o08/1/
It's fine at fullsize, but on resize the markers move. How can I prevent that?
Your markers are absolutely positioned, yes, but relatively to the body.
Put everything inside a "position: relative" container instead.
https://jsfiddle.net/asnvupqx/1/
Ah, shit. lol. Thanks.
Anybody know of a good, mobile friendly way of using popovers? Is there a standard js plugin or way to use pure CSS?
How do you trigger it then on tap and click without js?