Modern Web Development
jtaby.com
jtaby.com
Majd and I have talked a lot about tooling and the Chrome DevTools in particular. He ends up tweeting me a few requests or bugs a day that I'm routing to the engineering team. I love it.
Majd's writeup here is incredible. I hope to find a way to augment our existing documentation with this very thorough roundup. He's done a similar thing before ( http://jtaby.com/2011/05/31/google-chrome-why-i-hate-it-and-... ) and the Chrome team filed and fixed 33 bugs as a result. For the new article in particular, I expect us to iterate and improve based on the excellent feedback provided here.
I would add that CSS Selector Profiling is mostly in the DevTools so you can see how insignificant of a cost it is (in 99% of cases). But focusing on your network waterfall will pay performance dividends a few orders of magnitude bigger than optimizing selectors. :) That said, Majd knows what he's talking about quite well.
Otherwise, thanks to the team for the improvements that I've been seeing lately!
+ https://launchpad.net/~chromium-daily/+archive/stable (Stable Channel)
+ https://launchpad.net/~chromium-daily/+archive/beta (Beta Channel)
+ https://launchpad.net/~chromium-daily/+archive/dev (Dev Channel)
+ https://launchpad.net/~chromium-daily/+archive/ppa (trunk/daily builds)
+ https://launchpad.net/~chromium-daily/+archive/ppa (trunk/daily builds)
That said, it used to be actual dailies, but updates have been very spotty the last 4 months or so. I'm not sure why. When it was updated ~daily, it would sometimes break so it's not for everyone. I run it as my main browser and I've had to downgrade once. Now that it's updated less frequently it's been more stable (obviously).
I would have added this info in my original comment, but I was posting from the phone. Adding it to your sources is as simple as:
sudo add-apt-repository ppa:chromium-dailyI hope Chrome will have this feature in the future.
Google is in an interesting position. Of all of the major Silicon Valley tech companies, I think Google is the one most seen as the "web" company, and yet they've staked a lot of their future on Android. Android, instead of making the web a first-class citizen, has in fact set the mobile web back by years. While they should have worked to bring all of the strengths of the web to mobile devices, they decided to play the app game on Apple's terms and, IMO, have lost.
Surely someone at Google realizes that killing the open web also kills the company's cash cow--search and related advertising--but based on their behavior it doesn't seem like it.
My hope is that the Android wakes up and decides to make the web a priority again. In league with the Chrome team (some of the smartest people I've ever met), they could do wonders to make developing for the mobile web a joy instead of the disaster that it currently is. Google needs focus, and it needs its focus to be on the mobile web. Having great, unified documentation about building sophisticated web apps that competes with Apple's Developer Centers is a good start to doing so.
Steve Jobs started it. Everyone will follow it to the bitter end.
Sometimes it's useful to pretend that what you were going to do all along was merely a concession to outside demand.
> this is really the kind of content that should be coming
> out of Google itself.
What does this blog post do which the official docs don't?E.g., https://developers.google.com/chrome-developer-tools/docs/sc...
Also has a part on remote debugging which the article doesn't.
Chrome Beta needs to be backported to at least 2.3
Can anyone explain why this is such a problem? Does Android not have a proper hardware abstraction layer or driver model that would allow OS updates immediately, as long as these layers remained compatible and a build existed for your processor family?
Windows has supported disparate hardware configurations for many, many years. Yet, generally, you can run out and buy the new version and install it. Why can't Android do this (albeit with a version for each processor)?
For example, I worked on an app to be included with the device by the OEM. The OEM had roll a custom OS and kernel to handle their hardware and replace/update the mail and calender app because they are very tied to Google by default. We needed hooks into the the mail and calendar app in ways that are not supported by Google so the OEM also had to add those hooks for us. At this point, we were deep into unsupported territory by Google, but supported by the OEM. These things change unexpectedly with minor OS updates from Google which make them brittle to maintain. An update to a newer OS would be a hell of a lot of work.
All that said, if we could have based off of 3.0 instead of 2.3, many of these issues would not exist because of some abstraction layers added just for this purpose. I expect 4.0 to make that even nicer.
Too bad the providers have to degrade the experience with their crap, instead of just providing additional apps if they feel it's necessary.
Android, instead of making the web a first-class citizen,
has in fact set the mobile web back by years.
I don't know how you can come to this conclusion. Android has made an excellent mobile web browser available to over a quarter of a billion people.And how is the web not first-class? Google even started Web Intents to interoperate web apps with native apps.
A browser without decent SNI support, with broken XPATH support and really various shortcomings was outdated when it came out - and neglected afterwards.
<this post is partially for those of you who are, like me, relatively new to javascript. If you're one of the demigods that works at twitter/facebook, go ahead and ignore this>
I've been transitioning all of my projects from python cgi scripts (yuck), to shtml files, javascript clients, and APIs that run on node.js.
For somebody like me, that has been writing python+cgi for the last 5 years, diving into javascript was daunting. Terrifying even.
Console made this a lot, lot, lot easier. In javascript, you can call
console.log("thing")
and it will print it out to the console (again, this is obvious if you're done any JS development, I'm sure).But that isn't all...
Suppose that I'm working with an object called map_pins. In the javascript console, I can just type:
map_pins;
and it will print out the object for me in a tree that I can traverse by clicking the little sideways triangles.Very, very nice.
I can also interact with my javascript functions from the console. If I have a function called update_bounds(), I can force it to fire from the console by just typing:
update_bounds()
This is really, really nice. Before I discovered this, my javacsript was full of alert("I made it to this without crashing");It was awful.
If you're learning JS and OP's article looks over your head, at least take the console away from it.
See also:
https://bugs.webkit.org/show_bug.cgi?id=35801
Let's put aside any frustration that 16x9 is even usable much less desirable for any office work.
I especially like the source maps, which allow you to debug code cross-compiled from another language in that other language. http://www.html5rocks.com/en/tutorials/developertools/source...
I can either try to submit a patch and likely fail, or blog about it. Last time I complained to Google about Chrome, they filed 33 bugs and fixed many of them. The point here is to be an agent of change, not an agent of patches :)
Aside from the obvious - branding and stability - It's mainly the commercial stuff (MP3, PDF, Flash) which can't be distributed under Chromium's license.
But this is still a valid point in the sense that Chromium is run much more in the spirit of an open-source project than other large-scale commercial open source efforts. External patches do make their way into Chromium.
Don't get me wrong, I do the same thing, but you have to admit there is a certain dry humor in the fact that you recommended as a best practice to develop exclusively in a cutting edge build of a standards-based browser, only to find that your website is broken in every browser except your development one.
Anyone else in this boat?
It displays DOM properties and their current state. That's pretty important to any web developer.
Here is more about Heap Profiling from the horses mouth https://developers.google.com/chrome-developer-tools/docs/he...
Not sure why no one else is commenting about it though..
Also, files in the Scripts can be edited by double clicking.
data:text/html,<b>ZOMG I AM BOLD!?!!?</b>
That's one of the best tips I've learned in a while. Thanks a bunch.It most likely should be something like "Safari (stable build)", and similar for the others.
Thanks for the write-up.